Skip to main content
PATCH
/
api
/
charge_lines
/
{id}
Update a charge line
curl --request PATCH \
  --url https://clarus-api.com/api/charge_lines/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "data": {
    "type": "charge_lines",
    "attributes": {
      "charge_basket_id": 123,
      "charge_price_id": 123,
      "code": "<string>",
      "description": "<string>",
      "goods_out_id": 123,
      "goods_out_pick_list_id": 123,
      "inbound_good_id": 123,
      "inbound_item_id": 123,
      "name": "<string>",
      "price": 1,
      "product_id": 123,
      "quantity": 1,
      "storage_unit_id": 123
    }
  }
}
'
{
  "data": {
    "id": 123,
    "type": "charge_lines",
    "attributes": {
      "id": 1,
      "code": "PICK-001",
      "name": "Picking Charge",
      "description": null,
      "charge_type": "PICK",
      "quantity": 10,
      "price": 0.5
    }
  }
}

Request Structure

{
  "data": {
    "type": "charge_lines",
    "attributes": {
      "quantity": 15,
      "price": 0.75,
      "description": "Updated picking charge"
    }
  }
}

Key Fields

FieldRequiredDescription
quantityNoUpdated quantity
priceNoUpdated price per unit
descriptionNoUpdated description

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

id
integer
required

The unique identifier of the charge line to update

Body

application/json
data
object
required

Response

Charge line updated successfully

data
object