curl --request GET \
--url {protocol}://{host}/v2/loyalties/earning-rules/{earningRuleId}/activities \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"data": [
{
"id": "<string>",
"earning_rule_id": "<string>",
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"group_id": "<string>",
"source": {
"user": {
"id": "<string>"
},
"api_key": {
"name": "<string>",
"app_id": "<string>",
"client_app_id": "<string>"
}
}
}
],
"cursor": {
"next": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"object": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}List earning rule activities
⚠️ BETA endpoint
This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.
Returns a cursor-paginated list of activities (audit trail) for a single earning rule.
The same field cannot be used in both ascending and descending order at once.
Default order is -created_at.
A valid request URL is required to generate request examples{
"data": [
{
"id": "<string>",
"earning_rule_id": "<string>",
"data": {},
"created_at": "2023-11-07T05:31:56Z",
"group_id": "<string>",
"source": {
"user": {
"id": "<string>"
},
"api_key": {
"name": "<string>",
"app_id": "<string>",
"client_app_id": "<string>"
}
}
}
],
"cursor": {
"next": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"object": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Earning rule ID.
^lern_[a-f0-9]+$Query Parameters
Number of items to return. Between 1 and 100, defaults to 10.
1 <= x <= 100Sort order. A single value or repeated parameter. Allowed values: created_at, -created_at. Defaults to -created_at.
created_at, -created_at Pagination cursor returned in cursor.next of a previous response. Must match the pattern ^lcrsaer_[a-f0-9]+$.
^lcrsaer_[a-f0-9]+$Filters as a deep object, e.g. filters[type][conditions][$is]=vl.earning_rule.updated.
Filters for listing earning rule activities.
Show child attributes
Show child attributes
Response
Paginated list of earning rule activities
Was this page helpful?

