Pagination & Filtering
Pagination
List endpoints support pagination through start (or skip) and limit query parameters.
| Parameter | Type | Default | Description |
|---|---|---|---|
start / skip | integer | 0 | Number of records to skip |
limit | integer | 100 | Maximum number of records to return |
Example
# Get the first 25 products
GET /api/v1/partner/products?skip=0&limit=25
# Get the next 25 products
GET /api/v1/partner/products?skip=25&limit=25
note
Remember to include the x-api-key and Authorization headers with every request. See Authentication.
Response Formats
The API uses several response wrapper formats depending on the endpoint:
SearchResult
Used by most list/search endpoints.
{
"count": 25,
"total": 142,
"searchResult": [
{ ... },
{ ... }
]
}
| Field | Description |
|---|---|
count | Number of results in this page |
total | Total number of matching records |
searchResult | Array of result objects |
ListResult
Used by some endpoints that return a simple list.
{
"values": [
{ ... },
{ ... }
]
}
DateSearchResult
Used by date-range filtered endpoints.
{
"count": 10,
"cursor": "2024-01-15T10:30:00Z",
"results": [
{ ... },
{ ... }
]
}
| Field | Description |
|---|---|
count | Number of results in this page |
cursor | Cursor value for fetching the next page |
results | Array of result objects |
Date Range Filtering
Many endpoints support filtering by date range. The maximum date range for most endpoints is 7 days.
Date format varies by endpoint:
| Format | Example | Used by |
|---|---|---|
String (MM/dd/yyyy) | 01/15/2024 | Transactions, Vendors, Purchase Orders, Company Contacts |
| Epoch milliseconds | 1704067200000 | Members, Products, Batches, Inventory |
# String date format
GET /api/v1/partner/transactions?startDate=01/01/2024&endDate=01/07/2024
# Epoch milliseconds format
GET /api/v1/partner/members?startDate=1704067200000&endDate=1704672000000
Filtering by Number of Days
Some endpoints also support a days parameter as a shorthand:
GET /api/v1/partner/transactions/days?days=3