Booking API
Events with Baskets
Create Basket
POST /Baskets
Creates new basket
You must call this method first when you have an intention of creating a new order
Request
POST https://api.londontheatredirect.com/rest/v2/Baskets
Api-Key: [YOUR API KEY] Content-Type: application/json
No variables required
Response
| Name | Data type | Additional information |
|---|---|---|
Success |
Boolean | if basket was successfully created |
BasketId |
Guid | unique basket identifier |
Please note that the returned BasketId must be stored and returned in every subsequent call
{
"Success": true,
"BasketId": "da8dbc5b-ab4c-4cb8-bd0e-ac003d21b28f"
}
Add Tickets to Basket
POST /Baskets/{basketId}/Tickets
Adds provided tickets into basket There are two types of tickets. For a specific seat GETPerformancesAvailableTickets or for a selected area GETAreaPrices. In the request body, you must provide either Tickets or BestSeats - these two cannot be combined in a single request.
Request
POST https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/Tickets
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
| Name | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
Tickets |
required | Collection of integers | [554871] | unique ticket identifier, required if BestSeats is not provided |
BestSeats |
required | BestSeatsRequest | "BestSeats": { "PerformanceId": 554871, "AreaId": 811, "SeatsCount": 2, "Price": 25 } | unique seats identifier, required if Tickets is not provided |
{
"Tickets": [
141745744,
141745743,
141745742
]
}
{
"BestSeats":
{
"PerformanceId": 688972,
"AreaId": 811,
"SeatsCount": 2,
"Price": 25
}
}
Response
| Name | Data type | Additional information |
|---|---|---|
Success |
Boolean | if item was successfully added to basket |
FailureReason |
AddItemToBasketFailureReason |
see AddItemToBasketFailureReason enumeration for further information |
FailureReasonText |
String | name of the AddItemToBasketFailureReason value |
BookableTicketsCount |
Integer | how many tickets can still be booked for the performance. Returned only when FailureReason is BookableTicketsExceeded, otherwise null. It is a point in time value rather than a reservation, so it can change before the booking is retried |
GetBasketContentResult |
GetBasketContentResult |
contains information about basket content |
{
"Success": true,
"FailureReason": 0,
"GetBasketContentResult": {
"BasketId": "da8dbc5b-ab4c-4cb8-bd0e-ac003d21b28f",
"MinExpirationDate": "2017-02-21T08:12:08.567",
"DeliveryInformation": null,
"Items": [
{
"BasketItemId": 9251039,
"EventId": 9,
"EventName": "The Lion King",
"ImageUrl": null,
"PerformanceDate": "2017-05-06T19:30:00",
"AreaName": "Stalls",
"Seats": [
"P39",
"P38",
"P37"
],
"Tickets": [
{
"TicketId": 141745744,
"TicketName1": "P",
"TicketName2": "39",
"FaceValue": 75,
"SellingPrice": 90,
"IsRestrictedView": false,
"RestrictionDescription": null,
"Barcode": "658942135648965246",
"BarcodeType": "Pdf417"
},
{
"TicketId": 141745743,
"TicketName1": "P",
"TicketName2": "38",
"FaceValue": 75,
"SellingPrice": 90,
"IsRestrictedView": false,
"RestrictionDescription": null,
"Barcode": "654896547856523458",
"BarcodeType": "Pdf417"
},
{
"TicketId": 141745742,
"TicketName1": "P",
"TicketName2": "37",
"FaceValue": 75,
"SellingPrice": 90,
"IsRestrictedView": false,
"RestrictionDescription": null,
"Barcode": "987458456821568796",
"BarcodeType": "Pdf417"
}
],
"VenueId": 9,
"VenueName": "Lyceum Theatre",
"VenueAddress": "21 Wellington Street",
"VenueCity": "London",
"VenuePostCode": "WC2E 7RQ",
"PriceSubTotal": 270,
"ReservationValidity": 9,
"ExpirationDate": "2017-02-21T08:12:08.567"
}
],
"DiscountInformation": null
}
}
Exceptions
| HTTP Status Code | Additional information |
|---|---|
502 |
Caused by supplier API failure |
409 |
These are either due to outdated availability (seats no longer available or single seat restriction is set), or because fewer tickets can be booked for the performance than were requested. In the latter case FailureReason is BookableTicketsExceeded and BookableTicketsCount indicates how many tickets can still be booked. See AddItemToBasketResult for the response fields. |
Get Basket detail
GET /Baskets/{basketId}
Returns contents of provided basket (BasketId)
Request
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Response
| Name | Data type | Additional information |
|---|---|---|
BasketId |
Guid | unique basket identifier |
MinExpirationDate |
DateTime | expiration date of reservation |
DeliveryInformation |
DeliveryInformation |
contains delivery information |
Items |
Collection of BasketItem |
expiration date of reservation |
DiscountInformation |
String | discount information |
{
"BasketId": "da8dbc5b-ab4c-4cb8-bd0e-ac003d21b28f",
"MinExpirationDate": "2017-02-21T08:12:08.567",
"DeliveryInformation": {
"DeliveryType": 1,
"DeliveryPrice": 0,
"CustomerEmail": "[email protected]",
"BillingFirstName": "John",
"BillingSurname": "Smith",
"BillingAddressLine1": "132, My Street",
"BillingAddressLine2": "1st floor",
"BillingPostCode": "WC1A 1AA",
"BillingPhoneNumber": "020 7946 0645",
"BillingCity": "London",
"BillingStateCode": "218",
"BillingCountry": "GB",
"BillingCountryName": "United Kingdom",
"DeliveryFirstName": "John",
"DeliverySurname": "Smith",
"DeliveryAddressLine1": "132, My Street",
"DeliveryAddressLine2": "1st floor",
"DeliveryPostCode": "WC1A 1AA",
"DeliveryPhoneNumber": "020 7946 0645",
"DeliveryCity": "London",
"DeliveryStateCode": "218",
"DeliveryCountry": "GB",
"DeliveryCountryName": "United Kingdom",
"DeliveryAddressSame": true
},
"Items": [
{
"BasketItemId": 9251039,
"EventId": 9,
"EventName": "The Lion King",
"ImageUrl": null,
"PerformanceDate": "2017-05-06T19:30:00",
"AreaName": "Stalls",
"Seats": [
"P39",
"P38",
"P37"
],
"Tickets": [
{
"TicketId": 141745744,
"TicketName1": "P",
"TicketName2": "39",
"FaceValue": 75,
"SellingPrice": 90,
"IsRestrictedView": false,
"RestrictionDescription": null,
"Barcode": "658942135648965246",
"BarcodeType": "Pdf417"
},
{
"TicketId": 141745743,
"TicketName1": "P",
"TicketName2": "38",
...
},
{
"TicketId": 141745742,
"TicketName1": "P",
"TicketName2": "37",
...
}
],
"VenueId": 9,
"VenueName": "Lyceum Theatre",
"VenueAddress": "21 Wellington Street",
"VenueCity": "London",
"VenuePostCode": "WC2E 7RQ",
"PriceSubTotal": 270,
"ReservationValidity": -4,
"ExpirationDate": "2017-02-21T08:12:08.567"
}
],
"DiscountInformation": null
}
Get Basket checkout options
related DTOGET /Baskets/{basketId}/CheckoutOptions
Returns aditional data for provided basket (BasketId)
Request
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/CheckoutOptions
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Response
| Name | Data type | Additional information |
|---|---|---|
CheckoutNotices |
Collection of CheckoutNotice |
contains checkout notices |
ETicketNotices |
Collection of ETicketNotice |
contains Eticket notices |
CustomerEmailIsMandatory |
Boolean | if the customer email is mandatory |
{
"CheckoutNotices": [
{
"Message": "I agree to the venue contacting me directly via email at least 48 hours before the performance for any dietary requirements.",
"RequiresCustomerConfirmation": true
}
],
"ETicketNotices": [
{
"EventId": 5770,
"Message": "**The venue will contact you at least 48 hours before the performance for any dietary requirements.\r\nThis email will come from [email protected]**"
}
],
"CustomerEmailIsMandatory": false
}
Submit Order
POST /Baskets/{basketId}/SubmitOrder
Submits basket content
Request
POST https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/SubmitOrder
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
| Name | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Email |
required | String | [email protected] | customer e-mail address |
Name |
required | String | John | customer first name |
LastName |
required | String | Smith | customer last name |
AddressLine1 |
not required | String | 132, My Street | billing address line 1 |
AddressLine2 |
not required | String | 1st floor | billing address line 2 |
CompanyName |
not required | String | Company, s.r.o. | billing company name |
City |
not required | String | London | billing city |
Country |
not required | Integer | 218 | billing country identifier |
Zip |
not required | String | WC1A 1AA | billing zip code |
Phone |
not required | String | 020 7946 0645 | contact phone number |
|
not required | String | 020 7946 0645 | Obsolete - use Phone instead |
StateCode |
not required | String | GB | state code, applied only for United States |
DeliveryType |
required | Integer | 1 | delivery type |
RequireTicketPlan |
not required | Boolean | true | flag indicating whether a booking insurance should be also created |
SuccessReturnUrl |
required | String | https://www.londontheatredirect.com | destination URL where you get redirected after successful payment |
FailureReturnUrl |
required | String | https://www.londontheatredirect.com | destination URL where you get redirected after failure payment |
SendConfirmationEmail |
not required | Boolean | true | flag indicating whether to send a confirmation e-mail to a customer |
TransactionReference |
not required | String | ticket123 | external identification of a transaction |
PaymentGateLanguage |
not required | Language | 1 | desired language of payment gate |
Please note that this Request data must be sent in the body of the POST request
{
"Email": "[email protected]",
"Name": "John",
"LastName": "Smith",
"AddressLine1": "132, My Street",
"AddressLine2": "1st floor",
"CompanyName": "Company, s.r.o.",
"City": "London",
"Country": 218,
"Zip": "WC1A 1AA",
"Phone": "020 7946 0645",
"StateCode": "GB",
"DeliveryType": 1,
"RequireTicketPlan": true,
"SuccessReturnUrl": "https://www.londontheatredirect.com",
"FailureReturnUrl": "https://www.londontheatredirect.com",
"SendConfirmationEmail": true,
"TransactionReference": "ticket123",
"PaymentGateLanguage": 1
}
Response
| Name | Data type | Additional information |
|---|---|---|
Success |
Boolean | if order was successfully submitted |
PaymentRedirectUrl |
String | URL to a payment redirect result |
{
"Success": true,
"PaymentRedirectUrl": "https://www.londontheatredirect.com/payments/PaymentGate.aspx?basketId=da8dbc5b-ab4c-4cb8-bd0e-ac003d21b28f"
}
Exceptions
| HTTP Status Code | Additional information |
|---|---|
400 |
Invalid phone number |
403 |
Invalid basket manipulation (empty or invalid basket) |
Submit Order on Account
POST /Baskets/{basketId}/SubmitOrderOnAccount
Submits basket content on account
BookingOnAccount is not available as standard on production environment. Please contact your account manager or e-mail us at [email protected] to unlock this on your production account.
Request
POST https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/SubmitOrderOnAccount
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
| Name | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Email |
required | String | [email protected] | customer e-mail address |
Name |
required | String | John | customer first name |
LastName |
required | String | Smith | customer last name |
AddressLine1 |
not required | String | 132, My Street | billing address line 1 |
AddressLine2 |
not required | String | 1st floor | billing address line 2 |
CompanyName |
not required | String | Company, s.r.o. | billing company name |
City |
not required | String | London | billing city |
Country |
not required | Integer | 218 | billing country identifier |
Zip |
not required | String | WC1A 1AA | billing zip code |
Phone |
not required | String | 020 7946 0645 | contact phone number |
|
not required | String | 020 7946 0645 | Obsolete - use Phone instead |
StateCode |
not required | String | GB | state code, applied only for United States |
DeliveryType |
required | Integer | 1 | delivery type |
RequireTicketPlan |
not required | Boolean | true | flag indicating whether a booking insurance should be also created |
ReturnUrl |
required | String | https://www.londontheatredirect.com | destination URL where you get redirected after payment |
SendConfirmationEmail |
not required | Boolean | true | flag indicating whether to send a confirmation e-mail to a customer |
TransactionReference |
not required | String | ticket123 | external identification of a transaction |
Please note that this Request data must be sent in the body of the POST request
{
"Email": "[email protected]",
"Name": "John",
"LastName": "Smith",
"AddressLine1": "132, My Street",
"AddressLine2": "1st floor",
"CompanyName": "Company, s.r.o.",
"City": "London",
"Country": 218,
"Zip": "WC1A 1AA",
"Phone": "020 7946 0645",
"StateCode": "GB",
"DeliveryType": 1,
"RequireTicketPlan": true,
"ReturnUrl": "https://www.londontheatredirect.com",
"SendConfirmationEmail": true,
"TransactionReference": "ticket123"
}
Response
| Name | Data type | Additional information |
|---|---|---|
Success |
Boolean | if order was successfully submitted |
BookingReference |
String | public unique booking reference |
{
"Success": true,
"BookingReference": "RRH11438"
}
Exceptions
| HTTP Status Code | Additional information |
|---|---|
400 |
Invalid phone number |
403 |
Invalid basket manipulation (empty or invalid basket) |
Get submitted Basket summary
GET /Baskets/{basketId}/SubmittedBasketSummary
Returns contents for provided BasketId only when basket was already submitted
Request
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/SubmittedBasketSummary
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Response
| Name | Data type | Additional information |
|---|---|---|
TransactionReference |
Integer | transaction reference |
BasketId |
Guid | unique basket identifier |
DeliveryInformation |
DeliveryInformation |
contains delivery information |
BasketItems |
Collection of BasketItem |
contains information about basket item |
BookingReference |
String | booking reference |
ProtectionInformation |
ProtectionInformation |
contains protection information |
DiscountInformation |
String | discount information |
{
"TransactionReference": 1119114,
"BasketId": "da8dbc5b-ab4c-4cb8-bd0e-ac003d21b28f",
"DeliveryInformation": {
"DeliveryType": 1,
"DeliveryPrice": 0,
"CustomerEmail": "[email protected]",
"BillingFirstName": "John",
"BillingSurname": "Smith",
"BillingAddressLine1": "132, My Street",
"BillingAddressLine2": "1st floor",
"BillingPostCode": "WC1A 1AA",
"BillingPhoneNumber": "020 7946 0645",
"BillingCity": "London",
"BillingStateCode": "218",
"BillingCountry": "GB",
"BillingCountryName": "United Kingdom",
"DeliveryFirstName": "John",
"DeliverySurname": "Smith",
"DeliveryAddressLine1": "132, My Street",
"DeliveryAddressLine2": "1st floor",
"DeliveryPostCode": "WC1A 1AA",
"DeliveryPhoneNumber": "020 7946 0645",
"DeliveryCity": "London",
"DeliveryStateCode": "218",
"DeliveryCountry": "GB",
"DeliveryCountryName": "United Kingdom",
"DeliveryAddressSame": true
},
"BasketItems": [
{
"BasketItemId": 9251039,
"EventId": 9,
"EventName": "The Lion King",
"ImageUrl": null,
"PerformanceDate": "2017-05-06T19:30:00",
"AreaName": "Stalls",
"Seats": [
"P39",
"P38",
"P37"
],
"Tickets": [
{
"TicketId": 141745744,
"TicketName1": "P",
"TicketName2": "39",
"FaceValue": 75,
"SellingPrice": 90,
"IsRestrictedView": false,
"RestrictionDescription": null,
"Barcode": "658942135648965246",
"BarcodeType": "Pdf417",
"ScheduledOn": "2022-03-13T19:30:00"
},
{
"TicketId": 141745743,
"TicketName1": "P",
"TicketName2": "38",
...,
"ScheduledOn": null
},
{
"TicketId": 141745742,
"TicketName1": "P",
"TicketName2": "37",
...
}
],
"VenueId": 9,
"VenueName": "Lyceum Theatre",
"VenueAddress": "21 Wellington Street",
"VenueCity": "London",
"VenuePostCode": "WC2E 7RQ",
"PriceSubTotal": 270,
"ReservationValidity": 0,
"ExpirationDate": "2017-02-21T08:12:08.567"
}
],
"ProtectionInformation": {
"ProtectedTicketsCount": 3,
"TotalProtectionPrice": 7.5
},
"BookingReference": "RRR11949",
"DiscountInformation": null
}
Exceptions
| HTTP Status Code | Additional information |
|---|---|
204 |
Tickets are not available |
Get Basket available deliveries
GET /Baskets/{basketId}/AvailableDeliveries
Returns available delivery types of partner providing basket (BasketId)
Request
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/AvailableDeliveries
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Response
| Name | Data type | Additional information |
|---|---|---|
DeliveryTypes |
Collection of DeliveryType |
collection of delivery type information |
{
"DeliveryTypes": [
{
"DeliveryTypeId": 1,
"DeliveryTypeName": "Box Office Collection",
"DeliveryTypePrice": 1
}
]
}
Exceptions
| HTTP Status Code | Additional information |
|---|---|
403 |
Invalid basket manipulation (empty or invalid basket) |
Get E-tickets
GET /Baskets/{basketId}/ETickets
Returns available E-tickets of provided basket (BasketId)
Request
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/ETickets
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Response
| Name | Data type | Additional information |
|---|---|---|
Items |
Collection of GetBasketETicketsItem |
collection of available E-tickets information |
{
"Items":[
{
"TicketId":20642388,
"ETickets":[
{
"Type":"PDF",
"DownloadUrl":"https://www.londontheatredirect.com/ETickets/DownloadETicket.ashx?pid=28e415d5-aab5-4b3d-86c9-c3ec7257070b"
},
{
"Type":"Apple",
"DownloadUrl":"https://pass.londontheatredirect.com/pass/apple/ea1740ab-a5a5-4905-9109-38922b3d62a5/20642388"
},
{
"Type":"Google",
"DownloadUrl":"https://pass.londontheatredirect.com/pass/google/ea1740ab-a5a5-4905-9109-38922b3d62a5/20642388"
}
]
}
]
}
Exceptions
| HTTP Status Code | Additional information |
|---|---|
204 |
Tickets are not available |
Delete from Basket
DELETE /Baskets/{basketId}/BasketItem/{basketItemId}
Removes order from basket
Request
DELETE https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/BasketItem/{basketItemId}
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
BasketItemId |
required | Integer | 32547 | basket item identifier |
Response
| Name | Data type | Additional information |
|---|---|---|
Success |
Boolean | if tickets were successfully deleted from basket |
GetBasketContentResult |
GetBasketContentResult |
contains information about basket content |
{
"Success": true,
"GetBasketContentResult": {
"BasketId": "18e4396f-5481-4cac-ba1f-ac40e7208176",
"MinExpirationDate": "0001-01-01T00:00:00",
"DeliveryInformation": null,
"Items": [],
"DiscountInformation": null
}
}
Delete all from Basket
DELETE /Baskets/{basketId}/Tickets
Releases all tickets from basket
Request
DELETE https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/Tickets
Api-Key: [YOUR API KEY] Content-Type: application/json
| Variable | Requirement | Data type | Example | Additional information |
|---|---|---|---|---|
BasketId |
required | Guid | 7c9e6679-7425-40de-944b-e07fc1f90ae7 | unique basket identifier |
Response
| Name | Data type | Additional information |
|---|---|---|
Success |
Boolean | if tickets were successfully deleted from basket |
GetBasketContentResult |
GetBasketContentResult |
contains basket content information |
{
"Success": true,
"GetBasketContentResult": {
"BasketId": "694370b4-ddd0-4650-a542-ad1240f4326f",
"MinExpirationDate": "0001-01-01T00:00:00",
"DeliveryInformation": null,
"Items": [],
"DiscountInformation": null
}
}
Exceptions
| HTTP Status Code | Additional information |
|---|---|
403 |
Invalid basket manipulation (empty or invalid basket) |