curl --request GET \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/earning-rules \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "<string>",
"data": [
{
"earning_rule_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>"
}
],
"cursor": {
"next": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"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 program earning rule assignments
⚠️ 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 earning rules assigned to the program.
curl --request GET \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/earning-rules \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"object": "<string>",
"data": [
{
"earning_rule_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"object": "<string>"
}
],
"cursor": {
"next": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"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
Unique program identifier.
^lprg_[a-f0-9]+$Query Parameters
Maximum number of items to return. Between 1 and 100. Defaults to 10. Non-integer values are rounded.
1 <= x <= 100Sorting order. A single value or an array of values. Prefix with - for descending.
Defaults to -created_at. The same field cannot be used in both ascending and
descending order at once.
-created_at, created_at Pagination cursor returned by a previous call (cursor.next).
^lcrserna_[a-f0-9]+$Response
Paginated list of earning rule assignments.
Was this page helpful?

