Developer portal

Booking API

Events with Baskets

Create Basket

related DTO

POST /Baskets

Creates new basket

You must call this method first when you have an intention of creating a new order

Request

URI
POST https://api.londontheatredirect.com/rest/v2/Baskets
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables

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

related DTO

POST /Baskets/{basketId}/Tickets

Adds provided tickets into basket

Request

URI
POST https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/Tickets
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
Variable Requirement Data type Example Additional information
BasketId required Guid 7c9e6679-7425-40de-944b-e07fc1f90ae7 unique basket identifier
Request data
Name Requirement Data type Example Additional information
TicketId required Collection of integers 554871 unique ticket identifier

Please note that the TicketId must be sent in the body of the POST request

{
  "Tickets": [
    141745744,
    141745743,
    141745742
  ]
}

Response

Name Data type Additional information
Success Boolean if item was successfully added to basket
FailureReason AddItemToBasketFailureReason see AddItemToBasketFailureReason enumeration for further information
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
          },
          {
            "TicketId": 141745743,
            "TicketName1": "P",
            "TicketName2": "38",
            "FaceValue": 75,
            "SellingPrice": 90,
            "IsRestrictedView": false,
            "RestrictionDescription": null
          },
          {
            "TicketId": 141745742,
            "TicketName1": "P",
            "TicketName2": "37",
            "FaceValue": 75,
            "SellingPrice": 90,
            "IsRestrictedView": false,
            "RestrictionDescription": null
          }
        ],
        "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
  }
}

Get Basket detail

related DTO

GET /Baskets/{basketId}

Returns contents of provided basket (BasketId)

Request

URI
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
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
        },
        {
          "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
}

Submit Order

related DTO

POST /Baskets/{basketId}/SubmitOrder

Submits basket content

Request

URI
POST https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/SubmitOrder
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
Variable Requirement Data type Example Additional information
BasketId required Guid 7c9e6679-7425-40de-944b-e07fc1f90ae7 unique basket identifier
Request data
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 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 required String London billing city
Country required Integer 218 billing country identifier
Zip required String WC1A 1AA billing zip code
Phone not required String 020 7946 0645 contact phone number
Mobile not required String 020 7946 0645 contact mobile phone number
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",
    "Mobile": "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://ltdtest.londontheatredirect.com/payments/PaymentGate.aspx?basketId=da8dbc5b-ab4c-4cb8-bd0e-ac003d21b28f"
}

Submit Order on Account

related DTO

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

URI
POST https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/SubmitOrderOnAccount
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
Variable Requirement Data type Example Additional information
BasketId required Guid 7c9e6679-7425-40de-944b-e07fc1f90ae7 unique basket identifier
Request data
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 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 required String London billing city
Country required Integer 218 billing country identifier
Zip required String WC1A 1AA billing zip code
Phone not required String 020 7946 0645 contact phone number
Mobile not required String 020 7946 0645 contact mobile phone number
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",
    "Mobile": "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
BookingReference String public unique booking reference
{
  "Success": true,
  "BookingReference": "RRH11438"
}

Get submitted Basket summary

related DTO

GET /Baskets/{basketId}/SubmittedBasketSummary

Returns contents for provided BasketId only when basket was already submitted

Request

URI
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/SubmittedBasketSummary
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
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 Integer 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
        },
        {
          "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": 0,
      "ExpirationDate": "2017-02-21T08:12:08.567"
    }
  ],
  "ProtectionInformation": {
    "ProtectedTicketsCount": 3,
    "TotalProtectionPrice": 7.5
  },
  "BookingReference": "RRR11949",    
  "DiscountInformation": null
}

Get Basket available deliveries

related DTO

GET /Baskets/{basketId}/AvailableDeliveries

Returns available delivery types of partner providing basket (BasketId)

Request

URI
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/AvailableDeliveries
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
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
    }
  ]
}

Get Print-At-Home tickets

related DTO

GET /Baskets/{basketId}/PrintAtHomeTickets

Returns available Print-At-Home tickets of provided basket (BasketId)

Request

URI
GET https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/PrintAtHomeTickets
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
Variable Requirement Data type Example Additional information
BasketId required Guid 7c9e6679-7425-40de-944b-e07fc1f90ae7 unique basket identifier

Response

Name Data type Additional information
AllTicketsGenerated Boolean if all Print-At-Home tickets of provided basket were generated successfully
RequestedTicketsCount Integer requested Print-At-Home tickets count
GeneratedTicketsCount Integer generated Print-At-Home tickets count
GeneratedTickets Collection of GeneratedPrintAtHomeTicket collection of generated Print-At-Home ticket information
{
    "AllTicketsGenerated": true,
    "RequestedTicketsCount": 2,
    "GeneratedTicketsCount": 2,
    "GeneratedTickets": [
        {
            "Ticket": {
                "TicketId": 8788829,
                "TicketName1": "D",
                "TicketName2": "12"
            },
            "FileSize": 859475,
            "DownloadUrl": "https://www.londontheatredirect.com/ETickets/DownloadETicket.ashx?pid=c420bac1-601e-4fa7-948a-d4033fb968ae"
        },
        {
            "Ticket": {
                "TicketId": 8788830,
                "TicketName1": "D",
                "TicketName2": "13"
            },
            "FileSize": 859670,
            "DownloadUrl": "https://www.londontheatredirect.com/ETickets/DownloadETicket.ashx?pid=a7ad1bdf-d860-4a62-9005-d2416f0f43f8"
        }
    ]
}

Delete from Basket

related DTO

DELETE /Baskets/{basketId}/BasketItem/{basketItemId}

Removes order from basket

Request

URI
DELETE https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/BasketItem/{basketItemId}
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
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

related DTO

DELETE /Baskets/{basketId}/Tickets

Releases all tickets from basket

Request

URI
DELETE https://api.londontheatredirect.com/rest/v2/Baskets/{basketId}/Tickets
Request Headers
Api-Key: [YOUR API KEY]
Content-Type: application/json
Variables
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
  }
}