cancel
Showing results for 
Search instead for 
Did you mean: 

Coupa API GET

manohar
Contributor

hi there,

I need to call Coupa API to do a GET but their API only lets me get 50 records at a time, but they have over 7000 records that I need to pull.

image

how can I increament my url

https://instance.coupahost.com/api/invoices?offset=50&exported=false https://instance.coupahost.com/api/invoices?offset=100&exported=false https://instance.coupahost.com/api/invoices?offset=150&exported=false
.
.
.

I see there are options for these but dont know how to leverage them. any guidance?

image

Thanks
Manohar

1 ACCEPTED SOLUTION

image

hasNext: eval(sl.ensureArray($.get(‘entity’,)).length > 0)
nextUrl: lib.conf.getAppConf(‘coupa’).basepath.concat(“supplier_information?offset=”,(snap.out.totalCount + 1) * 50, “&exported=false”)

View solution in original post

9 REPLIES 9

alchemiz
Contributor III

Hi @manohar ,

Good day, before what I did was…

Set the has next property where you check the returned entity of coupa api

eval(sl.ensureArray($.get(‘entity’,)))

then for the next page

‘’.concat(‘https://instance.coupahost.com/api/invoices?offset=’, (snap.out.totalCount + 1) * 50, ‘&exported=false’)

then set pagination interval maybe 1 or 2 secs

Hope this helps

Thanks,
MM

Hi @alchemiz , thank you for your help.

I have tried but still gets me only 50 records. I am sure, I am not doing right. Please check the pipeline that I tried to build. Can you please tell me whats missing?

CoupaExtract_2023_01_24.slp (23.6 KB)

Thank you,
Manohar

image

hasNext: eval(sl.ensureArray($.get(‘entity’,)).length > 0)
nextUrl: lib.conf.getAppConf(‘coupa’).basepath.concat(“supplier_information?offset=”,(snap.out.totalCount + 1) * 50, “&exported=false”)

thank you very much. that did it.