PATCH /commerce/{accountId}/baskets/{basketId}/charges

Path parameters

  • accountId string Required
  • basketId string Required
application/json

Body

  • RAW_BODY array[object] Required

    charges

    Hide RAW_BODY attributes Show RAW_BODY attributes object
    • chargeType string

      Values are serviceCharge, bagFee, or deliveryFee.

    • type string Required

      Values are fixed or percent.

    • value integer(int32) Required
    • taxRate integer(int32)

      Tax Rate - For 10%, input 10000

      Default value is 0.

Responses

  • 200 application/json

    200

    Hide response attributes Show response attributes object
    • id string
    • created string
    • updated string
    • deleted boolean

      Default value is true.

    • etag string
    • accountId string
    • storeId string
    • channel integer

      Default value is 0.

    • currency string
    • taxExclusive boolean

      Default value is true.

    • status string
    • items array
    • payment object
      Hide payment attributes Show payment attributes object
      • tips array
      • discountsTotal integer

        Default value is 0.

      • chargesTotal integer

        Default value is 0.

      • taxTotal integer

        Default value is 0.

      • tipTotal integer

        Default value is 0.

      • total integer

        Default value is 0.

    • customer object
      Hide customer attributes Show customer attributes object
      • name string
      • companyName string
      • phoneNumber string
      • email string
      • externalId string
    • fulfillment object
      Hide fulfillment attribute Show fulfillment attribute object
      • type string
    • taxes array
    • discounts array
    • charges object
      Hide charges attributes Show charges attributes object
      • serviceCharge object
        Hide serviceCharge attributes Show serviceCharge attributes object
        • value integer

          Default value is 0.

        • taxRate integer

          Default value is 0.

        • gross integer

          Default value is 0.

        • tax integer

          Default value is 0.

        • net integer

          Default value is 0.

        • type string
      • bagFee object
        Hide bagFee attributes Show bagFee attributes object
        • value integer

          Default value is 0.

        • taxRate integer

          Default value is 0.

        • gross integer

          Default value is 0.

        • tax integer

          Default value is 0.

        • net integer

          Default value is 0.

      • deliveryFee object
        Hide deliveryFee attributes Show deliveryFee attributes object
        • value integer

          Default value is 0.

        • taxRate integer

          Default value is 0.

        • gross integer

          Default value is 0.

        • tax integer

          Default value is 0.

        • net integer

          Default value is 0.

      • taxTotal integer

        Default value is 0.

      • netTotal integer

        Default value is 0.

      • grossTotal integer

        Default value is 0.

  • 400 application/json

    400

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 '[{"type":"fixed","value":500,"taxRate":0,"chargeType":"serviceCharge"}]'
Request example
[
  {
    "type": "fixed",
    "value": 500,
    "taxRate": 0,
    "chargeType": "serviceCharge"
  }
]
Response examples (200)
{
  "id": "6846dec388f9ddb3b0147c33",
  "etag": "38654a00ccfee91784411382ca379dd73fe05121",
  "items": [],
  "taxes": [],
  "status": "open",
  "channel": 20000,
  "charges": {
    "bagFee": {
      "net": 300,
      "tax": 0,
      "gross": 300,
      "value": 300,
      "taxRate": 0
    },
    "netTotal": 1000,
    "taxTotal": 0,
    "grossTotal": 1000,
    "deliveryFee": {
      "net": 700,
      "tax": 0,
      "gross": 700,
      "value": 700,
      "taxRate": 0
    },
    "serviceCharge": {
      "net": 0,
      "tax": 0,
      "type": "fixed",
      "gross": 0,
      "value": 500,
      "taxRate": 0
    }
  },
  "created": "2025-06-09T13:16:51.472000+00:00",
  "deleted": false,
  "payment": {
    "tips": [],
    "total": 1000,
    "taxTotal": 0,
    "tipTotal": 0,
    "chargesTotal": 1000,
    "discountsTotal": 0
  },
  "storeId": "65eee6a9984a1bc1b9637c59",
  "updated": "2025-06-09T13:17:18.219000+00:00",
  "currency": "EUR",
  "customer": {
    "name": "Test",
    "email": "test@email.com",
    "externalId": "ext_458d3f2432858ffdfs",
    "companyName": "Company LTDA",
    "phoneNumber": "12345",
    "loyaltyProviderCustomerId": null
  },
  "accountId": "65c35d109a19b819b7cf78d8",
  "discounts": [],
  "fulfillment": {
    "time": null,
    "type": "pickup"
  },
  "taxExclusive": false,
  "channelLinkId": "65eee6a9984a1bc1b9637c59",
  "channelOrderId": null,
  "channelOrderDisplayId": null
}
Response examples (400)
{}