Skip to main content

Booking API

The Booking API allows guests to use a voucher code when booking on their website.

URLs

LIVE: https://api.skchase.com/api/v1/booking Staging: https://api.skchase-staging.com/api/v1/booking

Authentication

These endpoints will use Basic Authentication. The username and password for each environment will be provided to you by SKChase.

Operations

All operations are executed against the URL above (same for all requests) and will have the same response. Only the HTTP Method, query string and request payload differ.

The endpoint uses JSON formatting.The following header must be present with each request:

Accept: application/json

When an operation is successful the HTTP 200 status code will be returned, along with the updated order items in the body of the response.

OperationHTTP MethodRequest Body / Query StringResponse (same for all)
Check Voucher StatusGET
?orderItemIds=IDs​

Where multiple IDs are separated by a comma

Response
{
orderItems: {
orderItemId: int;
orderId: int;
voucherGuid: string;
catalogueGuid: string;
voucherName: string;
description: string;
imageUrl: string;
validFromUtc: string;
validToUtc: string;
gracePeriod: int;
status: string;
booked: boolean;
bookingNotes: string;
orderItemNotes: string;
orderNotes: string;
unitPrice: Money;
actualCharge: Money;
}[];
}
Money
{
amount: string;
currency: string;
}
Set Voucher BookedPUT
{
orderItemId: int;
notes: string;
}[]
Remove Voucher BookingDELETE
{
orderItemIds: int;
notes: string;
}[]

Error Handling

If there were any issues with processing of the request, such as invalid authentication, malformed / invalid input data, rules validation, DB access issue etc., a status code other than HTTP 200 will be returned, together with a payload conforming to the RFC 7807 specification.

Example response:

api error response

Notes

  • A booking may only be made when the following is true:
    • Status is either “Purchased” or “Issued”.
    • The voucher is not currently booked.
    • Current date falls between Valid From date and Valid To date + Grace Period.
  • Grace Period is in days.