About the API

Pagination

Overview

Many Propexo GET endpoints return an array of results. To make it easier to work with these results, we provide standard pagination and sorting options to be used in the query string.

Parameters

There are two optional parameters that can be used to control pagination of results: offset and limit. Each can be used independently, or together.

Meta Object

The meta object is returned at the root with every paginated response payload. It contains information about the query that was performed.

Example meta object
1{
2 "meta": {
3 "offset": 0, // default is 0
4 "limit": 100, // default is 100
5 "orderBy": [], // default is no sorting
6 "hasMore": Boolean // (no default)
7 },
8 results: [] // the data you requested
9}

Limit

The limit parameter is used to limit the number of results returned. For example, if you wanted to limit the results to 10, you would use limit=10 as a query string parameter in the URL. If you do not define a limit, the default is 100.

Example use of limit
1// GET https://api.propexo.com/v1/<model_name>?limit=10
2
3{
4 "meta": {
5 "offset": 0,
6 "limit": 10,
7 "orderBy": [],
8 "hasMore": true // or false
9 },
10 "results": [] // 10 results
11}

Offset

The offset parameter is used to skip results. For example, if you wanted to skip the first 10 results, you would use offset=10 as a query string parameter in the URL. If you do not define an offset, the default is 0.

The below example would skip the first 10 results, and return the next 100 results.

Example use of offset
1// GET https://api.propexo.com/v1/<model_name>?offset=10
2
3{
4 "meta": {
5 "offset": 10,
6 "limit": 100,
7 "orderBy": [],
8 "hasMore": true // or false
9 },
10 "results": [] // 100 results
11}

hasMore

The hasMore parameter is used to indicate if there are more results available. If there are more results available, the value will be true. If there are no more results available, the value will be false. This can be used to determine if you should make another request to get more results, or optionally increase the limit value.