API/Pagination
Get started
Pagination
All endpoints that return lists use the same pagination format. The objects are in the results field of the response.
Query parameters
| Field | Type | Description | |
|---|---|---|---|
page | integer | optional | Which page to fetch. Default 1. |
page_size | integer | optional | Number of objects per page. Default 25. |
Response format
| Field | Type | Description |
|---|---|---|
total | integer | Total number of objects matching the query. |
count | integer | Number of objects in results on this page. |
next | string / null | Full URL to the next page, or null on the last page. |
previous | string / null | Full URL to the previous page, or null on the first page. |
results | array | The objects themselves. |
{
"total": 148,
"next": "https://app.easyfreelance.no/api/v1/users?page=2&page_size=2",
"previous": null,
"count": 2,
"results": [
{
"id": 123,
"email": "[email protected]",
"internal_id": 456,
"name": "Marte Hansen",
"onboarding": { "is_onboarded": true, "missing_steps": [] }
},
{
"id": 124,
"email": "[email protected]",
"internal_id": null,
"name": "Jonas Skoglund",
"onboarding": { "is_onboarded": false, "missing_steps": ["bank_account"] }
}
]
}Which endpoints
| Endpoint | Returns |
|---|---|
GET /users | Contractors linked to the partner. |
GET /payouts | Payouts for all contractors. |
GET /users/{id}/payouts | Payouts for a single contractor. |
Practical advice
- Follow
nextuntil it isnullinstead of calculating page numbers yourself – that way the integration copes with objects arriving in the meantime. - Remember that each page is a separate call against the rate budget of 500 requests per minute. Prefer fetching larger pages rather than paginating in small steps.
GET /payoutsandGET /users/{id}/payoutsalso acceptsstatusas a filter (exact match), so you do not have to fetch everything.