Add external taxation information to a basket.
Operation ID: addTaxesForBasketThis method allows you to apply external taxation data to an existing basket to be able to pass tax rates and optional values for all taxable line items. This endpoint can be called only if external taxation mode was used for basket creation. See POST /baskets for more information.
curl "https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/v2/organizations/{organizationId}/baskets/{basketId}/taxes?siteId=RefArch" \
-X PUT \
-H "content-type: application/json" \
-d '{
"taxes": {
"3d4e28425ce0b3a65b0ac4e163": {
"taxItems": [
{
"id": "DE_7",
"rate": 0.07,
"value": 13.99
},
{
"id": "DE_19",
"rate": 0.19
}
]
},
"ff9452ed11fcf5c80f9143a8f1": {
"taxItems": [
{
"id": "US_1",
"rate": 0.01
},
{
"id": "US_5",
"rate": 0.05
}
]
}
}
}'
An identifier for the organization the request is being made by
f_ecom_zzxy_prd
The ID of the basket to be modified.
The identifier of the site that a request is being made in the context of. Attributes might have site specific values, and some objects may only be assigned to specific sites
RefArch
{
"taxes": {
"3d4e28425ce0b3a65b0ac4e163": {
"taxItems": [
{
"id": "DE_7",
"rate": 0.07,
"value": 13.99
},
{
"id": "DE_19",
"rate": 0.19
}
]
},
"ff9452ed11fcf5c80f9143a8f1": {
"taxItems": [
{
"id": "US_1",
"rate": 0.01
},
{
"id": "US_5",
"rate": 0.05
}
]
}
}
}
Map containing the TaxItems for the line item ids: Map<LineItemId, TaxItems []>
Success, without body.