JSON API - VALIDATEPROMOTION
Checks whether a promotion code is valid or not using book commands. This API only validates the promotion by creating a temporary cart using the supplied bookcommands. It does not create a reservation nor apply a promotion to a reservation. After validating a promotion, it can be applied by including it in the BOOK API request.
Input
transtype- “VALIDATEPROMOTION”login- API user loginpassword- API user passwordbookrequest- A JSON object string containing an array ofbookcommandobjects and an array ofpromotionobjectsbookcommands- A JSON array ofbookcommandobjects representing the services be used in the validation of the promotion.bookcommandsare obtained from the SHOP API.promotion- A JSON array of containing the promotion code to validate. Currently you can only validate one promotion at a time.promotionid- string - The promotion code to be validated
Example
transtype=VALIDATEPROMOTION
&login=MyLogin
&password=MyPassword
&bookrequest={
"bookcommands": [
{
"productcode": "MYPRODUCT",
"brandid": "MYBRAND"
"itemnumber": 100,
"inclusionnumber": 10,
"supplierid": "US-PHLSFT",
"serviceid": "SVC1",
"departuredate": "2025-11-08",
"duration": 4,
"mask": "AA",
"qcurrency": "USD",
"sellmethod": "WEB"
},
{
"productcode": "MYPRODUCT",
"brandid": "MYBRAND"
"itemnumber": 9999,
"inclusionnumber": 20,
"supplierid": "US-PHLSFT",
"serviceid": "TRF1",
"departuredate": "2025-11-08",
"duration": 1,
"mask": "AA",
"qcurrency": "USD",
"sellmethod": "WEB"
}
],
"promotions": [
{
"promotionid": "EARLYBIRDDISCOUNT"
}
]
}Output
If the promotion is valid, the
errormessagefield will be empty and the amount of the discount will be in thetotaldiscountfield in thepromotionobject.If the promotion is not valid, the
errormessagefield in the response will contain a message indicating why.