Shipping discount data in order details
What's new
From now on, order details will contain additional discount details if the discount was applied to shipping.
Changes in API
New object with shipping discounts was added to GET
/orders/{orderId}
, GET
/orders
, GET
/orders/last
and similar endpoints.
shippingOptionDiscount
object is added to for the discountType
field in promotion endpoints. Additionally requires "dicountType": ITEM
to work.
Example JSON with shipping discount details:
{
"id": "GGGS4QVE",
"subtotal": 50,
"total": 73,
"discount": 2,
"shippingOption": {
"shippingMethodId": "6589-1709547151586",
"shippingMethodName": "Standard shipping",
"shippingRate": 20,
"shippingRateWithoutTax": 20,
"isPickup": false,
"fulfillmentType": "SHIPPING",
"isShippingLimit": false,
"discount": {
"id": 75672138,
"value": 10,
"type": "PERCENT",
"base": "SHIPPING",
"orderTotal": 50,
"description": "10% off on cart total above €50,00",
"appliesToItems": [],
"appliesToOrderItems": [],
"triggeredByOrderItems": [],
"appliesToShippingMethodId": "6589-1709547151586"
}
},
Documentation links
Get orderLast updated
Was this helpful?