Core APIs
Walmart Product Data API
Pagination
6 min
pagination requesting paginated results across multiple pages is one of the most common use cases in bluecart api for certain types of requests bluecart api allows you to return data across multiple pages automatically you can request a single page per request, or have bluecart api automatically retrieve data from multiple pages and concatenate the results into one response api credits and max page each successfully retrieved page incurs an api credit if the request yields fewer pages than specified, only credits for the actual number of returned pages are charged for example, for a request with max page=5 that only yields 3 pages (because only 3 pages are available), then only 3 api credits are charged single pages to request a single page of results you should use the page parameter for example, making a request with page=5 will return data from page 5 to find the total number of pages, and determine whether a next page is available, inspect the pagination object in the result json infinate scrolling pagination request types that implement infinate scrolling pagination use a next page token parameter to request the next page of results in these cases starting pagination from an explicit page number is not possible multiple pages bluecart api provides the max page parameter to retrieve mutliple pages of results and concatenate them into one response automating workloads such as "get the first 5 pages of results, if they exist" when running a request with max page set, the main array property of the response contains a concatenation of the array values from all requested pages setting a max page when using max page bluecart api will retrieve the number of pages (if available) specified in the max page parameter results from subsequent pages will be concatenated into the main array property of the response for example, the following request would yield data from pages 1, 2, 3, 4 and 5 max page=5 the main array property of a request made with max page will have the following properties added, making it easy to determine which physical page the current result came from property type description position number the position of the current result on the its page page number the page the current result is taken from position overall number the position of the current result within all requested pages set in the max page parameter example assuming 10 results per page and a request made with max page=2 the first result on page would be position overall=1 and the last result on page 2 would be position overall=20 setting the start page set the page to start the multiple page concatenation from by using the page and max page parameters together for example, the following request would yield data from pages 2, 3 & 4 page=2\&max page=4 limits when using max page set the page to start the multiple page concatenation from by using the page and max page parameters together for example, the following request would yield data from pages 2, 3 & 4 true false 208false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type false left unhandled content type