# Pagination
easyPoints uses pagination for routes that return multiple data points.
# Fields
All requests default to returning the first page with 250 results in ascending order unless otherwise specified
Key | Type | Definition |
---|---|---|
page | Integer | The page number to be returned (Defaults to page 1) |
per_page | Integer | The number of results per page (Defaults to 250 per page, max 250) |
direction | String | The direction to sort values in (Asc or Desc, defaults to Ascending) |
# Example
Example request and result:
curl -X GET \
'https://loyalty.slrs.io/api/shopify/point_allotments?type=api&per_page=250&page=1&direction=desc' \
-H 'content-type: application/json' \
-H 'authorization: Basic ${API_CREDENTIALS}'
{
"data": [
{
"action": null,
"allotment_cascade": true,
"allotted_at": "2023-01-01T00:00:00.000000",
"app_reference": "shopify_integration",
"event_id": null,
"inserted_at": "2023-01-01T00:00:00.000000",
"object": null,
"parent": "point_story-2",
"point_balance_uid": "f70bf33c-de77-11ed-9367-787b8aae8c7a",
"point_value": 500,
"points_deducted": 0,
"type": "manual",
"uid": "8a6e8036-e305-11ed-a715-787b8aae8c7a"
},
{
"action": "fulfillment-1",
"allotment_cascade": null,
"allotted_at": "2000-01-01T00:00:00.000000",
"app_reference": "shopify_integration",
"event_id": 1,
"inserted_at": "2023-01-01T00:00:00.000000",
"object": "line_item-1",
"parent": "order-1",
"point_balance_uid": "f715bfd4-de77-11ed-8597-787b8aae8c7a",
"point_value": 100,
"points_deducted": 0,
"type": "fulfillment",
"uid": "e94d0d42-df50-11ed-bb36-787b8aae8c7a"
},
...
]
}