Migrated from Redmine #106 | Author: jasmine JJ Status: Closed | Priority: Normal | Created: 2018-02-07
Hello there,
I am trying to get list booking through API getBookings() but I don’t know exactly format request so I test quit this
{“jsonrpc”:“2.0”,“method”:“getBookings()”,“id”:“1”,“params”:{“date_from”:“2017-01-01”,“date_to”:“2017-12-12”}}
but it response invalid request, so could you please help me correct this format.
Thank you
Hi! Please remove () in method name and use non named parameters.
{“jsonrpc”:“2.0”,“method”:“getBookings”,“id”:“1”,“params”:[{“date_from”:“2017-01-01”,“date_to”:“2017-12-12”}]}
I’m sorry when asking again but when I request
{“jsonrpc”:“2.0”,“method”:“getBookings”,“id”:“1”,“params”:{“params”:[{“date_from”:“2018-01-20”,“date_to”:“2018-01-21”,“booking_type”:“all”,“order”:“start_date”,“unit_group_id”:6,“event_id”:1}]}}
I still receive booing with another unit_id and event id at another time.
For example: when request like above I receive
{
“id”: “1”,
“record_date”: “2018-01-15 16:49:45”,
“start_date”: “2018-01-15 17:00:00”,
“end_date”: “2018-01-15 18:00:00”,
“unit_id”: “1”,
…
“event_id”: “1”
I’m sorry when asking again but when I request
{“jsonrpc”:“2.0”,“method”:“getBookings”,“id”:“1”,“params”:{“params”:[{“date_from”:“2018-01-20”,“date_to”:“2018-01-21”,“booking_type”:“all”,“order”:“start_date”,“unit_group_id”:6,“event_id”:1}]}}
I still receive booing with another unit_id and event id at another time.
For example: when request like above I receive
{“jsonrpc”:“2.0”,“method”:“getBookings”,“id”:“1”,“params”:{“params”:[{“date_from”:“2018-01-20”,“date_to”:“2018-01-21”,“booking_type”:“all”,“order”:“start_date”,“unit_group_id”:6,“event_id”:1}]}}
Must be:
{“jsonrpc”:“2.0”,“method”:“getBookings”,“id”:“1”,“params”:[{“date_from”:“2018-01-20”,“date_to”:“2018-01-21”,“booking_type”:“all”,“order”:“start_date”,“unit_group_id”:6,“event_id”:1}]}