Skip to main content
POST
/
api
/
charge_baskets
Create a charge basket
curl --request POST \
  --url https://clarus-api.com/api/charge_baskets \
  --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": {
      "account_id": 1,
      "charge_card_id": 1,
      "start_at": "2026-03-01T00:00:00Z"
    }
  }
}

Required Fields

FieldDescription
account_idAccount to associate the basket with
charge_card_idCharge card (billing profile) to use
start_atStart date/time for the billing period

Optional Fields

FieldDescription
end_atEnd date/time for the billing period
statusBasket status: OPEN or CLOSED (defaults to OPEN)

Important Notes

  • Each account typically has one open basket at a time
  • The invoice_status field is system-managed and cannot be set via the API

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.

Body

application/json
data
object
required

Response

Charge Basket created successfully

data
object