# Update Consumables for the Appointment-Service Association

Endpoint: PUT /technological_cards/record_consumables/consumables/{location_id}/{record_id}/{service_id}
Version: 1.0.0
Security: BearerPartnerUser

## Security:

  - `BearerPartnerUser` (unknown)
    http bearer Bearer {PartnerToken}, User {UserToken}

## Path parameters:

  - `location_id` (number, required)
    Location ID

  - `record_id` (number, required)
    Appointment ID

  - `service_id` (number, required)
    Service ID

## Header parameters:

  - `Accept` (string, required)
    e.g. application/vnd.api.v2+json

  - `Content-Type` (string, required)
    application/json

  - `Authorization` (string, required)
    Bearer partner_token, User user_token

## Request fields (application/json):

  - `consumables` (array)
    List of consumables

  - `consumables.goods_transaction_id` (number, required)
    commodity transaction id

  - `consumables.record_id` (number, required)
    appointment id

  - `consumables.service_id` (number, required)
    service id

  - `consumables.storage_id` (number, required)
    inventory id

  - `consumables.good_id` (number, required)
    product id

  - `consumables.price` (number, required)
    the cost of the consumable in the appointment

  - `consumables.amount` (number, required)
    the number of consumables in the appointment

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `success` (boolean)
    Execution success status (true)

  - `data` (array)
    Array of objects with data

  - `data.service_id` (number)
    Service ID

  - `data.record_id` (number)
    Appointment ID

  - `data.technological_cards` (array)
    Technological cards

  - `data.technological_cards.id` (number)
    ID of those cards

  - `data.technological_cards.title` (string)
    The name of those cards

  - `data.technological_cards.technological_card_items` (array)
    Those consumables cards

  - `data.technological_cards.technological_card_items.id` (number)
    Consumable ID

  - `data.technological_cards.technological_card_items.technological_card_id` (number)
    Dash ID

  - `data.technological_cards.technological_card_items.storage_id` (number)
    Inventory ID

  - `data.technological_cards.technological_card_items.good_id` (number)
    Product ID

  - `data.technological_cards.technological_card_items.amount` (number)
    Quantity

  - `data.technological_cards.technological_card_items.price` (number)
    Price

  - `data.technological_cards.technological_card_items.good` (object)
    Product

  - `data.technological_cards.technological_card_items.good.id` (number)
    Product ID

  - `data.technological_cards.technological_card_items.good.title` (string)
    Product Name

  - `data.technological_cards.technological_card_items.good.unit` (string)
    unit of measurement

  - `data.consumables` (array)

  - `data.consumables.goods_transaction_id` (number)
    Commodity transaction ID

  - `data.consumables.record_id` (number)
    Appointment ID

  - `data.consumables.service_id` (number)
    Service ID

  - `data.consumables.storage_id` (number)
    Inventory ID

  - `data.consumables.good_id` (number)
    Product ID

  - `data.consumables.price` (number)
    Price

  - `data.consumables.amount` (number)
    Quantity

  - `data.consumables.good` (object)
    Product

  - `data.consumables.good.id` (number)
    Product ID

  - `data.consumables.good.title` (string)
    Product Name

  - `data.consumables.good.unit` (string)
    unit of measurement

  - `meta` (array)
    Metadata (empty array)

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Authentication needed.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object)
    Additional response data.

  - `meta.message` (string)
    Error message.
    Example: Access denied.

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `success` (boolean)
    Response status.
    Example: false

  - `data` (object | null)
    Response data.
    Example: null

  - `meta` (object | array)
    Additional response data (empty object or empty array)
    Example: {}

