Wiki
Clone wikiAPI-2.0 / Get_booking_frequencies
API method DEPRECATED, please use Frequencies for booking instead
Method: GET
Path: /api/bookings/booking_id
/frequencies
Return list of frequencies available for selected booking. Returned list of frequencies contains all frequencies returned by List frequencies plus selected booking frequency even if it is currently deactivated
This call requires authentication so X-Authentication header must be present.
Parameters: booking_id
(required)
Selected booking id
.
Example response JSON
{"frequencies":[ {"id":3,"code":"bw","name":"Bi-weekly cleaning","percent":15.0}, {"id":1,"code":"o","name":"One time cleaning","percent":0.0}, {"id":2,"code":"w","name":"Weekly cleaning","percent":10.0} ]}
Example requests:
For production, replace https://acme-sandbox.l27.co
with https://<your subdomain>.launch27.com
(1) First, get auth token for user@email.com:
curl -H "X-API-Key: test_8kBFkhmf8TA7TZyQBh" \ -H "Content-Type: application/json" \ -X POST -k \ -d '{"auth": {"email": "user@email.com", "password":"trustno1"}}' \ https://acme-sandbox.l27.co/api/auth
{"user":{ "id":2, "email":"user@email.com", "single_access_token":"JZR39nBOtg89JyyqmeI", "first_name":"First", "last_name":"Last" }}
curl -H "X-API-Key: test_8kBFkhmf8TA7TZyQBh" \ -H "X-Authentication: user@email.com:JZR39nBOtg89JyyqmeI" \ -H "Content-Type: application/json" \ -H "Accept: application/launch27.v2" \ -X GET -k \ https://acme-sandbox.l27.co/api/bookings/1/frequencies
Updated