# Order History
# Fetching orders
# Route
Use the following GET route to get a store's order history.
GET
https://loyalty.slrs.io/api/shopify/orders?ids=
Provide the ids
request parameter with a comma-separated list of Shopify IDs of the orders for which you want to fetch point data.
# Arguments
Only the first 250 IDs at most will be accepted.
# Required Parameters
Provide the ids
request parameter with a comma-separated list of Shopify IDs of the orders for which you want to fetch point data.
# Optional Parameters
None
# Returns
This route returns the following data
Key | Type | Definition |
---|---|---|
id | String | The Shopify ID of the order |
awardable_points | Integer | The total number of points this order can award |
points_awarded | Integer | The number of points already awarded for this order |
points_redeemed | Integer | The number of points used to discount this order |
Example request and result:
curl -X GET \
'https://loyalty.slrs.io/api/shopify/orders?ids=123,456,789' \
-H 'content-type: application/json' \
-H 'authorization: Basic ${API_CREDENTIALS}' \
{
"data": {
"123": {
"awardable_points": 210,
"points_awarded": 210,
"points_redeemed": 0
},
"456": {
"awardable_points": 119,
"points_awarded": 0,
"points_redeemed": 200
}
}
}