Hi @unicornParty, it looks like your API provides all information required to query additional pages in the body.list.meta.nextCursor field.
You should be able to do something like this:
This workflow appends the body.list.meta.nextCursor field when present, otherwise it uses an empty string instead. I don’t have access to the Walmart API, but perhaps you can give this a go with your own credentials?
I’ve also removed what seems to be a token from the workflow you have shared, to be safe you might want to rotate/recreate the secrets you have used in this workflow.
In your example, how will the next request be queried?
Hi @unicornParty, the example HTTP Request uses a URL expression of https://marketplace.walmartapis.com{{ $json?.body?.list?.meta?.nextCursor ? $json.body.list.meta.nextCursor : "" }}
The snippet inside the curly braces $json?.body?.list?.meta?.nextCursor ? $json.body.list.meta.nextCursor : "" uses the ternary operator. So on the first execution (when there is no json.body.list.meta.nextCursor field) the request would simply go to https://marketplace.walmartapis.com, but when the field is populated it would be attached to this URL.
I couldn’t test this myself so just used this as a dummy URL, but now revisiting your original workflow you probably want to use an expression like this instead as I’ve missed the /v3/orders part before: