Update Basket - Charges Run in API Explorer
Ask AI
PATCH
/commerce/{accountId}/baskets/{basketId}/charges
curl \
--request PATCH 'https://api.staging.deliverect.com/commerce/{accountId}/baskets/{basketId}/charges' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '[{"chargeType":"serviceCharge","type":"fixed","value":500,"taxRate":0}]'
Request example
[
{
"chargeType": "serviceCharge",
"type": "fixed",
"value": 500,
"taxRate": 0
}
]
Response examples (200)
{
"id": "6846dec388f9ddb3b0147c33",
"created": "2025-06-09T13:16:51.472000+00:00",
"updated": "2025-06-09T13:17:18.219000+00:00",
"deleted": false,
"etag": "38654a00ccfee91784411382ca379dd73fe05121",
"accountId": "65c35d109a19b819b7cf78d8",
"storeId": "65eee6a9984a1bc1b9637c59",
"channelLinkId": "65eee6a9984a1bc1b9637c59",
"channel": 20000,
"channelOrderId": null,
"channelOrderDisplayId": null,
"currency": "EUR",
"taxExclusive": false,
"status": "open",
"items": [],
"payment": {
"tips": [],
"discountsTotal": 0,
"chargesTotal": 1000,
"taxTotal": 0,
"tipTotal": 0,
"total": 1000
},
"customer": {
"name": "Test",
"companyName": "Company LTDA",
"phoneNumber": "12345",
"email": "test@email.com",
"externalId": "ext_458d3f2432858ffdfs",
"loyaltyProviderCustomerId": null
},
"fulfillment": {
"type": "pickup",
"time": null
},
"taxes": [],
"discounts": [],
"charges": {
"serviceCharge": {
"value": 500,
"taxRate": 0,
"gross": 0,
"tax": 0,
"net": 0,
"type": "fixed"
},
"bagFee": {
"value": 300,
"taxRate": 0,
"gross": 300,
"tax": 0,
"net": 300
},
"deliveryFee": {
"value": 700,
"taxRate": 0,
"gross": 700,
"tax": 0,
"net": 700
},
"taxTotal": 0,
"netTotal": 1000,
"grossTotal": 1000
}
}
Response examples (400)
{}