Hi Everyone,
I’m trying to see if there’s a way to handle this pagination. I’m trying to extract payment data in Walmart. (Here is the doc to the API).
Below is the get URI and the paging configuration.
GET
/report/reconreport/reconFileJson?reportDate=test&offset={{export.http.paging.token}}&noOfRecords=1000
In the connection debug logs, I can see that I am able to go through the records up until the last page.
1st Request:
{"url":"``https://marketplace.walmartapis.com/v3/report/reconreport/reconFileJson?reportDate=test&offset=
0
&noOfRecords=1000","method":"GET","headers":{"authorization":"Basic``test==","wm_svc.name":"Walmart Marketplace","wm_qos.correlation_id":"test","wm_consumer.channel.type":"test","WM_SEC.ACCESS_TOKEN":"********","accept":"application/json"}}
The response would have this field in the body called nextOffset with a value of 380098 and would be used on the 2nd request below
{"url":"``https://marketplace.walmartapis.com/v3/report/reconreport/reconFileJson?reportDate=test&offset=
380098
&noOfRecords=1000","method":"GET","headers":{"authorization":"Basic``test==","wm_svc.name":"Walmart Marketplace","wm_qos.correlation_id":"test","wm_consumer.channel.type":"test","WM_SEC.ACCESS_TOKEN":"********","accept":"application/json"}}
When I reach the last page, the nextOffset field will contain a value of -1. However, even though I have specified the field and value in the “Path to paging complete field in HTTP response body and Paging complete values”. It still tries to make a call like below which would then error the flow step.
{"url":"``https://marketplace.walmartapis.com/v3/report/reconreport/reconFileJson?reportDate=test&offset=
-1
&noOfRecords=1000","method":"GET","headers":{"authorization":"Basic``test==","wm_svc.name":"Walmart Marketplace","wm_qos.correlation_id":"test","wm_consumer.channel.type":"test","WM_SEC.ACCESS_TOKEN":"********","accept":"application/json"}}
Hope my explanation makes sense. I appreciate any inputs
Thank you!