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"
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_baskets/{id}"
payload = { "data": {
"type": "charge_baskets",
"attributes": {
"account_id": 1,
"charge_card_id": 1,
"start_at": "2026-03-01T00:00:00Z"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'charge_baskets',
attributes: {account_id: 1, charge_card_id: 1, start_at: '2026-03-01T00:00:00Z'}
}
})
};
fetch('https://clarus-api.com/api/charge_baskets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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"
}
}
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Charging: Baskets
Update a charge basket
Update an existing charge basket’s attributes.
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"
}
}
}
'import requests
url = "https://clarus-api.com/api/charge_baskets/{id}"
payload = { "data": {
"type": "charge_baskets",
"attributes": {
"account_id": 1,
"charge_card_id": 1,
"start_at": "2026-03-01T00:00:00Z"
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {
type: 'charge_baskets',
attributes: {account_id: 1, charge_card_id: 1, start_at: '2026-03-01T00:00:00Z'}
}
})
};
fetch('https://clarus-api.com/api/charge_baskets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"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"
}
}
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "charge_baskets",
"attributes": {
"status": "CLOSED",
"end_at": "2026-03-31T23:59:59Z"
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
status | No | Update basket status (OPEN/CLOSED) |
end_at | No | Set or update the billing period end date |
start_at | No | Update the billing period start date |
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Path Parameters
The unique identifier of the charge basket to update
Body
application/json
Show child attributes
Show child attributes
Response
Charge Basket updated successfully
Show child attributes
Show child attributes
⌘I

