Promocodes

Discounts & Offers

Add Promocode

post

This API is called to apply promocodes on a reservation.

Promocode Functionality:

  • To add a promocode to the Cart / Reservation, add the applicable promocode to the query. The promocode will automatically be added to the Cart and the updated prices will be returned in the response.

  • There could be multiple reasons for a promocode to be declined. For example, insufficient cart balance, expired, already used etc. In this case an error INVALID_PROMOCODE will be returned with a customer friendly message which can be shown on your front-end.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired

OAuth2 implementation.

Token URL:
Path parameters
reservation_referencestring · min: 8Required

A unique identifier got in response of the reservation_reference API.

Example: ORDRREF123456
Query parameters
promo_codestringRequired

The promocode which should be applied to the cart.

Example: PROMOCODE_123
Responses
chevron-right
200

Promocode Added

application/json
post
/reservations/{reservation_reference}/promocode

Remove Promocode

delete

This API is called to remove an applied promocode on a reservation. If a DELETE method is successfully applied, the origin server SHOULD send a 200 (Promocode Removed) status code if the action has been enacted. The new reservation will be returned with the updated prices.

If a promocode or an existing order applied with a promocode is cancelled, the use count will be restored.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
Authorizations
OAuth2clientCredentialsRequired

OAuth2 implementation.

Token URL:
Path parameters
reservation_referencestring · min: 8Required

A unique identifier got in response of the reservation API.

Example: RESREF123
promo_codestringRequired

The promocode which should should be removed from the cart.

Example: PROMOCODE_123
Responses
chevron-right
200

Promocode Removed

application/json
delete
/reservations/{reservation_reference}/promocode/{promo_code}

Last updated

Was this helpful?