Bookings

List bookings

Lists the company's bookings, latest start first, 25 to a page. Narrow it with `from` and `to`, a `serviceId`, the `assignedUserId` of the company user assigned to them or a `status`. Without the `bookings.read.all` permission the list holds only bookings assigned to the caller; an API key sees every booking.

GET
/bookings

Lists the company's bookings, latest start first, 25 to a page. Narrow it with from and to, a serviceId, the assignedUserId of the company user assigned to them or a status. Without the bookings.read.all permission the list holds only bookings assigned to the caller; an API key sees every booking.

Authorization

x-api-key
x-api-key<token>

Company API key, created under Settings > API Keys.

In: header

Query Parameters

page?number

The page to return, starting at 1.

Default1
limit?number

Bookings per page, at most 100.

Range1 <= value <= 100
Default25
from?string

Only bookings starting at or after this instant, as an ISO 8601 date-time.

to?string

Only bookings ending at or before this instant, as an ISO 8601 date-time.

serviceId?string

Only bookings of this service.

assignedUserId?string

Only bookings assigned to this company user.

status?unknown

Only bookings in this status: ACTIVE or CANCELED.

Value in

  • "ACTIVE"
  • "CANCELED"

Header Parameters

x-company-id?string

Optional with an API key or OAuth token: leave it out and the company the key or token belongs to is used. If sent, it must be that same company, otherwise the request is refused with 403 API_KEY_WRONG_COMPANY or OAUTH_WRONG_COMPANY.

Match^[0-9a-fA-F]{24}$

Response Body

application/json

curl -X GET "https://example.com/bookings"
{  "currentPage": 0,  "data": [    {      "assignedUser": {        "email": "string",        "firstName": "string",        "id": "string",        "lastName": "string"      },      "attribution": {        "firstTouch": {          "capturedAt": "string",          "fbclid": "string",          "gclid": "string",          "landingPage": "string",          "msclkid": "string",          "referrer": "string",          "ttclid": "string",          "utmCampaign": "string",          "utmContent": "string",          "utmMedium": "string",          "utmSource": "string",          "utmTerm": "string"        },        "lastTouch": {          "capturedAt": "string",          "fbclid": "string",          "gclid": "string",          "landingPage": "string",          "msclkid": "string",          "referrer": "string",          "ttclid": "string",          "utmCampaign": "string",          "utmContent": "string",          "utmMedium": "string",          "utmSource": "string",          "utmTerm": "string"        }      },      "cancellationReason": "string",      "client": {        "address": "string",        "contactId": "string",        "email": "string",        "name": "string",        "notes": "string",        "phone": "string"      },      "duration": 0,      "endDateTime": "string",      "formData": [        {          "label": "string",          "value": "string"        }      ],      "id": "string",      "service": {        "id": "string",        "name": "string"      },      "startDateTime": "string",      "status": "string",      "timeZone": "string"    }  ],  "nextPage": 0,  "total": 0,  "totalPages": 0}