---
title: SAP Shipment API Pagination
date: 2025-12-11T06:19:51Z
modified: 2025-12-15T05:22:59Z
permalink: "https://ezintegrations.ai/docs/use-pagination-in-sap-shipment-api/"
type: docs
status: publish
excerpt: ""
wpid: 3914
doc_category:
  - Pagination examples
author: Automation Hub
---

## Use Pagination in SAP Shipment API

#### **API Response**

![API Response](https://help.bizdata360.com/uploads/images/gallery/2025-09/scaled-1680-/xDGimage.png)

---

#### Custom Pagination Script

response_parameters = "['value']"
next_link = api_response.get('@odata.nextLink')
skip_token = next_link.split("$skiptoken=")[-1]
---

#### Params

{
  "$skiptoken": "{%skip_token%}"
}
---

#### Pre-request Script

skip_token = 0
---

#### Explanation

- `api_response` → Refers to the entire JSON response returned by the API. 
    - `value` → Contains the actual inventory records.
    - `@odata.nextLink` → Provides the URL for the next request,
        including the `$skiptoken`.
- The script extracts the skip token by splitting
    `@odata.nextLink` at `"$skiptoken="`.
- The `$skiptoken` parameter dynamically uses
    `{%skip_token%}`.
- The pre-request script initializes `skip_token` to
    `0` for the first API call.

## Topics

**Docs Categories:** [Pagination examples](https://ezintegrations.ai/wp-content/uploads/wp-mfa-exports/taxonomy/doc_category/pagination-examples.md)