How to create reservation order and pass it to sale order

The example below explains how to create reservation order and pass it to sale order using REST calls.

Reference data

You must have them under hand before to begin.

Username : PLAY_B2C
Password : P@ssw0rd
Contact : 2258
pointOfSalesId : 101053522324

Postman collection

Please download and import the postman collection to be able to reproduce de example: Collection - Create reservation order and pass it to sale order

Steps to follow

Authentication

Just execute to get the token for next steps.

Get seat availability

This method is called to get the availability of a specific performance ID, a specific seat category ID and a specific block/area (all these information can be obtained from the catalog). To create the order (next step), we will need the "physicalSeatId" which appears in the result of this call.

Create the reservation order

Using the "physicalSeatId" from the previous step and setting the desired tariff (audience sub category), we will be able to create the reservation order for a specific seat. It's important to set the tag "orderType" as "RESERVATION". For next steps, we will need the "orderId" returned by this call and the "fileId".

Close the reservation order

Using the "orderId" from the "Create order" step, we will be able to close the reservation order. It's important to set the tag "orderType" as "RESERVATION".

Check the order status

Using the "orderId" from the "Create order" step, we will be able to check the status of the order (the order should be in "CLOSED" status). Get the "seatNumber" for next checks.

Create the sale order from the reservation order

Using the "fileId" from the "Create reservation order" step, we will be able to create the sale order from the reservation order. It's important to set the tag "orderType" as "SALE" and the "orderCreationOptions" as "RESUME_ALL_RESERVATION_OPERATIONS". For next steps, we will need the "orderId" returned by this call.

Close the sale order

Using the "orderId" from the "Create sale order from the reservation order" step, we will be able to close the reservation order. It's important to set the tag "orderType" as "SALE" and the flag "isConvertedReservation" as "true".

Check the order status

Using the "orderId" from the "Create sale order from the reservation order" step, we will be able to check the status of the order (the order should be in "CLOSED" status). Check also that the "seatNumber" from the reservation order is the same as the sale order.