Response formats
The API supports JSON, CSV, and PDF response formats. Specify your preferred format using theAccept header.
- JSON
- CSV
- PDF
Expanding responses
Some endpoints support expanding nested objects in the response using theexpand query parameter. You can expand multiple objects with a comma-separated list, and use dot notation for nested objects.
For example, when retrieving an order, you can expand the contact, line_items, and line_items.item:
For each expanded resource, ensure the access token has read scope for that resource. For example, when expanding the
site on subscription, the public.site:read scope is required.Pagination
List endpoints are paginated. The defaults are:- 50 items per page by default
- 100 items per page maximum (set via the
limitquery parameter) - Use the
pagequery parameter to navigate through pages
count, last, limit, next, page, pages, and prev) is returned in the response’s meta/pagination field.
Links
Some resources include a_links field containing HATEOAS-style links. These provide URLs to related actions or pages, such as signing a contract on the storefront or starting a new booking for a unit type.
Structure
Each link is keyed by a namespaced relation name and contains anhref (relative path) and a human-readable title:
CURIEs
Link relation names use a CURIE (Compact URI) prefix to indicate which application the link points to:| Prefix | Application | Example |
|---|---|---|
sf | Storefront (customer-facing booking site) | sf:new_order |
bo | Backoffice (operator dashboard) | bo:view_contact |
meta object includes a curies array that maps each prefix to a URL template. To resolve a full URL, replace {rel} in the CURIE href with the link’s href:
sf:new_order with href /sites/belfast/5x5-unit/order/contact-details?unit_type_slug=5x5-unit resolves to:
Conditional links
Links can be conditional — they only appear when the action is available. For example:- A contract only has
sf:show_contractwhen it is not voided or deleted - A unit type only has
sf:new_orderwhen its status isbookable
_links field is an empty object {}.