Wiki

Clone wiki

API-2.0 / Frequencies_for_booking

Method: GET

Path: /booking/frequencies

Return list of configured booking frequencies for new or existing booking.

Query params

booking_uuid (optional)

Booking digest. MUST be provided if frequencies requested for existing booking. (requires authentication)

location_id (optional)

Unique ID of location (see Location for booking). Default location used if parameter not provided.

Example of response

[
  {
    "id": 17,
    "interval": "4w",
    "name": "Monthly",
    "percent": 5,
    "amount": 0.00,
    "exclude_first": true,
    "default": false
  },
  {
    "id": 15,
    "interval": "2w",
    "name": "Every 2 weeks",
    "percent": 15,
    "amount": 0.00,
    "exclude_first": true,
    "default": false
  },
  {
    "id": 13,
    "interval": "3w",
    "name": "Every 3 weeks",
    "percent": 15,
    "amount": 0.00,
    "exclude_first": true,
    "default": true
  },
  {
    "id": 4,
    "interval": "o",
    "name": "One Time",
    "percent": 0,
    "amount": 0.00,
    "exclude_first": false,
    "default": false
  },
  {
    "id": 18,
    "interval": "1w",
    "name": "Weekly",
    "percent": 0,
    "amount": 10.00,
    "exclude_first": true,
    "default": false
  }
]

Where:

  • interval tells if frequency is recurring frequency or not: value o means frequency is not recurring, otherwise frequency is recurring
  • if frequency has discount, it is percent discount or amount discount, never both
  • default is true for default frequency, can be used to pre-select frequency for new booking
  • exclude_first when true means that no frequency discount will be applied to the first recurring booking.

Example request (as non-logged-in):

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/booking/frequencies

Example request (as logged-in):

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

Replace BEARER_FROM_LOGIN with bearer from Login

curl -H "Content-Type: application/json" \
     -H 'Authorization: Bearer BEARER_FROM_LOGIN' \
     -X GET -k \
     https://acme-sandbox.l27.co/latest/booking/frequencies?booking_uuid=NcUHgV93Vkf7Jxgr8P6rvOi3DMLpYvc2

Updated