cancel
Showing results for 
Search instead for 
Did you mean: 

Coupa API Pagination with Dates in Service URL

rpc1235x
New Contributor II

Hey,

How can I adjust the following Service URL so that it extracts all available records? By default, Coupa API only allows 50 records, this is why I need to implement pagination. 

"https://XYZ.coupahost.com/api/invoices?offset=100&created-at[gt_or_eq]="+$date_1+"&created-at[lt_or_eq]="+$date_2

In the past, I have adjusted the pagination for service URLs without dates, but it's proving difficult to adjust with dates

What has worked in the past, in the REST GET:

Service URL: "https://XYZ.coupahost.com/api/invoices"

Has Next: eval(sl.ensureArray($.get('entity')).length > 0)

Next URL: "https://XYZ.coupahost.com/api/invoices?offset="+eval((snap.out.totalCount + 1) * 50)+"%26exported=false"

But when I try to add the dates, I keep getting 400 error code.

Thank you

0 REPLIES 0