curl https://api.thanxsandbox.com/purchases \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"purchases": [
{
"id": "92b7b0dac4",
"user_id": "weori235",
"merchant_id": "9a1f0772c9ac",
"location_id": "e7183da044",
"purchased_at": "2020-01-01T20:00:00Z",
"amount": 9.99,
"order": {
"provider": "OLO",
"id": "YWEI2342F"
}
}
],
"pagination": {
"total_page": 1,
"per_page": 10,
"current_page": 1
}
}
Purchases
Get Purchases
This section describes endpoints that enable a third party to fetch a user’s purchases. This endpoint describes all available purchases.
GET
/
purchases
curl https://api.thanxsandbox.com/purchases \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"purchases": [
{
"id": "92b7b0dac4",
"user_id": "weori235",
"merchant_id": "9a1f0772c9ac",
"location_id": "e7183da044",
"purchased_at": "2020-01-01T20:00:00Z",
"amount": 9.99,
"order": {
"provider": "OLO",
"id": "YWEI2342F"
}
}
],
"pagination": {
"total_page": 1,
"per_page": 10,
"current_page": 1
}
}
Please review proper request headers here.
Parameters
string
Only return purchases for this merchant
string
Only return purchases for this location
string
Only return purchases for this user. Note: the bearer token will be used to
determine which user’s purchases are being requested when the request is made
by a logged in user.
integer
The current page of paginated resources.
- Default:
1.
integer
Number of records to be returned per API request.
- Default:
10 - Minimum:
1 - Maximum:
100
Response
string
The ID of the purchase record
string
The user ID
string
The merchant ID
string
Location ID
string
Time the purchase was made in ISO8601-format
decimal
The purchase amount
hash
hash
curl https://api.thanxsandbox.com/purchases \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"purchases": [
{
"id": "92b7b0dac4",
"user_id": "weori235",
"merchant_id": "9a1f0772c9ac",
"location_id": "e7183da044",
"purchased_at": "2020-01-01T20:00:00Z",
"amount": 9.99,
"order": {
"provider": "OLO",
"id": "YWEI2342F"
}
}
],
"pagination": {
"total_page": 1,
"per_page": 10,
"current_page": 1
}
}