Skip to content
Workaround for API ...
 
Notifications
Clear all

Workaround for API Call GET Limit (Booqable)

4 Posts
3 Users
0 Reactions
6 Views
Stef_OTH
(@stef_oth)
Posts: 2
New Member
Topic starter
 

Hello!

I'm using a scenario to retrieve archived orders from our booking platform (Booqable) and update them in Airtable. The current limit for fetching orders is 1,000. I didn't anticipate reaching this limit, but we have!

At present, I fetch all archived orders and then filter them after the Iterator module based on their last updated date. This is because I only need to process orders that have been updated or created within the last 48 hours.

I've identified two potential solutions, but I'm unsure how to implement either:

  1. Incorporate an additional filter into the API Call to retrieve only orders updated in the last 24 hours.
  2. Complete the initial API Call, store the data, repeat the Call to retrieve different data, and then process all data together.

Are either of these approaches feasible? Or is there a third option I might be missing?

Option 1 seems the most straightforward, but I'm struggling to figure out the correct filter. Would it involve an additional query string?

My understanding of API calls is limited, so I'm feeling a bit stuck. Any assistance would be greatly appreciated!

Stefaan

Current Working API Call

Output of API Call (‘statuses’ and ‘updated_at’ highlighted)

Error

Scenario Blueprint
blueprint.json (261.5 KB)

 
Posted : 22/11/2023 12:24 am
samliew
(@samliew)
Posts: 293
Reputable Member
 

Welcome to the callin.io community!

According to the Booqable API documentation for List all orders, you can utilize these parameters to fetch the subsequent page(s) of search results.

Screenshot_2023-11-22_131157

/orders?per=1000&page=1
 
Posted : 22/11/2023 5:38 am
Simon_Langham
(@simon_langham)
Posts: 1
New Member
 

Hi there,

The approach we've used for paging involves webhooks and multiple scenarios.

Essentially, you start with a scenario that configures necessary details for API calls, such as the URL, page number, and items per page. This scenario then passes these configuration options to another scenario using an HTTP call to that scenario's webhook.

The second scenario executes the API calls to Booqable, specifying the page number for each request. It increments the page number and then triggers itself again at the end of the scenario if all pages/data haven't been processed.

In your specific case, since you can't filter returned data by date (which is a limitation with Booqable), you could make an initial API call to determine the total number of orders. Then, you can calculate the required number of pages based on your desired batch size and make the API calls in reverse order. I'd recommend doing this in the first scenario to establish your starting page number before engaging the webhook scenario.

This method allows you to retrieve data starting from the last page and moving backward. As soon as you encounter an order that falls outside your 48-hour threshold, you can trigger an error to halt execution. This prevents the webhook from being called unnecessarily and processing data you no longer need.

Hope this explanation is clear.

Best regards,

Simon

 
Posted : 22/11/2023 8:44 am
Stef_OTH
(@stef_oth)
Posts: 2
New Member
Topic starter
 

Thank you so much for your assistance!

 
Posted : 23/11/2023 12:54 am
Share: