{"templateId":"markdown","versions":[{"version":"shipstation-v2","label":"ShipStation V2 API","link":"/apis/shipstation-v2/docs/reference/pagination","default":true,"active":false,"folderId":"58c9a61d"},{"version":"shipengine","label":"ShipStation API (formerly ShipEngine)","link":"/apis/shipengine/docs/reference/pagination","default":false,"active":true,"folderId":"58c9a61d"},{"version":"shipstation-v1","label":"ShipStation V1 API","link":"/apis/shipstation-v1/docs/reference/pagination","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"sidebar":"sidebar-apis/@shipengine/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Multi-Page Responses","keywords":"shipping, labels, shipstation, documentation, api","siteUrl":"https://docs.shipstation.com","lang":"en-US","llmstxt":{"hide":false,"title":"ShipStation API LLM Docs","description":"Find links and references to all markdown documentation for use with LLMs","excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"multi-page-responses","__idx":0},"children":["Multi-Page Responses"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some ShipStation API endpoints return paged results. This keeps response sizes manageable and prevents accidental over-fetching."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Examples of paginated endpoints include:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/reference/list-shipments"},"children":["List Shipments"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/reference/list-labels"},"children":["List Labels"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/reference/list-batches"},"children":["List Batches"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"/apis/shipengine/docs/reference/list-batch-errors"},"children":["List Batch Errors"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pagination-options","__idx":1},"children":["Pagination Options"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All paginated endpoints support the following fields, though the default values and allowed values may differ for each endpoint:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Query Parameter"},"children":["Query Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Which page of results you want. Defaults to 1."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page_size"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The number of resources returned per page. The default varies by endpoint, as does the max value."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sort_dir"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asc"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["desc"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The sort order of results. Defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["desc"]}," for most endpoints."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sort_by"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["enumerated string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Which field to sort by. The default value and available values differ by endpoint."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pagination-fields","__idx":2},"children":["Pagination Fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Paginated responses include several fields to help you determine the total number of pages, which page you're on, and how to request other pages."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field Name"},"children":["Field Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The total number of resources that match your search criteria."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The current page of results."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pages"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The total number of pages."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["links"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URLs of the first, last, previous, and next pages of results."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-request--response","__idx":3},"children":["Example Request & Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"  GET /v1/shipments?page_size=25&sort_dir=desc&sort_by=created_at HTTP/1.1\n  Host: api.shipengine.com\n  API-Key: __YOUR_API_KEY_HERE__\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":" {\n   \"shipments\": [],\n   \"total\": 168,\n   \"page\": 1,\n   \"pages\": 7,\n   \"links\": {\n     \"first\": {\n       \"href\": \"https://api.shipengine.com/v1/shipments?sort_dir=desc&sort_by=created_at&page=1&page_size=25\"\n     },\n     \"last\": {\n       \"href\": \"https://api.shipengine.com/v1/shipments?sort_dir=desc&sort_by=created_at&page=7&page_size=25\"\n     },\n     \"prev\": {},\n     \"next\": {\n       \"href\": \"https://api.shipengine.com/v1/shipments?sort_dir=desc&sort_by=created_at&page=2&page_size=25\"\n     }\n   }\n }\n","lang":"json"},"children":[]}]},"headings":[{"value":"Multi-Page Responses","id":"multi-page-responses","depth":1},{"value":"Pagination Options","id":"pagination-options","depth":2},{"value":"Pagination Fields","id":"pagination-fields","depth":2},{"value":"Example Request & Response","id":"example-request--response","depth":2}],"frontmatter":{"seo":{"title":"Multi-Page Responses"}},"lastModified":"2026-04-08T10:47:45.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/apis/shipengine/docs/reference/pagination","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}