Wiki

Clone wiki

API-2.0 / New_booking_policy

Method: GET

Path: /policy/booking

Return "create new booking" policy details. Applicable only when new/existing customer creates booking.

Note: policy taken into account by Spots for booking when called for mode="new". If spot not available because of the policy it will have past=true.

Example of response JSON (default policy)

{
  "custom": false
}
Default policy means: there are no restrictions.

Example of response JSON (custom policy)

{
  "custom": true,
  "unit": "hour",
  "quantity": 24
}
Custom policy means: booking can be created if there is at least quantity units (example: 24 hours) before the desired appointment.

Where:

  • custom can be true or false
  • unit can be "hour" or "day"
  • quantity is integer value

Example request:

For production, replace https://acme-sandbox.l27.co with https://<your subdomain>.launch27.com

curl -H "Content-Type: application/json" \
     -X GET -k \
      https://acme-sandbox.l27.co/latest/policy/booking

Updated