Skip to main content
PATCH
/
api
/
charge_baskets
/
{id}
Update a charge basket
curl --request PATCH \
  --url https://clarus-api.com/api/charge_baskets/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "data": {
    "type": "charge_baskets",
    "attributes": {
      "account_id": 1,
      "charge_card_id": 1,
      "start_at": "2026-03-01T00:00:00Z"
    }
  }
}
'
{
  "data": {
    "id": "<string>",
    "type": "charge_baskets",
    "attributes": {
      "end_at": null,
      "id": 1,
      "invoice_status": "not_invoiced",
      "start_at": "2026-03-01T00:00:00Z",
      "status": "OPEN"
    },
    "relationships": {
      "account": {
        "data": {
          "id": "<string>",
          "type": "accounts"
        }
      },
      "charge_card": {
        "data": {
          "id": "<string>",
          "type": "charge_cards"
        }
      }
    }
  }
}

Request Structure

{
  "data": {
    "type": "charge_baskets",
    "attributes": {
      "status": "CLOSED",
      "end_at": "2026-03-31T23:59:59Z"
    }
  }
}

Key Fields

FieldRequiredDescription
statusNoUpdate basket status (OPEN/CLOSED)
end_atNoSet or update the billing period end date
start_atNoUpdate the billing period start date

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 basket to update

Body

application/json
data
object
required

Response

Charge Basket updated successfully

data
object