Wiki

Clone wiki

API-2.0 / Get_spots

API method DEPRECATED, please use Spots_for_booking instead


Method: GET

Path: /api/spots/date

Return list of spots available for booking on a given date.

Parameters: date (required)

Date to return booking spots for. Should be in YYYY-MM-DD format and is always interpreted as local date in client timezone.

Example response JSON

{"spots":[{
  "id":2,
  "hours":10,
  "minutes":30,
  "service_date":"2015-02-10T10:30",
  "value":1,
  "remaining":1,
  "spot_flexibilities":[{
    "id":2,"spot_id":2,"hours":3,"value":1,"remaining":1
  }]
},{
  "id":1,
  "hours":13,
  "minutes":0,
  "service_date":"2015-02-10T13:00",
  "value":0,
  "remaining":0,
  "spot_flexibilities":[]
}]}
Where:

  • remaining may have value 0 or 1:
    • 1 means there is at least one free spot
    • 0 means there are no free spots
  • value is deprecated, returns same value as remaining

Example request:

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

curl -H "X-API-Key: test_8kBFkhmf8TA7TZyQBh" \
     -H "Content-Type: application/json" \
     -H "Accept: application/launch27.v2" \
     -X GET -k \
     https://acme-sandbox.l27.co/api/spots/2015-02-10

Updated