[#561] GetBooking

Migrated from Redmine #561 | Author: David Liew
Status: New | Priority: Normal | Created: 2020-08-23


Hi I am trying to getbooking. There is a booking made. but no matter what i filter. No result was return

“{"jsonrpc":"2.0","method":"getBooking","id":"1","params":[{ "date_from":"2020-08-01","date_to":"2020-08-31","booking_type":"all","order":"start_date","order":"start_date"}]}”;

{“error”:{“code”:-32080,“message”:“Appointment couldn’t be found”,“data”:},“id”:“1”,“jsonrpc”:“2.0”}

Below is Previous Booking record

	"bookings": [
		{
			"id": "89",
			"event_id": "4",
			"unit_id": "13",
			"client_id": "85",
			"client_hash": "4e93f64943ef98fe4899a0cbb21f1d0a",
			"start_date_time": "2020-08-23 15:00:00",
			"end_date_time": "2020-08-23 16:00:00",
			"time_offset": "0",
			"is_confirmed": "1",
			"require_payment": true,
			"code": "90h2gcra",
			"hash": "54c074abfc053952a70340fd44a7d83e"
		}

Redmine Admin wrote:

hi, it seems you need to call admin API method getBookings API documentation | SimplyBook.me Online Scheduling

public API getBooking require different params set

David Liew wrote:

I manage to get the booking. But the reason i calling this field is to get the Booking ID and hash for cancellation MD5 usage.

can check which method will return booking hash field?

Redmine Admin wrote:

you can use admin api without hash. The only way to get hash via public API is book method