Skip to content

Pagination

The SKUs endpoint is the only paginated endpoint in the Prediko API. All other endpoints (Orders, Suppliers, Locations) return complete result sets.

EndpointMethodPagination
/api/v1/skusPOST✅ Yes
/api/v1/ordersGET❌ No (returns all)
/api/v1/suppliersGET❌ No (returns all)
/api/v1/warehousesGET❌ No (returns all)

The SKUs endpoint accepts these pagination parameters:

ParameterTypeDefaultMaxDescription
limitinteger10005000Number of results per page
offsetinteger0-Number of results to skip

The SKUs endpoint returns a pagination object with metadata:

{
"data": [...],
"pagination": {
"total": 1250,
"limit": 100,
"offset": 0,
"has_more": true
}
}
FieldDescription
totalTotal number of SKUs available
limitNumber of SKUs returned in this page
offsetNumber of SKUs skipped
has_moreWhether more SKUs exist after this page
import requests
def get_all_skus(api_key):
all_skus = []
offset = 0
limit = 1000 # Use default limit for efficiency
while True:
response = requests.post(
"https://api.prediko.io/api/v1/skus",
headers={
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
},
params={"limit": limit, "offset": offset},
json={}
)
data = response.json()
all_skus.extend(data["data"])
if not data["pagination"]["has_more"]:
break
offset += limit
return all_skus
# Usage
skus = get_all_skus("YOUR_API_KEY")
print(f"Total SKUs: {len(skus)}")
  1. Use the default limit - 1000 records per page is efficient for most use cases
  2. Check has_more - Always check this field before making another request
  3. Handle empty results - The first page may be empty if no SKUs match your filters
  4. Use filters - Reduce result sets with filters like name_like or with_material