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 true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type 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 208left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type