Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

List Slots

Developer Preview

Returns the schedule slots, calculated by the schedule's availability specification.
Query object support:

  • filter: supports
    • scheduleIds: scheduleIds represent the schedule of the sessions. Required. The Min list size is 1. all other filters are optional.
    • from: query range start time
    • to: query range end time
    • isAvailable: By default returned slots will include full capacity sessions. Filter.isAvailable = false is not supported.
  • fields: supported.
  • paging: Paging is supported using the page token. For paging the results, i.e. with a page size of 10, set the query.paging.limit to a value of 10. The response will contain a value in the nextPageToken field. Pass this value in the pageToken field in the following calls and leave the query field empty.
  • fieldsets: not supported.

Query filter example:

{"scheduleIds": ["66a2674c-9267-4600-826e-f463957b9446", "66a2674c-9267-4600-826e-f463957b9447"] , "from": "2019-02-17T13:08:43.000Z" , "to": "2019-02-17T14:08:43.000Z","isAvailable": true}).
Copy Code

Permissions
This endpoint requires the Read Bookings Calendar Availability, the Read Bookings Calendar, the Read Bookings - Public Data, the Read Bookings - Including Participants or the Manage Bookings permission scope.

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

POST

https://www.wixapis.com/bookings/v1/calendar/listSlots

Body Params

NAME
TYPE
DESCRIPTION
query

object

Partially supported. See description above.

pageToken

string

Token for the next page of results

Response Object

NAME
TYPE
DESCRIPTION
slots

Array<object>

Slots on the calendar.

nextPageToken

string

Slots paging response. Token for the next page of results

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

List Slots

Lists all the slots of a specific schedule id at a specific date-time range. For paging the results, please see the examples for List Sessions.

Request

curl

Copy Code
1curl -X POST \
2 'https://www.wixapis.com/bookings/v1/calendar/listSlots' \
3 -H "Content-Type: application/json" \
4 -H 'Authorization: <AUTH>' \
5 --data '{
6 "query": {
7 "filter": "{\"from\":\"2020-04-29T00:00:00.000Z\",\"to\":\"2020-04-29T10:00:00.00Z\", \"scheduleIds\":[\"5ba15a40-7a89-4126-9448-6c3bac668976\"]}"
8 }
9 }'

Response

json

1
2{"slots": [
3 {
4 "scheduleId": "5ba15a40-7a89-4126-9448-6c3bac668976",
5 "scheduleOwnerId": "893b6705-2f4f-49ca-a178-4038750314d9",
6 "start": {"timestamp": "2020-04-29T07:00:00Z"},
7 "end": {"timestamp": "2020-04-29T09:00:00Z"},
8 "affectedSchedules": [ {
9 "scheduleId": "287fde78-6c7d-4044-a22b-8c87f8338fe2",
10 "transparency": "BUSY",
11 "scheduleOwnerId": "96efc89b-bd1d-446a-ab0f-f9c789ae3bca"
12 }],
13 "tags": [],
14 "location": {"locationType": "OWNER_BUSINESS"},
15 "capacity": 1,
16 "rate": {"labeledPriceOptions": {"general": {
17 "amount": "220",
18 "currency": "USD",
19 "downPayAmount": "0"
20 }}},
21 "notes": "",
22 "totalNumberOfParticipants": 0,
23 "participants": [],
24 "inheritedFields": [],
25 "status": "UNDEFINED",
26 "type": "UNDEFINED"
27 },
28 {
29 "scheduleId": "5ba15a40-7a89-4126-9448-6c3bac668976",
30 "scheduleOwnerId": "893b6705-2f4f-49ca-a178-4038750314d9",
31 "start": {"timestamp": "2020-04-29T07:00:00Z"},
32 "end": {"timestamp": "2020-04-29T09:00:00Z"},
33 "affectedSchedules": [ {
34 "scheduleId": "e07c6328-4495-4b80-b04d-c45f13215881",
35 "transparency": "BUSY",
36 "scheduleOwnerId": "76570209-101f-409b-af97-b445bdb63125"
37 }],
38 "tags": [],
39 "location": {"locationType": "OWNER_BUSINESS"},
40 "capacity": 1,
41 "rate": {"labeledPriceOptions": {"general": {
42 "amount": "220",
43 "currency": "USD",
44 "downPayAmount": "0"
45 }}},
46 "notes": "",
47 "totalNumberOfParticipants": 0,
48 "participants": [],
49 "inheritedFields": [],
50 "status": "UNDEFINED",
51 "type": "UNDEFINED"
52 },
53 {
54 "scheduleId": "5ba15a40-7a89-4126-9448-6c3bac668976",
55 "scheduleOwnerId": "893b6705-2f4f-49ca-a178-4038750314d9",
56 "start": {"timestamp": "2020-04-29T07:00:00Z"},
57 "end": {"timestamp": "2020-04-29T09:00:00Z"},
58 "affectedSchedules": [ {
59 "scheduleId": "f2743b3b-9186-48ce-b00a-b1ce87cbbcf4",
60 "transparency": "BUSY",
61 "scheduleOwnerId": "5349296a-0797-4e47-b5db-d9e4316e3124"
62 }],
63 "tags": [],
64 "location": {"locationType": "OWNER_BUSINESS"},
65 "capacity": 1,
66 "rate": {"labeledPriceOptions": {"general": {
67 "amount": "220",
68 "currency": "USD",
69 "downPayAmount": "0"
70 }}},
71 "notes": "",
72 "totalNumberOfParticipants": 0,
73 "participants": [],
74 "inheritedFields": [],
75 "status": "UNDEFINED",
76 "type": "UNDEFINED"
77 }
78]}