This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Applies booking fees to an eCommerce order.
The booking fees are added as a single additional fee to the eCommerce order.
The order's additionalFee.lineItemIds
array is set to the list of corresponding
booking IDs. By default, the additionalFee.price.amount
is the sum of all
booking fee prices. But you may provide a priceOverride
instead. The override
price can't be higher than the sum of all booking fees.
Apply Booking Fees to Order also updates the prices of all affected line items
in the relevant eCommerce order to zero. After a cancellation fee is applied
to an eCommerce order, the cancellation fee's price.value
is updated to 0.00
and its trigger is set to UNKNOWN_TRIGGER
. You can retrieve the fee amount
from the corresponding additionalFee
object of the eCommerce order with
Search Orders.
If you apply multiple booking fees to an eCommerce order, they either all fail or all succeed together. For example, the call fails if the booking fees are associated with different eCommmerce orders.
IDs of the bookings for which to apply booking fees to an eCommerce order.
Custome price override for the additional fee that's added to the eCommerce
order. The override mustn't exceed the sum of all booking fees. You must have
the OVERRIDE_BOOKING_FEE_PRICE
permission to use this property.
Information about the message to the business and whether to send it if the booking fee application to the eCommerce order fails.
Booking fees that were applied as a single additional fee to the eCommerce order.
Information about the eCommerce order to which the booking fees are applied.
curl -X POST \
'https://www.wixapis.com/_api/booking-fees/v1/booking-fees/apply' \
-H 'Authorization: <AUTH>' \
-d '{
"bookingIds": [
"a717b687-aaa8-4e35-85ba-adbd88bbadd8",
"ff04b4b3-b386-4db1-8990-60c5ec6f4229"
]
}'
{
"bookingFees": [
{
"id": "a717b687-aaa8-4e35-85ba-adbd88bbadd8",
"bookingId": "a717b687-aaa8-4e35-85ba-adbd88bbadd8",
"cancellationFee": {
"price": {
"value": "5.0",
"currency": "USD"
},
"status": "APPLIED_TO_ORDER",
"trigger": "NOT_ATTENDED"
},
"policyDetails": {
"id": "295e2750-852f-4c52-9693-fc6c0d0c587b",
"description": "This is our policy"
}
},
{
"id": "ff04b4b3-b386-4db1-8990-60c5ec6f4229",
"bookingId": "ff04b4b3-b386-4db1-8990-60c5ec6f4229",
"cancellationFee": {
"price": {
"value": "5.0",
"currency": "USD"
},
"status": "APPLIED_TO_ORDER",
"trigger": "NOT_ATTENDED"
},
"policyDetails": {
"id": "295e2750-852f-4c52-9693-fc6c0d0c587b",
"description": "This is our policy"
}
}
],
"ecomOrderInfo": {
"orderId": "f8131b11-4a40-461e-939e-f67961ecf593",
"additionalFeePrice": {
"amount": "10.0",
"formattedAmount": "$10.00"
}
}
}
There is 1 error with this status code.
There are 2 errors with this status code.
There is 1 error with this status code.
There are 9 errors with this status code.
There are 2 errors with this status code.
This method may also return standard errors. Learn more about standard Wix errors.