BookingSync / bookingsync-api-docs

BookingSync API Documentations
http://developers.bookingsync.com/
12 stars 6 forks source link

Get booking by reference/external_reference #338

Closed bkniffler closed 3 years ago

bkniffler commented 3 years ago

I'm surprised that querying by reference or external_reference is not possible. Would it be possible to add those? Should be a pretty common request, our customers store reference instead of id in their data, so to get bookings by their reference we currently have to fetch ALL bookings right now.

StoneFrog commented 3 years ago

I believe sth like filter[external_reference]=XEPATD and filter[reference]=00A76 should do the job

bkniffler commented 3 years ago

It works, though, unlike filtering by id or orderId for payments, I'm not able to provide a list (filter[reference]=00A76,00A77). Having to query single results + not being able to expand related items within the same query (like including fees in the same call) + a rate limit of 1000 calls per hour, will probably make me hit the limit pretty fast. Any chance some way to query for multiple references/external_references may get implemented?

Also, I couldn't find anything about filter[] in the docs.

StoneFrog commented 3 years ago

For filtering by multiple references you couldtry filter[external_reference][]=EXTERNAL_REF_1&filter[external_reference][]=EXTERNAL_REF_2. as for related items - you should be able to do that, as described http://developers.bookingsync.com/reference/#request-options Sideloading Associations section, so ?include=booking_fees

Also to minimize the number of requests you could take a look at updated since http://developers.bookingsync.com/guides/updated-since-flow/ to fetch objects updated after specific time.

As for missing documentation, I'll ask the responsible team to add that.

bkniffler commented 3 years ago

This works good, thanks for mentioning these features @StoneFrog.