Update Basket - Tips Run in API Explorer
Ask AI
Sets the desired tip(s) and recalculates the basket price.
PATCH
/commerce/{accountId}/baskets/{basketId}/payment
curl \
--request PATCH 'https://api.staging.deliverect.com/commerce/{accountId}/baskets/{basketId}/payment' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"tips":[{"type":"restaurant","amount":100}]}'
Request example
{
"tips": [
{
"type": "restaurant",
"amount": 100
}
]
}
Response examples (200)
{
"id": "6643782d0c1914c93a846834",
"etag": "d8ac2d392f6a89d80376174d19cbe84b8b65d637",
"items": [
{
"net": 1500,
"plu": "STK-01",
"name": "Delicious Steak Frites",
"gross": 1500,
"price": 1500,
"taxes": [],
"menuId": "62d7f77f64c95193cc29aa91",
"quantity": 1,
"subItems": [],
"discounts": [],
"discountTotal": 0
}
],
"taxes": [],
"status": "open",
"created": "2024-05-14T14:41:49.738000+00:00",
"deleted": false,
"payment": {
"tips": [
{
"type": "restaurant",
"amount": 100
}
],
"total": 1600,
"taxTotal": 0,
"tipTotal": 100,
"discountsTotal": 0
},
"storeId": "65eee6a9984a1bc1b9637c59",
"updated": "2024-05-14T15:28:33.188000+00:00",
"currency": "EUR",
"customer": {
"name": "Test",
"email": "test@email.com",
"companyName": "Company LTDA",
"phoneNumber": "12345"
},
"accountId": "65c35d109a19b819b7cf78d8",
"discounts": [],
"fulfillment": {
"type": "pickup"
},
"taxExclusive": false,
"channelLinkId": "65eee6a9984a1bc1b9637c59",
"channelOrderId": null,
"channelOrderDisplayId": null
}
Response examples (400)
{}