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

List

Developer Preview

Returns a list of bookings; Based on the invoker permissions and the request query. Query object support:

  • filter: supports
    • bookingId - query for a specific booking. Example: "filter { string_value: "{ "bookingId": "46ce4cd4-46ff-4aa7-9cc0-02fd4f0f3209" }" }".
    • contactId - Bookings made by this contactId (defined in Contact service). Example: "filter { string_value: "{ "contactId": "b68960d3-820a-4588-a6b3-d7238add8af5" }" }".
    • sessionId - Bookings made to this sessionId. Support for a list of sessionIds; Example: "filter { string_value: "{ "sessionId": ["193ZPR9ppP9emJUCLevcLf6orynNE45", "193ZPR9ppP9emJUCLevcLf6orynNE98"] }" }".
    • scheduleId - Bookings made to sessions from this scheduleId, or made to the scheduleId itself. We support list of scheduleIds; Example: "filter { string_value: "{ "scheduleId": ["cd65b7de-164c-471b-908d-ee94d8ba6459", "fa573e37-e035-4bec-93b8-05cb90fe7aba"] }" }".
    • startTime - Bookings with booked entity (schedule/session) start time. We support 'gte' , 'lt'; Examples:
      • All bookings that will start after or equal to 27/04/20 10:00:00 - "filter { string_value: "{ "startTime": {"$gte": "2020-04-27T10:00:00.000Z" }}" }".
      • All bookings that start before 27/04/20 10:00:00 - "filter { string_value: "{ "startTime": {"$lt": "2020-04-27T10:00:00.000Z" }}" }".
    • endTime - Bookings with booked entity (schedule/session) end time. We support 'gt' , 'lte'; Examples:
      • All bookings that will start after 27/04/20 10:00:00 - "filter { string_value: "{ "startTime": {"$gt": "2020-04-27T10:00:00.000Z" }}" }".
      • All bookings that start before or equal to 27/04/20 10:00:00 - "filter { string_value: "{ "startTime": {"$lte": "2020-04-27T10:00:00.000Z" }}" }".
    • status - Bookings with this status. We support list of statuses. Example: "filter { string_value: "{ "status": "CONFIRMED", "PENDING" }" }".
  • paging: Supported. Limit Example: "query { paging { limit { value: 10 } } }". Offset Example: "query { paging { offset { value: 10 } } }".
  • fieldsets: not supported.
  • fields: not supported.

Important:

  • Only one use at a time of each filter once in the same query is supported. If a filter will be used more than once in one query, only the first occurrence is taken.
    Calling List without any filter, will return all bookings permitted to watch by the invoker permission.
  • All results are for one specific business, resolved from the request context.
  • A Member can only see its own bookings;

  • It is able to get the available actions for a member to do on each booking based on the business bookings policy using the with_booking_allowed_actions field.

Permissions
This endpoint requires the Read Bookings - Including Participants permission scope.

Authorization

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

GET

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

Query Params

NAME
TYPE
DESCRIPTION
query.fieldsets

Array<string>

Projection on the result object - list of named projections. E.g. "basic" will return id and name fields. Specifying multiple fieldsets will return the union of fields from all. Specifying fieldsets and fields will also return the union of fields.

query.filter

object

A filter object. See documentation here

query.paging

object

Limit number of results

query.fields

Array<string>

Projection on the result object - list of specific field names to return. If fieldsets are also specified, return the union of fieldsets and fields

query.sort

Array<object>

withBookingAllowedActions

boolean

If true will return the allowed actions for each booking calculated using the business booking policy.

Response Object

NAME
TYPE
DESCRIPTION
bookingsEntries

Array<object>

paging
Deprecated

object

metadata

object

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

List Bookings by id

Returns a booking by the provided id, including the allowed actions on that booking.

Request

curl

Copy Code
1curl -X GET /
2 'http://www.wixapis.com/bookings/v1/bookings?withBookingAllowedActions=true&query.filter.stringValue={%22bookingId%22:%20%22ceea2e96-4b64-48ce-92d6-70e4033cfaaf%22}' \
3 -H 'Authorization: <AUTH>'

Response

json

1
2{"bookingsEntries": [{
3 "booking": {
4 "id": "ceea2e96-4b64-48ce-92d6-70e4033cfaaf",
5 "bookedEntity": {
6 "serviceId": "f9969221-88b0-442d-9bfa-b7f0b739b0fc",
7 "scheduleId": "a1239c6f-5984-4e2e-af5d-fa54726c63a5",
8 "singleSession": {
9 "sessionId": "193ZPR9ppP9emJUCLevcLf6orynNEIDt5nc0520xjGQILnPPaF5s62yK3BWz7ExgIRM1U16wP6xWxScBjow6BsCpOlYupqA0QEQ9iVUZQC7LnzPEwgmdkeL2mPMg4UEDj7PK4pWOmHDGvYT1V4YoaQZGKCE7RDgcqiLqLdiiQfitxaB0qCTHkDsdele0v9SX7ceywcLnNV3t1qxRCMaNPvdxWAeLVFm0JndxF1yAU5Bqf6ucyw4sSBvLQVjFEjfZVd3HqkYhTPoPz9Xy7TOGhFKWS7wX905vWYKWWt9L6NSqAocAGzIbRQWNnGpaKlJBnBjwcqGq8axwbt",
10 "start": "2020-04-29T07:00:00Z",
11 "end": "2020-04-29T08:00:00Z"
12 },
13 "title": "Yoga class over Zoom",
14 "location": {"locationType": "OWNER_BUSINESS"},
15 "rate": {
16 "labeledPriceOptions": {"general": {
17 "amount": "14",
18 "currency": "USD",
19 "downPayAmount": "0"
20 }},
21 "priceText": ""
22 },
23 "tags": ["GROUP"]
24 },
25 "bookedResources": [ {
26 "id": "936d2078-79ba-49ca-b82d-8f12b8a050ac",
27 "name": "Dorgal",
28 "email": "dorga@wix.com"
29 }],
30 "formInfo": {
31 "contactDetails": {
32 "contactId": "b9388c66-29c3-4719-997c-7440c5530e4b",
33 "firstName": "Homer",
34 "lastName": "Simpson",
35 "email": "Doh@Doh.com",
36 "phone": "5558707",
37 "timeZone": "Asia/Jerusalem",
38 "countryCode": "IL"
39 },
40 "paymentSelection": [ {
41 "rateLabel": "general",
42 "numberOfParticipants": 1
43 }],
44 "customFormFields": {},
45 "additionalFields": []
46 },
47 "paymentDetails": {
48 "balance": {
49 "finalPrice": {
50 "amount": "14",
51 "currency": "USD",
52 "downPayAmount": "0"
53 },
54 "amountReceived": "0"
55 },
56 "wixPayDetails": {
57 "txId": "23c63b3d-8714-4b75-870b-bb42502ac29c",
58 "orderId": "0b7303c2-5b69-4326-9d9f-650d1c896095",
59 "orderAmount": "14",
60 "orderStatus": "UNDEFINED",
61 "paymentVendorName": "inPerson"
62 },
63 "state": "PENDING_MARK_AS_PAID",
64 "wixPayMultipleDetails": [ {
65 "txId": "23c63b3d-8714-4b75-870b-bb42502ac29c",
66 "orderId": "0b7303c2-5b69-4326-9d9f-650d1c896095",
67 "orderAmount": "14",
68 "orderStatus": "UNDEFINED",
69 "paymentVendorName": "inPerson"
70 }]
71 },
72 "status": "CONFIRMED",
73 "created": "2020-04-28T09:02:13.592Z"
74 },
75 "allowedActions": {
76 "cancel": true,
77 "reschedule": true,
78 "bookAnother": true
79 }
80}]}
List Bookings for session
List Bookings by time range.