Wiki
Clone wikiAPI-2.0 / Next_booking_date_for_frequency
Method: POST
Path: /booking/frequencies/{id:[0-9]+}/next
Return next booking date for recurring frequency and date
.
id
(required)
Frequency unique ID (see Frequencies for booking)
Request Schema:
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Next recurring booking date for frequency request", "type": "object", "properties": { "date": { "type": "string", "pattern": "\\A\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\z" } }, "required": [ "date" ] }
Where:
date
is the date for which next recurring date should be calculated
Example of request JSON:
{ "date": "2016-03-06T13:30:00" }
Example request:
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 POST -k \ -d '{"date": "2016-03-06T13:30:00"}' \ https://acme-sandbox.l27.co/latest/booking/frequencies/2/next
Response
- 401 Unauthorized on login failure.
- 422 on JSON schema errors or frequency is not recurring.
- 200 OK on success.
Example of response JSON:
{ "date": "2016-03-20T13:30:00Z" }
Updated