Skip to main content

Order information

Retrieving order history​

After swapping a ticket, the ​OpenTicket system augments the original order with additional TicketSwap information.

  • swap_description: concatenation of the ticket name, first name, last name and email.
  • swap_name: concatenation of the ticket name, product name and ticket description.

This information is not listed by default when getting order information; it needs to be requested explicitly. For this, the following information is required.

  • guid: the GUID of the order that contains the to-be-swapped ticket.

Use the GUID to create a POST request to https://api.openticket.tech/ticketswap/order/:GUID. The following code block shows some examples of such a request.

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $accessToken"
],
CURLOPT_URL => "https://api.openticket.tech/ticketswap/order/$GUID"
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;
This request results in the following response
{
"guid": "56f5e720-611c-11ee-8dc2-455b4c4323d2",
"purchase_channel": "shop",
"shop_id": "7d2bb3a8-739b-41c8-afe0-80b66f70943a",
"email": "john.appleseed@example.com",
"pdf_location": "xtkz2ovnhp97aar3v7y6vct6ix2qud9guo4q66noadh624esodx46nd73x5kd2brcroxmcjdw4zsjhyxuxrsaxo5mwqidhdi93265zth4jdbdw6gm3vodehnn4xxxfo7",
"status": "paid",
"firstName": "John",
"lastName": "Appleseed",
"locale": "nl_NL",
"tickets": [
{
"ticket_number": "THYWNZYQC7RT3B1",
"swap_name": "Gold circle (John Appleseed, john.appleseed@example.com)",
"swap_description": "Gold circle\n- Front row seats in the Hertog Jan Zaal"
}
]
}