Testing

The sandbox environment includes additional endpoints for testing webhooks. Sending a request to these endpoints transforms it into a request for your webhook service. Using these endpoints allows suppliers to test their integration before going live.

Diagram of testing flowSupplierPORTASend test request200 status code responseSend webhook requestSupplierPORTADiagram of testing flow

The request bodies must contain most of the same properties expected for real requests. Suppliers need to generate values for some properties, while others should come from existing properties in the sandbox environment.

Properties used across multiple webhook requests must contain consistent values. Generated values cannot always be completely random.

Hold availability

You can send yourself a hold availability request in the sandbox environment at POST /supplier/integration-tests/hold:
Request Body schema: application/json
experience_id
required
string^(?!\-|\.|\_)[0-9a-z\-\.\_]{1,50}$

The ID for an existing sandbox experience.

expiration_time
required
string <date-time>

When the hold availability request can expire, based on the agreed upon hold_duration value.

The value for this property must be in the local time for the experience with no time zone information, following the ISO 8601 standard.

hold_id
required
string <uuid>

A randomly-generated UUID. The same hold_id value must be used when testing the booking confirmation webhook.

option_id
required
string^(?!\-|\.|\_)[0-9a-z\-\.\_]{1,50}$

The ID for an existing sandbox option.

pickup_id
string^(?!\-|\.|\_)[0-9a-z\-\.\_]{1,50}$

The ID for an existing sandbox pickup, if any.

required
Array of objects unique

An array of the requested holder categories and their quantities.

slot_id
required
string^(?!\-|\.|\_)[0-9a-z\-\.\_]{1,50}$

The ID for an existing sandbox availability slot.

A valid request returns an empty 200 status code response. Request errors return a 400 status code response.

Booking confirmation

You can send yourself a booking confirmation request at POST /supplier/integration-tests/book:
Request Body schema: application/json
booking_id
required
string <uuid>

A randomly-generated UUID. The same booking_id value must be used when testing the booking cancellation webhook.

required
Array of objects unique

An array of items for the booking.

hold_id
required
string

The ID of the sandbox hold availability request.

required
object

Randomly-generated lead booker information.

pickup_id
string^(?!\-|\.|\_)[0-9a-z\-\.\_]{1,50}$

The ID of an existing sandbox pickup, if any.

Note that the location of this property differs from its location in the confirmation request sent to your webhook service.

slot_id
required
string^(?!\-|\.|\_)[0-9a-z\-\.\_]{1,50}$

The ID of an existing sandbox availability slot.

Note that the location of this property differs from its location in the confirmation request sent to your webhook service.

request_id
required
string <uuid>

In production this property reflects PORTA's own ID for the item in the webhook request. Here, it can be a randomly-generated UUID. The same request_id value will appear in the request sent to the webhook service.

Note that the location of this property differs from its location in the confirmation request sent to your webhook service.

Please note that the request for this endpoint differs from the request that is eventually sent to the webhook service. The following properties in this request are moved to each item in the booking_requests property:
  • request_id
  • guide_language
  • pickup_id (if present)
  • slot_id
A randomly-generated value for tuimm_booking_id is also added to the final request that the webhook service receives.

A valid request returns an empty 200 status code response. Request errors return a 400 status code response.

Booking cancellation

You can trigger a booking cancellation request at POST /supplier/integration-tests/cancel-booking:
Request Body schema: application/json
One of:
booking_id
required
string <uuid>

The ID of the booking to cancel.

ticket_numbers
required
Array of strings

A list of ticket values issued by the original booking confirmation response.

transaction_id
required
string

The ID issued by the original booking confirmation response.

A valid request returns an empty 200 status code response. Request errors return a 400 status code response.

Copyright © TUI Musement. All rights reserved.