Tixstock Pagination Overview
Currently, Tixstock allows Partners to sort, filter and paginate certain endpoints.
Paginated responses always contain meta and links keys which outline the pagination's state.
Please see below for list of default query strings used for pagination and sorting.
Query String | Description |
---|---|
page | Defines the current page please change this value accordingly to paginate the results. Default: 1 Type: Integer |
per_page | Defines the number of results per page. Default: 10 Type: Integer Min: 1 Max: 50 |
sort_order | Order the result by ascending or descending. Default: desc Accepted Values: asc / desc Type: String |
order_by | Order the results based on the supplied value. Options will vary per endpoint. Type: String |
Pagination Response Meta
The meta JSON is useful if you wish to write your own custom code to pagination through the results.
Key | Description |
---|---|
current_page | The current page. Type: Integer |
from | Stores the value for the start of the offset. Type: Integer |
to | Stores the value for the end of the offset. Type: Integer |
path | Stores the path url for the endpoint offset. Type: String |
per_page | Stores the number of results per page. Type: String |
Pagination Response Links
The links JSON provides convenient links to navigation through your results.
Key | Description |
---|---|
self | Defines the relationship of the link. Type: Integer |
first | The first page of data. Type: Integer |
last | The last page of data. Type: Integer |
prev | The previous page of data. Type: String |
next | The next page of data. Type: String |
Pagination Example Response
{
"data": [],
"meta": {
"mode": "Production",
"type": "feed.get",
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://pf.tixstock.com/v1/feed",
"per_page": 10,
"to": 1,
"total": 1,
"request_id": "01ercz4hw9ftdnamjx754cwxxy"
},
"links": {
"self": "link-value",
"first": "https://pf.tixstock.com/v1/feed?page=1",
"last": "https://pf.tixstock.com/v1/feed?page=1",
"prev": null,
"next": null
}
}