All endpoints which may return lists of resources will be paginated, unless explicitly stated otherwise in the API reference.
Pagination improves the reliability of our API, by helping to reduce timeouts and provide you with results faster.
The Perk API uses an offset and limit-based paging implementation: requests may include offset and limit parameters. The limit is the number of results you want, and the offset is how many items to “skip” over before starting to return results. To simplify things for the caller, the API may also return the total number amount of items within the set.
Default and maximum values for both limit and offset are given here, but may be altered according to a specific endpoint's documentation.
| Parameter | Type | Description |
|---|---|---|
offset | integer | The starting index of the data page to be returned. Defaults to zero (from the first item). Values should be greater or equal than 0 |
limit | integer | The maximum size of the data page to be returned. Allowed values are in the range [1, 50], and it defaults to 10, unless other values are specified in the endpoint. |
total | integer | The total amount of items evaluated by the query to the server. This number might reflect a value higher than the actual pagination limit. |
{
"offset": 0,
"limit": 10,
"total": 2,
"profiles": [
{
"id": "f2dd1aa3-5601-4725-a520-bd59885bbb16",
"name": "My Company Ltd",
"payment_method_type": "automatic",
"billing_period": "instant",
"currency": "GBP",
"billing_information": {
"legal_name": "My Company Ltd",
"vat_number": "GB123456789",
"address_line_1": "199 Bishopsgate",
"address_line_2": "Spitalfields",
"city": "London",
"postal_code": "EC2M 3TY",
"country_name": "United Kingdom"
}
},
{
"id": "8fa66535-5a9a-4a6f-90d8-2986621a706a",
"name": "My Spanish Company SL",
"payment_method_type": "manual",
"billing_period": "monthly",
"currency": "EUR",
"billing_information": {
"legal_name": "My Spanish Company SL",
"vat_number": "ES123456789",
"address_line_1": "Passeig de Gracia 345",
"address_line_2": "Planta 14",
"city": "Barcelona",
"postal_code": "080123",
"country_name": "Spain"
}
}
]
}
