Skip to main content
GET
/
v1
/
loyalties
/
{campaignId}
/
transactions
List Loyalty Campaign Transactions
curl --request GET \
  --url https://{cluster}.voucherify.io/v1/loyalties/{campaignId}/transactions \
  --header 'Authorization: Bearer <token>' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>'
{
"object": "list",
"data_ref": "data",
"data": [
{
"id": "vtx_0f9159e2a055e41e16",
"source_id": null,
"voucher_id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
"campaign_id": "camp_5Hn0NM3Uf77tC3IV3kX5un36",
"source": null,
"reason": null,
"type": "POINTS_REDEMPTION",
"details": {
"balance": {
"type": "loyalty_card",
"total": 283,
"object": "balance",
"points": -50,
"balance": 23,
"operation_type": "AUTOMATIC",
"related_object": {
"id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
"type": "voucher"
}
},
"redemption": {
"id": "r_0f9159e29815e41e08"
},
"reward": {
"id": "rew_GCq9usMjLffVacs0mlyMmDZo",
"name": "Material"
}
},
"related_transaction_id": null,
"created_at": "2024-10-24T12:19:45.597Z"
},
{
"id": "vtx_0f9159e1a48b219c95",
"source_id": null,
"voucher_id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
"campaign_id": "camp_5Hn0NM3Uf77tC3IV3kX5un36",
"source": "voucherify-web-ui",
"reason": "Apology addition",
"type": "POINTS_ADDITION",
"details": {
"balance": {
"type": "loyalty_card",
"total": 283,
"object": "balance",
"points": 50,
"balance": 73,
"operation_type": "MANUAL",
"related_object": {
"id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
"type": "voucher"
}
}
},
"related_transaction_id": null,
"created_at": "2024-10-24T12:19:44.902Z"
}
],
"has_more": true,
"more_starting_after": "vtx_0f9159e1a48b219c95"
}

Authorizations

X-App-Id
string
header
required
X-App-Token
string
header
required
Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

campaignId
string
required

You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.

Example:

"camp_rRsfatlwN7unSeUIJDCYedal"

Query Parameters

limit
integer

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

Required range: 1 <= x <= 100
order
enum<string>

Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

Available options:
id,
-id
starting_after_id
string

A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID.

filters
object

Filters for listing responses. The id filter denotes the unique transaction identifier.

Response

200 - application/json

Returns a dictionary with a data property that contains an array of transactions. The maximum number of transactions returned is determined by the limit query parameter. Each entry in the array is a separate transaction object. If more results are available, the has_more flag has value true and the value of the more_starting_after property can be used to retrieve another page of results.

Response body schema for GET v1/loyalties/{campaignId}/transactions.

object
enum<string>
default:list
required

The type of the object represented by JSON.

Available options:
list
data_ref
enum<string>
default:data
required

Identifies the name of the attribute that contains the array of transaction objects.

Available options:
data
data
Loyalty Card Transaction Β· object[]
required

A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object.

has_more
boolean
required

As query results are always limited (by the limit parameter), the has_more flag indicates if there are more records for given filter parameters. This lets you know if you can run another request (with a different paging or a different start date filter) to get more records returned in the results.

more_starting_after
string

Returns an ID that can be used to return another page of results. Use the transaction ID in the starting_after_id query parameter to display another page of the results starting after the transaction with that ID.

⌘I