Developer Hub

Shopping test requests

Test your handling of possible shopping error states.

Important notes

  • To send a test request for the Rapid Shopping API method, include an additional HTTP header named test in your booking request and use the appropriate value from the tables below.
  • Failing to send a test header or sending an invalid test header will cause the shopping to be processed live.
  • Using a test header returns a static 'canned' response. Therefore, rates/content etc. returned may not be relevant with the properties being tested.
  • A Price Check token or link returned from a Shop request using a test header should not be reused in a stubbed Price Check request. Attempting to reuse that token or link may result in 400 invalid_input.
  • For Rapid Price Check when using a test header, the request should be formatted as /properties/{property_id}/rooms/{room_id}/rates/{rate_id}.
  • When a valid test header value is included, the property_id, room_id, and rate_id do not need to come from a previous Shop response. Any numeric values can be used to return the canned Price Check response.

Shop

Test header valueHTTP code and responseStatus
standard200 - Standard responseavailable
no_availability200 - Standard responsesold_out
unknown_internal_error500 - Internal errorN/A
service_unavailable503 - Service unavailable errorN/A
marketing_fee_details200 - Standard responseavailable

Price Check

Test header valueHTTP code and responseStatus
available200 - Standard responseavailable
price_changed200 - Standard responseprice_changed
sold_out200 - Standard responsesold_out
unknown_internal_error500 - Internal errorNA
service_unavailable503 - Service unavailable errorNA
marketing_fee_details200 - Standard responseavailable

Deposit policy

Test header valueHTTP code and response
all200 - Standard response with all options
night200 - Standard night-based deposit response
amount200 - Standard amount-based deposit response
percent200 - Standard percentage-based deposit response
remainder200 - Standard remainder-based deposit response
unknown_internal_error500 - Internal error
service_unavailable503 - Service unavailable error

For more information on HTTP error codes see common error responses.

Was this page helpful?
How can we improve this content?
Thank you for helping us improve!