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

Lock

Developer Preview

Lock a session for bookings.
When invoking this API with a sessionId, it returns a key that will enable to book the given session.
Once the session is locked -
Only the holder of the right key will be able to Book or Checkout.
Calling IsAvailable returns as not available.
Invoking Bookings.Book, Bookings.Checkout APIs without the right key will fail.

Permissions
This endpoint requires 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/availability/lock

Body Params

NAME
TYPE
DESCRIPTION
sessionId
Required

string

session ID to lock

Response Object

NAME
TYPE
DESCRIPTION
key

string

locked session key

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Lock Session

Locks a session and return a key with which a booking on the session can be done.

Request

curl

Copy Code
1curl --X POST /
2 'https://www.wixapis.com/bookings/v1/bookings/availability/lock' \
3 -H 'Authorization: <AUTH>'
4 --data {
5 "sessionId": "193ZPR9ppP9emJUCLevcLf6orynNEIDt5nc0520xjGQILnPPaF5s62yK3BWz7ExgIRM1VRioAcbF7zzwvoBTEIScx8fykHVtU2r5GoJrd7PuRidnB3zvYGeB6vu46SF7RN6M20Jg3OP1PZhRjhbotC5iz5mBXEncK2sHCaVgGczVpDEUts19ULscMtZ8dzmp6Hd6caRs6g5UcGtKSnvH5KJPYdojijsgantqsSTmGCItRoTcYi0dBhYzvxxB6Sv51iSs7tupi36hkw6Eau5FhC7P8jBQfZ0eFi7tZIeGUyoV39wexfMbu0kLn5nRTUVx5r0eSzENSJcV7F"
6 }'

Response

json

1
2{"key": "74dae3a4-d7e0-4126-bb0a-d487a83c6505"}