Pagination with Body Testing API demonstrates a pagination approach where parameters are sent in the request body instead of query parameters. This is useful for APIs that require POST requests for retrieving paginated data.
Method
POST
Endpoint
{{base_url}}/orderdetails-paginationbody
Query Parameters
| Parameter Name | Value | Description |
|---|---|---|
| pageSize | {%max_num%} | Maximum records per page |
| pageToken | {%min_num%} | Starting point for records |
Headers
| Header Name | Value |
|---|---|
| Content-Type | application/json |
Body
{
"pageToken": 1,
"pageSize": 100
}
Authorization
Type: OAuth 2.0
Refresh Token Endpoint URL: {{base_url}}/api/oauth2/token
Headers
{
"Content-Type": "application/x-www-form-urlencoded"
}
Body (OAuth)
{
"grant_type": "password",
"client_id": "{{client_id}}",
"client_secret": "{{client_secret}}",
"username": "training@bizdata360.com",
"password": "B!zdata@360"
}
Pagination Details
Pagination Type: Pagination with Body
User Key: nextPageToken
Key to update: pageToken
Data Collection Key: [‘items’]
Numeric Parameters
| Parameter | Value | Description |
|---|---|---|
| Minimum Number | 1 | Minimum records per page |
| Maximum Number | 100 | Maximum records per page |
Notes:
- Useful for APIs requiring POST requests with pagination parameters in the body.
Authentication Instructions:
To acquire the Base URL and create your own Client ID and Secret, please refer to the My Profile section within your Bizdata account.