API reference
- Introduction
- Authentication
- Pagination
Resources
- Identity
- Customers
- Activities
- Transactions
- Orders
- Sites
- Emails
- Webhooks
Webhooks
- Introduction
- Webhook events
List Transactions
curl --request GET \
--url https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions
{
"transactions": [
{
"id": 123,
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"points_approved": 123,
"points_pending": 123,
"created_at": "<string>",
"resource": "activity",
"activity": {
"id": 123,
"merchant_id": "<string>",
"value": 123,
"state": "pending",
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"created_at": "<string>",
"rule": {
"id": 123,
"name": "<string>",
"title": "<string>"
},
"flow": {
"id": 123,
"journey_id": 123,
"name": "<string>",
"block_id": "<string>"
},
"resource": null
}
}
],
"cursor": {
"prev": "<string>",
"next": "<string>"
}
}
Retrieve a list of transactions for this customer.
Unlike activities and rewards, transactions are immutable. For example, if an activity is triggered and then voided, it will typically create two transactions, one which adds points and a second which removes points.
Path Parameters
The ID of the customer in your platform or ecommerce store
Query Parameters
The format of the response
csv
, json
Return only resources whose id is after the specified id
x >= 0
Max number of resources to return per request
1 <= x <= 500
Fetch another page of results using a cursor returned in a previous response
Return only transactions created on or after the specified ISO 8601
datetime string
Return only transactions created before the specified ISO 8601
datetime string
Response
The customer linked to the transaction. The attached fields describe the current state of the customer as the API response is generated, not their state at the time of the transaction
Number of approved points added or removed
Number of pending points added or removed
ISO 8601
timestamp representing the time of the transaction
activity
Unique ID of the activity in LoyaltyLion
The ID of the associated resource in your store, or null if it has no association. This can be used to update an activity
The value of the activity, in points
pending
, declined
, approved
, void
, expired
The customer linked to the activity. The attached fields describe the current state of the customer as the API response is generated, not their state at the time of the activity
An ISO 8601
timestamp representing the time of the activity
The rule that triggered this activity. If the activity was not linked to a rule, such as a manual points adjustment, this field will still be present but each of its properties will be null
The customer linked to the transaction. The attached fields describe the current state of the customer as the API response is generated, not their state at the time of the transaction
Number of approved points added or removed
Number of pending points added or removed
ISO 8601
timestamp representing the time of the transaction
activity
Unique ID of the activity in LoyaltyLion
The ID of the associated resource in your store, or null if it has no association. This can be used to update an activity
The value of the activity, in points
pending
, declined
, approved
, void
, expired
The customer linked to the activity. The attached fields describe the current state of the customer as the API response is generated, not their state at the time of the activity
An ISO 8601
timestamp representing the time of the activity
The rule that triggered this activity. If the activity was not linked to a rule, such as a manual points adjustment, this field will still be present but each of its properties will be null
The response is of type string
.
curl --request GET \
--url https://api.loyaltylion.com/v2/customers/{merchant_id}/transactions
{
"transactions": [
{
"id": 123,
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"points_approved": 123,
"points_pending": 123,
"created_at": "<string>",
"resource": "activity",
"activity": {
"id": 123,
"merchant_id": "<string>",
"value": 123,
"state": "pending",
"customer": {
"id": 123,
"merchant_id": "<string>",
"email": "<string>",
"points_pending": 123,
"points_approved": 123,
"points_spent": 123
},
"created_at": "<string>",
"rule": {
"id": 123,
"name": "<string>",
"title": "<string>"
},
"flow": {
"id": 123,
"journey_id": 123,
"name": "<string>",
"block_id": "<string>"
},
"resource": null
}
}
],
"cursor": {
"prev": "<string>",
"next": "<string>"
}
}