Skip to main content

Tickets Pdf

Get Tickets Pdf Tutorial

This guide shows how to get the purchased tickets in PDF format after of realize the commit order. Before you start reading this guide you should be able to create an complete order purchase as described in our Purchase Flow Guide. The main difference between creating an order and creating a booking is a simple parameter.

Let's get started with the examples

Step-by-step examples

This guide shows how to get the order tickets in PDF format easily.

Prerequisites!

You will need a valid OAuth access_token to be able to make each call! Please refer to our Authentication Guide to obtain one.

Get the PDF tickets

With this simple call we can easily obtain the order tickets with the relevant information in PDF format.

  • order-code: The unique identifier of the commited order from which we want to obtain the PDF tickets.
curl --location --request GET 'http://gateway-pre.oneboxtickets.net/onebox-rest2/rest/order/ticketsPDF?orderCode={{order-code}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}'

Note: This endpoint will return the error 1088 (ERROR_REST_DOCUMENT_IN_GENERATION_PROCESS) on the first call that is made and each time it is called while the PDF files of the tickets are being processed, please note that this is an expensive process and can take a few seconds to finish.

While the PDF are being generated (the files generation begins on the first call) it is recommended to make calls repeatedly until the endpoint returns OK-200 and the download link of the corresponding PDF files with the tickets be returned, making a call every second would be optimal. Note that the integration is responsible for hosting these PDF tickets to provide them to the user when they need them since the generated download link expires in 5 minutes, although you can generate them again whenever you want and a new download link will be generated .