Orders
Apply a discount to an order
Use this endpoint to apply the discount from a DiscountType to an order.
post/shop/orders/{orderId}/discounts
Request body
Example request
{
"discount_type_code": "SUMMER23",
"discount_amount": 15,
"amount_type": "percentage",
"reason_code": "coupon"
}Response
The OrderDiscount was successfully applied.
Example response
{
"data": [
{
"discount_type_code": "SUMMER23",
"applicable_for": "app_and_booking_engine",
"amount_type": "percentage",
"discount_amount": 15,
"calculated_amount": 150,
"currency": "gbp",
"reason_code": "coupon",
"coupon": {
"code": "FIVEOFF",
"name": "April special",
"description": "Get 10% off all treatments booked in April."
},
"applied_by": {
"avatar": {
"file_name": "super-cool-photo.jpg",
"mime_type": "image/jpeg",
"original_url": "https://example.com/media/super-cool-photo.jpg",
"size": 84256,
"url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
},
"first_name": "Jane",
"full_name": "Jane Smith",
"last_name": "Smith"
}
}
]
}Changes
No recorded changes to this endpoint across all 1 revision of this API.