{
"openapi": "3.1.0",
"info": {
"title": "Voucherify API - Loyalty v2",
"version": "v2018-08-01",
"description": "Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.",
"contact": {
"name": "Voucherify Team",
"url": "https://www.voucherify.io/contact-support",
"email": "support@voucherify.io"
},
"termsOfService": "https://www.voucherify.io/legal/subscription-agreement",
"license": {
"name": "MIT",
"url": "https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE"
}
},
"servers": [
{
"url": "https://{cluster}.voucherify.io",
"description": "Base URL",
"variables": {
"cluster": {
"default": "api",
"enum": [
"api",
"us1.api",
"as1.api",
"download",
"us1.download",
"as1.download"
]
}
}
}
],
"paths": {
"/v2/loyalties/programs": {
"post": {
"operationId": "createProgram",
"tags": [
"Programs"
],
"summary": "Create program",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nCreates a new loyalty program. The program can be created with status `DRAFT` (default) or\n`ACTIVE`. When created as `ACTIVE`, the program must be connected to at least one active\ncard definition and at least one active earning rule (provided via `card_definitions` and\n`earning_rules` arrays), otherwise the request is rejected with `423 Locked`\n(keys `missing_active_card_definition` / `missing_active_earning_rule`).\nOptionally assigns card definitions, earning rules, rewards and tier structures in the same request.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsCreateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Program created. Response includes the ids of resources assigned during creation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsCreateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"get": {
"operationId": "listPrograms",
"tags": [
"Programs"
],
"summary": "List programs",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of loyalty programs. Supports filtering by `id`, `name`,\n`status` and `created_at`. The same field cannot be used in both ascending and descending\norder at once.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"description": "Filters for the program list. Nested object serialized in the query string\n(e.g. `filters[status][conditions][$is]=ACTIVE`). Each field accepts a `conditions`\nobject with at least one condition. Only the condition operators supported by each\nfield type are allowed.",
"style": "deepObject",
"explode": true,
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsListRequestQuery"
},
{
"type": "null"
}
]
}
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsprg_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsprg_[a-f0-9]+$"
}
}
],
"responses": {
"200": {
"description": "Paginated list of programs.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getProgram",
"tags": [
"Programs"
],
"summary": "Get program",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a single loyalty program by its ID.",
"parameters": [],
"responses": {
"200": {
"description": "The program.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsGetResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"put": {
"operationId": "updateProgram",
"tags": [
"Programs"
],
"summary": "Update program",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates a loyalty program. When the program is not in `DRAFT` status, only `name`, `end_date`, and `metadata` may be changed.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The updated program.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsUpdateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"operationId": "deleteProgram",
"tags": [
"Programs"
],
"summary": "Delete program",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nSoft-deletes a loyalty program and removes all of its card definition, earning rule,\nreward and tier structure assignments.",
"parameters": [],
"responses": {
"200": {
"description": "The deleted program.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsDeleteResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/activate": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "activateProgram",
"tags": [
"Programs"
],
"summary": "Activate program",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nTransitions the program to `ACTIVE` status. Allowed transitions to `ACTIVE` are from\n`DRAFT` and `INACTIVE`. Before activation the program's card definition, earning rule\nand tier structure assignments are validated (at least one active card definition and\nearning rule is required). An invalid state transition is rejected with `400`\n(key `invalid_state_transition`). No request body.",
"parameters": [],
"responses": {
"200": {
"description": "The activated program.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsActivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/deactivate": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "deactivateProgram",
"tags": [
"Programs"
],
"summary": "Deactivate program",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nTransitions the program to `INACTIVE` status. Only an `ACTIVE` program can be deactivated.\nAn invalid state transition is rejected with `400` (key `invalid_state_transition`).\nNo request body.",
"parameters": [],
"responses": {
"200": {
"description": "The deactivated program.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsDeactivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/activities": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramActivities",
"tags": [
"Programs"
],
"summary": "List program activities",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of activities recorded for a program (created, updated,\ndeleted, activated, deactivated and assignment changes). Supports filtering by activity\n`id`, `type` and `created_at`.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.program.created`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"style": "deepObject",
"explode": true,
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsActivitiesListRequestQuery"
},
{
"type": "null"
}
]
}
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsapr_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsapr_[a-f0-9]+$"
}
}
],
"responses": {
"200": {
"description": "Paginated list of program activities.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsActivitiesListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/card-definitions": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramCardDefinitionAssignments",
"tags": [
"Programs"
],
"summary": "List program card definition assignments",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of card definitions assigned to the program.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrscdefa_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrscdefa_[a-f0-9]+$"
}
}
],
"responses": {
"200": {
"description": "Paginated list of card definition assignments.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsCardDefinitionsListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/card-definitions/batch": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "batchProgramCardDefinitionAssignments",
"tags": [
"Programs"
],
"summary": "Batch assign/unassign card definitions",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nAssigns and/or unassigns card definitions to/from a program in a single batch.\nUnassign operations are processed before assign operations.\nThe program must be in `DRAFT` status - otherwise the request is rejected with\n`423 Locked` (key `non_draft_program`). In strict mode (default) missing card\ndefinitions, inactive card definitions or missing assignments cause the whole\nbatch to fail.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsCardDefinitionsBatchRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Batch processing result.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsCardDefinitionsBatchResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/earning-rules": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramEarningRuleAssignments",
"tags": [
"Programs"
],
"summary": "List program earning rule assignments",
"description": "Returns a cursor-paginated list of earning rules assigned to the program.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrserna_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrserna_[a-f0-9]+$"
}
}
],
"responses": {
"200": {
"description": "Paginated list of earning rule assignments.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsEarningRulesListResponseBody"
},
"examples": {
"List of earning rules with a cursor": {
"value": {
"data": [
{
"earning_rule_id": "lern_12cd26a685db3e63d8",
"created_at": "2026-07-29T11:38:14.731Z",
"object": "program_earning_rule"
},
{
"earning_rule_id": "lern_128f48ee44cc4bec34",
"created_at": "2026-06-11T15:57:31.791Z",
"object": "program_earning_rule"
},
{
"earning_rule_id": "lern_128f577bd4d47c8e12",
"created_at": "2026-06-11T15:57:29.977Z",
"object": "program_earning_rule"
}
],
"cursor": {
"next": "lcrserna_131f92cb9e16d68013",
"expires_at": "2026-10-01T12:16:10.809Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or the cursor is invalid, expired, from another list, or does not match this query.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor format": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrserna_[a-f0-9]+$\"",
"request_id": "v-12f90062450611349b"
}
},
"Cursor invalid or expired": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12f90062450611349c"
}
},
"Cursor does not match query": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12f90062450611349d"
}
},
"Cursor from another list": {
"value": {
"code": 400,
"key": "invalid_cursor",
"message": "Invalid cursor",
"details": "The provided cursor is invalid",
"request_id": "v-12f90062450611349e"
}
},
"Limit too high": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be greater than 100",
"request_id": "v-12f90062450611349f"
}
},
"Limit too low": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be lower than 1",
"request_id": "v-12f9006245061134a0"
}
},
"Unsupported order value": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -created_at, created_at ]",
"request_id": "v-12f9006245061134a1"
}
},
"Conflicting order values": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query cannot be ordered by 'created_at' and '-created_at' at the same time",
"request_id": "v-12f9006245061134a2"
}
}
}
}
}
},
"404": {
"description": "Program not found. Returned for any unknown program id, including a value that does not match `lprg_[a-f0-9]+`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_18f58429f4c4bf7b2",
"request_id": "v-131f936f8b622332dd",
"resource_id": "lprg_18f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id non-existent-program-id",
"request_id": "v-131f936f8b622332de",
"resource_id": "non-existent-program-id",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/earning-rules/batch": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "batchProgramEarningRuleAssignments",
"tags": [
"Programs"
],
"summary": "Batch assign/unassign earning rules",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nAssigns and/or unassigns earning rules to/from a program in a single batch.\nUnassign operations are processed before assign operations. When the program is\n`ACTIVE`, the batch is validated to leave at least one active earning rule assigned.\nIn strict mode (default) missing earning rules or missing assignments cause the whole\nbatch to fail.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsEarningRulesBatchRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Batch processing result.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsEarningRulesBatchResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/tier-structures": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramTierStructureAssignments",
"tags": [
"Programs"
],
"summary": "List program tier structure assignments",
"description": "Returns a cursor-paginated list of tier structures assigned to the program. Currently, a program can have only one tier structure assigned.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrstsa_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrstsa_[a-f0-9]+$"
}
}
],
"responses": {
"200": {
"description": "Paginated list of tier structure assignments.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsTierStructuresListResponseBody"
},
"examples": {
"List of program tier structures": {
"value": {
"data": [
{
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"created_at": "2026-06-11T13:03:57.028Z",
"object": "program_tier_structure"
}
],
"cursor": null,
"object": "list"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or the cursor is invalid, expired, from another list, or does not match this query.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor format": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrstsa_[a-f0-9]+$\"",
"request_id": "v-12f9006245061134b0"
}
},
"Cursor invalid or expired": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12f9006245061134b1"
}
},
"Cursor does not match query": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12f9006245061134b2"
}
},
"Cursor from another list": {
"value": {
"code": 400,
"key": "invalid_cursor",
"message": "Invalid cursor",
"details": "The provided cursor is invalid",
"request_id": "v-12f9006245061134b3"
}
},
"Limit too high": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be greater than 100",
"request_id": "v-12f9006245061134b4"
}
},
"Limit too low": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be lower than 1",
"request_id": "v-12f9006245061134b5"
}
},
"Unsupported order value": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -created_at, created_at ]",
"request_id": "v-12f9006245061134b6"
}
},
"Conflicting order values": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query cannot be ordered by 'created_at' and '-created_at' at the same time",
"request_id": "v-12f9006245061134b7"
}
}
}
}
}
},
"404": {
"description": "Program not found. Returned for any unknown program id, including a value that does not match `lprg_[a-f0-9]+`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_18f58429f4c4bf7b2",
"request_id": "v-131f936f8b622332e0",
"resource_id": "lprg_18f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id non-existent-program-id",
"request_id": "v-131f936f8b622332e1",
"resource_id": "non-existent-program-id",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/tier-structures/batch": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "batchProgramTierStructureAssignments",
"tags": [
"Programs"
],
"summary": "Batch assign/unassign tier structures",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nAssigns and/or unassigns tier structures to/from a program in a single batch.\nUnassign operations are processed before assign operations. Unassigning is only\nallowed while the program is in `DRAFT` status - otherwise the request is rejected\nwith `423 Locked` (key `non_draft_program`). A program can have at most one tier\nstructure assigned. In strict mode (default) missing tier structures, inactive tier\nstructures or missing assignments cause the whole batch to fail.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsTierStructuresBatchRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Batch processing result.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsTierStructuresBatchResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/rewards": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramRewardAssignments",
"tags": [
"Programs"
],
"summary": "List program reward assignments",
"description": "Returns a cursor-paginated list of rewards assigned to the program, including their stock configuration and redemption counters.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsrewa_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsrewa_[a-f0-9]+$"
}
}
],
"responses": {
"200": {
"description": "Paginated list of reward assignments.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsRewardsListResponseBody"
},
"examples": {
"List of program reward assignments": {
"value": {
"data": [
{
"reward_id": "lrew_1294cebb458e4904a0",
"stock": {
"type": "LIMITED",
"limited": {
"quantity": 92
}
},
"redeemed": 10,
"created_at": "2026-06-15T17:19:10.897Z",
"updated_at": "2026-07-27T16:10:01.905Z",
"object": "program_reward"
},
{
"reward_id": "lrew_128f4c6710947c85d1",
"stock": {
"type": "LIMITED",
"limited": {
"quantity": 999
}
},
"redeemed": 1,
"created_at": "2026-06-11T15:58:06.017Z",
"updated_at": "2026-06-17T15:29:44.542Z",
"object": "program_reward"
},
{
"reward_id": "lrew_128f4cab04147c8608",
"stock": {
"type": "UNLIMITED"
},
"redeemed": 0,
"created_at": "2026-06-11T15:57:54.021Z",
"updated_at": null,
"object": "program_reward"
}
],
"cursor": {
"next": "lcrsrewa_132d7ff1a7df244d31",
"expires_at": "2026-10-12T07:52:33.119Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or the cursor is invalid, expired, from another list, or does not match this query.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor format": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrsrewa_[a-f0-9]+$\"",
"request_id": "v-12f9006245061134c0"
}
},
"Cursor invalid or expired": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12f9006245061134c1"
}
},
"Cursor does not match query": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12f9006245061134c2"
}
},
"Cursor from another list": {
"value": {
"code": 400,
"key": "invalid_cursor",
"message": "Invalid cursor",
"details": "The provided cursor is invalid",
"request_id": "v-12f9006245061134c3"
}
},
"Limit too high": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be greater than 100",
"request_id": "v-12f9006245061134c4"
}
},
"Limit too low": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be lower than 1",
"request_id": "v-12f9006245061134c5"
}
},
"Unsupported order value": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -created_at, created_at ]",
"request_id": "v-12f9006245061134c6"
}
},
"Conflicting order values": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query cannot be ordered by 'created_at' and '-created_at' at the same time",
"request_id": "v-12f9006245061134c7"
}
}
}
}
}
},
"404": {
"description": "Program not found. Returned for any unknown program id, including a value that does not match `lprg_[a-f0-9]+`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_18f58429f4c4bf7b2",
"request_id": "v-131f936f8b622332e2",
"resource_id": "lprg_18f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id non-existent-program-id",
"request_id": "v-131f936f8b622332e3",
"resource_id": "non-existent-program-id",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/rewards/batch": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "batchProgramRewardAssignments",
"tags": [
"Programs"
],
"summary": "Batch assign/unassign rewards",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nAssigns and/or unassigns rewards to/from a program in a single batch.\nUnassign operations are processed before assign operations. Each reward to assign\nmust include its `stock` configuration. In strict mode (default) missing rewards\nor missing assignments cause the whole batch to fail (`404 Not Found`).",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsRewardsBatchRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Batch processing result.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsRewardsBatchResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/rewards/{rewardId}": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "rewardId",
"in": "path",
"required": true,
"description": "Identifies the reward. Format `lrew_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
}
],
"put": {
"operationId": "updateProgramRewardAssignment",
"tags": [
"Programs"
],
"summary": "Update program reward assignment",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates the stock configuration of a reward assigned to a program.\nReturns the updated reward assignment.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsRewardsUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The updated reward assignment.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsRewardsUpdateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "createProgramMember",
"tags": [
"Programs"
],
"summary": "Create program member",
"description": "Enrolls an existing customer as a member of the loyalty program and creates a loyalty card for each card definition assigned to the program. Card `code` generation is asynchronous, so `code` can be `null` right after creation.\n\nThe program must be `ACTIVE` and inside its validity window, and the customer must already exist. A customer can be a member of a program only once. Identify the customer with `customer_identification`. `status` defaults to `ACTIVE`.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCreateRequestBody"
},
"examples": {
"Enroll by customer ID": {
"value": {
"customer_identification": {
"type": "customer_id",
"customer_id": "cust_X07elh40iNWLujRmDNmBufxd"
}
}
},
"Enroll by source ID": {
"value": {
"customer_identification": {
"type": "customer_source_id",
"customer_source_id": "crm-1001"
},
"status": "INACTIVE",
"metadata": {
"tier": "gold"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The created member with its automatically created cards.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCreateResponseBody"
},
"examples": {
"Member added to the program": {
"value": {
"id": "lmbr_12ba1c1a8456b6db8c",
"customer_id": "cust_X07elh40iNWLujRmDNmBufxd",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-07-14T16:41:01.201Z",
"updated_at": null,
"object": "member",
"cards": [
{
"member_role": "OWNER",
"created_at": "2026-07-14T16:41:01.214Z",
"card": {
"id": "lcrd_12ba1c1a86d6b6db8f",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": null,
"lifetime_bucket": {
"points": {
"total": 0,
"earned": 0,
"added": 0,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 0,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 0,
"pending_points": 0
},
"next_expiration": null,
"next_activation": null,
"object": "card"
},
"object": "member_card"
},
{
"member_role": "OWNER",
"created_at": "2026-07-14T16:41:01.214Z",
"card": {
"id": "lcrd_12ba1c1a86d6b6db90",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"code": null,
"lifetime_bucket": {
"points": {
"total": 0,
"earned": 0,
"added": 0,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 0,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 0,
"pending_points": 0
},
"next_expiration": null,
"next_activation": null,
"object": "card"
},
"object": "member_card"
},
{
"member_role": "OWNER",
"created_at": "2026-07-14T16:41:01.214Z",
"card": {
"id": "lcrd_12ba1c1a86d6b6db91",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": null,
"lifetime_bucket": {
"points": {
"total": 0,
"earned": 0,
"added": 0,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 0,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 0,
"pending_points": 0
},
"next_expiration": null,
"next_activation": null,
"object": "card"
},
"object": "member_card"
}
]
}
}
}
}
}
},
"400": {
"description": "The request body failed validation (`invalid_payload`), or `metadata` doesn't match the `vl_member` metadata schema (`metadata_validation_failed`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid customer ID": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .customer_identification.customer_id must match pattern \"^cust_[a-zA-Z0-9]+\"",
"request_id": "v-12c30587d84f93b9b0"
}
},
"Metadata validation failed": {
"value": {
"code": 400,
"key": "metadata_validation_failed",
"message": "Metadata validation failed",
"details": "Only defined properties are allowed",
"request_id": "v-12c30587d84f93b9b1"
}
}
}
}
}
},
"402": {
"description": "The organization has reached its loyalty members plan limit (`payment_required`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Loyalty members limit exceeded": {
"value": {
"code": 402,
"key": "payment_required",
"message": "Plan limit exceeded",
"details": "You cannot create more than 1000 loyalty members in your current plan",
"request_id": "v-12c30587d84f93b9b2"
}
}
}
}
}
},
"404": {
"description": "The program or the customer doesn't exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf7b2",
"request_id": "v-12c30587d84f93b9ae",
"resource_id": "lprg_128f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Customer not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find customer with id cust_X07elh40iNWLujRmDNmBufd",
"request_id": "v-12c30587d84f93b9af",
"resource_id": "cust_X07elh40iNWLujRmDNmBufd",
"resource_type": "customer"
}
}
}
}
}
},
"409": {
"description": "The customer is already a member of the program (`member_already_exists`). When you identify the customer by source ID, `details` quotes that source ID.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member already exists": {
"value": {
"code": 409,
"key": "member_already_exists",
"message": "Member already exists",
"details": "Customer 'cust_X07elh40iNWLujRmDNmBufxd' already is a member of program 'lprg_128f58429f4c4bf7b2'",
"request_id": "v-12c3021e930a67865c"
}
}
}
}
}
},
"423": {
"description": "The program is not `ACTIVE` (`non_active_program`) or is outside its validity window (`program_outside_validity_window`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Non-active program": {
"value": {
"code": 423,
"key": "non_active_program",
"message": "Cannot create member when program status is not ACTIVE",
"details": "Invalid program status",
"request_id": "v-12c30587d84f93b9b3"
}
},
"Program outside validity window": {
"value": {
"code": 423,
"key": "program_outside_validity_window",
"message": "Program is not available at this time",
"details": "Cannot create member when program is not active at this time",
"request_id": "v-12c30587d84f93b9b4"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"get": {
"operationId": "listProgramMembers",
"tags": [
"Programs"
],
"summary": "List program members",
"description": "Returns a cursor-paginated list of members of the program. Deleted members are omitted. Results can be filtered by ID, status, customer ID and creation date. Results can be ordered by creation date, status, or customer ID (ascending or descending). The same field cannot be ordered both ascending and descending at the same time.\n\nReturns `404` when the program does not exist.\n\nList items do not include the `cards` array. Use the following endpoints to retrieve cards for a given member:\n- [Get customer memberships](/api-reference/programs/get-customer-memberships),\n- [Get program member](/api-reference/programs/get-program-member),\n- [Get program membership](/api-reference/programs/get-program-membership).",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at",
"status",
"-status",
"customer_id",
"-customer_id"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at",
"status",
"-status",
"customer_id",
"-customer_id"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsmbr_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsmbr_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[status][conditions][$is]=ACTIVE`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of members.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersListResponseBody"
},
"examples": {
"List of program members": {
"value": {
"data": [
{
"id": "lmbr_12c3092a048ffa1a33",
"customer_id": "cust_RhnOBUBSf2lVKz74eKCHnEs4",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-07-21T15:04:36.114Z",
"updated_at": null,
"object": "member"
},
{
"id": "lmbr_12ba1c1a8456b6db8c",
"customer_id": "cust_X07elh40iNWLujRmDNmBufxd",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-07-14T16:41:01.201Z",
"updated_at": null,
"object": "member"
}
],
"cursor": {
"next": "lcrsmbr_12f8ff4b05eed6b35a",
"expires_at": "2026-09-01T13:09:27.127Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "Validation error - query parameters failed validation, or the cursor is invalid, expired, or does not match the query.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor format": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrsmbr_[a-f0-9]+$\"",
"request_id": "v-12f90062450611349b"
}
},
"Cursor invalid or expired": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12f90062450611349c"
}
},
"Cursor does not match query": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12f90062450611349d"
}
},
"Limit too high": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be greater than 100",
"request_id": "v-12f90062450611349e"
}
},
"Limit too low": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be lower than 1",
"request_id": "v-12f90062450611349f"
}
},
"Unsupported order value": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -created_at, created_at, status, -status, customer_id, -customer_id ]",
"request_id": "v-12f9006245061134a0"
}
},
"Conflicting order values": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query cannot be ordered by 'created_at' and '-created_at' at the same time",
"request_id": "v-12f9006245061134a1"
}
}
}
}
}
},
"404": {
"description": "Resource (program) not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5829f4c4bf7b2",
"request_id": "v-12f90062450611349a",
"resource_id": "lprg_128f5829f4c4bf7b2",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/batch": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "batchCreateProgramMembers",
"tags": [
"Programs"
],
"summary": "Batch create program members",
"description": "Schedules creation of program members from a JSON array and returns `202` with `async_action_id`. The program must exist, be `ACTIVE`, and be inside its validity window. The body isn't checked before that response. Entries are processed in batches of 100. The raw body must be at most 10 MB.\n\nEach entry uses the same fields as [Create program member](/api-reference/programs/create-program-member). A failed entry is skipped. Its report row sets `created` to `false` and explains the failure in `error`. Skipped cases include an invalid `customer_identification`, an unknown customer, an invalid `status`, a duplicate customer in the batch (`Duplicate customer ID`), a customer who is already a member (`Member already exists`), metadata that doesn't match the `vl_member` schema, and entries past the loyalty members plan limit. Successful entries enroll the customer and create a loyalty card for each card definition on the program. Report columns are `identification_type`, `customer_id`, `customer_source_id`, `program_id`, `member_id`, `created`, and `error`.\n\nAn empty array or a `null` entry fails the async action with `invalid_request_payload`. A body that isn't a JSON array fails it with `top_level_object_should_be_an_array`. Use [Get async action](/api-reference/async-actions/get-async-action) to read the status and the report. You can also open the result from Audit log, [Background tasks](/analyze/audit-logs#background-tasks).",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCreateInBulkRequestBody"
},
"examples": {
"Create members": {
"value": [
{
"customer_identification": {
"type": "customer_id",
"customer_id": "cust_X07elh40iNWLujRmDNmBufxd"
}
},
{
"customer_identification": {
"type": "customer_source_id",
"customer_source_id": "crm-1001"
},
"status": "ACTIVE"
}
]
}
}
}
}
},
"responses": {
"202": {
"description": "The batch is scheduled. Use `async_action_id` to follow processing.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCreateInBulkResponseBody"
},
"examples": {
"Create members in batch: Async action": {
"value": {
"async_action_id": "aa_12c30928a207efcc66"
}
}
}
}
}
},
"404": {
"description": "Resource not found - the program ID could not be found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5829f4c4bf7b2",
"request_id": "v-12c31c59130a67bb28",
"resource_id": "lprg_128f5829f4c4bf7b2",
"resource_type": "program"
}
}
}
}
}
},
"413": {
"description": "Payload too large - the request body exceeds the 10 MB limit.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VLBadRequest"
},
"examples": {
"Request Entity Too Large": {
"value": {
"statusCode": 413,
"error": "Request Entity Too Large",
"message": "Payload content length greater than maximum allowed: 10485760"
}
}
}
}
}
},
"423": {
"description": "The program is not `ACTIVE` (`non_active_program`) or is outside its validity window (`program_outside_validity_window`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Non-active program": {
"value": {
"code": 423,
"key": "non_active_program",
"message": "Cannot create members when program status is not ACTIVE",
"details": "Invalid program status",
"request_id": "v-12c31c59130a67bb29"
}
},
"Program outside validity window": {
"value": {
"code": 423,
"key": "program_outside_validity_window",
"message": "Program is not available at this time",
"details": "Cannot create members when program is not active at this time",
"request_id": "v-12c31c59130a67bb2a"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getProgramMember",
"tags": [
"Programs"
],
"summary": "Get program member",
"description": "Returns one member of the program together with that member's loyalty cards. Each card includes `balance`, `lifetime_bucket`, `next_expiration`, and `next_activation`. `tier_progress` is not included. Use [Get program membership](/api-reference/programs/get-program-membership) when you need tier progress.\n\n`card.code` can be `null` shortly after member creation, while code generation is still running.\n\nReturns `404` when the program doesn't exist, or when the member doesn't exist in that program. The program is checked first.",
"parameters": [],
"responses": {
"200": {
"description": "The member with its cards.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersGetResponseBody"
},
"examples": {
"Get member with cards": {
"value": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"updated_at": null,
"object": "member",
"cards": [
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"card": {
"id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": "SummerTime-7z8dWawICd",
"lifetime_bucket": {
"points": {
"total": 740,
"earned": 40,
"added": 700,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 30,
"expired": 300,
"spent": 250,
"refunded": 0,
"returned": 0,
"locked": 250,
"unlocked": 250
},
"pending_points": {
"total": 160,
"activated": 40,
"canceled": 0
}
},
"balance": {
"points": 160,
"pending_points": 120
},
"next_expiration": {
"points": 160,
"date": "2026-08-08"
},
"next_activation": {
"points": 10,
"type": "PERIOD_BASED",
"date": "2026-07-20"
},
"object": "card"
},
"object": "member_card"
},
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"card": {
"id": "lcrd_128f962dbd8c4ba5e0",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"code": "AutumnTime-R02hVARx33",
"lifetime_bucket": {
"points": {
"total": 50,
"earned": 0,
"added": 50,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 160,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 50,
"pending_points": 160
},
"next_expiration": {
"points": 50,
"date": "2026-12-23"
},
"next_activation": {
"points": 160,
"type": "FIXED_DATES",
"date": "2026-12-23"
},
"object": "card"
},
"object": "member_card"
},
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": "AnnualTime-7M7ShPGfme",
"lifetime_bucket": {
"points": {
"total": 1250,
"earned": 250,
"added": 1000,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 1000,
"expired": 0,
"spent": 150,
"refunded": 0,
"returned": 0,
"locked": 10,
"unlocked": 10
},
"pending_points": {
"total": 300,
"activated": 250,
"canceled": 0
}
},
"balance": {
"points": 100,
"pending_points": 50
},
"next_expiration": null,
"next_activation": {
"points": 50,
"type": "PERIOD_BASED",
"date": "2026-07-20"
},
"object": "card"
},
"object": "member_card"
}
]
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). A member of another program is not found. The program is checked first.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf7b2",
"request_id": "v-12bdef050f2cb1ef70",
"resource_id": "lprg_128f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f962dbc8c4ba5d",
"request_id": "v-12bdef050f2cb1ef71",
"resource_id": "lmbr_128f962dbc8c4ba5d",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"put": {
"operationId": "updateProgramMember",
"tags": [
"Programs"
],
"summary": "Update program member",
"description": "Updates a program member's metadata. Provided object keys are merged into the existing metadata; omitted keys are preserved. Pass `metadata: null` to clear all metadata (sets it to an empty object).\n\nThis endpoint cannot change `status`. Use [Activate program member](/api-reference/programs/activate-program-member) or [Deactivate program member](/api-reference/programs/deactivate-program-member) for status transitions.\n\nRecords a `vl.member.updated` activity. Returns the updated member without the `cards` array. Returns `404` when the program or member does not exist. Returns `400` when the request body fails validation or the project `vl_member` metadata schema rejects the payload.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The updated member (without cards).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersUpdateResponseBody"
},
"examples": {
"Updated member metadata": {
"value": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {
"tier_note": "gold",
"source": "crm"
},
"created_at": "2026-06-11T15:59:41.298Z",
"updated_at": "2026-07-30T10:15:22.401Z",
"object": "member"
}
}
}
}
}
},
"400": {
"description": "Validation error - request body failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f92dbc8c4ba5dc",
"request_id": "v-12cf8bce66569748e7",
"resource_id": "lmbr_128f92dbc8c4ba5dc",
"resource_type": "member"
}
},
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_12858429f4c4bf7b2",
"request_id": "v-12cf8b960f5adeeb76",
"resource_id": "lprg_12858429f4c4bf7b2",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"operationId": "deleteProgramMember",
"tags": [
"Programs"
],
"summary": "Delete program member",
"description": "Deletes the member and sets `status` to `DELETED`. Removes the member's card assignments in this program.\n\nReturns the member without a `cards` array. Delete doesn't change `updated_at`.\n\nRecords a `vl.member.deleted` activity. Each unassigned card also records `vl.member.card.unassigned` and `vl.card.unassigned`. When an assignment has a tier, the delete records a `LEFT` tier transaction with origin `member_card_deleted`.\n\nThe same customer can join the program again. The new member gets a new ID.\n\nReturns `404` when the program doesn't exist, or when the member doesn't exist in that program. The program is checked first. Deleting a member that is already `DELETED` returns `404`.",
"parameters": [],
"responses": {
"200": {
"description": "The deleted member (without cards).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersDeleteResponseBody"
},
"examples": {
"Delete member": {
"value": {
"id": "lmbr_12fa65bb422a9fab71",
"customer_id": "cust_TL1FepNr2ewiwl3ybI36Ss1v",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "DELETED",
"metadata": {},
"created_at": "2026-09-02T15:05:29.608Z",
"updated_at": null,
"object": "member"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). The program is checked first. A second delete of the same member also returns `404`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_12fa65bb422a9fab71",
"request_id": "v-12fa6937d2a4064071",
"resource_id": "lmbr_12fa65bb422a9fab71",
"resource_type": "member"
}
},
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf72",
"request_id": "v-12fa69cc8401a871ec",
"resource_id": "lprg_128f58429f4c4bf72",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/memberships/{customerId}": {
"parameters": [
{
"name": "customerId",
"in": "path",
"required": true,
"description": "Identifies the customer or member. `identification_type` selects the value: a Voucherify customer ID (`cust_...`), a customer `source_id`, or a loyalty member ID (`lmbr_...`).",
"schema": {
"type": "string"
}
}
],
"get": {
"operationId": "getCustomerMemberships",
"tags": [
"Programs"
],
"summary": "Get customer memberships",
"description": "Returns loyalty memberships for a customer, including the resolved customer and each membership's member, program, and cards. `identification_type` chooses how `customerId` is read. It defaults to `customer_id`.\n\n`customer_id` and `customer_source_id` return every membership for that customer. `member_id` returns the customer linked to that member and only the membership for that member's program.\n\nCards omit `tier_progress`. See [Get program membership](/api-reference/programs/get-program-membership) when you need tier progress.\n\nReturns an empty `memberships` array when the customer exists and has no memberships. Returns `404` when the customer or member cannot be resolved.",
"parameters": [
{
"name": "identification_type",
"in": "query",
"required": false,
"description": "Selects how `customerId` is read. `customer_id` is the Voucherify customer ID and the default. `customer_source_id` is the customer's `source_id`. `member_id` is the loyalty member ID.",
"schema": {
"type": "string",
"enum": [
"customer_id",
"customer_source_id",
"member_id"
],
"default": "customer_id"
}
}
],
"responses": {
"200": {
"description": "Customer memberships across programs.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesMembershipsGetResponseBody"
},
"examples": {
"Get customer memberships": {
"value": {
"customer": {
"id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"source_id": "lx-rdmptr",
"object": "customer"
},
"memberships": [
{
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {
"Lv2Member": "PQR"
},
"created_at": "2026-06-11T15:59:41.298Z",
"updated_at": "2026-09-17T14:02:05.105Z",
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"status": "ACTIVE",
"metadata": {},
"object": "program"
},
"cards": [
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"card": {
"id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": "SummerTime-7z8dWawICd",
"lifetime_bucket": {
"points": {
"total": 2701,
"earned": 250,
"added": 2451,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 33,
"expired": 2158,
"spent": 500,
"refunded": 0,
"returned": 0,
"locked": 500,
"unlocked": 500
},
"pending_points": {
"total": 310,
"activated": 250,
"canceled": 60
}
},
"balance": {
"points": 10,
"pending_points": 0
},
"next_expiration": {
"points": 10,
"date": "2026-11-22"
},
"next_activation": null,
"object": "card"
},
"object": "member_card"
},
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"card": {
"id": "lcrd_128f962dbd8c4ba5e0",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"code": "AutumnTime-R02hVARx33",
"lifetime_bucket": {
"points": {
"total": 50,
"earned": 0,
"added": 50,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 310,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 50,
"pending_points": 310
},
"next_expiration": {
"points": 50,
"date": "2026-12-23"
},
"next_activation": {
"points": 310,
"type": "FIXED_DATES",
"date": "2026-12-23"
},
"object": "card"
},
"object": "member_card"
},
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": "AnnualTime-7M7ShPGfme",
"lifetime_bucket": {
"points": {
"total": 92925835,
"earned": 2916298,
"added": 90009537,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 90689052,
"expired": 2227148,
"spent": 9985,
"refunded": 0,
"returned": 500,
"locked": 57613,
"unlocked": 57613
},
"pending_points": {
"total": 2916298,
"activated": 2916298,
"canceled": 0
}
},
"balance": {
"points": 150,
"pending_points": 0
},
"next_expiration": {
"points": 150,
"date": "2026-12-31"
},
"next_activation": null,
"object": "card"
},
"object": "member_card"
}
],
"object": "membership"
},
{
"member": {
"id": "lmbr_12bb65545345af2452",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_12bb64ba895f8d3d38",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-07-15T16:39:25.773Z",
"updated_at": null,
"object": "member"
},
"program": {
"id": "lprg_12bb64ba895f8d3d38",
"name": "TestujemyLimity",
"status": "ACTIVE",
"metadata": {},
"object": "program"
},
"cards": [
{
"member_role": "OWNER",
"created_at": "2026-07-15T16:39:25.781Z",
"card": {
"id": "lcrd_12bb655454c5af2455",
"card_definition_id": "lcdef_12bb64c52585af2385",
"card_type": "INDIVIDUAL",
"code": "Limity-GeSEtNqPox",
"lifetime_bucket": {
"points": {
"total": 23,
"earned": 23,
"added": 0,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 10,
"expired": 0,
"spent": 3,
"refunded": 0,
"returned": 0,
"locked": 3,
"unlocked": 3
},
"pending_points": {
"total": 0,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 10,
"pending_points": 0
},
"next_expiration": null,
"next_activation": null,
"object": "card"
},
"object": "member_card"
}
],
"object": "membership"
}
],
"object": "memberships_result"
}
}
}
}
}
},
"400": {
"description": "The query failed validation (`invalid_query_params`). `identification_type` must be `customer_id`, `customer_source_id`, or `member_id`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Unsupported identification type": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .identification_type must be equal to one of the allowed values [ customer_id, customer_source_id, member_id ]",
"request_id": "v-12bdef050f2cb1ef70"
}
},
"Unknown query parameter": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must NOT have additional properties",
"request_id": "v-12bdef050f2cb1ef71"
}
}
}
}
}
},
"404": {
"description": "Customer's ID, source ID, or member ID not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Customer ID not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find customer with id cust_6onRrs4kCnvSVrTs5YtDPFBG",
"request_id": "v-1339d03d08cf99cf69",
"resource_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"resource_type": "customer"
}
},
"Customer ID pattern mismatch": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find customer with id not-a-customer-id",
"request_id": "v-1339d03d08cf99cf6a",
"resource_id": "not-a-customer-id",
"resource_type": "customer"
}
},
"Source ID not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find customer with id hrs-lprcl",
"request_id": "v-1339d03d08cf99cf68",
"resource_id": "hrs-lprcl",
"resource_type": "customer"
}
},
"Member ID not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f962dbc8c4ba5dc",
"request_id": "v-1339d03d08cf99cf6b",
"resource_id": "lmbr_128f962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Member ID pattern mismatch": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id non-existent-member-id",
"request_id": "v-1339d03d08cf99cf6c",
"resource_id": "non-existent-member-id",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/memberships/{customerId}": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "customerId",
"in": "path",
"required": true,
"description": "Identifies the customer or member. `identification_type` selects the value: a Voucherify customer ID (`cust_...`), a customer `source_id`, or a loyalty member ID (`lmbr_...`).",
"schema": {
"type": "string"
}
}
],
"get": {
"operationId": "getProgramMembership",
"tags": [
"Programs"
],
"summary": "Get program membership",
"description": "Returns the membership for one customer in the program: the member, the program, and the member's loyalty cards. A card includes `tier_progress` when its card definition has a tier structure and the member has a tier on that card. Otherwise `tier_progress` is omitted.\n\n`identification_type` chooses how `customerId` is read. It defaults to `customer_id`.",
"parameters": [
{
"name": "identification_type",
"in": "query",
"required": false,
"description": "Selects how `customerId` is read. `customer_id` is the Voucherify customer ID and the default. `customer_source_id` is the customer's `source_id`. `member_id` is the loyalty member ID.",
"schema": {
"type": "string",
"enum": [
"customer_id",
"customer_source_id",
"member_id"
],
"default": "customer_id"
}
}
],
"responses": {
"200": {
"description": "The membership in the program.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembershipsGetResponseBody"
},
"examples": {
"Get membership": {
"value": {
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"updated_at": null,
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "Summer Rewards",
"status": "ACTIVE",
"metadata": {},
"object": "program"
},
"cards": [
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"tier_progress": {
"current": {
"tier": {
"id": "lt_128f4a88414c4bed6a",
"name": "Gold"
},
"start_at": "2026-06-15T00:00:00.000Z",
"expires_at": "2027-06-15T00:00:00.000Z",
"points": {
"current": 740,
"min": 500,
"max": 1500
}
},
"tier_structure": {
"id": "lts_128f4a88414c4bed69",
"object": "tier_structure"
},
"deferred": [],
"risks": [
{
"type": "TIER_DOWNGRADE",
"date": "2026-09-01T00:00:00.000Z",
"tier": {
"id": "lt_128f4b46558c4bedff",
"name": "Silver"
}
}
],
"opportunities": [],
"object": "member_tier_progress"
},
"card": {
"id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": "SummerTime-7z8dWawICd",
"lifetime_bucket": {
"points": {
"total": 740,
"earned": 40,
"added": 700,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 30,
"expired": 300,
"spent": 250,
"refunded": 0,
"returned": 0,
"locked": 250,
"unlocked": 250
},
"pending_points": {
"total": 160,
"activated": 40,
"canceled": 0
}
},
"balance": {
"points": 160,
"pending_points": 120
},
"next_expiration": {
"points": 160,
"date": "2026-08-08"
},
"next_activation": {
"points": 10,
"type": "PERIOD_BASED",
"date": "2026-07-20"
},
"object": "card"
},
"object": "member_card"
},
{
"member_role": "OWNER",
"created_at": "2026-06-11T15:59:41.303Z",
"card": {
"id": "lcrd_128f962dbd8c4ba5e0",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"code": "AutumnTime-R02hVARx33",
"lifetime_bucket": {
"points": {
"total": 50,
"earned": 0,
"added": 50,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 160,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 50,
"pending_points": 160
},
"next_expiration": {
"points": 50,
"date": "2026-12-23"
},
"next_activation": {
"points": 160,
"type": "FIXED_DATES",
"date": "2026-12-23"
},
"object": "card"
},
"object": "member_card"
}
],
"object": "membership"
}
}
}
}
}
},
"400": {
"description": "The query failed validation (`invalid_query_params`). `identification_type` must be `customer_id`, `customer_source_id`, or `member_id`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Unsupported identification type": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .identification_type must be equal to one of the allowed values [ customer_id, customer_source_id, member_id ]",
"request_id": "v-12bdef050f2cb1ef70"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), the source ID doesn't match a customer (`resource_type` `customer`), or there is no membership in the program (`resource_type` `member`). A lookup by customer ID with no membership returns that customer ID as `resource_id`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf7b2",
"request_id": "v-12bdef050f2cb1ef6f",
"resource_id": "lprg_128f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Customer not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find customer with id nonexistent-source-id",
"request_id": "v-12bdef050f2cb1ef6e",
"resource_id": "nonexistent-source-id",
"resource_type": "customer"
}
},
"No membership": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id cust_6onRrs4kCnvSVrTs5YtDPFBG",
"request_id": "v-12bdef050f2cb1ef71",
"resource_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/activate": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "activateProgramMember",
"tags": [
"Programs"
],
"summary": "Activate program member",
"description": "Moves an `INACTIVE` member to `ACTIVE` and sets `updated_at`. Records a `vl.member.activated` activity. No request body.\n\nReturns the member without a `cards` array.\n\nReturns `404` when the program doesn't exist, or when the member doesn't exist in that program. The program is checked first. A `DELETED` member returns `404`. Returns `400` with key `invalid_state_transition` when the member is already `ACTIVE`.",
"parameters": [],
"responses": {
"200": {
"description": "The activated member, without cards. Status is always `ACTIVE`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersActivateResponseBody"
},
"examples": {
"Activated inactive member": {
"value": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"updated_at": "2026-09-02T16:42:43.436Z",
"object": "member"
}
}
}
}
}
},
"400": {
"description": "The member is already `ACTIVE`. Key `invalid_state_transition`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Activate active member": {
"value": {
"code": 400,
"key": "invalid_state_transition",
"message": "Invalid state transition",
"details": "Cannot activate member 'lmbr_128f962dbc8c4ba5dc' from current state: 'ACTIVE'",
"request_id": "v-12fa7b75e964066340"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). The program is checked first. A `DELETED` member also returns `404`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f96dbc8c4ba5dc",
"request_id": "v-12fa7be05741a8148b",
"resource_id": "lmbr_128f96dbc8c4ba5dc",
"resource_type": "member"
}
},
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4cbf7b2",
"request_id": "v-12fa7bb9c8240663c4",
"resource_id": "lprg_128f58429f4cbf7b2",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/deactivate": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "deactivateProgramMember",
"tags": [
"Programs"
],
"summary": "Deactivate program member",
"description": "Moves an `ACTIVE` member to `INACTIVE` and sets `updated_at`. Records a `vl.member.deactivated` activity. An `INACTIVE` member can't earn or spend points. No request body.\n\nReturns the member without a `cards` array.\n\nReturns `404` when the program doesn't exist, or when the member doesn't exist in that program. The program is checked first. A `DELETED` member returns `404`. Returns `400` with key `invalid_state_transition` when the member is already `INACTIVE`.",
"parameters": [],
"responses": {
"200": {
"description": "The deactivated member, without cards. Status is always `INACTIVE`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersDeactivateResponseBody"
},
"examples": {
"Deactivated active member": {
"value": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"status": "INACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"updated_at": "2026-09-02T17:17:24.129Z",
"object": "member"
}
}
}
}
}
},
"400": {
"description": "The member is already `INACTIVE`. Key `invalid_state_transition`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Deactivate inactive member": {
"value": {
"code": 400,
"key": "invalid_state_transition",
"message": "Invalid state transition",
"details": "Cannot deactivate member 'lmbr_128f962dbc8c4ba5dc' from current state: 'INACTIVE'",
"request_id": "v-12fa842a736406741d"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). The program is checked first. A `DELETED` member also returns `404`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f96dbc8c4ba5dc",
"request_id": "v-12fa7be05741a8148b",
"resource_id": "lmbr_128f96dbc8c4ba5dc",
"resource_type": "member"
}
},
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4cbf7b2",
"request_id": "v-12fa7bb9c8240663c4",
"resource_id": "lprg_128f58429f4cbf7b2",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/activities": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramMemberActivities",
"tags": [
"Programs"
],
"summary": "List program member activities",
"description": "Returns a cursor-paginated list of lifecycle and card-assignment activities recorded for the member. Filters are `id`, `type`, and `created_at`. Default order is `-created_at`, then `id` ascending.\n\nReturns 404 when the program doesn't exist, or when the member doesn't exist in that program. The program is checked first. A DELETED member returns 404.\n\nReturns 400 with key `invalid_query_params` when the query fails validation. That check runs before the program and member lookup. A cursor that doesn't match `^lcrsambr_[a-f0-9]+$`, a `limit` outside 1 to 100, an `order` other than `created_at` or `-created_at`, or an array that orders by both directions fails here.\n\nAfter the program and member are found, an unknown or expired cursor returns `invalid_or_expired_cursor`. A cursor recorded for different `filters` or `order` returns `cursor_and_query_mismatch`. The cursor stays valid when only `limit` changes.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsambr_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsambr_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.member.created`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersActivitiesListRequestQueryFilters"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of member activities.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersActivitiesListResponseBody"
},
"examples": {
"List of member activities": {
"value": {
"data": [
{
"id": "lambr_130da710ecee46e2a6",
"type": "vl.member.updated",
"data": {
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"object": "member",
"status": "ACTIVE",
"metadata": {
"Lv2Member": true
},
"created_at": "2026-06-11T15:59:41.298Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": "2026-09-17T14:02:05.105Z",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"object": "program",
"status": "ACTIVE",
"end_date": null,
"metadata": {},
"created_at": "2026-06-11T11:29:09.756Z",
"start_date": null,
"updated_at": "2026-07-22T19:09:54.323Z",
"validity_hours": {
"type": "ANY_TIME"
}
}
},
"created_at": "2026-09-17T14:02:05.105Z",
"group_id": "v-130da710e305963b5f",
"source": {
"channel": "USER_PORTAL",
"user": {
"id": "user_...(example user ID)"
}
},
"member_id": "lmbr_128f962dbc8c4ba5dc"
},
{
"id": "lambr_12fa8445996a9fd12f",
"type": "vl.member.activated",
"data": {
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"object": "member",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": "2026-09-02T17:18:55.570Z",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"object": "program",
"status": "ACTIVE",
"end_date": null,
"metadata": {},
"created_at": "2026-06-11T11:29:09.756Z",
"start_date": null,
"updated_at": "2026-07-22T19:09:54.323Z",
"validity_hours": {
"type": "ANY_TIME"
}
}
},
"created_at": "2026-09-02T17:18:55.589Z",
"group_id": "v-12fa8445926406744d",
"source": {
"channel": "API",
"api_key": {
"name": "Primary",
"app_id": "some-app-id"
}
},
"member_id": "lmbr_128f962dbc8c4ba5dc"
},
{
"id": "lambr_128f962dc00c4ba5f5",
"type": "vl.member.card.assigned",
"data": {
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"code": null,
"object": "card",
"balance": {
"points": 0,
"pending_points": 0
},
"card_type": "INDIVIDUAL",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"created_at": "2026-06-11T15:59:41.302Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": null,
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"lifetime_bucket": {
"points": {
"added": 0,
"spent": 0,
"total": 0,
"earned": 0,
"locked": 0,
"expired": 0,
"refunded": 0,
"returned": 0,
"unlocked": 0,
"subtracted": 0,
"purchased": 0,
"purchased_reversed": 0
},
"pending_points": {
"total": 0,
"canceled": 0,
"activated": 0
}
},
"card_definition_id": "lcdef_128f4a88414c4bed69"
},
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"object": "member",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": null,
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"object": "program",
"status": "ACTIVE",
"end_date": null,
"metadata": {},
"created_at": "2026-06-11T11:29:09.756Z",
"start_date": null,
"updated_at": "2026-06-11T15:58:23.525Z",
"validity_hours": {
"type": "ANY_TIME"
}
},
"member_card": {
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"code": null,
"object": "card",
"balance": {
"points": 0,
"pending_points": 0
},
"card_type": "INDIVIDUAL",
"lifetime_bucket": {
"points": {
"added": 0,
"spent": 0,
"total": 0,
"earned": 0,
"locked": 0,
"expired": 0,
"refunded": 0,
"returned": 0,
"unlocked": 0,
"subtracted": 0,
"purchased": 0,
"purchased_reversed": 0
},
"pending_points": {
"total": 0,
"canceled": 0,
"activated": 0
}
},
"next_activation": null,
"next_expiration": null,
"card_definition_id": "lcdef_128f4a88414c4bed69"
},
"object": "member_card",
"created_at": "2026-06-11T15:59:41.303Z",
"member_role": "OWNER"
}
},
"created_at": "2026-06-11T15:59:41.303Z",
"group_id": "v-128f962db19cae026c",
"source": {
"channel": "USER_PORTAL",
"user": {
"id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
}
},
"member_id": "lmbr_128f962dbc8c4ba5dc"
},
{
"id": "lambr_128f962dbd4c4ba5dd",
"type": "vl.member.created",
"data": {
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"object": "member",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": null,
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"object": "program",
"status": "ACTIVE",
"end_date": null,
"metadata": {},
"created_at": "2026-06-11T11:29:09.756Z",
"start_date": null,
"updated_at": "2026-06-11T15:58:23.525Z",
"validity_hours": {
"type": "ANY_TIME"
}
}
},
"created_at": "2026-06-11T15:59:41.298Z",
"group_id": "v-128f962db19cae026c",
"source": {
"channel": "USER_PORTAL",
"user": {
"id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
}
},
"member_id": "lmbr_128f962dbc8c4ba5dc"
}
],
"cursor": {
"next": "lcrsambr_130daa57296e46e6b6",
"expires_at": "2026-09-17T14:26:23.462Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "The query failed validation (`invalid_query_params`), the cursor is unknown or expired (`invalid_or_expired_cursor`), or the cursor was recorded for different `filters` or `order` (`cursor_and_query_mismatch`). Query validation runs before the program and member lookup. Cursor checks run after both are found. The cursor stays valid when only `limit` changes.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-130db36510c5e2759b"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). The program is checked first. A DELETED member also returns 404.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_18f58429f4c4bf7b2",
"request_id": "v-130db30e15859652a6",
"resource_id": "lprg_18f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f62dbc8c4ba5dc",
"request_id": "v-130db31ffb859652cd",
"resource_id": "lmbr_128f62dbc8c4ba5dc",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/points": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "adjustCardPoints",
"tags": [
"Programs"
],
"summary": "Adjust card points",
"description": "Manually adjusts the points balance of the member's card.\n\nA positive `points` value creates an `ADMIN_CREDIT` card transaction. The expiration date comes from the member tier when that tier defines its own points expiration. Otherwise the date comes from the card definition. `expiration_date` is `null` when points don't expire.\n\nA negative `points` value creates an `ADMIN_DEBIT` card transaction.\n\nWhen `points` is `0`, no transaction is created and `status` is `NO_CHANGE`.\n\nThe transaction is created with status `PENDING` and processed asynchronously. The program and the member must be `ACTIVE`. The program must also be inside its validity window. Otherwise the response is `423`. The response is `404` when the program or the member doesn't exist, or when the card isn't assigned to that member.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsPointsAdjustRequestBody"
},
"examples": {
"Add points": {
"value": {
"points": 100
}
},
"Subtract points": {
"value": {
"points": -100
}
},
"No change": {
"value": {
"points": 0
}
},
"Add points with reason": {
"value": {
"points": 100,
"reason": "Sorry points for late delivery."
}
}
}
}
}
},
"responses": {
"200": {
"description": "Result of the points adjustment.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsPointsAdjustResponseBody"
},
"examples": {
"Points added: Result": {
"value": {
"transaction": {
"id": "lctx_12cfcfd67c8725bb92",
"card_id": "lcrd_128f962dbd8c4ba5df",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"type": "ADMIN_CREDIT",
"details": {
"reason": null,
"rejection": null,
"metadata": {},
"points": {
"total": 100,
"expiration_date": "2026-08-31"
}
},
"status": "PENDING",
"created_at": "2026-07-31T13:14:23.602Z",
"updated_at": null,
"object": "card_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Points addition transaction created"
}
},
"Points subtracted: Result": {
"value": {
"transaction": {
"id": "lctx_12cfdf2de2570aa63b",
"card_id": "lcrd_128f962dbd8c4ba5df",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"type": "ADMIN_DEBIT",
"details": {
"reason": "Mistake",
"rejection": null,
"metadata": {},
"points": {
"total": -100
}
},
"status": "PENDING",
"created_at": "2026-07-31T14:21:25.257Z",
"updated_at": null,
"object": "card_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Points subtraction transaction created"
}
},
"No change: Result": {
"value": {
"transaction": null,
"status": "NO_CHANGE",
"message": "Provided amount is zero, transaction was not created"
}
}
}
}
}
},
"400": {
"description": "Validation error – request body failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Point adjustment: Invalid payload": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Payload must have required property 'points'",
"request_id": "v-12cfd2c0055ade85d7"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_12858429f4c4bf7b2",
"request_id": "v-12cfd2fbbc1ade865f",
"resource_id": "lprg_12858429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmr_128f962dbc8c4ba5dc",
"request_id": "v-12cfd31da59ade86a1",
"resource_id": "lmr_128f962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f92dbd8c4ba5df",
"request_id": "v-12cfd327b75ade86be",
"resource_id": "lcrd_128f92dbd8c4ba5df",
"resource_type": "card"
}
}
}
}
}
},
"423": {
"description": "Resource locked - the program or member is not in a state that allows this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program inactive": {
"value": {
"code": 423,
"key": "non_active_program",
"message": "Cannot adjust member's card points when program status is not ACTIVE",
"details": "Invalid program status",
"request_id": "v-12cfd18761d697612c"
}
},
"Program outside validity window": {
"value": {
"code": 423,
"key": "program_outside_validity_window",
"message": "Program is not available at this time",
"details": "Cannot adjust member's card points when program is not active at this time",
"request_id": "v-12cfd18761d697612e"
}
},
"Member inactive": {
"value": {
"code": 423,
"key": "non_active_member",
"message": "Cannot adjust member's card points when member status is not ACTIVE",
"details": "Invalid member status",
"request_id": "v-12cfd18761d697612d"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/activities": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listCardActivities",
"tags": [
"Programs"
],
"summary": "List card activities",
"description": "Returns a cursor-paginated list of activities recorded for the member's card. The card must still be assigned to that member. Filters are `id`, `type`, and `created_at`. Default order is `-created_at`, then `id` ascending.\n\nReturns 404 when the program doesn't exist, when the member doesn't exist in that program, or when the card isn't currently assigned to that member. The program is checked first, then the member. A DELETED member returns 404 with `resource_type` `member`. A missing assignment and a missing or deleted card both return 404 with `resource_type` `card`.\n\nReturns 400 with key `invalid_query_params` when the query fails validation. That check runs before the program, member, and card lookup. A cursor that doesn't match `^lcrsacrd_[a-f0-9]+$`, a `limit` outside 1 to 100, an `order` other than `created_at` or `-created_at`, or an array that orders by both directions fails here.\n\nAfter the program, member, and card are found, an unknown or expired cursor returns `invalid_or_expired_cursor`. A cursor recorded for different `filters` or `order` returns `cursor_and_query_mismatch`. The cursor stays valid when only `limit` changes.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsacrd_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsacrd_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.card.created`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFilters"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of card activities.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsActivitiesListResponseBody"
},
"examples": {
"List of card activities": {
"value": {
"data": [
{
"id": "lacrd_128f962f93cfd14ca9",
"type": "vl.card.code_generation.succeeded",
"data": {
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"code": "AnnualTime-7M7ShPGfme",
"object": "card",
"balance": {
"points": 0,
"pending_points": 0
},
"card_type": "INDIVIDUAL",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"created_at": "2026-06-11T15:59:41.302Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": "2026-06-11T15:59:43.175Z",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"lifetime_bucket": {
"points": {
"added": 0,
"spent": 0,
"total": 0,
"earned": 0,
"locked": 0,
"expired": 0,
"refunded": 0,
"returned": 0,
"unlocked": 0,
"subtracted": 0
},
"pending_points": {
"total": 0,
"canceled": 0,
"activated": 0
}
},
"card_definition_id": "lcdef_128f4a88414c4bed69"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"object": "program",
"status": "ACTIVE",
"end_date": null,
"metadata": {},
"created_at": "2026-06-11T11:29:09.756Z",
"start_date": null,
"updated_at": "2026-06-11T15:58:23.525Z",
"validity_hours": {
"type": "ANY_TIME"
}
}
},
"created_at": "2026-06-11T15:59:43.175Z",
"group_id": "v-128f962db19cae026c",
"source": {
"channel": "INTERNAL"
},
"card_id": "lcrd_128f962dbd8c4ba5e1"
},
{
"id": "lacrd_128f962dc00c4ba5f7",
"type": "vl.card.assigned",
"data": {
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"code": null,
"object": "card",
"balance": {
"points": 0,
"pending_points": 0
},
"card_type": "INDIVIDUAL",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"created_at": "2026-06-11T15:59:41.302Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": null,
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"lifetime_bucket": {
"points": {
"added": 0,
"spent": 0,
"total": 0,
"earned": 0,
"locked": 0,
"expired": 0,
"refunded": 0,
"returned": 0,
"unlocked": 0,
"subtracted": 0
},
"pending_points": {
"total": 0,
"canceled": 0,
"activated": 0
}
},
"card_definition_id": "lcdef_128f4a88414c4bed69"
},
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"object": "member",
"status": "ACTIVE",
"metadata": {},
"created_at": "2026-06-11T15:59:41.298Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": null,
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"object": "program",
"status": "ACTIVE",
"end_date": null,
"metadata": {},
"created_at": "2026-06-11T11:29:09.756Z",
"start_date": null,
"updated_at": "2026-06-11T15:58:23.525Z",
"validity_hours": {
"type": "ANY_TIME"
}
},
"member_card": {
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"code": null,
"object": "card",
"balance": {
"points": 0,
"pending_points": 0
},
"card_type": "INDIVIDUAL",
"lifetime_bucket": {
"points": {
"added": 0,
"spent": 0,
"total": 0,
"earned": 0,
"locked": 0,
"expired": 0,
"refunded": 0,
"returned": 0,
"unlocked": 0,
"subtracted": 0
},
"pending_points": {
"total": 0,
"canceled": 0,
"activated": 0
}
},
"next_activation": null,
"next_expiration": null,
"card_definition_id": "lcdef_128f4a88414c4bed69"
},
"object": "member_card",
"created_at": "2026-06-11T15:59:41.303Z",
"member_role": "OWNER"
}
},
"created_at": "2026-06-11T15:59:41.303Z",
"group_id": "v-128f962db19cae026c",
"source": {
"channel": "USER_PORTAL",
"user": {
"id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
}
},
"card_id": "lcrd_128f962dbd8c4ba5e1"
},
{
"id": "lacrd_128f962dbf8c4ba5eb",
"type": "vl.card.created",
"data": {
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"code": null,
"object": "card",
"balance": {
"points": 0,
"pending_points": 0
},
"card_type": "INDIVIDUAL",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"created_at": "2026-06-11T15:59:41.302Z",
"program_id": "lprg_128f58429f4c4bf7b2",
"updated_at": null,
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"lifetime_bucket": {
"points": {
"added": 0,
"spent": 0,
"total": 0,
"earned": 0,
"locked": 0,
"expired": 0,
"refunded": 0,
"returned": 0,
"unlocked": 0,
"subtracted": 0
},
"pending_points": {
"total": 0,
"canceled": 0,
"activated": 0
}
},
"card_definition_id": "lcdef_128f4a88414c4bed69"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"object": "program",
"status": "ACTIVE",
"end_date": null,
"metadata": {},
"created_at": "2026-06-11T11:29:09.756Z",
"start_date": null,
"updated_at": "2026-06-11T15:58:23.525Z",
"validity_hours": {
"type": "ANY_TIME"
}
}
},
"created_at": "2026-06-11T15:59:41.302Z",
"group_id": "v-128f962db19cae026c",
"source": {
"channel": "USER_PORTAL",
"user": {
"id": "user_ypzfEcSAphSONMGJRlj6trzXKsh7FGX7"
}
},
"card_id": "lcrd_128f962dbd8c4ba5e1"
}
],
"cursor": null,
"object": "list"
}
}
}
}
}
},
"400": {
"description": "The query failed validation (`invalid_query_params`), the cursor is unknown or expired (`invalid_or_expired_cursor`), or the cursor was recorded for different `filters` or `order` (`cursor_and_query_mismatch`). Query validation runs before the program, member, and card lookup. Cursor checks run after all three are found. The cursor stays valid when only `limit` changes.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-130db36510c5e2759b"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), the member doesn't exist in that program (`resource_type` `member`), or the card isn't currently assigned to that member (`resource_type` `card`). The program is checked first, then the member. A DELETED member returns 404. A missing assignment and a deleted card both use `resource_type` `card`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_18f58429f4c4bf7b2",
"request_id": "v-130db30e15859652a6",
"resource_id": "lprg_18f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f62dbc8c4ba5dc",
"request_id": "v-130db31ffb859652cd",
"resource_id": "lmbr_128f62dbc8c4ba5dc",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f62dbd8c4ba5df",
"request_id": "v-12d749e6f811f0e31a",
"resource_id": "lcrd_128f62dbd8c4ba5df",
"resource_type": "card"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listCardPendingPoints",
"tags": [
"Programs"
],
"summary": "List card pending point buckets",
"description": "Returns a cursor-paginated list of pending point buckets for the member's card. Every bucket has status `PENDING`. Pending points wait for activation (`PERIOD_BASED`, `FIXED_DATES`, or `EVENT_BASED`), following the card definition.\n\nThe list starts on the next project day. The current day's bucket is omitted because it's still accumulating.\n\nResults can be filtered by card definition ID and ordered by `date`.\n\nReturns `404` when the program or the member doesn't exist, or when the card isn't assigned to that member.\n\nBucket IDs from this list are the `bucketId` for [Activate pending point bucket](/api-reference/programs/activate-pending-point-bucket) and [Cancel pending point bucket](/api-reference/programs/cancel-pending-point-bucket).",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `date`. Soonest activation first. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"date",
"-date"
]
}
},
{
"type": "string",
"enum": [
"date",
"-date"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrscppb_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrscppb_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[card_definition_id][conditions][$is]=lcdef_128f495f720c4bec8c`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsPendingPointsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of pending point buckets.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsPendingPointsListResponseBody"
},
"examples": {
"List of pending point buckets": {
"value": {
"data": [
{
"id": "lcppb_12db4ebb0483a140a9",
"card_id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"program_id": "lprg_128f58429f4c4bf7b2",
"card_type": "INDIVIDUAL",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"points": {
"total": 10
},
"date": "2026-08-09",
"type": "PERIOD_BASED",
"status": "PENDING",
"created_at": "2026-07-30T11:32:06.254Z",
"updated_at": null,
"object": "card_pending_points_bucket"
}
],
"cursor": {
"next": "lcrscppb_12d74837ba44e95894",
"expires_at": "2026-08-06T08:39:42.505Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "The query failed validation, the cursor is invalid or expired, or the cursor doesn't match the query.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12d75fbdd02d464373"
}
},
"Invalid query params": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrscppb_[a-f0-9]+$\"",
"request_id": "v-12d75fbdd02d464374"
}
},
"Cursor and query mismatch": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12d75fbdd02d464375"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5429f4c4bf7b2",
"request_id": "v-12d749a01991f0e278",
"resource_id": "lprg_128f5429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_18f962dbc8c4ba5dc",
"request_id": "v-12d749dc22ed46108e",
"resource_id": "lmbr_18f962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f62dbd8c4ba5df",
"request_id": "v-12d749e6f811f0e31a",
"resource_id": "lcrd_128f62dbd8c4ba5df",
"resource_type": "card"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points/{bucketId}/activate": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
},
{
"name": "bucketId",
"in": "path",
"required": true,
"description": "Identifies the pending points bucket. Format `lcppb_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcppb_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "activateCardPendingPointsBucket",
"tags": [
"Programs"
],
"summary": "Activate pending point bucket",
"description": "Activates a pending points bucket and creates a `PENDING_POINTS_ACTIVATED` card transaction. The transaction is created with status `PENDING` and processed asynchronously. No request body.\n\nThe bucket must be `PENDING`, and its `date` must be after the current project day. The program and the member must be `ACTIVE`, and the program must be inside its validity window. Otherwise the response is `423`.\n\nReturns `404` when the program or the member doesn't exist, when the card isn't assigned to that member, or when the bucket isn't on that card.",
"parameters": [],
"responses": {
"200": {
"description": "Result of the pending points activation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsPendingPointsActivateResponseBody"
},
"examples": {
"Pending points bucket activated": {
"value": {
"transaction": {
"id": "lctx_12d7831b16c4e9243f",
"card_id": "lcrd_128f962dbd8c4ba5df",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"type": "PENDING_POINTS_ACTIVATED",
"details": {
"reason": "Manual points activation",
"rejection": null,
"metadata": {},
"points": {
"total": 70,
"date": "2026-08-16",
"type": "PERIOD_BASED"
}
},
"status": "PENDING",
"created_at": "2026-08-06T12:46:59.675Z",
"updated_at": null,
"object": "card_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Points activation transaction created"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf7b2",
"request_id": "v-12d782064b07858c3c",
"resource_id": "lprg_128f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128962dbc8c4ba5dc",
"request_id": "v-12d78211422d461324",
"resource_id": "lmbr_128962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f962bd8c4ba5df",
"request_id": "v-12d7821a6a47858c67",
"resource_id": "lcrd_128f962bd8c4ba5df",
"resource_type": "card"
}
},
"Bucket not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card_pending_points_bucket with id lcppb_12db4ebb0483a1409",
"request_id": "v-12d782e1852d4614ef",
"resource_id": "lcppb_12db4ebb0483a1409",
"resource_type": "card_pending_points_bucket"
}
}
}
}
}
},
"423": {
"description": "The program or member isn't `ACTIVE`, the program is outside its validity window, the bucket isn't `PENDING`, or the bucket `date` isn't after the current project day.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Bucket already activated": {
"value": {
"code": 423,
"key": "invalid_pending_points_bucket_status",
"message": "Invalid pending points bucket status",
"details": "Pending points bucket must be in PENDING status in order to be activated",
"request_id": "v-12d782251047858c7e"
}
},
"Bucket date not in the future": {
"value": {
"code": 423,
"key": "bucket_not_eligible_for_manual_activation",
"message": "Manual activation not available",
"details": "Only future-dated buckets can be manually activated",
"request_id": "v-12d782251047858c7f"
}
},
"Program inactive": {
"value": {
"code": 423,
"key": "non_active_program",
"message": "Cannot activate member's card pending points when program status is not ACTIVE",
"details": "Invalid program status",
"request_id": "v-12d782251047858c80"
}
},
"Program outside validity window": {
"value": {
"code": 423,
"key": "program_outside_validity_window",
"message": "Program is not available at this time",
"details": "Cannot activate member's card pending points when program is not active at this time",
"request_id": "v-12d782251047858c81"
}
},
"Member inactive": {
"value": {
"code": 423,
"key": "non_active_member",
"message": "Cannot activate member's card pending points when member status is not ACTIVE",
"details": "Invalid member status",
"request_id": "v-12d782251047858c82"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points/{bucketId}/cancel": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
},
{
"name": "bucketId",
"in": "path",
"required": true,
"description": "Identifies the pending points bucket. Format `lcppb_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcppb_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "cancelCardPendingPointsBucket",
"tags": [
"Programs"
],
"summary": "Cancel pending point bucket",
"description": "Cancels a pending points bucket so its points aren't activated. Creates a `PENDING_POINTS_CANCELED` card transaction. The transaction is created with status `PENDING` and processed asynchronously. No request body.\n\nThe bucket must be `PENDING`, and its `date` must be after the current project day. The program and the member must be `ACTIVE`, and the program must be inside its validity window. Otherwise the response is `423`.\n\nReturns `404` when the program or the member doesn't exist, when the card isn't assigned to that member, or when the bucket isn't on that card.",
"parameters": [],
"responses": {
"200": {
"description": "Result of the pending points cancellation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsPendingPointsCancelResponseBody"
},
"examples": {
"Pending points bucket canceled": {
"value": {
"transaction": {
"id": "lctx_12d7941860abf9e87f",
"card_id": "lcrd_128f962dbd8c4ba5df",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"type": "PENDING_POINTS_CANCELED",
"details": {
"reason": "Manual points cancellation",
"rejection": null,
"metadata": {},
"points": {
"total": 60,
"date": "2026-08-16",
"type": "PERIOD_BASED"
}
},
"status": "PENDING",
"created_at": "2026-08-06T14:01:13.346Z",
"updated_at": null,
"object": "card_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Points cancellation transaction created"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf7b2",
"request_id": "v-12d782064b07858c3c",
"resource_id": "lprg_128f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128962dbc8c4ba5dc",
"request_id": "v-12d78211422d461324",
"resource_id": "lmbr_128962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f962bd8c4ba5df",
"request_id": "v-12d7821a6a47858c67",
"resource_id": "lcrd_128f962bd8c4ba5df",
"resource_type": "card"
}
},
"Bucket not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card_pending_points_bucket with id lcppb_12db4ebb0483a1409",
"request_id": "v-12d782e1852d4614ef",
"resource_id": "lcppb_12db4ebb0483a1409",
"resource_type": "card_pending_points_bucket"
}
}
}
}
}
},
"423": {
"description": "The program or member isn't `ACTIVE`, the program is outside its validity window, the bucket isn't `PENDING`, or the bucket `date` isn't after the current project day.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Bucket not pending": {
"value": {
"code": 423,
"key": "invalid_pending_points_bucket_status",
"message": "Invalid pending points bucket status",
"details": "Pending points bucket must be in PENDING status in order to be canceled",
"request_id": "v-12d7919208d91c5632"
}
},
"Bucket date not in the future": {
"value": {
"code": 423,
"key": "bucket_not_eligible_for_manual_cancellation",
"message": "Manual cancellation not available",
"details": "Only future-dated buckets can be manually canceled",
"request_id": "v-12d7919208d91c5633"
}
},
"Program inactive": {
"value": {
"code": 423,
"key": "non_active_program",
"message": "Cannot cancel member's card pending points when program status is not ACTIVE",
"details": "Invalid program status",
"request_id": "v-12d7919208d91c5634"
}
},
"Program outside validity window": {
"value": {
"code": 423,
"key": "program_outside_validity_window",
"message": "Program is not available at this time",
"details": "Cannot cancel member's card pending points when program is not active at this time",
"request_id": "v-12d7919208d91c5635"
}
},
"Member inactive": {
"value": {
"code": 423,
"key": "non_active_member",
"message": "Cannot cancel member's card pending points when member status is not ACTIVE",
"details": "Invalid member status",
"request_id": "v-12d7919208d91c5636"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listCardExpiringPoints",
"tags": [
"Programs"
],
"summary": "List card expiring points buckets",
"description": "Returns a cursor-paginated list of `ACTIVE` point expiration buckets for the member's card. Each bucket groups points that share an expiration date and expiration type, including points from separate transactions.\n\nThe list starts on the current project day. Earlier buckets are omitted.\n\nResults can be filtered by card definition ID and expiration date, and ordered by `expiration_date`.\n\nReturns an empty list when the card has no matching buckets. Returns `400` when the query is invalid or the cursor is invalid, expired, or doesn't match the query. Returns `404` when the program or the member doesn't exist, or when the card isn't assigned to that member.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `expiration_date`. Soonest expiration first. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"expiration_date",
"-expiration_date"
]
}
},
{
"type": "string",
"enum": [
"expiration_date",
"-expiration_date"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrspeb_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrspeb_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[card_definition_id][conditions][$is]=lcdef_1297339938ae248cea`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsExpiringPointsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of points expiration buckets.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsExpiringPointsListResponseBody"
},
"examples": {
"Card expiring points bucket list response": {
"value": {
"data": [
{
"id": "lcpeb_12f5022f1ce873e0b4",
"card_id": "lcrd_129741698b665ae2f6",
"customer_id": "cust_zCwFz4PwbC2m0rUJOW8c2w1l",
"card_definition_id": "lcdef_1297339938ae248cea",
"program_id": "lprg_12974109bca65ae291",
"card_type": "INDIVIDUAL",
"member_id": "lmbr_129741698a265ae2f3",
"points": {
"total": 6
},
"expiration_date": "2026-08-29",
"expiration_type": "ROLLING_EXPIRATION",
"status": "ACTIVE",
"created_at": "2026-08-28T10:38:10.405Z",
"updated_at": null,
"object": "card_points_bucket"
}
],
"cursor": {
"next": "lcrspeb_12f5022f1ce873e0b5",
"expires_at": "2026-09-04T10:38:10.405Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "Invalid query parameters or pagination cursor.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor format": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrspeb_[a-f0-9]+$\"",
"request_id": "v-12f3be8e03ab12dbfb"
}
},
"Cursor invalid or expired": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12f3be8e03ab12dbfc"
}
},
"Cursor does not match query": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12f3be8e03ab12dbfd"
}
},
"Limit too high": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be greater than 100",
"request_id": "v-12f3be8e03ab12dbfe"
}
},
"Limit too low": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be lower than 1",
"request_id": "v-12f3be8e03ab12dbff"
}
},
"Unsupported order value": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ expiration_date, -expiration_date ]",
"request_id": "v-12f3be8e03ab12dc00"
}
},
"Conflicting order values": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query cannot be ordered by 'expiration_date' and '-expiration_date' at the same time",
"request_id": "v-12f3be8e03ab12dc01"
}
}
}
}
}
},
"404": {
"description": "Resource (program, member, card) not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_1294109bca65ae291",
"request_id": "v-12f3b9e9c750334b0d",
"resource_id": "lprg_1294109bca65ae291",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_129741698265ae2f3",
"request_id": "v-12f3be8e03ab12dbfb",
"resource_id": "lmbr_129741698265ae2f3",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_12971698b665ae2f6",
"request_id": "v-12f3be965ceb12dc18",
"resource_id": "lcrd_12971698b665ae2f6",
"resource_type": "card"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points/{bucketId}/expire": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
},
{
"name": "bucketId",
"in": "path",
"required": true,
"description": "Identifies the points expiration bucket. Format `lcpeb_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcpeb_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "expireCardPointsBucket",
"tags": [
"Programs"
],
"summary": "Expire point bucket",
"description": "Expires an `ACTIVE` points bucket. Creates an `ADMIN_POINTS_EXPIRATION` card transaction. The transaction is created with status `PENDING` and processed asynchronously. No request body.\n\nThe bucket must be `ACTIVE`, and its `expiration_date` must be on or after the current project day. The program and the member must be `ACTIVE`, and the program must be inside its validity window. Otherwise the response is `423`.\n\nReturns `404` when the program, the member, or the card definition doesn't exist, when the card isn't assigned to that member, or when the bucket isn't on that card.",
"parameters": [],
"responses": {
"200": {
"description": "Result of the points expiration.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsExpiringPointsExpireResponseBody"
},
"examples": {
"Point expiration bucket response": {
"value": {
"transaction": {
"id": "lctx_12f7dc8650267658b4",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"type": "ADMIN_POINTS_EXPIRATION",
"details": {
"reason": "Manual points expiration",
"rejection": null,
"metadata": {},
"bucket": {
"id": "lcpeb_139415d0be4d928f6e",
"points": {
"total": 220
},
"expiration_date": "2026-12-31",
"expiration_type": "CALENDAR_EXPIRATION"
}
},
"status": "PENDING",
"created_at": "2026-08-31T15:49:03.936Z",
"updated_at": null,
"object": "card_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Points expiration transaction created"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5849f4c4bf7b2",
"request_id": "v-12f7deaa8ded51e922",
"resource_id": "lprg_128f5849f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128962dbc8c4ba5dc",
"request_id": "v-12f7dec39b5e1ffd5b",
"resource_id": "lmbr_128962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_28f962dbd8c4ba5e1",
"request_id": "v-12f7ded28cad51e96a",
"resource_id": "lcrd_28f962dbd8c4ba5e1",
"resource_type": "card"
}
},
"Card definition not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card_definition with id lcdef_128f4a88414c4bed00",
"request_id": "v-12f7deda0cad51e97a",
"resource_id": "lcdef_128f4a88414c4bed00",
"resource_type": "card_definition"
}
},
"Point bucket not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card_points_bucket with id lcpeb_19415d0be4d928f6e",
"request_id": "v-12f7dee4036d51e990",
"resource_id": "lcpeb_19415d0be4d928f6e",
"resource_type": "card_points_bucket"
}
}
}
}
}
},
"423": {
"description": "The program or member isn't `ACTIVE`, the program is outside its validity window, the bucket isn't `ACTIVE`, or the bucket `expiration_date` is before the current project day.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program inactive": {
"value": {
"code": 423,
"key": "non_active_program",
"message": "Cannot expire member's card points when program status is not ACTIVE",
"details": "Invalid program status",
"request_id": "v-12f7de75256d51e8b1"
}
},
"Program outside validity window": {
"value": {
"code": 423,
"key": "program_outside_validity_window",
"message": "Program is not available at this time",
"details": "Cannot expire member's card points when program is not active at this time",
"request_id": "v-12f7de75256d51e8b2"
}
},
"Member inactive": {
"value": {
"code": 423,
"key": "non_active_member",
"message": "Cannot expire member's card points when member status is not ACTIVE",
"details": "Invalid member status",
"request_id": "v-12f7de75256d51e8b3"
}
},
"Invalid point bucket status": {
"value": {
"code": 423,
"key": "invalid_points_bucket_status",
"message": "Invalid points bucket status",
"details": "Points bucket must be in ACTIVE status in order to be expired",
"request_id": "v-12f7de75256d51e8bf"
}
},
"Bucket not eligible for manual expiration": {
"value": {
"code": 423,
"key": "bucket_not_eligible_for_manual_expiration",
"message": "Manual expiration not available",
"details": "Only future-dated buckets can be expired manually",
"request_id": "v-12f7de75256d51e8b5"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/transactions": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listCardTransactions",
"tags": [
"Programs"
],
"summary": "List card transactions",
"description": "Returns a cursor-paginated list of transactions on the member's card. Filter by `id`, `card_definition_id`, and `created_at`. Order by `id` (default `-id`, newest first). Returns `404` when the program, member, or card doesn't exist. The program is checked first, then the member, then the card. A member of another program, or a card that isn't assigned to this member, is not found.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-id`. Newest first. The same field cannot be used in both directions.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-id",
"id"
]
}
},
{
"type": "string",
"enum": [
"-id",
"id"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsctx_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsctx_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[id][conditions][$is]=lctx_0f5d0a8878caa3ee5c`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsTransactionsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of card transactions.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersCardsTransactionsListResponseBody"
},
"examples": {
"Card transaction list response": {
"value": {
"data": [
{
"id": "lctx_1294c0f2ed0e497abc",
"card_id": "lcrd_128f962dbd8c4ba5e0",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"type": "ADMIN_CREDIT",
"details": {
"reason": "Sorry points",
"rejection": null,
"metadata": {},
"points": {
"total": 50,
"expiration_date": "2026-12-23"
}
},
"status": "APPROVED",
"created_at": "2026-06-15T16:18:57.588Z",
"updated_at": "2026-06-15T16:18:58.239Z",
"object": "card_transaction"
},
{
"id": "lctx_128f9821b6cfd14efa",
"card_id": "lcrd_128f962dbd8c4ba5e0",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"type": "PENDING_POINTS_ADDED",
"details": {
"reason": "AnnualProgram / AutumnPaid",
"rejection": null,
"metadata": {
"event_id": "evcus_128f981fced47cbe9b",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"program_id": "lprg_128f58429f4c4bf7b2",
"earning_item_id": "lernei_128f582238cc4bf78e",
"earning_rule_id": "lern_128f5822398c4bf78f"
},
"points": {
"total": 10,
"date": "2026-12-23",
"type": "FIXED_DATES"
}
},
"status": "APPROVED",
"created_at": "2026-06-11T16:08:13.275Z",
"updated_at": "2026-06-11T16:08:14.223Z",
"object": "card_transaction"
},
{
"id": "lctx_128f97f6b88fd14ea8",
"card_id": "lcrd_128f962dbd8c4ba5e0",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"type": "PENDING_POINTS_ADDED",
"details": {
"reason": "AnnualProgram / AutumnPaid",
"rejection": null,
"metadata": {
"event_id": "evcus_128f97f4f7d47cbe6a",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"program_id": "lprg_128f58429f4c4bf7b2",
"earning_item_id": "lernei_128f582238cc4bf78e",
"earning_rule_id": "lern_128f5822398c4bf78f"
},
"points": {
"total": 10,
"date": "2026-12-23",
"type": "FIXED_DATES"
}
},
"status": "APPROVED",
"created_at": "2026-06-11T16:07:29.250Z",
"updated_at": "2026-06-11T16:07:30.271Z",
"object": "card_transaction"
},
{
"id": "lctx_128f97848e4fd14e1d",
"card_id": "lcrd_128f962dbd8c4ba5e0",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"type": "PENDING_POINTS_ADDED",
"details": {
"reason": "AnnualProgram / AutumnPaid",
"rejection": null,
"metadata": {
"event_id": "evcus_128f9782100c4ba718",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"program_id": "lprg_128f58429f4c4bf7b2",
"earning_item_id": "lernei_128f582238cc4bf78e",
"earning_rule_id": "lern_128f5822398c4bf78f"
},
"points": {
"total": 10,
"date": "2026-12-23",
"type": "FIXED_DATES"
}
},
"status": "APPROVED",
"created_at": "2026-06-11T16:05:32.345Z",
"updated_at": "2026-06-11T16:05:33.153Z",
"object": "card_transaction"
},
{
"id": "lctx_128f974da3cfd14db7",
"card_id": "lcrd_128f962dbd8c4ba5e0",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"type": "PENDING_POINTS_ADDED",
"details": {
"reason": "AnnualProgram / AutumnPaid",
"rejection": null,
"metadata": {
"event_id": "evcus_128f974badd47cbddd",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"program_id": "lprg_128f58429f4c4bf7b2",
"earning_item_id": "lernei_128f582238cc4bf78e",
"earning_rule_id": "lern_128f5822398c4bf78f"
},
"points": {
"total": 10,
"date": "2026-12-23",
"type": "FIXED_DATES"
}
},
"status": "APPROVED",
"created_at": "2026-06-11T16:04:36.111Z",
"updated_at": "2026-06-11T16:04:37.157Z",
"object": "card_transaction"
}
],
"cursor": null,
"object": "list"
}
}
}
}
}
},
"400": {
"description": "The query failed validation. `order` must be `id` or `-id`, and an array can't order by `id` and `-id` together. A cursor that doesn't match `^lcrsctx_[a-f0-9]+$` returns `invalid_query_params`. An unknown cursor returns `invalid_or_expired_cursor`. A cursor from a different `limit` or `order` returns `cursor_and_query_mismatch`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid order": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -id, id ]",
"request_id": "v-12bdef050f2cb1ef70"
}
},
"Invalid cursor": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrsctx_[a-f0-9]+$\"",
"request_id": "v-12bdef050f2cb1ef71"
}
},
"Unknown cursor": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12bdef050f2cb1ef72"
}
},
"Cursor and query mismatch": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12bdef050f2cb1ef73"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), the member doesn't exist in that program (`resource_type` `member`), or the card isn't assigned to that member (`resource_type` `card`). The program is checked first.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf7b2",
"request_id": "v-12bdef050f2cb1ef74",
"resource_id": "lprg_128f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f962dbc8c4ba5dc",
"request_id": "v-12bdef050f2cb1ef75",
"resource_id": "lmbr_128f962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f962dbd8c4ba5e0",
"request_id": "v-12bdef050f2cb1ef76",
"resource_id": "lcrd_128f962dbd8c4ba5e0",
"resource_type": "card"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/rewards/purchases/{rewardTransactionId}/refund": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "rewardTransactionId",
"in": "path",
"required": true,
"description": "Identifies the reward transaction of the purchase to refund. Format `lrtx_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "refundRewardPurchase",
"tags": [
"Programs"
],
"summary": "Refund reward purchase",
"description": "Refunds an `APPROVED` reward purchase made by a program member. The purchase transaction is marked `REFUNDED`, a new `REFUND` reward transaction is created with status `APPROVED`, and the points spent on the purchase are returned to the member's card.\n\nThe request body is optional and an empty payload is allowed. Policies default to `refund: DEFAULT` and `stock: DEFAULT`.\n\nThe endpoint responds with `202` before the card balance changes. A `POINTS_RETURNED` card transaction is created for the member's card and processed shortly after the response. When the member's tier or the card definition expires points, returned points receive a new expiration date from that setting. They don't inherit the expiration of the originally spent points. A `NO_EXPIRATION` setting leaves the returned points without an expiration date. Card earning limits don't block the refund.\n\nFor a `LOYALTY_CARD_POINTS` reward, the points credited to the target card are also reversed, with a `POINTS_PURCHASE_REVERSED` card transaction on that card. That transaction is processed shortly after the response. Its expiration is copied from the original points-purchased transaction.\n\nA `DISCOUNT_COUPONS` refund deletes the issued vouchers. `details.result.digital.discount_coupons[].result` is `DELETED`, or `SKIPPED` when the voucher isn't deleted. A `GIFT_VOUCHERS` refund subtracts the credited amount. `details.result.digital.gift_vouchers[].result` is `CREDITS_SUBTRACTED`, or `SKIPPED` when the balance update is rejected.\n\nThe refund reverses that purchase in the reward's purchase limits for the project-local day of the original purchase. A day whose purchases are all refunded no longer counts as the member's last purchase.\n\nOnly rewards whose `refunds.type` is `REFUNDABLE` can be refunded. Any other reward is rejected with `423` and key `reward_refund_policy_does_not_allow_refunds`. `policies.refund` set to `ALLOW` refunds it anyway.\n\nThe program must exist, and the reward transaction must belong to that program. Otherwise the request fails with `404`. The program is checked first. The request is rejected with `423` when:\n- The program isn't `ACTIVE` (`non_active_program`) or is outside its validity window (`program_outside_validity_window`),\n- The transaction isn't a purchase (`non_purchase_reward_transaction`) or isn't `APPROVED` (`non_approved_reward_transaction`); refunding the same purchase twice fails here,\n- The reward no longer exists (`reward_not_found`), isn't assigned to the program (`refund_reward_not_assigned_to_program`), the member's card is gone (`refund_card_not_found`), or the card definition is gone (`refund_card_definition_not_found`),\n- The reward type isn't supported (`reward_type_not_supported_for_refunds`),\n- For a `LOYALTY_CARD_POINTS` reward, the purchase result is missing (`loyalty_card_points_purchase_result_not_found`), the target card is gone (`loyalty_card_points_target_card_not_found`), the points-purchased card transaction is missing (`loyalty_card_points_purchase_not_found`), the target card's available balance is lower than the purchased points (`loyalty_card_points_insufficient_balance`), or the target card definition is gone (`loyalty_card_points_target_card_definition_not_found`).",
"parameters": [],
"requestBody": {
"required": false,
"description": "Optional refund policies. An empty payload is allowed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsRewardsPurchasesRefundRequestBody"
}
}
}
},
"responses": {
"202": {
"description": "Refund accepted. The refund reward transaction has been created with status APPROVED and points will be returned to the member's card asynchronously.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsRewardsPurchasesRefundResponseBody"
},
"examples": {
"Refund accepted": {
"value": {
"transaction": {
"id": "lrtx_12fa3c01696025a386",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_transaction_id": "lctx_12fa3c0169a025a387",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"reward_id": "lrew_1294cebb458e4904a0",
"status": "APPROVED",
"type": "REFUND",
"details": {
"reason": "Manual reward refund",
"rejection": null,
"metadata": {},
"points": {
"total": 500
},
"result": {
"reward": {
"id": "lrew_1294cebb458e4904a0",
"type": "MATERIAL"
},
"quantity": 1,
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_1294ce96f66d469498"
}
},
"digital": null
},
"purchase": {
"card_transaction": {
"id": "lctx_12cad1abefa2311e02"
},
"reward_transaction": {
"id": "lrtx_12cad1abefa2311e03"
}
}
},
"created_at": "2026-09-02T12:03:11.401Z",
"updated_at": null,
"object": "reward_transaction"
},
"status": "APPROVED",
"message": "Reward refund transaction created. Points will be returned to the member's card shortly."
}
}
}
}
}
},
"400": {
"description": "Invalid payload. `policies.refund` or `policies.stock` is not one of the allowed values.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid refund policy": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .policies.refund must be equal to one of the allowed values [ DEFAULT, ALLOW ]",
"request_id": "v-12fa3c853ac1a815fa"
}
},
"Invalid stock policy": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .policies.stock must be equal to one of the allowed values [ DEFAULT, WRITE_OFF ]",
"request_id": "v-12fa3c853ac1a815fb"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the reward transaction doesn't belong to that program (`resource_type` `reward_transaction`). The program is checked first.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5849f4c4bf7b2",
"request_id": "v-12fa42985001a82218",
"resource_id": "lprg_128f5849f4c4bf7b2",
"resource_type": "program"
}
},
"Transaction not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find reward_transaction with id lrtx_12cadabefa2311e03",
"request_id": "v-12fa42b2a281a82254",
"resource_id": "lrtx_12cadabefa2311e03",
"resource_type": "reward_transaction"
}
}
}
}
}
},
"423": {
"description": "Locked. The program isn't `ACTIVE` (`non_active_program`) or is outside its validity window (`program_outside_validity_window`). The transaction isn't an `APPROVED` `PURCHASE` (`non_purchase_reward_transaction`, `non_approved_reward_transaction`). The reward refund policy doesn't allow refunds (`reward_refund_policy_does_not_allow_refunds`). The reward, its program assignment, the source card, or the card definition is missing (`reward_not_found`, `refund_reward_not_assigned_to_program`, `refund_card_not_found`, `refund_card_definition_not_found`). The reward type isn't supported (`reward_type_not_supported_for_refunds`). For a `LOYALTY_CARD_POINTS` reward, the purchase result, target card, points-purchased transaction, or target card definition is missing, or the target card's available balance is lower than the purchased points (`loyalty_card_points_purchase_result_not_found`, `loyalty_card_points_target_card_not_found`, `loyalty_card_points_purchase_not_found`, `loyalty_card_points_insufficient_balance`, `loyalty_card_points_target_card_definition_not_found`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Refund not allowed": {
"value": {
"code": 423,
"key": "reward_refund_policy_does_not_allow_refunds",
"message": "Cannot refund reward",
"details": "Reward lrew_1294cebb458e4904a0 refund policy does not allow refunds. To refund reward, set the refund policy to 'ALLOW' in the request body",
"request_id": "v-12fa3c853ac1a815fa"
}
},
"Transaction not approved": {
"value": {
"code": 423,
"key": "non_approved_reward_transaction",
"message": "Cannot refund reward when transaction status is not APPROVED",
"details": "Invalid reward_transaction status",
"request_id": "v-12fa3cdc7fa4066775"
}
},
"Target card balance too low": {
"value": {
"code": 423,
"key": "loyalty_card_points_insufficient_balance",
"message": "Cannot refund reward",
"details": "Target card lcrd_128f962dbd8c4ba5e1 does not have enough points to reverse the loyalty card points purchase",
"request_id": "v-12fa3cdc7fa4066776"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listMemberRewardPurchases",
"tags": [
"Programs"
],
"summary": "List member reward purchases",
"description": "Lists stored `PURCHASE` reward transactions for the program member, with cursor pagination. Filter by `id`, `reward_id`, `card_definition_id`, and `created_at`. Order by `id` (default `-id`, newest first). Purchases rejected before a transaction is stored don't appear. A purchase accepted with `202` that later fails is stored as `REJECTED` with `details.rejection`. Returns `404` when the program or the member doesn't exist. The program is checked first.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-id`. Newest first. The same field cannot be used in both directions.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-id",
"id"
]
}
},
{
"type": "string",
"enum": [
"-id",
"id"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrstrx_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrstrx_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[reward_id][conditions][$is]=lrew_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersRewardsPurchasesListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Paginated list of reward purchase transactions.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBody"
},
"examples": {
"Reward purchase list": {
"value": {
"data": [
{
"id": "lrtx_12cac270a5e2310b4b",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12cac270a5e2310b4a",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"reward_id": "lrew_1294cebb458e4904a0",
"status": "APPROVED",
"type": "PURCHASE",
"details": {
"reason": "Points spent on reward",
"rejection": null,
"metadata": {},
"points": {
"total": 500
},
"result": {
"reward": {
"id": "lrew_1294cebb458e4904a0",
"type": "MATERIAL"
},
"quantity": 1,
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_1294ce96f66d469498"
}
},
"digital": null
}
},
"created_at": "2026-07-27T15:03:27.128Z",
"updated_at": "2026-07-27T15:03:28.277Z",
"object": "reward_transaction"
},
{
"id": "lrtx_1299a9ded817f57b90",
"card_id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_transaction_id": "lctx_1299a9ded817f57b8f",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"reward_id": "lrew_128f4cefbad47c863e",
"status": "APPROVED",
"type": "PURCHASE",
"details": {
"reason": "Points spent on reward",
"rejection": null,
"metadata": {},
"points": {
"total": 250
},
"result": {
"reward": {
"id": "lrew_128f4cefbad47c863e",
"type": "MATERIAL"
},
"quantity": 1,
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_128f4cd0a94c4bef25"
}
},
"digital": null
}
},
"created_at": "2026-06-19T11:50:32.033Z",
"updated_at": "2026-06-19T11:50:33.387Z",
"object": "reward_transaction"
},
{
"id": "lrtx_129748dbafe65ae86e",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_129748dbafe65ae86d",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"reward_id": "lrew_128f4c6710947c85d1",
"status": "APPROVED",
"type": "PURCHASE",
"details": {
"reason": "Points spent on reward",
"rejection": null,
"metadata": {},
"points": {
"total": 150
},
"result": {
"reward": {
"id": "lrew_128f4c6710947c85d1",
"type": "MATERIAL"
},
"quantity": 1,
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_128f4c2edf547c859e"
}
},
"digital": null
}
},
"created_at": "2026-06-17T15:29:43.104Z",
"updated_at": "2026-06-17T15:29:44.542Z",
"object": "reward_transaction"
}
],
"cursor": {
"next": "lcrstrx_12cacd3182e2311881",
"expires_at": "2026-07-27T16:00:26.059Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "The query failed validation. `order` must be `id` or `-id`, and an array can't order by `id` and `-id` together. A cursor that doesn't match `^lcrstrx_[a-f0-9]+$` returns `invalid_query_params`. An unknown cursor returns `invalid_or_expired_cursor`. A cursor from a different `limit` or `order` returns `cursor_and_query_mismatch`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid order": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -id, id ]",
"request_id": "v-12bdef050f2cb1ef70"
}
},
"Invalid cursor": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrstrx_[a-f0-9]+$\"",
"request_id": "v-12bdef050f2cb1ef71"
}
},
"Unknown cursor": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12bdef050f2cb1ef72"
}
},
"Cursor and query mismatch": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12bdef050f2cb1ef73"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). A member of another program is not found. The program is checked first.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429f4c4bf7b2",
"request_id": "v-12bdef050f2cb1ef74",
"resource_id": "lprg_128f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f962dbc8c4ba5dc",
"request_id": "v-12bdef050f2cb1ef75",
"resource_id": "lmbr_128f962dbc8c4ba5dc",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"post": {
"operationId": "purchaseMemberReward",
"tags": [
"Programs"
],
"summary": "Purchase reward with points",
"description": "Purchases a reward for the program member by spending points from the member's card. The card comes from the matching reward cost's card definition.\n\nThe program, reward, and member must be `ACTIVE`. The program and reward must be inside their validity windows. The reward must be assigned to the program with stock available, a cost must match the customer, and the purchase must stay inside frequency, cooldown, balance, and spending limits.\n\nModes:\n- `TRANSACTION` (default): creates a `PENDING` reward transaction and a `PENDING` card transaction. Returns `202`.\n- `DRY_RUN`: simulates the purchase and doesn't create a transaction. Returns `200` with status `SIMULATED`.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersRewardsPurchasesCreateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Dry run result (mode `DRY_RUN`). No transaction was created; the returned transaction has status `SIMULATED` and no `id`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersRewardsPurchasesCreateDryRunResponseBody"
},
"examples": {
"Reward purchase dry run": {
"value": {
"transaction": {
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": null,
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"reward_id": "lrew_1294cebb458e4904a0",
"status": "SIMULATED",
"type": "PURCHASE",
"details": {
"reason": "Points spent on reward",
"rejection": null,
"metadata": {},
"points": {
"total": 500
},
"result": null
},
"updated_at": null,
"object": "reward_transaction"
},
"status": "DRY_RUN",
"message": "Dry run mode. No transaction was created. This is only a simulation."
}
}
}
}
}
},
"202": {
"description": "Purchase accepted (mode `TRANSACTION`). A `PENDING` reward transaction was created and will be processed asynchronously.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersRewardsPurchasesCreateTransactionResponseBody"
},
"examples": {
"Reward purchase transaction created": {
"value": {
"transaction": {
"id": "lrtx_12cad1abefa2311e03",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12cad1abefa2311e02",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"reward_id": "lrew_1294cebb458e4904a0",
"status": "PENDING",
"type": "PURCHASE",
"details": {
"reason": "Points spent on reward",
"rejection": null,
"metadata": {},
"points": {
"total": 500
},
"result": null
},
"created_at": "2026-07-27T16:09:59.999Z",
"updated_at": null,
"object": "reward_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Reward purchase transaction created"
}
}
}
}
}
},
"400": {
"description": "Request body validation failed.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Checked in order. The program doesn't exist (`resource_type` `program`). The member doesn't exist in that program (`member`). The reward doesn't exist, or it isn't assigned to the program (`reward`, `resource_id` is the reward id). The member has no card for the cost's card definition, or that card record is missing (`card`; `resource_id` is the card definition id, or the card id). The card definition doesn't exist (`card_definition`). For a `LOYALTY_CARD_POINTS` reward, a missing target card is also `card`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f96dbc8c4ba5dc",
"request_id": "v-12cbaf63ce6ac91da3",
"resource_id": "lmbr_128f96dbc8c4ba5dc",
"resource_type": "member"
}
},
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5429f4c4bf7b2",
"request_id": "v-12cbaf431280295102",
"resource_id": "lprg_128f5429f4c4bf7b2",
"resource_type": "program"
}
},
"Reward not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find reward with id lrew_128f4cefbad47863e",
"request_id": "v-12cbaf831680295186",
"resource_id": "lrew_128f4cefbad47863e",
"resource_type": "reward"
}
},
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcdef_128f4a88414c4bed69",
"request_id": "v-12cbaf831680295187",
"resource_id": "lcdef_128f4a88414c4bed69",
"resource_type": "card"
}
},
"Card definition not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card_definition with id lcdef_128f4a88414c4bed69",
"request_id": "v-12cbaf831680295188",
"resource_id": "lcdef_128f4a88414c4bed69",
"resource_type": "card_definition"
}
}
}
}
}
},
"423": {
"description": "The purchase is locked. `non_active_program`, `program_outside_validity_window`, `non_active_member`, `non_active_reward`, and `reward_outside_validity_window` reject a resource that isn't `ACTIVE` or is outside its validity window. `reward_out_of_stock` means assignment stock isn't available. `purchase_limit_cooldown` and `purchase_limit_frequency` mean a purchase limit blocked the request. `no_matching_reward_cost` means no cost matches this customer. `insufficient_card_balance` means the card doesn't have enough points. `exceeded_card_spending_global_spending_based_limit`, `exceeded_card_spending_global_time_based_limit`, and `exceeded_card_spending_transactions_limit` mean a spending cap was exceeded. `exceeded_spending_limits` is the fallback when the cap has no specific key.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Insufficient card balance": {
"value": {
"code": 423,
"key": "insufficient_card_balance",
"message": "Insufficient card balance",
"details": "Operation exceeds the available card balance",
"request_id": "v-12cbb8e7c89a39f4df"
}
},
"Reward out of stock": {
"value": {
"code": 423,
"key": "reward_out_of_stock",
"message": "Cannot purchase reward when stock is not available",
"details": "Reward stock is not available",
"request_id": "v-12cbaf9b78002951b5"
}
},
"No matching reward cost": {
"value": {
"code": 423,
"key": "no_matching_reward_cost",
"message": "Reward is not available for this customer",
"details": "No matching cost for the current customer context",
"request_id": "v-12cbaf9b78002951b6"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listMemberOrderPayments",
"tags": [
"Programs"
],
"summary": "List member order payments",
"description": "Lists stored `PAY_WITH_POINTS` order transactions for the program member, with cursor pagination. Filter by `id`, `card_definition_id`, and `created_at`. Order by `id` (default `-id`, newest first). Dry-run (`SIMULATED`) results aren't stored and don't appear. Returns `404` when the program or the member doesn't exist. The program is checked first.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-id`. Newest first. The same field cannot be used in both directions.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-id",
"id"
]
}
},
{
"type": "string",
"enum": [
"-id",
"id"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsotx_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsotx_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[id][conditions][$is]=lotx_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersOrdersPaymentsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Returns a paginated list of persisted order payment transactions.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBody"
},
"examples": {
"Member pay-with-points transactions": {
"value": {
"data": [
{
"id": "lotx_12b8dbf787c67de367",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12b8dbf787c67de366",
"order_id": "ord_12b4cdf5f30c158825",
"status": "APPROVED",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {
"points_limit": 150
},
"payment": {
"id": "ordpay_12b8dbf8d6939c4cd3",
"amount": 100,
"points_spent": 100,
"exchange_ratio": 1
}
},
"created_at": "2026-07-13T17:22:19.296Z",
"updated_at": "2026-07-13T17:22:20.630Z",
"object": "order_transaction"
},
{
"id": "lotx_12b8d2573e96b6af3b",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12b8d2573e96b6af3a",
"order_id": "ord_12b4cdf5f30c158825",
"status": "APPROVED",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {
"points_limit": 100
},
"payment": {
"id": "ordpay_12b8d25896d39c45e0",
"amount": 100,
"points_spent": 100,
"exchange_ratio": 1
}
},
"created_at": "2026-07-13T16:40:15.866Z",
"updated_at": "2026-07-13T16:40:17.237Z",
"object": "order_transaction"
},
{
"id": "lotx_12b8d23e9016b6af18",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12b8d23e9016b6af17",
"order_id": "ord_12b4cdf5f30c158825",
"status": "REJECTED",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": {
"reason": "PAYMENT_EXCEEDS_ORDER_TOTAL_AMOUNT"
},
"metadata": {
"amount_limit": 2000
},
"payment": {
"amount": 2000,
"points_spent": 2000,
"exchange_ratio": 1
}
},
"created_at": "2026-07-13T16:39:50.592Z",
"updated_at": "2026-07-13T16:39:52.240Z",
"object": "order_transaction"
}
],
"cursor": {
"next": "lcrsotx_12cbca76e282083066",
"expires_at": "2026-07-28T10:26:59.530Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "The query failed validation. `order` must be `id` or `-id`, and an array can't order by `id` and `-id` together. A cursor that doesn't match `^lcrsotx_[a-f0-9]+$` returns `invalid_query_params`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid order": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -id, id ]",
"request_id": "v-12bdef050f2cb1ef70"
}
},
"Invalid cursor": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrsotx_[a-f0-9]+$\"",
"request_id": "v-12bdef050f2cb1ef71"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). A member of another program is not found. The program is checked first.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128962dbc8c4ba5dc",
"request_id": "v-12cbd13b05da398de1",
"resource_id": "lmbr_128962dbc8c4ba5dc",
"resource_type": "member"
}
},
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f8429f4c4bf7b2",
"request_id": "v-12cbd12127da398dac",
"resource_id": "lprg_128f8429f4c4bf7b2",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"post": {
"operationId": "createMemberOrderPayment",
"tags": [
"Programs"
],
"summary": "Pay for order with points",
"description": "Pays for an order with points from the member's card. The amount and points come from the card definition's pay-with-points exchange ratio, limited by the order total, the card balance, card spending caps, and the optional `payment_limit`. The binding cap is returned as `details.spending_cap`.\n\nThe program and member must be `ACTIVE`, and the program must be inside its validity window. The card must belong to the member. The card definition must have pay-with-points enabled and an exchange-ratio formula. The order must already exist, identified by `id` or `source_id`.\n\nModes:\n- `TRANSACTION` (default): creates a `PENDING` order transaction and a `PENDING` card transaction. Returns `202`. The same order can be paid again; each call creates a new transaction.\n- `DRY_RUN`: simulates the payment and doesn't create a transaction. Returns `200` with status `SIMULATED`.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBody"
},
"examples": {
"Card balance type": {
"value": {
"payment_limit": {
"type": "CARD_BALANCE"
},
"mode": "TRANSACTION",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"order": {
"id": "ord_12b4cdf5f30c158825"
}
}
},
"Point limit type": {
"value": {
"payment_limit": {
"type": "POINTS_LIMIT",
"points_limit": {
"max": 150
}
},
"mode": "TRANSACTION",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"order": {
"id": "ord_12b4cdf5f30c158825"
}
}
},
"Amount limit type": {
"value": {
"payment_limit": {
"type": "AMOUNT_LIMIT",
"amount_limit": {
"max": 2000
}
},
"mode": "TRANSACTION",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"order": {
"id": "ord_12b4cdf5f30c158825"
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Dry run result (mode `DRY_RUN`). No transaction was created; the returned transaction has status `SIMULATED` and no `id`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersOrdersPaymentsCreateDryRunResponseBody"
},
"examples": {
"Dry run: Point limit": {
"value": {
"transaction": {
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": null,
"order_id": "ord_12b4cdf5f30c158825",
"status": "SIMULATED",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {
"points_limit": 150
},
"payment": {
"amount": 150,
"points_spent": 150,
"exchange_ratio": 1
},
"spending_cap": {
"type": "REQUEST_PAYMENT_LIMIT",
"unit": "POINTS",
"value": 150
}
},
"updated_at": null,
"object": "order_transaction"
},
"status": "DRY_RUN",
"message": "Dry run mode. No transaction was created. This is only a simulation."
}
},
"Dry run: Amount limit": {
"value": {
"transaction": {
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": null,
"order_id": "ord_12b4cdf5f30c158825",
"status": "SIMULATED",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {
"amount_limit": 2000
},
"payment": {
"amount": 650,
"points_spent": 650,
"exchange_ratio": 1
},
"spending_cap": {
"type": "ORDER_TOTAL_AMOUNT",
"unit": "AMOUNT",
"value": 650
}
},
"updated_at": null,
"object": "order_transaction"
},
"status": "DRY_RUN",
"message": "Dry run mode. No transaction was created. This is only a simulation."
}
},
"Dry run: Card balance": {
"value": {
"transaction": {
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": null,
"order_id": "ord_12b4cdf5f30c158825",
"status": "SIMULATED",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {},
"payment": {
"amount": 650,
"points_spent": 650,
"exchange_ratio": 1
},
"spending_cap": {
"type": "CARD_BALANCE_POINTS",
"unit": "POINTS",
"value": 650
}
},
"updated_at": null,
"object": "order_transaction"
},
"status": "DRY_RUN",
"message": "Dry run mode. No transaction was created. This is only a simulation."
}
}
}
}
}
},
"202": {
"description": "Payment accepted (mode `TRANSACTION`). A `PENDING` order transaction was created and will be processed asynchronously.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersOrdersPaymentsCreateTransactionResponseBody"
},
"examples": {
"Transaction created: Point limit": {
"value": {
"transaction": {
"id": "lotx_12b884c72b0dd352b9",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12b884c72b0dd352b8",
"order_id": "ord_12b4cdf5f30c158825",
"status": "PENDING",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {
"points_limit": 12
},
"payment": {
"amount": 12,
"points_spent": 12,
"exchange_ratio": 1
},
"spending_cap": {
"type": "REQUEST_PAYMENT_LIMIT",
"unit": "POINTS",
"value": 12
}
},
"created_at": "2026-07-13T11:01:23.245Z",
"updated_at": null,
"object": "order_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Pay with points transaction created"
}
},
"Transaction created: Amount limit": {
"value": {
"transaction": {
"id": "lotx_12b8939fd78dd3657f",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12b8939fd78dd3657e",
"order_id": "ord_12b4cdf5f30c158825",
"status": "PENDING",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {
"amount_limit": 2000
},
"payment": {
"amount": 2000,
"points_spent": 2000,
"exchange_ratio": 1
},
"spending_cap": {
"type": "REQUEST_PAYMENT_LIMIT",
"unit": "AMOUNT",
"value": 2000
}
},
"created_at": "2026-07-13T12:06:15.135Z",
"updated_at": null,
"object": "order_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Pay with points transaction created"
}
},
"Transaction created: Card balance": {
"value": {
"transaction": {
"id": "lotx_12b8861fdd0dd35462",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_transaction_id": "lctx_12b8861fdd0dd35461",
"order_id": "ord_12b4cdf5f30c158825",
"status": "PENDING",
"type": "PAY_WITH_POINTS",
"details": {
"reason": "Points spent on order payment",
"rejection": null,
"metadata": {},
"payment": {
"amount": 200,
"points_spent": 200,
"exchange_ratio": 1
},
"spending_cap": {
"type": "CARD_BALANCE_POINTS",
"unit": "POINTS",
"value": 200
}
},
"created_at": "2026-07-13T11:07:16.212Z",
"updated_at": null,
"object": "order_transaction"
},
"status": "TRANSACTION_CREATED",
"message": "Pay with points transaction created"
}
}
}
}
}
},
"400": {
"description": "The request body failed validation (`invalid_payload`). Pay-with-points is enabled but the card definition has no exchange-ratio formula (`missing_exchange_ratio_formula`).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Missing exchange ratio formula": {
"value": {
"code": 400,
"key": "missing_exchange_ratio_formula",
"message": "Missing exchange ratio formula",
"details": "Card definition has pay with points enabled but no exchange ratio formula configured",
"request_id": "v-12bdef050f2cb1ef70"
}
}
}
}
}
},
"404": {
"description": "Checked in order. The program doesn't exist (`resource_type` `program`). The member doesn't exist in that program (`member`). The card doesn't exist, or it isn't assigned to this member (`card`, `resource_id` is the card id). The card definition doesn't exist (`card_definition`). The order doesn't exist (`order`). Lookup by `id` says `Cannot find order with id {id}`. Lookup by `source_id` says `Cannot find order with source_id {sourceId}`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Card not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f962bd8c4ba5e1",
"request_id": "v-12cc33659a5a39c1f1",
"resource_id": "lcrd_128f962bd8c4ba5e1",
"resource_type": "card"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f962db8c4ba5dc",
"request_id": "v-12cc3350135a39c1c3",
"resource_id": "lmbr_128f962db8c4ba5dc",
"resource_type": "member"
}
},
"Order not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find order with id ord_12b4cdf5f30c58825",
"request_id": "v-12cc3377e7da39c211",
"resource_id": "ord_12b4cdf5f30c58825",
"resource_type": "order"
}
},
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5849f4c4bf7b2",
"request_id": "v-12cc332f6fda39c18b",
"resource_id": "lprg_128f5849f4c4bf7b2",
"resource_type": "program"
}
}
}
}
}
},
"423": {
"description": "The payment is locked. `non_active_program` and `program_outside_validity_window` reject a program that isn't `ACTIVE` or is outside its validity window. `non_active_member` rejects a member that isn't `ACTIVE`. `pay_with_points_not_enabled` means the card definition doesn't allow pay-with-points. `invalid_exchange_ratio` means the formula result isn't a positive number. `zero_card_balance`, `zero_order_total_amount`, `exhausted_card_spending_global_spending_based_limit`, `exhausted_card_spending_global_time_based_limit`, and `exhausted_card_spending_transactions_limit` mean a cap is already zero. `zero_points_to_spent` and `zero_payment_amount` mean the calculation produced nothing to charge.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Zero card balance": {
"value": {
"code": 423,
"key": "zero_card_balance",
"message": "Card balance is zero",
"details": "Operation requires a positive card balance",
"request_id": "v-12b8894b3ec1a59873"
}
},
"Pay with points is not enabled": {
"value": {
"code": 423,
"key": "pay_with_points_not_enabled",
"message": "Pay with points is not enabled",
"details": "Card definition does not have pay with points enabled",
"request_id": "v-12cd00d6722df1bf7e"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/benefits/transactions": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listMemberBenefitTransactions",
"tags": [
"Programs"
],
"summary": "List member benefit transactions",
"description": "Lists benefit transactions (benefit fulfillments) for a given program member, with cursor-based pagination.\n\nSupports filtering by benefit ID and creation date.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-id`. Newest first. The same field cannot be used in both directions.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"id",
"-id"
]
}
},
{
"type": "string",
"enum": [
"id",
"-id"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsbtx_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsbtx_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[benefit_id][conditions][$is]=lben_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersBenefitsTransactionsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Paginated list of benefit transactions.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBody"
},
"examples": {
"Benefit transaction list": {
"value": {
"data": [
{
"id": "lbtx_12f8c3d1571aa184e0",
"benefit_id": "lben_128f4bba81947c8542",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"earning_rule_id": "lern_128f57ec40cc4bf762",
"type": "FULFILLMENT",
"details": {
"reason": "AnnualProgram / Autumn Ethiopia",
"rejection": null,
"metadata": {
"event_id": "evcus_12f8c3cf15eed6dde4",
"earning_item_id": "lernei_128f57ec3b8c4bf761"
},
"result": {
"details": {
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_128f4baa45547c8530"
}
}
}
}
},
"status": "APPROVED",
"created_at": "2026-09-01T08:39:36.028Z",
"updated_at": null,
"object": "benefit_transaction"
}
],
"cursor": {
"next": "lcrsbtx_12f8c42751eed6de54",
"expires_at": "2026-09-01T08:51:04.072Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "Invalid query parameters or pagination cursor.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor format": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrsbtx_[a-f0-9]+$\"",
"request_id": "v-12f8c71a41b2ce9101"
}
},
"Cursor invalid or expired": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-12f8c71a41b2ce9102"
}
},
"Cursor does not match query": {
"value": {
"code": 400,
"key": "cursor_and_query_mismatch",
"message": "Cursor and query mismatch",
"details": "The provided cursor does not match the query, either the cursor is invalid or the query has changed",
"request_id": "v-12f8c71a41b2ce9103"
}
},
"Limit too high": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be greater than 100",
"request_id": "v-12f8c71a41b2ce9104"
}
},
"Limit too low": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .limit cannot be lower than 1",
"request_id": "v-12f8c71a41b2ce9105"
}
},
"Unsupported order value": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .order must be equal to one of the allowed values [ -id, id ]",
"request_id": "v-12f8c71a41b2ce9106"
}
},
"Conflicting order values": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query cannot be ordered by 'id' and '-id' at the same time",
"request_id": "v-12f8c71a41b2ce9107"
}
}
}
}
}
},
"404": {
"description": "Resource (program or member) not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_18f58429f4c4bf7b2",
"request_id": "v-12f8c62fad93dba093",
"resource_id": "lprg_18f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f96dbc8c4ba5dc",
"request_id": "v-12f8c64448dc2f8435",
"resource_id": "lmbr_128f96dbc8c4ba5dc",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/tiers/transactions": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listMemberTierTransactions",
"tags": [
"Programs"
],
"summary": "List member tier transactions",
"description": "Lists tier transactions for the member: joins, leaves, upgrades, downgrades, expiration changes, and evaluation refreshes. Results use cursor pagination. Default order is `-id`, newest first.\n\nFilters are `card_id`, `card_definition_id`, and `created_at`.\n\nReturns 404 when the program doesn't exist, or when the member doesn't exist in that program. The program is checked first. A DELETED member returns 404.\n\nReturns 400 with key `invalid_query_params` when the query fails validation. That check runs before the program and member lookup. `order` must be `id` or `-id`. An array that orders by both directions is rejected. A cursor that doesn't match `^lcrsttx_[a-f0-9]+$` fails here.\n\nAfter the program and member are found, an unknown or expired cursor returns `invalid_or_expired_cursor`. A cursor recorded for different `filters` or `order` returns `cursor_and_query_mismatch`. The cursor stays valid when only `limit` changes.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-id`. Newest first. The same field cannot be used in both directions.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-id",
"id"
]
}
},
{
"type": "string",
"enum": [
"-id",
"id"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsttx_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsttx_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[card_id][conditions][$is]=lcrd_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersTiersTransactionsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Paginated list of tier transactions.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersTiersTransactionsListResponseBody"
},
"examples": {
"Tier transaction list": {
"value": {
"data": [
{
"id": "lttx_12fa3c024b476799e1",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46808c4bee07",
"type": "UPGRADED",
"details": {
"points": 500,
"tier_from": "lt_128f4b46400c4bedfb",
"tier_to": "lt_128f4b46808c4bee07",
"origin": {
"type": "card_operations",
"card_transaction_ids": [
"lctx_12fa3c0169a025a387"
]
},
"rejection": null,
"start_at": null,
"expires_at": null
},
"status": "APPROVED",
"created_at": "2026-09-02T12:03:12.301Z",
"updated_at": "2026-09-02T12:03:12.908Z",
"object": "tier_transaction"
},
{
"id": "lttx_12f7dc870f4fbd500c",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46400c4bedfb",
"type": "DOWNGRADED",
"details": {
"points": 0,
"tier_from": "lt_128f4b46808c4bee07",
"tier_to": "lt_128f4b46400c4bedfb",
"origin": {
"type": "card_operations",
"card_transaction_ids": [
"lctx_12f7dc8650267658b4"
]
},
"rejection": null,
"start_at": null,
"expires_at": null
},
"status": "APPROVED",
"created_at": "2026-08-31T15:49:04.701Z",
"updated_at": "2026-08-31T15:49:05.673Z",
"object": "tier_transaction"
},
{
"id": "lttx_12f3b6e3a268738b18",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": null,
"type": "EVALUATION_REFRESHED",
"details": {
"points": 2221000,
"tier_from": null,
"tier_to": null,
"origin": {
"type": "card_operations",
"card_transaction_ids": [
"lctx_12f3b6e28cae8bfa27"
]
},
"rejection": null,
"start_at": null,
"expires_at": null
},
"status": "APPROVED",
"created_at": "2026-08-28T10:30:42.569Z",
"updated_at": "2026-08-28T10:30:43.406Z",
"object": "tier_transaction"
},
{
"id": "lttx_1294dc734a1bbeb5ec",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": null,
"type": "EXPIRATION_CHANGED",
"details": {
"points": 500,
"tier_from": null,
"tier_to": null,
"origin": {
"type": "daily_task_operations"
},
"rejection": null,
"start_at": null,
"expires_at": "2026-07-15T23:59:59.999Z"
},
"status": "APPROVED",
"created_at": "2026-06-15T18:19:06.920Z",
"updated_at": "2026-06-15T18:19:07.918Z",
"object": "tier_transaction"
},
{
"id": "lttx_128f962dbf0c4ba5e5",
"card_id": "lcrd_128f962dbd8c4ba5e1",
"program_id": "lprg_128f58429f4c4bf7b2",
"member_id": "lmbr_128f962dbc8c4ba5dc",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46400c4bedfb",
"type": "JOINED",
"details": {
"points": 0,
"tier_from": null,
"tier_to": "lt_128f4b46400c4bedfb",
"origin": {
"type": "member_card_created"
},
"rejection": null,
"start_at": null,
"expires_at": null
},
"status": "APPROVED",
"created_at": "2026-06-11T15:59:41.308Z",
"updated_at": "2026-06-11T15:59:42.248Z",
"object": "tier_transaction"
}
],
"cursor": {
"next": "lcrsttx_130e8b9d41ee46fb7a",
"expires_at": "2026-09-18T06:50:37.639Z"
},
"object": "list"
}
}
}
}
}
},
"400": {
"description": "The query failed validation (`invalid_query_params`), the cursor is unknown or expired (`invalid_or_expired_cursor`), or the cursor was recorded for different `filters` or `order` (`cursor_and_query_mismatch`). `order` must be `id` or `-id`. Query validation runs before the program and member lookup. Cursor checks run after both are found. The cursor stays valid when only `limit` changes.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid cursor format": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .cursor must match pattern \"^lcrsttx_[a-f0-9]+$\"",
"request_id": "v-130db36510c5e2759a"
}
},
"Cursor invalid or expired": {
"value": {
"code": 400,
"key": "invalid_or_expired_cursor",
"message": "Invalid or expired cursor",
"details": "The provided cursor is invalid or has expired",
"request_id": "v-130db36510c5e2759b"
}
}
}
}
}
},
"404": {
"description": "The program doesn't exist (`resource_type` `program`), or the member doesn't exist in that program (`resource_type` `member`). The program is checked first. A DELETED member also returns 404.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_18f58429f4c4bf7b2",
"request_id": "v-130db30e15859652a6",
"resource_id": "lprg_18f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f62dbc8c4ba5dc",
"request_id": "v-130db31ffb859652cd",
"resource_id": "lmbr_128f62dbc8c4ba5dc",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/reports/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "cardId",
"in": "path",
"required": true,
"description": "Identifies the loyalty card. Format `lcrd_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listMemberCardDailyReports",
"tags": [
"Programs"
],
"summary": "List card daily points reports",
"description": "Returns aggregated points statistics for a member's loyalty card over the given date range and resolution. Each entry sums the point operations recorded in one period. Periods without recorded activity are omitted.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program or member does not exist, or when the card does not exist or is not assigned to the member in the program.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
}
],
"responses": {
"200": {
"description": "Card daily points report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsMembersCardsReportsDailyListResponseBody"
},
"examples": {
"Card daily points report: Day resolution": {
"value": {
"data": [
{
"date": "2026-07-01",
"points_total": 0,
"points_earned": 0,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 0,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 7497,
"pending_points_activated": 0,
"pending_points_canceled": 0,
"object": "card_daily_report"
},
{
"date": "2026-07-11",
"points_total": 7497,
"points_earned": 7497,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 0,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 0,
"pending_points_activated": 7497,
"pending_points_canceled": 0,
"object": "card_daily_report"
},
{
"date": "2026-07-16",
"points_total": 0,
"points_earned": 0,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 0,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 1400,
"pending_points_activated": 0,
"pending_points_canceled": 0,
"object": "card_daily_report"
},
{
"date": "2026-07-26",
"points_total": 1400,
"points_earned": 1400,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 7497,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 0,
"pending_points_activated": 1400,
"pending_points_canceled": 0,
"object": "card_daily_report"
}
],
"object": "report"
}
},
"Card daily points report: Week resolution": {
"value": {
"data": [
{
"date": "2026-06-29",
"points_total": 0,
"points_earned": 0,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 0,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 7497,
"pending_points_activated": 0,
"pending_points_canceled": 0,
"object": "card_daily_report"
},
{
"date": "2026-07-06",
"points_total": 7497,
"points_earned": 7497,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 0,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 0,
"pending_points_activated": 7497,
"pending_points_canceled": 0,
"object": "card_daily_report"
},
{
"date": "2026-07-13",
"points_total": 0,
"points_earned": 0,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 0,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 1400,
"pending_points_activated": 0,
"pending_points_canceled": 0,
"object": "card_daily_report"
},
{
"date": "2026-07-20",
"points_total": 1400,
"points_earned": 1400,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 7497,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 0,
"pending_points_activated": 1400,
"pending_points_canceled": 0,
"object": "card_daily_report"
}
],
"object": "report"
}
},
"Card daily points report: Month resolution": {
"value": {
"data": [
{
"date": "2026-07-01",
"points_total": 8897,
"points_earned": 8897,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 7497,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 8897,
"pending_points_activated": 8897,
"pending_points_canceled": 0,
"object": "card_daily_report"
}
],
"object": "report"
}
},
"Card daily points report: Quarter resolution": {
"value": {
"data": [
{
"date": "2026-07-01",
"points_total": 8897,
"points_earned": 8897,
"points_added": 0,
"points_purchased": 0,
"points_purchased_reversed": 0,
"points_subtracted": 0,
"points_expired": 7497,
"points_spent": 0,
"points_refunded": 0,
"points_returned": 0,
"points_locked": 0,
"points_unlocked": 0,
"pending_points_total": 8897,
"pending_points_activated": 8897,
"pending_points_canceled": 0,
"object": "card_daily_report"
}
],
"object": "report"
}
},
"Card daily points report: No activity": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-130eb43b3685e26454"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-130eb46d6c45e264b2"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-130eb4847405e264e3"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-130eb4847405e264e4"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26455"
}
},
"Invalid query parameters: `end_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .end_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26458"
}
},
"Invalid query parameters: date range exceeds limit": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-130eb43b3685e26456"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-130eb43b3685e26457"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_28f58429f4c4bf7b2",
"request_id": "v-131e61d450c264502d",
"resource_id": "lprg_28f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f9ee624c4ba553",
"request_id": "v-131e61f4dcee09b660",
"resource_id": "lmbr_128f9ee624c4ba553",
"resource_type": "member"
}
},
"Card not found or not assigned to the member": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id lcrd_128f9ee63cc4ba558",
"request_id": "v-131e61ff0dc2645083",
"resource_id": "lcrd_128f9ee63cc4ba558",
"resource_type": "card"
}
},
"Program ID does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e61d450c264502e",
"resource_id": "missing",
"resource_type": "program"
}
},
"Member ID does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id missing",
"request_id": "v-131e61f4dcee09b661",
"resource_id": "missing",
"resource_type": "member"
}
},
"Card ID does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card with id missing",
"request_id": "v-131e61ff0dc2645084",
"resource_id": "missing",
"resource_type": "card"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/members/{memberId}/earning-rules/{earningRuleId}/reports/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
},
{
"name": "memberId",
"in": "path",
"required": true,
"description": "Identifies the member. Format `lmbr_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
}
},
{
"name": "earningRuleId",
"in": "path",
"required": true,
"description": "Identifies the earning rule. Format `lern_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getMemberEarningRuleDailyReport",
"tags": [
"Programs"
],
"summary": "List member earning-rule daily reports",
"description": "Returns aggregated daily usage statistics for a specific earning rule and member over the given date range and resolution. Each entry sums successful earning-rule triggers recorded in one period. Periods without recorded activity are omitted.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program or member does not exist, or when the earning rule does not exist or is not assigned to the program.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
}
],
"responses": {
"200": {
"description": "Member earning-rule daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsMembersEarningRulesReportsDailyListResponseBody"
},
"examples": {
"Member earning-rule daily report: Day resolution": {
"value": {
"data": [
{
"date": "2026-07-10",
"count": 1,
"object": "earning_rule_daily_report"
},
{
"date": "2026-07-15",
"count": 11,
"object": "earning_rule_daily_report"
},
{
"date": "2026-07-30",
"count": 1,
"object": "earning_rule_daily_report"
},
{
"date": "2026-08-06",
"count": 13,
"object": "earning_rule_daily_report"
}
],
"object": "report"
}
},
"Member earning-rule daily report: Month resolution": {
"value": {
"data": [
{
"date": "2026-06-01",
"count": 4,
"object": "earning_rule_daily_report"
},
{
"date": "2026-07-01",
"count": 13,
"object": "earning_rule_daily_report"
},
{
"date": "2026-08-01",
"count": 13,
"object": "earning_rule_daily_report"
}
],
"object": "report"
}
},
"Member earning-rule daily report: No activity": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-130eb43b3685e26454"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-130eb46d6c45e264b2"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-130eb4847405e264e3"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-130eb4847405e264e4"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26455"
}
},
"Invalid query parameters: `end_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .end_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26459"
}
},
"Invalid query parameters: date range exceeds limit": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-130eb43b3685e26456"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-130eb43b3685e26457"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_28f58429f4c4bf7b2",
"request_id": "v-131e61d450c264502d",
"resource_id": "lprg_28f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f9ee624c4ba553",
"request_id": "v-131e61f4dcee09b660",
"resource_id": "lmbr_128f9ee624c4ba553",
"resource_type": "member"
}
},
"Earning rule not found or not assigned to the program": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find earning_rule with id lern_128f9ee63cc4ba558",
"request_id": "v-131e61ff0dc2645083",
"resource_id": "lern_128f9ee63cc4ba558",
"resource_type": "earning_rule"
}
},
"Program ID does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e61d450c264502f",
"resource_id": "missing",
"resource_type": "program"
}
},
"Member ID does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id missing",
"request_id": "v-131e61f4dcee09b662",
"resource_id": "missing",
"resource_type": "member"
}
},
"Earning rule ID does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find earning_rule with id missing",
"request_id": "v-131e61ff0dc2645085",
"resource_id": "missing",
"resource_type": "earning_rule"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/spending/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramSpendingDailyReports",
"tags": [
"Programs"
],
"summary": "List program spending daily reports",
"description": "Returns aggregated points-spending statistics for the program over the given date range and resolution. Each row covers one card definition and one period with recorded spending. Periods without recorded spending are omitted. Optionally filters by card definition.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[card_definition_id][conditions][$is]=lcdef_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/SpendingReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program spending daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsSpendingDailyListResponseBody"
},
"examples": {
"Daily spending report: Day resolution": {
"value": {
"data": [
{
"date": "2026-06-30",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 3,
"success_on_reward": 0,
"success_on_order": 3,
"points": 423,
"points_on_rewards": 0,
"points_on_order": 423,
"amount_on_order": 423,
"object": "spending_daily_report"
},
{
"date": "2026-07-08",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 2,
"success_on_reward": 2,
"success_on_order": 0,
"points": 1000,
"points_on_rewards": 1000,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-10",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 4,
"success_on_reward": 0,
"success_on_order": 4,
"points": 48,
"points_on_rewards": 0,
"points_on_order": 48,
"amount_on_order": 48,
"object": "spending_daily_report"
},
{
"date": "2026-07-13",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 10,
"success_on_reward": 0,
"success_on_order": 10,
"points": 2232,
"points_on_rewards": 0,
"points_on_order": 2232,
"amount_on_order": 2232,
"object": "spending_daily_report"
},
{
"date": "2026-07-21",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success": 1,
"success_on_reward": 1,
"success_on_order": 0,
"points": 250,
"points_on_rewards": 250,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-21",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 1,
"success_on_reward": 1,
"success_on_order": 0,
"points": 500,
"points_on_rewards": 500,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-27",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 7,
"success_on_reward": 7,
"success_on_order": 0,
"points": 3500,
"points_on_rewards": 3500,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-29",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 3,
"success_on_reward": 0,
"success_on_order": 3,
"points": 240,
"points_on_rewards": 0,
"points_on_order": 240,
"amount_on_order": 240,
"object": "spending_daily_report"
}
],
"object": "report"
}
},
"Daily spending report: Week resolution": {
"value": {
"data": [
{
"date": "2026-06-29",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 3,
"success_on_reward": 0,
"success_on_order": 3,
"points": 423,
"points_on_rewards": 0,
"points_on_order": 423,
"amount_on_order": 423,
"object": "spending_daily_report"
},
{
"date": "2026-07-06",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 6,
"success_on_reward": 2,
"success_on_order": 4,
"points": 1048,
"points_on_rewards": 1000,
"points_on_order": 48,
"amount_on_order": 48,
"object": "spending_daily_report"
},
{
"date": "2026-07-13",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 10,
"success_on_reward": 0,
"success_on_order": 10,
"points": 2232,
"points_on_rewards": 0,
"points_on_order": 2232,
"amount_on_order": 2232,
"object": "spending_daily_report"
},
{
"date": "2026-07-20",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success": 1,
"success_on_reward": 1,
"success_on_order": 0,
"points": 250,
"points_on_rewards": 250,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-20",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 1,
"success_on_reward": 1,
"success_on_order": 0,
"points": 500,
"points_on_rewards": 500,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-27",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 10,
"success_on_reward": 7,
"success_on_order": 3,
"points": 3740,
"points_on_rewards": 3500,
"points_on_order": 240,
"amount_on_order": 240,
"object": "spending_daily_report"
}
],
"object": "report"
}
},
"Daily spending report: Month resolution": {
"value": {
"data": [
{
"date": "2026-06-01",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 3,
"success_on_reward": 0,
"success_on_order": 3,
"points": 423,
"points_on_rewards": 0,
"points_on_order": 423,
"amount_on_order": 423,
"object": "spending_daily_report"
},
{
"date": "2026-07-01",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success": 1,
"success_on_reward": 1,
"success_on_order": 0,
"points": 250,
"points_on_rewards": 250,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-01",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 27,
"success_on_reward": 10,
"success_on_order": 17,
"points": 7520,
"points_on_rewards": 5000,
"points_on_order": 2520,
"amount_on_order": 2520,
"object": "spending_daily_report"
}
],
"object": "report"
}
},
"Daily spending report: Quarter resolution": {
"value": {
"data": [
{
"date": "2026-04-01",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 3,
"success_on_reward": 0,
"success_on_order": 3,
"points": 423,
"points_on_rewards": 0,
"points_on_order": 423,
"amount_on_order": 423,
"object": "spending_daily_report"
},
{
"date": "2026-07-01",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success": 1,
"success_on_reward": 1,
"success_on_order": 0,
"points": 250,
"points_on_rewards": 250,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_daily_report"
},
{
"date": "2026-07-01",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 27,
"success_on_reward": 10,
"success_on_order": 17,
"points": 7520,
"points_on_rewards": 5000,
"points_on_order": 2520,
"amount_on_order": 2520,
"object": "spending_daily_report"
}
],
"object": "report"
}
},
"Spending daily report: No activity": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-130eb43b3685e26454"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-130eb46d6c45e264b2"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-130eb4847405e264e3"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-130eb4847405e264e4"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26455"
}
},
"Invalid query parameters: date range exceeds limit": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-130eb43b3685e26456"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-130eb43b3685e26457"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f5829f4c4bf7b2",
"request_id": "v-130eb4c2a6459642bb",
"resource_id": "lprg_128f5829f4c4bf7b2",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/spending/summary": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramSpendingSummaryReports",
"tags": [
"Programs"
],
"summary": "List program spending summary reports",
"description": "Returns all-time point-spending totals for the program, one row per card definition that has recorded spending. Filters rows with `filters[card_definition_id]`. Returns at most 10 rows (max number of card definitions per program), ordered by `id` descending. `limit` and `order` are not query parameters.\n\nReturns `200` with an empty `data` array when no spending is recorded. Returns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[card_definition_id][conditions][$is]=lcdef_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/SpendingReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program spending summary report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsSpendingSummaryListResponseBody"
},
"examples": {
"Summary spending report": {
"value": {
"data": [
{
"id": "lssum_12c2bc3be20c8cb533",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success": 1,
"success_on_reward": 1,
"success_on_order": 0,
"points": 250,
"points_on_rewards": 250,
"points_on_order": 0,
"amount_on_order": 0,
"object": "spending_summary_report"
},
{
"id": "lssum_12a8242827ca244ecd",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success": 30,
"success_on_reward": 10,
"success_on_order": 20,
"points": 7943,
"points_on_rewards": 5000,
"points_on_order": 2943,
"amount_on_order": 2943,
"object": "spending_summary_report"
}
],
"object": "report"
}
},
"Empty spending summary report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `card_definition_id` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .filters.card_definition_id.conditions.$is must match pattern \"^lcdef_[a-f0-9]+$\"",
"request_id": "v-131e4b76ad2e098945"
}
}
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429fc4bf7b2",
"request_id": "v-131e4b76ad2e098944",
"resource_id": "lprg_128f58429fc4bf7b2",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/tiers/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramTiersDailyReports",
"tags": [
"Programs"
],
"summary": "List program tiers daily reports",
"description": "Returns aggregated tier-movement statistics for the program over the given date range and resolution, optionally filtered by tier structure and tier. Each row covers one tier structure, one tier, and one period with recorded movement. Periods without recorded movement are omitted. A filter that matches no rows returns an empty `data` array.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[tier_structure_id][conditions][$is]=lts_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/TiersReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program tiers daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsReportsTiersDailyListResponseBody"
},
"examples": {
"Daily tiers report": {
"value": {
"data": [
{
"date": "2026-07-01",
"tier_structure_id": "lts_128f4a88414c4bed69",
"tier_id": "lt_128f4a88414c4bed6a",
"joins": 1,
"upgrades": 0,
"downgrades": 0,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
}
],
"object": "report"
}
},
"Monthly tiers report": {
"value": {
"data": [
{
"date": "2026-07-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46400c4bedfb",
"joins": 0,
"upgrades": 0,
"downgrades": 2,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-07-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46558c4bedff",
"joins": 0,
"upgrades": 0,
"downgrades": 1,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-07-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46808c4bee07",
"joins": 0,
"upgrades": 2,
"downgrades": 0,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-08-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46808c4bee07",
"joins": 0,
"upgrades": 1,
"downgrades": 0,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-08-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b466a0c4bee03",
"joins": 0,
"upgrades": 1,
"downgrades": 0,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-08-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46400c4bedfb",
"joins": 0,
"upgrades": 0,
"downgrades": 1,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-09-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46808c4bee07",
"joins": 0,
"upgrades": 1,
"downgrades": 0,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-09-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46400c4bedfb",
"joins": 2,
"upgrades": 0,
"downgrades": 0,
"lefts": 1,
"prolongs": 0,
"object": "program_tiers_daily_report"
},
{
"date": "2026-10-01",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46400c4bedfb",
"joins": 1,
"upgrades": 0,
"downgrades": 1,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_daily_report"
}
],
"object": "report"
}
},
"Empty tiers daily report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-131e4b76ad2e098901"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-131e4b76ad2e098902"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-131e4b76ad2e098903"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-131e4b76ad2e098904"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-131e4b76ad2e098905"
}
},
"Invalid query parameters: `end_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .end_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-131e4b76ad2e098909"
}
},
"Invalid query parameters: date range exceeds limit for `day`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-131e4b76ad2e098906"
}
},
"Invalid query parameters: date range exceeds limit for `week`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 12 weeks for resolution 'week'",
"request_id": "v-131e4b76ad2e09890a"
}
},
"Invalid query parameters: date range exceeds limit for `month`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 12 months for resolution 'month'",
"request_id": "v-131e4b76ad2e09890b"
}
},
"Invalid query parameters: date range exceeds limit for `quarter`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 4 quarters for resolution 'quarter'",
"request_id": "v-131e4b76ad2e09890c"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-131e4b76ad2e098907"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f4a88414c4bed69",
"request_id": "v-131e4b76ad2e098908",
"resource_id": "lprg_128f4a88414c4bed69",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e09890d",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/tiers/summary": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramTiersSummaryReports",
"tags": [
"Programs"
],
"summary": "List program tiers summary reports",
"description": "Returns all-time tier-movement totals for the program, one row per tier structure and tier that has recorded movement. Filters rows with `filters[tier_structure_id]` and `filters[tier_id]`. Returns at most 100 rows, ordered by `id` descending. `limit` and `order` are not query parameters. A filter that matches no rows returns an empty `data` array.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[tier_id][conditions][$is]=lt_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/TiersReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program tiers summary report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsReportsTiersSummaryListResponseBody"
},
"examples": {
"Summary tiers report": {
"value": {
"data": [
{
"id": "lptrs_12d1ada07056ba14da",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b466a0c4bee03",
"joins": 0,
"upgrades": 1,
"downgrades": 0,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_summary_report"
},
{
"id": "lptrs_12cad1af9bc1616fe5",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46558c4bedff",
"joins": 0,
"upgrades": 0,
"downgrades": 1,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_summary_report"
},
{
"id": "lptrs_12cad001d441616ea8",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46808c4bee07",
"joins": 0,
"upgrades": 4,
"downgrades": 0,
"lefts": 0,
"prolongs": 0,
"object": "program_tiers_summary_report"
},
{
"id": "lptrs_12cac273c0016164ec",
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_id": "lt_128f4b46400c4bedfb",
"joins": 3,
"upgrades": 0,
"downgrades": 4,
"lefts": 1,
"prolongs": 0,
"object": "program_tiers_summary_report"
}
],
"object": "report"
}
},
"Empty tiers summary report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `tier_structure_id` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .filters.tier_structure_id.conditions.$is must match pattern \"^lts_[a-f0-9]+$\"",
"request_id": "v-131e4b76ad2e098911"
}
},
"Invalid query parameters: `tier_id` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .filters.tier_id.conditions.$is must match pattern \"^lt_[a-f0-9]+$\"",
"request_id": "v-131e4b76ad2e098913"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f4a88414c4bed69",
"request_id": "v-131e4b76ad2e098912",
"resource_id": "lprg_128f4a88414c4bed69",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e098914",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/rewards/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramRewardsDailyReports",
"tags": [
"Programs"
],
"summary": "List program rewards daily reports",
"description": "Returns aggregated reward-purchase statistics for the program over the given date range and resolution, optionally filtered by reward. Each row covers one reward and one period with recorded purchases. Periods without recorded purchases are omitted. `failures_breakdown` is always an empty object. A filter that matches no rows returns an empty `data` array.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[reward_id][conditions][$is]=lrew_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/RewardsReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program rewards daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsRewardsDailyListResponseBody"
},
"examples": {
"Daily rewards report": {
"value": {
"data": [
{
"date": "2026-10-12",
"reward_id": "lrew_1294cebb458e4904a0",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_rewards_daily_report"
}
],
"object": "report"
}
},
"Empty rewards daily report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-131e4b76ad2e098921"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-131e4b76ad2e098922"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-131e4b76ad2e098923"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-131e4b76ad2e098924"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-131e4b76ad2e098925"
}
},
"Invalid query parameters: date range exceeds limit": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-131e4b76ad2e098926"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-131e4b76ad2e098927"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429fc4bf7b2",
"request_id": "v-131e4b76ad2e098928",
"resource_id": "lprg_128f58429fc4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e098929",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/rewards/summary": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramRewardsSummaryReports",
"tags": [
"Programs"
],
"summary": "List program rewards summary reports",
"description": "Returns all-time reward-purchase totals for the program, one row per reward with a recorded purchase attempt. Filters rows with `filters[reward_id]`. Returns at most 100 rows, ordered by `id` descending. `limit` and `order` are not query parameters. A filter that matches no rows returns an empty `data` array.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[reward_id][conditions][$is]=lrew_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/RewardsReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program rewards summary report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsRewardsSummaryListResponseBody"
},
"examples": {
"Summary rewards report": {
"value": {
"data": [
{
"id": "lprrs_132d80d588916617aa",
"reward_id": "lrew_1294cebb458e4904a0",
"success_count": 3,
"failures_count": 1,
"failures_breakdown": {
"FREQUENCY": 1
},
"object": "program_rewards_summary_report"
}
],
"object": "report"
}
},
"Empty rewards summary report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `reward_id` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .filters.reward_id.conditions.$is must match pattern \"^lrew_[a-f0-9]+$\"",
"request_id": "v-131e4b76ad2e098931"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429fc4bf7b2",
"request_id": "v-131e4b76ad2e098932",
"resource_id": "lprg_128f58429fc4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e098933",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/rewards/spendings/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramRewardsSpendingsDailyReports",
"tags": [
"Programs"
],
"summary": "List program rewards spendings daily reports",
"description": "Returns aggregated points spent on reward purchases for the program over the given date range and resolution. Each row covers one reward, reward cost, reward spending, card definition, and period with an approved point spend. Periods without an approved point spend are omitted. Optionally filters by reward, cost, spending, and card definition. A filter that matches no rows returns an empty `data` array.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[reward_id][conditions][$is]=lrew_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/RewardsSpendingsReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program rewards spendings daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsRewardsSpendingsDailyListResponseBody"
},
"examples": {
"Daily rewards spendings report": {
"value": {
"data": [
{
"date": "2026-10-01",
"reward_id": "lrew_1294cebb458e4904a0",
"cost_id": "lrcst_1294cebb43ce49049f",
"spending_id": "lrspn_132f2669bf4b1cc455",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 500,
"object": "program_rewards_spendings_daily_report"
},
{
"date": "2026-10-01",
"reward_id": "lrew_1294cebb458e4904a0",
"cost_id": "lrcst_1294cebb43ce49049f",
"spending_id": "lrspn_132f26b3a10b1cc4ca",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 500,
"object": "program_rewards_spendings_daily_report"
},
{
"date": "2026-10-01",
"reward_id": "lrew_1294cebb458e4904a0",
"cost_id": "lrcst_1294cebb43ce49049f",
"spending_id": "lrspn_4a004fb92d3376f332",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 500,
"object": "program_rewards_spendings_daily_report"
}
],
"object": "report"
}
},
"Empty rewards spendings daily report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-131e4b76ad2e098941"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-131e4b76ad2e098942"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-131e4b76ad2e098943"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-131e4b76ad2e098944"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-131e4b76ad2e098945"
}
},
"Invalid query parameters: date range exceeds limit": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-131e4b76ad2e098946"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-131e4b76ad2e098947"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429fc4bf7b2",
"request_id": "v-131e4b76ad2e098948",
"resource_id": "lprg_128f58429fc4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e098949",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/rewards/spendings/summary": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramRewardsSpendingsSummaryReports",
"tags": [
"Programs"
],
"summary": "List program rewards spendings summary reports",
"description": "Returns all-time points spent on reward purchases for the program. Each row covers one reward, reward cost, reward spending, and card definition with an approved point spend. Filters rows by reward, cost, spending, and card definition. Returns at most 100 rows, ordered by `id` descending. `limit` and `order` are not query parameters. A filter that matches no rows returns an empty `data` array.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[reward_id][conditions][$is]=lrew_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/RewardsSpendingsReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program rewards spendings summary report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody"
},
"examples": {
"Summary rewards spendings report": {
"value": {
"data": [
{
"id": "lprss_132f26b7ec8e8d4272",
"reward_id": "lrew_1294cebb458e4904a0",
"cost_id": "lrcst_1294cebb43ce49049f",
"spending_id": "lrspn_132f26b3a10b1cc4ca",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 500,
"object": "program_rewards_spendings_summary_report"
},
{
"id": "lprss_132f2695310e8d423f",
"reward_id": "lrew_1294cebb458e4904a0",
"cost_id": "lrcst_1294cebb43ce49049f",
"spending_id": "lrspn_132f2669bf4b1cc455",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 500,
"object": "program_rewards_spendings_summary_report"
},
{
"id": "lprss_132d80d5d3116617af",
"reward_id": "lrew_1294cebb458e4904a0",
"cost_id": "lrcst_1294cebb43ce49049f",
"spending_id": "lrspn_4a004fb92d3376f332",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 500,
"object": "program_rewards_spendings_summary_report"
}
],
"object": "report"
}
},
"Empty rewards spendings summary report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `reward_id` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .filters.reward_id.conditions.$is must match pattern \"^lrew_[a-f0-9]+$\"",
"request_id": "v-131e4b76ad2e098951"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429fc4bf7b2",
"request_id": "v-131e4b76ad2e098952",
"resource_id": "lprg_128f58429fc4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e098953",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/members/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramMembersDailyReports",
"tags": [
"Programs"
],
"summary": "List program members daily reports",
"description": "Returns member and card changes for the program over the given date range and resolution. Each row covers one period with recorded activity. Periods without activity are omitted.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
}
],
"responses": {
"200": {
"description": "Program members daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsMembersDailyListResponseBody"
},
"examples": {
"Daily members report: Month resolution": {
"value": {
"data": [
{
"date": "2026-07-01",
"members_joined": 10,
"members_deactivated": 1,
"members_deleted": 2,
"cards": 0,
"object": "program_members_daily_report"
},
{
"date": "2026-09-01",
"members_joined": 2,
"members_deactivated": 3,
"members_deleted": 0,
"cards": 3,
"object": "program_members_daily_report"
},
{
"date": "2026-10-01",
"members_joined": 1,
"members_deactivated": 1,
"members_deleted": 0,
"cards": 3,
"object": "program_members_daily_report"
}
],
"object": "report"
}
},
"Empty members daily report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-131e4b76ad2e098961"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-131e4b76ad2e098962"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-131e4b76ad2e098963"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-131e4b76ad2e098964"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-131e4b76ad2e098965"
}
},
"Invalid query parameters: date range exceeds limit": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-131e4b76ad2e098966"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-131e4b76ad2e098967"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429fc4bf7b2",
"request_id": "v-131e4b76ad2e098968",
"resource_id": "lprg_128f58429fc4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e098969",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/members/summary": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramMembersSummaryReports",
"tags": [
"Programs"
],
"summary": "List program members summary reports",
"description": "Returns all-time member and card totals for the program. The response contains one row when activity was recorded, and an empty `data` array otherwise. `limit` and `order` are not query parameters.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"responses": {
"200": {
"description": "Program members summary report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesProgramsReportsMembersSummaryListResponseBody"
},
"examples": {
"Summary members report": {
"value": {
"data": [
{
"id": "lpmrs_12d8b27ab4e0fcb6e1",
"members_joined": 5,
"members_deactivated": 5,
"members_deleted": 2,
"cards": 6,
"object": "program_members_summary_report"
}
],
"object": "report"
}
},
"Empty members summary report": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `limit` is not a query parameter": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must NOT have additional properties",
"request_id": "v-131e4b76ad2e098970"
}
}
}
}
}
},
"404": {
"description": "Program not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_128f58429fc4bf7b2",
"request_id": "v-131e4b76ad2e098972",
"resource_id": "lprg_128f58429fc4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e4b76ad2e098973",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/points-earnings/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getProgramPointsEarningsDailyReport",
"tags": [
"Programs"
],
"summary": "List program points-earnings daily reports",
"description": "Returns aggregated daily points-earnings statistics for the program over the given date range and resolution, optionally filtered by earning rule and card definition. Each entry sums earning operations recorded for one period, earning rule, earning item, and card definition. Periods without recorded activity are omitted. A filter that matches no rows returns an empty `data` array.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[earning_rule_id][conditions][$is]=lern_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/PointsEarningsReportListFilters"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Program points-earnings daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody"
},
"examples": {
"Program points-earnings daily report: Day resolution": {
"value": {
"data": [
{
"date": "2026-07-01",
"earning_rule_id": "lern_128f9ee63cc4ba558",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f58429f4c4bf7b2",
"success_count": 1,
"points": 100,
"pending_points": 0,
"object": "program_points_earnings_daily_report"
}
],
"object": "report"
}
},
"Program points-earnings daily report: Week resolution": {
"value": {
"data": [
{
"date": "2026-06-29",
"earning_rule_id": "lern_128f5822398c4bf78f",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"success_count": 3,
"points": 0,
"pending_points": 30,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-06-29",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_128f48ee3fcc4bec33",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 3,
"points": 0,
"pending_points": 7497,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-06-29",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"earning_item_id": "lernei_128f5834b20c4bf7a2",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success_count": 3,
"points": 0,
"pending_points": 30,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-06",
"earning_rule_id": "lern_128f5822398c4bf78f",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"success_count": 1,
"points": 0,
"pending_points": 10,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-06",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_128f48ee3fcc4bec33",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 0,
"pending_points": 2999,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-06",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"earning_item_id": "lernei_128f5834b20c4bf7a2",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success_count": 1,
"points": 0,
"pending_points": 10,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-13",
"earning_rule_id": "lern_128f5822398c4bf78f",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"success_count": 18,
"points": 0,
"pending_points": 180,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-13",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_128f48ee3fcc4bec33",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 18,
"points": 0,
"pending_points": 4400,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-13",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"earning_item_id": "lernei_128f5834b20c4bf7a2",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success_count": 18,
"points": 0,
"pending_points": 180,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-20",
"earning_rule_id": "lern_128f5822398c4bf78f",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"success_count": 1,
"points": 0,
"pending_points": 10,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-20",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_128f48ee3fcc4bec33",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 0,
"pending_points": 200,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-20",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"earning_item_id": "lernei_128f5834b20c4bf7a2",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success_count": 1,
"points": 0,
"pending_points": 10,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-27",
"earning_rule_id": "lern_128f5822398c4bf78f",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"success_count": 1,
"points": 0,
"pending_points": 10,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-27",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_128f48ee3fcc4bec33",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 0,
"pending_points": 2999,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-07-27",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"earning_item_id": "lernei_128f5834b20c4bf7a2",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success_count": 1,
"points": 0,
"pending_points": 10,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-08-03",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_128f48ee3fcc4bec33",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 13,
"points": 0,
"pending_points": 2223000,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-08-03",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"earning_item_id": "lernei_128f5834b20c4bf7a2",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success_count": 13,
"points": 0,
"pending_points": 130,
"object": "program_points_earnings_daily_report"
},
{
"date": "2026-08-03",
"earning_rule_id": "lern_128f5822398c4bf78f",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"success_count": 13,
"points": 0,
"pending_points": 130,
"object": "program_points_earnings_daily_report"
}
],
"object": "report"
}
},
"Program points-earnings daily report: No activity": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-130eb43b3685e26454"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-130eb46d6c45e264b2"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-130eb4847405e264e3"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-130eb4847405e264e4"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26455"
}
},
"Invalid query parameters: `end_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .end_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26458"
}
},
"Invalid query parameters: date range exceeds limit for `day`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-130eb43b3685e26456"
}
},
"Invalid query parameters: date range exceeds limit for `week`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 12 weeks for resolution 'week'",
"request_id": "v-130eb43b3685e26459"
}
},
"Invalid query parameters: date range exceeds limit for `month`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 12 months for resolution 'month'",
"request_id": "v-130eb43b3685e2645a"
}
},
"Invalid query parameters: date range exceeds limit for `quarter`": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 4 quarters for resolution 'quarter'",
"request_id": "v-130eb43b3685e2645b"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-130eb43b3685e26457"
}
}
}
}
}
},
"404": {
"description": "The program does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_28f58429f4c4bf7b2",
"request_id": "v-131e61d450c264502d",
"resource_id": "lprg_28f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e61d450c264502e",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/points-earnings/summary": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getProgramPointsEarningsSummaryReport",
"tags": [
"Programs"
],
"summary": "List program points-earnings summary reports",
"description": "Returns total points-earnings statistics for the program (all time), optionally filtered by earning rule or card definition. Each entry sums earning operations for one earning rule, earning item, and card definition. Returns at most 100 rows, ordered by `id` descending. `limit` and `order` are not query parameters. A filter that matches no rows returns an empty `data` array.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[earning_rule_id][conditions][$is]=lern_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/PointsEarningsReportListFilters"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Program points-earnings summary report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsReportsPointsEarningsSummaryListResponseBody"
},
"examples": {
"Program points-earnings summary report": {
"value": {
"data": [
{
"id": "lppes_132df39de951666c5b",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_132df28ca59f245b8f",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 1,
"points": 0,
"pending_points": 150,
"object": "program_points_earnings_summary_report"
},
{
"id": "lppes_12a92be5da077a3460",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"earning_item_id": "lernei_128f48ee3fcc4bec33",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"success_count": 39,
"points": 0,
"pending_points": 2251295,
"object": "program_points_earnings_summary_report"
},
{
"id": "lppes_12a92be5b1077a345a",
"earning_rule_id": "lern_128f5822398c4bf78f",
"earning_item_id": "lernei_128f582238cc4bf78e",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"success_count": 40,
"points": 0,
"pending_points": 400,
"object": "program_points_earnings_summary_report"
},
{
"id": "lppes_12a92be5b0c77a3459",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"earning_item_id": "lernei_128f5834b20c4bf7a2",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"success_count": 40,
"points": 0,
"pending_points": 400,
"object": "program_points_earnings_summary_report"
}
],
"object": "report"
}
},
"Program points-earnings summary report: No activity": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `earning_rule_id` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .filters.earning_rule_id.conditions.$is must match pattern \"^lern_[a-f0-9]+$\"",
"request_id": "v-131e4b76ad2e098946"
}
}
}
}
}
},
"404": {
"description": "The program does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_28f58429f4c4bf7b2",
"request_id": "v-131e61d450c264502e",
"resource_id": "lprg_28f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e61d450c264502f",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/earning-rules/daily": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramEarningRulesDailyReports",
"tags": [
"Programs"
],
"summary": "List program earning-rules daily reports",
"description": "Returns aggregated daily earning-rule evaluation statistics for the program over the given date range and resolution, optionally filtered by earning rule. Each entry counts eligibility checks for one period and earning rule. Periods without recorded activity are omitted. `failures_breakdown` is always an empty object. A filter that matches no rows returns an empty `data` array.\n\nThe date range is limited per resolution:\n- 90 days for `day`,\n- 12 weeks for `week`,\n- 12 months for `month`,\n- 4 quarters for `quarter`,\n- `start_date` must be before `end_date`,\n- `start_date` and `end_date` are inclusive.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "start_date",
"in": "query",
"required": true,
"description": "Sets the inclusive start of the report date range. Format `YYYY-MM-DD`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "end_date",
"in": "query",
"required": true,
"description": "Sets the inclusive end of the report date range. Format `YYYY-MM-DD`. Must be after `start_date`.",
"schema": {
"type": "string",
"format": "date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
}
},
{
"name": "resolution",
"in": "query",
"required": true,
"description": "Sets the aggregation resolution. `day` allows at most 90 days, `week` at most 12 weeks, `month` at most 12 months, and `quarter` at most 4 quarters.",
"schema": {
"type": "string",
"enum": [
"day",
"week",
"month",
"quarter"
]
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[earning_rule_id][conditions][$is]=lern_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/EarningRulesReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program earning-rules daily report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody"
},
"examples": {
"Program earning-rules daily report: Day resolution": {
"value": {
"data": [
{
"date": "2026-07-01",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 3,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-01",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 3,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-10",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-10",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-15",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 11,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-16",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 7,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-16",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 7,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-16",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 7,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-23",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-23",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-23",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-30",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-30",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-30",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-08-06",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 13,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-08-06",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 13,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-08-06",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 13,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
}
],
"object": "report"
}
},
"Program earning-rules daily report: Month resolution": {
"value": {
"data": [
{
"date": "2026-07-01",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 24,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-01",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 24,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-07-01",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 24,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-08-01",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 13,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-08-01",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 13,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-08-01",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 13,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-09-01",
"earning_rule_id": "lern_12cd26a685db3e63d8",
"success_count": 1,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-09-01",
"earning_rule_id": "lern_128f57ec40cc4bf762",
"success_count": 3,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-10-01",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 3,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-10-01",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 3,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
},
{
"date": "2026-10-01",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 3,
"failures_count": 0,
"failures_breakdown": {},
"object": "program_earning_rules_daily_report"
}
],
"object": "report"
}
},
"Program earning-rules daily report: No activity": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation, or `start_date` is not before `end_date`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `start_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'start_date'",
"request_id": "v-130eb43b3685e26454"
}
},
"Invalid query parameters: `end_date` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'end_date'",
"request_id": "v-130eb46d6c45e264b2"
}
},
"Invalid query parameters: `resolution` is required": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query must have required property 'resolution'",
"request_id": "v-130eb4847405e264e3"
}
},
"Invalid query parameters: `resolution` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .resolution must be equal to one of the allowed values [ day, week, month, quarter ]",
"request_id": "v-130eb4847405e264e4"
}
},
"Invalid query parameters: `start_date` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .start_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-130eb43b3685e26455"
}
},
"Invalid query parameters: date range exceeds limit": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Query date range exceeds maximum allowed 90 days for resolution 'day'",
"request_id": "v-130eb43b3685e26456"
}
},
"Invalid payload: `start_date` is not before `end_date`": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'start_date' must be before 'end_date'",
"request_id": "v-130eb43b3685e26457"
}
}
}
}
}
},
"404": {
"description": "The program does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_28f58429f4c4bf7b2",
"request_id": "v-131e61d450c264502d",
"resource_id": "lprg_28f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e61d450c264502e",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/programs/{programId}/reports/earning-rules/summary": {
"parameters": [
{
"name": "programId",
"in": "path",
"required": true,
"description": "Identifies the loyalty program. Format `lprg_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listProgramEarningRulesSummaryReports",
"tags": [
"Programs"
],
"summary": "List program earning-rules summary reports",
"description": "Returns total earning-rule evaluation statistics for the program (all time), optionally filtered by earning rule. Includes success and failure counts with a failures breakdown. Each entry counts eligibility checks for one earning rule. Returns at most 100 rows, ordered by `id` descending. `limit` and `order` are not query parameters. A filter that matches no rows returns an empty `data` array.\n\nReturns `400` when query validation fails. Returns `404` when the program does not exist.",
"parameters": [
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[earning_rule_id][conditions][$is]=lern_...`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"$ref": "#/components/schemas/EarningRulesReportListFilters"
}
}
],
"responses": {
"200": {
"description": "Program earning-rules summary report.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesProgramsReportsEarningRulesSummaryListResponseBody"
},
"examples": {
"Program earning-rules summary report": {
"value": {
"data": [
{
"id": "lpers_12f8c3cb8fdaa184cd",
"earning_rule_id": "lern_128f57ec40cc4bf762",
"success_count": 3,
"failures_count": 0,
"failures_breakdown": {
"COOLDOWN": 0,
"FREQUENCY": 0
},
"object": "program_earning_rules_summary_report"
},
{
"id": "lpers_12a92be41e477a33d8",
"earning_rule_id": "lern_128f5834b30c4bf7a3",
"success_count": 40,
"failures_count": 0,
"failures_breakdown": {
"COOLDOWN": 0,
"FREQUENCY": 0
},
"object": "program_earning_rules_summary_report"
},
{
"id": "lpers_12a92be41b077a33d1",
"earning_rule_id": "lern_128f5822398c4bf78f",
"success_count": 40,
"failures_count": 0,
"failures_breakdown": {
"COOLDOWN": 0,
"FREQUENCY": 0
},
"object": "program_earning_rules_summary_report"
},
{
"id": "lpers_12a92be418877a33ca",
"earning_rule_id": "lern_128f48ee44cc4bec34",
"success_count": 40,
"failures_count": 0,
"failures_breakdown": {
"COOLDOWN": 0,
"FREQUENCY": 0
},
"object": "program_earning_rules_summary_report"
}
],
"object": "report"
}
},
"Program earning-rules summary report: Cooldown failure": {
"value": {
"data": [
{
"id": "lpers_12c2bc3be20c8cb534",
"earning_rule_id": "lern_128f9ee63cc4ba558",
"success_count": 0,
"failures_count": 1,
"failures_breakdown": {
"COOLDOWN": 1
},
"object": "program_earning_rules_summary_report"
}
],
"object": "report"
}
},
"Program earning-rules summary report: No activity": {
"value": {
"data": [],
"object": "report"
}
}
}
}
}
},
"400": {
"description": "Query parameters failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid query parameters: `earning_rule_id` is invalid": {
"value": {
"code": 400,
"key": "invalid_query_params",
"message": "Invalid query params",
"details": "Property .filters.earning_rule_id.conditions.$is must match pattern \"^lern_[a-f0-9]+$\"",
"request_id": "v-131e4b76ad2e098947"
}
}
}
}
}
},
"404": {
"description": "The program does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Program not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id lprg_28f58429f4c4bf7b2",
"request_id": "v-131e61d450c264502f",
"resource_id": "lprg_28f58429f4c4bf7b2",
"resource_type": "program"
}
},
"Program id does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find program with id missing",
"request_id": "v-131e61d450c2645030",
"resource_id": "missing",
"resource_type": "program"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/card-definitions": {
"get": {
"operationId": "listCardDefinitions",
"tags": [
"Card Definitions"
],
"summary": "List Card Definitions",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of card definitions.\n\nFiltering is supported through the `filters` deep-object query parameter,\ne.g. `filters[name][conditions][$is]=Standard%20Card`.\nThe same field cannot be requested in both ascending and descending\norder at the same time.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "string",
"enum": [
"-name",
"name",
"-type",
"type",
"-status",
"status",
"-created_at",
"created_at"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-name",
"name",
"-type",
"type",
"-status",
"status",
"-created_at",
"created_at"
]
}
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrscdef_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrscdef_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[status][conditions][$is]=ACTIVE`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "A paginated list of card definitions.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - invalid state transition",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"post": {
"operationId": "createCardDefinition",
"tags": [
"Card Definitions"
],
"summary": "Create Card Definition",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nCreates a new card definition. Only `name` and `type` are required; all other\nsections default server-side as follows:\n- `code_config`: 10-character alphanumeric code pattern (`##########`)\n- `points_expiration`: `NO_EXPIRATION`\n- `pending_points`: `IMMEDIATE`\n- `earning_limits`: global `NO_LIMIT`, transactions `NO_LIMIT`\n- `spending_limits`: global `NO_LIMIT`, transactions `NO_LIMIT`\n- `refunds`: spent points `NONE`, earned points `NONE`\n- `balance_settings`: `allow_negative: false`\n- `pay_with_points`: `NO_PAYMENTS`\n\nCross-field rules:\n- `balance_settings.allow_negative` can only be `true` when `points_expiration.type`\n is `NO_EXPIRATION`. Additionally, the earned points refund mode `REVOKE_BELOW_ZERO`\n requires `balance_settings.allow_negative` to be `true`.\n- The earned points refund method `REVOKE_FROM_PENDING` requires\n `pending_points.type` to be one of `PERIOD_BASED`, `FIXED_DATES`, `EVENT_BASED`.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsCreateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The created card definition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsCreateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - invalid state transition",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/card-definitions/{cardDefinitionId}": {
"parameters": [
{
"name": "cardDefinitionId",
"in": "path",
"required": true,
"description": "Identifies the card definition. Format `lcdef_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getCardDefinition",
"tags": [
"Card Definitions"
],
"summary": "Get Card Definition",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a single card definition by its ID.",
"responses": {
"200": {
"description": "The card definition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsGetResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - invalid state transition",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"put": {
"operationId": "updateCardDefinition",
"tags": [
"Card Definitions"
],
"summary": "Update Card Definition",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates a card definition. All properties are optional; only provided sections\nare updated. `type` and `status` cannot be changed through this endpoint\n(status transitions are performed via the activate/draft endpoints).\n\nWhen the card definition is in use (e.g. assigned to a program with existing cards),\nupdates to restricted sections may be rejected with a resource-locked error;\nonly `name`, `metadata` and `pay_with_points` are always updatable.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The updated card definition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsUpdateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - invalid state transition",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"operationId": "deleteCardDefinition",
"tags": [
"Card Definitions"
],
"summary": "Delete Card Definition",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nDeletes a card definition by setting `status` to `DELETED`. Returns the deleted card definition. Returns `400` (`resource_in_use`) when a program, reward, earning rule, tier structure, or benefit still references the card definition.",
"responses": {
"200": {
"description": "The deleted card definition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsDeleteResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - invalid state transition",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/card-definitions/{cardDefinitionId}/activate": {
"parameters": [
{
"name": "cardDefinitionId",
"in": "path",
"required": true,
"description": "Identifies the card definition. Format `lcdef_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "activateCardDefinition",
"tags": [
"Card Definitions"
],
"summary": "Activate Card Definition",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nTransitions the card definition from `DRAFT` to `ACTIVE`. No request body. Activating from any other state returns `400` (`invalid_state_transition`).",
"responses": {
"200": {
"description": "The activated card definition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsActivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/card-definitions/{cardDefinitionId}/draft": {
"parameters": [
{
"name": "cardDefinitionId",
"in": "path",
"required": true,
"description": "Identifies the card definition. Format `lcdef_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "draftCardDefinition",
"tags": [
"Card Definitions"
],
"summary": "Draft Card Definition",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nTransitions the card definition from `ACTIVE` to `DRAFT`. No request body. Drafting from any other state returns `400` (`invalid_state_transition`). Returns `423` when the card definition is still used by a non-draft program (`connected_non_draft_program`), reward (`connected_non_draft_reward`), earning rule (`connected_non_draft_earning_rule`), benefit (`connected_non_draft_benefit`), or tier structure (`connected_non_draft_tier_structure`).",
"responses": {
"200": {
"description": "The drafted card definition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsDraftResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "The card definition is used by a non-draft program, reward, earning rule, benefit, or tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/card-definitions/{cardDefinitionId}/activities": {
"parameters": [
{
"name": "cardDefinitionId",
"in": "path",
"required": true,
"description": "Identifies the card definition. Format `lcdef_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listCardDefinitionActivities",
"tags": [
"Card Definitions"
],
"summary": "List Card Definition Activities",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of activities recorded for the card definition\n(creation, updates, deletion, state transitions and program assignments).\nReturns `404` when the card definition does not exist.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsacd_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsacd_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.card_definition.created`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsActivitiesListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "A paginated list of card definition activities.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesCardDefinitionsActivitiesListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - the request body or query parameters are invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/earning-rules": {
"post": {
"tags": [
"Earning Rules"
],
"operationId": "createEarningRule",
"summary": "Create earning rule",
"description": "Creates a new earning rule.\n\nWhen `status` is omitted the rule is created as `DRAFT`. Omitted or `null` `validity_hours` default to `{ \"type\": \"ANY_TIME\" }`, `trigger_limits` to `{ \"cooldown\": { \"type\": \"NO_COOLDOWN\" }, \"frequency\": { \"type\": \"NO_LIMIT\" } }`, and `earning_limits` to `{ \"global\": { \"type\": \"NO_LIMIT\", \"limits\": [] } }`. An `ACTIVE` rule whose trigger is `customer.segment.entered` activates a passive segment. Returns `423` when `status` is `ACTIVE` and an effect or tier rule points at a non-active benefit, card definition, or tier structure.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesCreateRequestBody"
},
"examples": {
"Earning rule: Customer order paid with effects": {
"value": {
"name": "Order paid VIP and non-VIP segments",
"trigger": {
"event": "customer.order.paid"
},
"trigger_limits": {
"cooldown": {
"type": "NO_COOLDOWN"
},
"frequency": {
"type": "NO_LIMIT"
}
},
"earning_limits": {
"global": {
"type": "NO_LIMIT",
"limits": []
}
},
"earnings": [
{
"name": "Earning for VIPs",
"effects": [
{
"type": "POINTS",
"points": {
"value": 300,
"card_definition_id": "lcdef_1329efb2af8ba6486f"
}
}
],
"rules": {
"1": {
"conditions": {
"$is": [
"seg_HFJezEkKnc0iHK50NWl6c6da"
]
},
"name": "customer.segment"
},
"logic": " 1"
},
"tier_rules": {
"type": "NO_REQUIREMENTS"
}
},
{
"name": "Earning for non-VIPs",
"effects": [
{
"type": "POINTS",
"points": {
"value": 150,
"card_definition_id": "lcdef_1329efb2af8ba6486f"
}
}
],
"tier_rules": {
"type": "NO_REQUIREMENTS"
}
}
],
"metadata": {},
"validity_hours": {
"type": "ANY_TIME"
},
"start_date": null,
"end_date": null,
"status": "DRAFT"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Earning rule created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesCreateResponseBody"
},
"examples": {
"Earning rule: Customer order paid": {
"value": {
"id": "lern_133a93007e0a5d2c4d",
"name": "Earning rule 2026-10-22-04",
"status": "DRAFT",
"earnings": [
{
"id": "lernei_133a93007cca5d2c4c",
"tier_rules": {
"type": "NO_REQUIREMENTS"
},
"effects": [
{
"type": "POINTS",
"points": {
"value": 150,
"card_definition_id": "lcdef_1329efb2af8ba6486f"
}
}
]
}
],
"trigger": {
"event": "customer.order.paid"
},
"error": {
"message": "You don't know what's right!"
},
"validity_hours": {
"type": "DAILY",
"daily": [
{
"days_of_week": [
0,
5,
6
],
"start_time": "15:00",
"end_time": "17:30"
}
]
},
"start_date": null,
"end_date": null,
"trigger_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 1,
"unit": "HOUR"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "WEEK"
}
},
"triggers": {
"max": 2
}
}
]
}
},
"earning_limits": {
"global": {
"type": "NO_LIMIT",
"limits": []
}
},
"metadata": {},
"created_at": "2026-10-22T11:26:04.277Z",
"updated_at": null,
"object": "earning_rule"
}
},
"Earning rule: Custom event": {
"value": {
"id": "lern_133a8fb1eb8a5d2830",
"name": "Earning rule 2026-10-22-02",
"status": "DRAFT",
"earnings": [
{
"id": "lernei_133a8fb1ceca5d282e",
"tier_rules": {
"type": "NO_REQUIREMENTS"
},
"effects": [
{
"type": "POINTS",
"points": {
"value": 150,
"card_definition_id": "lcdef_1329efb2af8ba6486f"
}
}
]
}
],
"trigger": {
"event": "customer.custom_event",
"custom_event": {
"schema_id": "ms_oX8au6DostTnHdWBAVVFnTLP"
}
},
"error": {
"message": "You don't know what's right!"
},
"validity_hours": {
"type": "ANY_TIME"
},
"start_date": null,
"end_date": null,
"trigger_limits": {
"cooldown": {
"type": "NO_COOLDOWN"
},
"frequency": {
"type": "NO_LIMIT",
"limits": []
}
},
"earning_limits": {
"global": {
"type": "NO_LIMIT",
"limits": []
}
},
"metadata": {},
"created_at": "2026-10-22T11:11:37.383Z",
"updated_at": null,
"object": "earning_rule"
}
},
"Earning rule: Customer segment entered": {
"value": {
"id": "lern_133a90fc9c0a5d46d5",
"name": "Earning rule 2026-10-22-03",
"status": "DRAFT",
"earnings": [
{
"id": "lernei_133a90fc988a5d46d4",
"tier_rules": {
"type": "NO_REQUIREMENTS"
},
"effects": [
{
"type": "POINTS",
"points": {
"value": 150,
"card_definition_id": "lcdef_1329efb2af8ba6486f"
}
}
]
}
],
"trigger": {
"event": "customer.segment.entered",
"segment": {
"id": "seg_MJ8qS9sXL0aRurtPSc3ddF3X"
}
},
"error": {
"message": "You don't know what's right!"
},
"validity_hours": {
"type": "ANY_TIME"
},
"start_date": null,
"end_date": null,
"trigger_limits": {
"cooldown": {
"type": "NO_COOLDOWN"
},
"frequency": {
"type": "NO_LIMIT",
"limits": []
}
},
"earning_limits": {
"global": {
"type": "NO_LIMIT",
"limits": []
}
},
"metadata": {},
"created_at": "2026-10-22T11:17:16.005Z",
"updated_at": null,
"object": "earning_rule"
}
}
}
}
}
},
"400": {
"description": "The request body failed validation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid payload": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "The payload cannot be empty",
"request_id": "v-0c52e783650ae585b2"
}
},
"Invalid validity hours": {
"value": {
"code": 400,
"key": "invalid_hours",
"message": "Invalid ValidityHours",
"details": "Overlapping hours for given days: 1,2",
"request_id": "v-0c52e784650ae585b3"
}
},
"Invalid rules definition": {
"value": {
"code": 400,
"key": "invalid_rules_definition",
"message": "Invalid Rules Definition",
"details": "Rule 'order.amount' is not supported for trigger 'customer.segment.entered'",
"request_id": "v-0c52e785650ae585b4"
}
},
"Invalid tier structure relation": {
"value": {
"code": 400,
"key": "invalid_tier_structure_relation",
"message": "Invalid payload",
"details": "Tier 'ltr_0e30613ad01f044515' does not belong to tier structure 'lts_128f4b460e4c4bedf6'",
"request_id": "v-0c52e786650ae585b5"
}
},
"Invalid benefit calculation type": {
"value": {
"code": 400,
"key": "invalid_benefit_calculation_type",
"message": "Invalid payload",
"details": "Benefit 'lben_128f4bba81947c8542' has calculation type 'PRE_DISCOUNT_ORDER_AMOUNT' which is not allowed for trigger 'customer.segment.entered'",
"request_id": "v-0c52e787650ae585b6"
}
},
"Invalid points expiration override": {
"value": {
"code": 400,
"key": "invalid_points_expiration_override",
"message": "Invalid payload",
"details": "Effect-level expiration type 'SLIDING_EXPIRATION' must match card definition expiration type 'ROLLING_EXPIRATION'",
"request_id": "v-0c52e788650ae585b7"
}
},
"Metadata validation failed": {
"value": {
"code": 400,
"key": "metadata_validation_failed",
"message": "Metadata validation failed",
"details": "campaign_type: must be a string, property is required (actual value is 'undefined')",
"request_id": "v-0c52e789650ae585b8"
}
}
}
}
}
},
"404": {
"description": "A referenced custom event schema, segment, card definition, benefit, tier, or tier structure does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Custom event schema not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find custom_event_schema with id ms_oX8au6DostTnHdWBAVVFnTLP",
"request_id": "v-0c52e78a650ae585b9",
"resource_id": "ms_oX8au6DostTnHdWBAVVFnTLP",
"resource_type": "custom_event_schema"
}
},
"Segment not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find segment with id seg_HFJezEkKnc0iHK50NWl6c6da",
"request_id": "v-0c52e78b650ae585ba",
"resource_id": "seg_HFJezEkKnc0iHK50NWl6c6da",
"resource_type": "segment"
}
},
"Card definition not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find card_definitions with ids [ lcdef_1329efb2af8ba6486f ]",
"request_id": "v-0c52e78c650ae585bb"
}
},
"Benefit not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find benefits with ids [ lben_128f4bba81947c8542 ]",
"request_id": "v-0c52e78d650ae585bc"
}
},
"Tier not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find tiers with ids [ ltr_0e30613ad01f044515 ]",
"request_id": "v-0c52e78e650ae585bd"
}
},
"Tier structure not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find tier_structures with ids [ lts_128f4b460e4c4bedf6 ]",
"request_id": "v-0c52e78f650ae585be"
}
}
}
}
}
},
"423": {
"description": "Returned when `status` is `ACTIVE` and an effect or tier rule points at a benefit, card definition, or tier structure that is not `ACTIVE`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Non-active card definition": {
"value": {
"code": 423,
"key": "non_active_card_definition",
"message": "Cannot create earning rule when card definition inside effect is not ACTIVE",
"details": "Invalid card_definition status with id lcdef_1329efb2af8ba6486f",
"request_id": "v-0c52e790650ae585bf"
}
},
"Non-active benefit": {
"value": {
"code": 423,
"key": "non_active_benefit",
"message": "Cannot create earning rule when benefit inside effect is not ACTIVE",
"details": "Invalid benefit status with id lben_128f4bba81947c8542",
"request_id": "v-0c52e791650ae585c0"
}
},
"Non-active tier structure": {
"value": {
"code": 423,
"key": "non_active_tier_structure",
"message": "Cannot use non-active tier structure in earning rule tier rules",
"details": "Invalid tier_structure status with id lts_128f4b460e4c4bedf6",
"request_id": "v-0c52e792650ae585c1"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"get": {
"tags": [
"Earning Rules"
],
"operationId": "listEarningRules",
"summary": "List earning rules",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of earning rules. The same field cannot be used\nin both ascending and descending order at once\n(e.g. `order=name&order=-name` is rejected). Default order is `-created_at`;\n`id` is always appended as a tie-breaker.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"explode": true,
"schema": {
"oneOf": [
{
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name"
]
}
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsern_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsern_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[status][conditions][$is]=ACTIVE`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesEarningRulesListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Paginated list of earning rules",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/earning-rules/{earningRuleId}": {
"parameters": [
{
"name": "earningRuleId",
"in": "path",
"required": true,
"description": "Identifies the earning rule. Format `lern_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
],
"get": {
"tags": [
"Earning Rules"
],
"operationId": "getEarningRule",
"summary": "Get earning rule",
"description": "Returns a single earning rule by its ID.",
"responses": {
"200": {
"description": "Earning rule",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesGetResponseBody"
},
"examples": {
"Draft earning rule with effects": {
"value": {
"id": "lern_1329f334d5cba64cfb",
"name": "Earning Rule Q42026",
"status": "DRAFT",
"earnings": [
{
"id": "lernei_1329f334d24ba64cf9",
"name": "Earning VIP",
"rules": {
"1": {
"name": "customer.segment",
"conditions": {
"$is": [
"seg_HFJezEkKnc0iHK50NWl6c6da"
]
}
},
"logic": "1"
},
"tier_rules": {
"type": "ANY_OF",
"any_of": [
{
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_ids": [
"lt_128f4b46808c4bee07"
]
}
]
},
"effects": [
{
"type": "POINTS",
"points": {
"value": 30,
"card_definition_id": "lcdef_1329efb2af8ba6486f"
}
}
]
},
{
"id": "lernei_1329f334d24ba64cfa",
"name": "Earning non-VIP",
"tier_rules": {
"type": "ANY_OF",
"any_of": [
{
"tier_structure_id": "lts_128f4b460e4c4bedf6",
"tier_ids": [
"lt_128f4b46808c4bee07"
]
}
]
},
"effects": [
{
"type": "POINTS",
"points": {
"value": 10,
"card_definition_id": "lcdef_1329efb2af8ba6486f"
}
}
]
}
],
"trigger": {
"event": "customer.order.paid"
},
"validity_hours": {
"type": "DAILY",
"daily": [
{
"days_of_week": [
0,
5,
6
],
"start_time": "14:00",
"end_time": "16:30"
}
]
},
"start_date": null,
"end_date": null,
"trigger_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 15,
"unit": "DAY"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"triggers": {
"max": 3
}
}
]
}
},
"earning_limits": {
"global": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"points": {
"max": 10
}
}
]
}
},
"metadata": {
"Temporal": "true"
},
"created_at": "2026-10-09T13:32:13.008Z",
"updated_at": null,
"object": "earning_rule"
}
}
}
}
}
},
"404": {
"description": "The earning rule doesn't exist. A deleted earning rule is not found. `key` is `not_found` and `resource_type` is `earning_rule`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"parameters": [],
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"put": {
"tags": [
"Earning Rules"
],
"operationId": "updateEarningRule",
"summary": "Update earning rule",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates an earning rule. All properties are optional; `status` cannot be changed\nthrough this endpoint (use the activate/deactivate/draft endpoints). For rules that\nare not in `DRAFT` status, only the following properties may effectively change:\nname, earnings, error, validity_hours, start_date, end_date, trigger_limits, earning_limits, metadata.\nEarnings items may carry an `id` (`lernei_...`) to update an existing earning item;\nitems without an `id` are created.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Updated earning rule",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesUpdateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"parameters": [],
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"tags": [
"Earning Rules"
],
"operationId": "deleteEarningRule",
"summary": "Delete earning rule",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nDeletes an earning rule by setting `status` to `DELETED` and returns the deleted earning rule. Returns `400` (`resource_in_use`) when a program still references the earning rule.",
"responses": {
"200": {
"description": "Deleted earning rule",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesDeleteResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"parameters": [],
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/earning-rules/{earningRuleId}/activate": {
"parameters": [
{
"name": "earningRuleId",
"in": "path",
"required": true,
"description": "Identifies the earning rule. Format `lern_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
],
"post": {
"tags": [
"Earning Rules"
],
"operationId": "activateEarningRule",
"summary": "Activate earning rule",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the earning rule to `ACTIVE` from `DRAFT` or `INACTIVE`. No request body. Any other status returns `400` (`invalid_state_transition`). Returns `423` when an effect or tier rule still points at a non-active benefit (`non_active_benefit`), card definition (`non_active_card_definition`), or tier structure (`non_active_tier_structure`).",
"responses": {
"200": {
"description": "Activated earning rule",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesActivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "A benefit, card definition, or tier structure used by the earning rule is not active.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/earning-rules/{earningRuleId}/deactivate": {
"parameters": [
{
"name": "earningRuleId",
"in": "path",
"required": true,
"description": "Identifies the earning rule. Format `lern_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
],
"post": {
"tags": [
"Earning Rules"
],
"operationId": "deactivateEarningRule",
"summary": "Deactivate earning rule",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the earning rule from `ACTIVE` to `INACTIVE`. No request body. Any other status returns `400` (`invalid_state_transition`).",
"responses": {
"200": {
"description": "Deactivated earning rule",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesDeactivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/earning-rules/{earningRuleId}/draft": {
"parameters": [
{
"name": "earningRuleId",
"in": "path",
"required": true,
"description": "Identifies the earning rule. Format `lern_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
],
"post": {
"tags": [
"Earning Rules"
],
"operationId": "draftEarningRule",
"summary": "Move earning rule to draft",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the earning rule from `ACTIVE` to `DRAFT`. No request body. Any other status returns `400` (`invalid_state_transition`). Returns `423` (`connected_non_draft_program`) when a non-draft program still uses the earning rule.",
"responses": {
"200": {
"description": "Drafted earning rule",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesDraftResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "The earning rule is used by a non-draft program.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/earning-rules/{earningRuleId}/activities": {
"parameters": [
{
"name": "earningRuleId",
"in": "path",
"required": true,
"description": "Identifies the earning rule. Format `lern_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
],
"get": {
"tags": [
"Earning Rules"
],
"operationId": "listEarningRuleActivities",
"summary": "List earning rule activities",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of activities (audit trail) for a single earning rule.\nThe same field cannot be used in both ascending and descending order at once.\nDefault order is `-created_at`.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"explode": true,
"schema": {
"oneOf": [
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsaer_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsaer_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.earning_rule.updated`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesEarningRulesActivitiesListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Paginated list of earning rule activities",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesEarningRulesActivitiesListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures": {
"post": {
"operationId": "createTierStructure",
"tags": [
"Tier Structures"
],
"summary": "Create tier structure",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nCreates a new tier structure. Depending on `type`, either\n`point_balance` (for `POINT_BALANCE`) or `point_earned` (for `POINT_EARNED`)\nis required and the other must be null/omitted. If `expiration` is omitted it\ndefaults to `{ \"type\": \"NO_RETENTION\" }`; if `downgrade` is omitted it defaults\nto `{ \"type\": \"NO_DOWNGRADE\" }`; if `status` is omitted it defaults to `DRAFT`.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresCreateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The created tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresCreateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"get": {
"operationId": "listTierStructures",
"tags": [
"Tier Structures"
],
"summary": "List tier structures",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of tier structures. The same field cannot be\nrequested in both ascending and descending order at once. Default order is\n`-created_at`.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name",
"type",
"-type",
"status",
"-status"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name",
"type",
"-type",
"status",
"-status"
]
}
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsts_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsts_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[status][conditions][$is]=ACTIVE`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Paginated list of tier structures.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures/{tierStructureId}": {
"parameters": [
{
"name": "tierStructureId",
"in": "path",
"required": true,
"description": "Identifies the tier structure. Format `lts_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getTierStructure",
"tags": [
"Tier Structures"
],
"summary": "Get tier structure",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a single tier structure by its ID.",
"responses": {
"200": {
"description": "The tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresGetResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"put": {
"operationId": "updateTierStructure",
"tags": [
"Tier Structures"
],
"summary": "Update tier structure",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates a tier structure. All properties are optional; provided\nvalues are merged with the existing tier structure. When `type` is provided as\n`POINT_EARNED`, `point_earned` is required and `point_balance` must be null; when\n`type` is `POINT_BALANCE`, `point_balance` is required and `point_earned` must be null.\nWhen the tier structure is not in `DRAFT` status, only `name` and `metadata` may be\nupdated; attempting to update other properties results in a validation error.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The updated tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresUpdateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"operationId": "deleteTierStructure",
"tags": [
"Tier Structures"
],
"summary": "Delete tier structure",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nDeletes a tier structure by deleting its tiers and setting `status` to `DELETED`, then returns the deleted tier structure. Returns `400` (`resource_in_use`) when a program, earning rule, or reward still references the tier structure.",
"responses": {
"200": {
"description": "The deleted tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresDeleteResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures/{tierStructureId}/activate": {
"parameters": [
{
"name": "tierStructureId",
"in": "path",
"required": true,
"description": "Identifies the tier structure. Format `lts_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "activateTierStructure",
"tags": [
"Tier Structures"
],
"summary": "Activate tier structure",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the tier structure to `ACTIVE` from `DRAFT` or `INACTIVE`. No request body. Any other status returns `400` (`invalid_state_transition`). Returns `403` (`tier_structure_assignments_limit_exceeded`) when a program already has another `DRAFT` or `ACTIVE` tier structure assigned.",
"responses": {
"200": {
"description": "The activated tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresActivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"403": {
"description": "A program already has another draft or active tier structure assigned.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures/{tierStructureId}/deactivate": {
"parameters": [
{
"name": "tierStructureId",
"in": "path",
"required": true,
"description": "Identifies the tier structure. Format `lts_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "deactivateTierStructure",
"tags": [
"Tier Structures"
],
"summary": "Deactivate tier structure",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the tier structure from `ACTIVE` to `INACTIVE`. No request body. Any other status returns `400` (`invalid_state_transition`). Returns `423` when an active reward (`connected_active_reward`) or an active card definition (`connected_active_card_definition`) still uses the tier structure.",
"responses": {
"200": {
"description": "The deactivated tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresDeactivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "An active reward or an active card definition still uses the tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures/{tierStructureId}/draft": {
"parameters": [
{
"name": "tierStructureId",
"in": "path",
"required": true,
"description": "Identifies the tier structure. Format `lts_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "draftTierStructure",
"tags": [
"Tier Structures"
],
"summary": "Move tier structure to draft",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the tier structure from `ACTIVE` to `DRAFT`. No request body. Any other status returns `400` (`invalid_state_transition`). Returns `423` when a non-draft program (`connected_non_draft_program`) or an active reward (`connected_active_reward`) still uses the tier structure.",
"responses": {
"200": {
"description": "The drafted tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresDraftResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "A non-draft program or an active reward still uses the tier structure.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures/{tierStructureId}/tiers": {
"parameters": [
{
"name": "tierStructureId",
"in": "path",
"required": true,
"description": "Identifies the tier structure. Format `lts_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "createTier",
"tags": [
"Tier Structures"
],
"summary": "Create tier",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nCreates a tier within the tier structure. If `downgrade` is omitted it defaults to\n`{ \"type\": \"INHERIT\" }`. A tier structure can hold at most 100 tiers.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresTiersCreateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The created tier.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresTiersCreateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"get": {
"operationId": "listTiers",
"tags": [
"Tier Structures"
],
"summary": "List tiers",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of tiers belonging to the tier structure. This\nendpoint does not support a `filters` parameter. The same field cannot be requested\nin both ascending and descending order at once. Default order is `-created_at`.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "string",
"enum": [
"created_at",
"-created_at",
"name",
"-name"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at",
"name",
"-name"
]
}
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrst_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrst_[a-f0-9]+$"
}
}
],
"responses": {
"200": {
"description": "Paginated list of tiers.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresTiersListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures/{tierStructureId}/tiers/{tierId}": {
"parameters": [
{
"name": "tierStructureId",
"in": "path",
"required": true,
"description": "Identifies the tier structure. Format `lts_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
},
{
"name": "tierId",
"in": "path",
"required": true,
"description": "Identifies the tier. Format `lt_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
}
}
],
"put": {
"operationId": "updateTier",
"tags": [
"Tier Structures"
],
"summary": "Update tier",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates a tier within the tier structure. All properties are optional. When the\nparent tier structure is not in `DRAFT` status, only `name` and `metadata` may be\nupdated.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresTiersUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The updated tier.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresTiersUpdateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"operationId": "deleteTier",
"tags": [
"Tier Structures"
],
"summary": "Delete tier",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nDeletes a tier by marking it deleted and returns the deleted tier. Returns `400` (`resource_in_use`) when an earning rule or a reward still references the tier.",
"responses": {
"200": {
"description": "The deleted tier.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresTiersDeleteResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/tier-structures/{tierStructureId}/activities": {
"parameters": [
{
"name": "tierStructureId",
"in": "path",
"required": true,
"description": "Identifies the tier structure. Format `lts_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listTierStructureActivities",
"tags": [
"Tier Structures"
],
"summary": "List tier structure activities",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of activities recorded for the tier structure\n(creation, updates, state transitions, assignments, and nested tier changes).\nThe same field cannot be requested in both ascending and descending order at once.\nDefault order is `-created_at`.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsats_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsats_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.tier_structure.created`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresActivitiesListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Paginated list of tier structure activities.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesTierStructuresActivitiesListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/benefits": {
"get": {
"operationId": "listBenefits",
"tags": [
"Benefits"
],
"summary": "List benefits",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of benefits. Supports filtering by `id`, `name`, `status`,\n`type`, and `created_at`, ordering by `created_at`, `name`, and `type` (prefix with `-` for\ndescending), and cursor-based pagination. Deleted benefits are excluded.\nMultiple filters are combined with the `junction` (`AND` by default).\nThe same field cannot be ordered both ascending and descending at the same time.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name",
"-type",
"type"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name",
"-type",
"type"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsben_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsben_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[name][conditions][$contains]=gold`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of benefits",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"post": {
"operationId": "createBenefit",
"tags": [
"Benefits"
],
"summary": "Create benefit",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nCreates a new benefit. Exactly one type-specific configuration object (`points`,\n`points_proportional`, `material`, or `digital`) is required, matching the `type`.\nWhen `status` is omitted the benefit is created in `DRAFT` status. When `stock` is\nomitted it defaults to `{ \"type\": \"UNLIMITED\" }`.\n\nReferenced resources are validated: the card definition (for points-based types) must\nexist and - when creating with `status: ACTIVE` - must be ACTIVE (423 `resource_locked`\notherwise); the product/SKU (for `MATERIAL`) and campaign (for `DIGITAL`) must exist,\nand the campaign type must match the digital benefit type (`DISCOUNT_COUPONS` or\n`GIFT_VOUCHERS`). The benefit name must be unique per project (409 `duplicate_found`).",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsCreateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The created benefit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsCreateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/benefits/{benefitId}": {
"parameters": [
{
"name": "benefitId",
"in": "path",
"required": true,
"description": "Identifies the benefit. Format `lben_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getBenefit",
"tags": [
"Benefits"
],
"summary": "Get benefit",
"description": "Returns a single benefit by its ID.",
"responses": {
"200": {
"description": "The benefit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsGetResponseBody"
},
"examples": {
"Sample benefit": {
"value": {
"id": "lben_128f4bba81947c8542",
"name": "Coffee sample Ethiopia",
"type": "MATERIAL",
"status": "ACTIVE",
"stock": {
"type": "LIMITED",
"limited": {
"quantity": 495
}
},
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_128f4baa45547c8530"
}
},
"created_at": "2026-06-11T10:34:24.645Z",
"updated_at": "2026-09-02T15:05:31.533Z",
"object": "benefit"
}
}
}
}
}
},
"404": {
"description": "The benefit doesn't exist. A deleted benefit is not found. Returned for any unknown benefit id, including a value that does not match `lben_[a-f0-9]+`. `key` is `not_found` and `resource_type` is `benefit`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Benefit not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find benefit with id lben_128f4bba81947c854",
"request_id": "v-132d84aa1315d651a9",
"resource_id": "lben_128f4bba81947c854",
"resource_type": "benefit"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"put": {
"operationId": "updateBenefit",
"tags": [
"Benefits"
],
"summary": "Update benefit",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates a benefit. When the benefit is in `DRAFT` status all properties can be updated.\nWhen the benefit is not in `DRAFT` status, only `name`, `stock`, `points`, `points_proportional`, and `digital` may be updated (400 `invalid_payload`\notherwise). Referenced resources (card definition, product/SKU, campaign) are validated\nthe same way as on create; a points-based benefit can only reference an ACTIVE card\ndefinition (423 `resource_locked` otherwise). The benefit name must remain unique per\nproject (409 `duplicate_found`).",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsUpdateRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "The updated benefit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsUpdateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"operationId": "deleteBenefit",
"tags": [
"Benefits"
],
"summary": "Delete benefit",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nSoft-deletes a benefit by setting `status` to `DELETED` and returns the deleted benefit. A benefit that is used by any\nearning rule cannot be deleted (400 `resource_in_use`, with `related_object_ids` and\n`related_object_type: earning_rule` in the error body).",
"responses": {
"200": {
"description": "The deleted benefit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsDeleteResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/benefits/{benefitId}/activate": {
"parameters": [
{
"name": "benefitId",
"in": "path",
"required": true,
"description": "Identifies the benefit. Format `lben_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "activateBenefit",
"tags": [
"Benefits"
],
"summary": "Activate benefit",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves a benefit from `DRAFT` to `ACTIVE` status. No request body. Only the\n`DRAFT` -> `ACTIVE` transition is allowed; activating from any other state returns\n400 `invalid_state_transition`. A points-based benefit cannot be activated when its\nconnected card definition does not exist (`non_existing_card_definition`) or is not ACTIVE (`non_active_card_definition`). A digital benefit cannot be activated when its campaign is in `DRAFT` (`non_active_campaign`). Those cases return 423 `resource_locked`.",
"responses": {
"200": {
"description": "The activated benefit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsActivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/benefits/{benefitId}/draft": {
"parameters": [
{
"name": "benefitId",
"in": "path",
"required": true,
"description": "Identifies the benefit. Format `lben_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "draftBenefit",
"tags": [
"Benefits"
],
"summary": "Move benefit to draft",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves a benefit from `ACTIVE` back to `DRAFT` status. No request body. Only the\n`ACTIVE` -> `DRAFT` transition is allowed; drafting from any other state returns\n400 `invalid_state_transition`. A benefit assigned to an active earning rule cannot\nbe moved to draft (423 `resource_locked`, key `connected_active_earning_rule`).",
"responses": {
"200": {
"description": "The drafted benefit",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsDraftResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/benefits/{benefitId}/activities": {
"parameters": [
{
"name": "benefitId",
"in": "path",
"required": true,
"description": "Identifies the benefit. Format `lben_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listBenefitActivities",
"tags": [
"Benefits"
],
"summary": "List benefit activities",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of activities recorded for the benefit (created, updated,\ndeleted, activated, drafted). Returns `404` when the benefit does not exist. Supports\nfiltering by activity `id`, `type`, and `created_at`, ordering by `created_at`\n(default `-created_at`), and cursor-based pagination.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsaben_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsaben_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.benefit.created`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsActivitiesListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of benefit activities",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesBenefitsActivitiesListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/rewards": {
"get": {
"operationId": "listRewards",
"tags": [
"Rewards"
],
"summary": "List rewards v2",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of rewards. Results can be filtered by id, name,\ntype and created_at, and ordered by created_at or name (ascending or descending).\nThe same field cannot be ordered both ascending and descending at the same time.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name"
]
}
},
{
"type": "string",
"enum": [
"-created_at",
"created_at",
"name",
"-name"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsrew_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsrew_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[name][conditions][$contains]=gift`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesRewardsListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of rewards.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"post": {
"operationId": "createReward",
"tags": [
"Rewards"
],
"summary": "Create a reward",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nCreates a new reward. `name`, `type` and `costs` are required. When `type` is\n`MATERIAL` the `material` object is required and `digital` must be null; when\n`type` is `DIGITAL` the `digital` object is required and `material` must be null.\nThe reward can be created directly in `DRAFT` (default) or `ACTIVE` status.\nWhen `validity_hours` is not provided it defaults to `{ \"type\": \"ANY_TIME\" }`.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsCreateRequestBody"
},
"examples": {
"Create reward with purchase limits": {
"value": {
"name": "Daily coffee voucher",
"type": "MATERIAL",
"status": "DRAFT",
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_0ba649b6893cf33a80"
}
},
"costs": [
{
"spending": [
{
"name": "Standard cost",
"points": 100,
"card_definition_id": "lcdef_128f495f720c4bec8c"
}
],
"tier_rules": {
"type": "NO_REQUIREMENTS"
}
}
],
"purchase_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 1,
"unit": "DAY"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"triggers": {
"max": 1
}
}
]
}
},
"metadata": {}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The created reward.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsCreateResponseBody"
},
"examples": {
"Created reward": {
"value": {
"id": "lrew_12cad1abefa2311e10",
"name": "Daily coffee voucher",
"type": "MATERIAL",
"status": "DRAFT",
"start_date": null,
"end_date": null,
"validity_hours": {
"type": "ANY_TIME"
},
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_0ba649b6893cf33a80"
}
},
"refunds": {
"type": "NONE"
},
"costs": [
{
"id": "lrcst_12cad1abefa2311e11",
"spending": [
{
"id": "lrspn_12cad1abefa2311e12",
"name": "Standard cost",
"points": 100,
"card_definition_id": "lcdef_128f495f720c4bec8c"
}
]
}
],
"purchase_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 1,
"unit": "DAY"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"triggers": {
"max": 1
}
}
]
}
},
"metadata": {},
"created_at": "2026-07-27T16:09:59.999Z",
"updated_at": null,
"object": "reward"
}
}
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/rewards/{rewardId}": {
"parameters": [
{
"name": "rewardId",
"in": "path",
"required": true,
"description": "Identifies the reward. Format `lrew_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "getReward",
"tags": [
"Rewards"
],
"summary": "Get reward by ID",
"description": "Returns a single reward by its ID.",
"parameters": [],
"responses": {
"200": {
"description": "The reward.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsGetResponseBody"
},
"examples": {
"Material reward": {
"value": {
"id": "lrew_12cad1abefa2311e10",
"name": "Daily coffee voucher",
"type": "MATERIAL",
"status": "DRAFT",
"start_date": null,
"end_date": null,
"validity_hours": {
"type": "ANY_TIME"
},
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_0ba649b6893cf33a80"
}
},
"refunds": {
"type": "NONE"
},
"costs": [
{
"id": "lrcst_12cad1abefa2311e11",
"spending": [
{
"id": "lrspn_12cad1abefa2311e12",
"name": "Standard cost",
"points": 100,
"card_definition_id": "lcdef_128f495f720c4bec8c"
}
],
"tier_rules": {
"type": "NO_REQUIREMENTS"
},
"name": "Cost one"
}
],
"purchase_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 1,
"unit": "DAY"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"triggers": {
"max": 1
}
}
]
}
},
"metadata": {},
"created_at": "2026-07-27T16:09:59.999Z",
"updated_at": null,
"object": "reward"
}
}
}
}
}
},
"404": {
"description": "The reward doesn't exist. A deleted reward is not found. Returned for any unknown reward ID, including a value that does not match `lrew_[a-f0-9]+`. `key` is `not_found` and `resource_type` is `reward`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Reward not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find reward with id lrew_18f58429f4c4bf7b2",
"request_id": "v-131f936f8b62233301",
"resource_id": "lrew_18f58429f4c4bf7b2",
"resource_type": "reward"
}
},
"Reward ID does not match the pattern": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find reward with id non-existent-id",
"request_id": "v-131f936f8b62233302",
"resource_id": "non-existent-id",
"resource_type": "reward"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"put": {
"operationId": "updateReward",
"tags": [
"Rewards"
],
"summary": "Update a reward",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nUpdates an existing reward. When `type` is provided as `MATERIAL` the `material`\nobject is required and `digital` must be null; when `type` is provided as `DIGITAL`\nthe `digital` object is required and `material` must be null.\n\nIn `DRAFT` status all properties can be updated. In `ACTIVE`/`INACTIVE` status only\nthe following properties can be updated: `name`, `metadata`, `refunds`,\n`validity_hours`, `start_date`, `end_date`, `costs`, `purchase_limits`.",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsUpdateRequestBody"
},
"examples": {
"Update purchase limits": {
"value": {
"purchase_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 1,
"unit": "DAY"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"triggers": {
"max": 1
}
}
]
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "The updated reward.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsUpdateResponseBody"
},
"examples": {
"Updated reward": {
"value": {
"id": "lrew_12cad1abefa2311e10",
"name": "Daily coffee voucher",
"type": "MATERIAL",
"status": "DRAFT",
"start_date": null,
"end_date": null,
"validity_hours": {
"type": "ANY_TIME"
},
"material": {
"type": "PRODUCT",
"product": {
"id": "prod_0ba649b6893cf33a80"
}
},
"refunds": {
"type": "NONE"
},
"costs": [
{
"id": "lrcst_12cad1abefa2311e11",
"spending": [
{
"id": "lrspn_12cad1abefa2311e12",
"name": "Standard cost",
"points": 100,
"card_definition_id": "lcdef_128f495f720c4bec8c"
}
]
}
],
"purchase_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 1,
"unit": "DAY"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"triggers": {
"max": 1
}
}
]
}
},
"metadata": {},
"created_at": "2026-07-27T16:09:59.999Z",
"updated_at": "2026-07-28T10:00:00.000Z",
"object": "reward"
}
}
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"409": {
"description": "Conflict - e.g. duplicate resource or invalid state transition.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
},
"delete": {
"operationId": "deleteReward",
"tags": [
"Rewards"
],
"summary": "Delete a reward",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nDeletes a reward (moves it to the DELETED status). Returns the deleted reward. Returns `400` (`resource_in_use`) when a program still references the reward.",
"responses": {
"200": {
"description": "The deleted reward.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsDeleteResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/rewards/{rewardId}/activate": {
"parameters": [
{
"name": "rewardId",
"in": "path",
"required": true,
"description": "Identifies the reward. Format `lrew_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "activateReward",
"tags": [
"Rewards"
],
"summary": "Activate reward",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the reward to the ACTIVE status. Allowed from DRAFT or INACTIVE status;\nother transitions return 400 `invalid_state_transition`. This endpoint takes no\nrequest body. Activation returns 423 `resource_locked` when a linked card definition is not ACTIVE (`non_active_card_definition`), a tier structure in the tier rules is not ACTIVE (`non_active_tier_structure`), or a digital reward campaign is in `DRAFT` (`non_active_campaign`).",
"responses": {
"200": {
"description": "The activated reward.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsActivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/rewards/{rewardId}/deactivate": {
"parameters": [
{
"name": "rewardId",
"in": "path",
"required": true,
"description": "Identifies the reward. Format `lrew_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "deactivateReward",
"tags": [
"Rewards"
],
"summary": "Deactivate reward",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the reward to the INACTIVE status. Allowed only from ACTIVE status;\nother transitions return 400 `invalid_state_transition`. This endpoint takes no\nrequest body.",
"responses": {
"200": {
"description": "The deactivated reward.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsDeactivateResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/rewards/{rewardId}/draft": {
"parameters": [
{
"name": "rewardId",
"in": "path",
"required": true,
"description": "Identifies the reward. Format `lrew_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
}
],
"post": {
"operationId": "draftReward",
"tags": [
"Rewards"
],
"summary": "Move reward back to draft",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nMoves the reward back to the DRAFT status. Allowed only from `ACTIVE` status;\nother transitions return 400 `invalid_state_transition`. A reward assigned to a program that is not in `DRAFT` cannot be drafted (423 `resource_locked`, key `connected_non_draft_program`). This endpoint takes no\nrequest body.",
"responses": {
"200": {
"description": "The drafted reward.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsDraftResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"423": {
"description": "Resource locked - a related resource is in a state that prevents this operation.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/rewards/{rewardId}/activities": {
"parameters": [
{
"name": "rewardId",
"in": "path",
"required": true,
"description": "Identifies the reward. Format `lrew_[a-f0-9]+`.",
"schema": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
}
],
"get": {
"operationId": "listRewardActivities",
"tags": [
"Rewards"
],
"summary": "List reward activities",
"description": "\n\n\nDocumentation in progress\n\nThis documentation is in progress. The parameters, fields, request and response bodies, and other data may be subject to change. If you need more information or you want to share feedback, contact [Voucherify support](https://www.voucherify.io/contact-support) or your Technical Account Manager.\n\n\n\nReturns a cursor-paginated list of activities recorded for the given reward\n(created, updated, deleted, assigned, unassigned, activated, deactivated, drafted).\nReturns `404` when the reward does not exist.",
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"description": "Limits the page size to an integer from 1 to 100. Defaults to 10. A numeric string is accepted and rounded to the nearest integer.",
"schema": {
"type": [
"number",
"string",
"null"
],
"minimum": 1,
"maximum": 100,
"default": 10
}
},
{
"name": "order",
"in": "query",
"required": false,
"description": "Orders the results. Accepts one value or an array. Prefix a field with `-` for descending order. Defaults to `-created_at`. The same field cannot be used in both directions. Rows with the same sort value are then ordered by `id` ascending.",
"schema": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"created_at",
"-created_at"
]
}
},
{
"type": "string",
"enum": [
"created_at",
"-created_at"
]
},
{
"type": "null"
}
]
}
},
{
"name": "cursor",
"in": "query",
"required": false,
"description": "Continues pagination. Pass the `cursor.next` value from a previous response. Format `lcrsarew_[a-f0-9]+`. The cursor matches the filters and order of that response.",
"schema": {
"type": [
"string",
"null"
],
"pattern": "^lcrsarew_[a-f0-9]+$"
}
},
{
"name": "filters",
"in": "query",
"required": false,
"style": "deepObject",
"explode": true,
"description": "Filters the results. Pass a deep object, for example `filters[type][conditions][$is]=vl.reward.created`. Fields combine through `junction`, which defaults to `AND`. Omit `filters` to apply no field filter.",
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesRewardsActivitiesListRequestQuery"
},
{
"type": "null"
}
]
}
}
],
"responses": {
"200": {
"description": "Cursor-paginated list of reward activities.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/V2LoyaltiesRewardsActivitiesListResponseBody"
}
}
}
},
"400": {
"description": "Validation error - request body or query parameters failed validation, or the operation is not allowed in the current resource state.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"404": {
"description": "Resource not found.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/examine/earning-rules": {
"post": {
"tags": [
"Examine"
],
"operationId": "examineEarningRules",
"summary": "Examine earning rules",
"description": "Estimates earning opportunities for a customer without triggering any actual earning for loyalty v2 earning rules. The `trigger` selects whether all trigger events or one specific event is examined. When a specific event is selected, exactly one matching context object is required: `customer_order_paid` for `customer.order.paid`, `customer_segment_entered` for `customer.segment.entered`, and `customer_custom_event` for `customer.custom_event`. The other context objects must not be present.\n\nThis endpoint can examine earning rules for all loyalty programs the customer belongs to by using `customer_identification` with `customer_id` or `customer_source_id`. To examine earning rules only for one program, use `member_id` in `customer_identification`, as `member_id` is loyalty program-specific. A customer who exists but has no active membership returns `200` with an empty `memberships` array.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBody"
},
"examples": {
"All triggers": {
"value": {
"trigger": {
"type": "ALL"
},
"customer_identification": {
"type": "member_id",
"member_id": "lmbr_128f962dbc8c4ba5dc"
},
"customer_order_paid": {
"customer": {
"metadata": {
"tier": "gold"
}
},
"member": {
"metadata": {
"channel": "mobile"
}
},
"order": {
"amount": 10000,
"metadata": {
"source": "pos"
}
}
},
"customer_segment_entered": {
"customer": {
"metadata": {
"is_premium": "true",
"loyalty_score": 10
}
}
},
"customer_custom_event": {
"type": "ALL",
"all": {
"customer": {
"metadata": {
"plan": "pro"
}
},
"custom_event": {
"metadata": {
"source": "mobile",
"score": 40
}
}
}
}
}
},
"Order paid": {
"value": {
"trigger": {
"type": "SPECIFIC",
"specific": {
"event": "customer.order.paid"
}
},
"customer_identification": {
"type": "member_id",
"member_id": "lmbr_128f962dbc8c4ba5dc"
},
"customer_order_paid": {
"customer": {
"metadata": {
"tier": "gold"
}
},
"member": {
"metadata": {
"channel": "mobile"
}
},
"order": {
"amount": 10000,
"initial_amount": 10000,
"items": [
{
"quantity": 1,
"price": 10000,
"product": {
"id": "prod_0ba86913fb8b47f7cb"
},
"metadata": {
"category": "electronics"
}
}
],
"metadata": {
"source": "pos"
}
}
}
}
},
"Customer entered segment": {
"value": {
"trigger": {
"type": "SPECIFIC",
"specific": {
"event": "customer.segment.entered"
}
},
"customer_identification": {
"type": "member_id",
"member_id": "lmbr_128f962dbc8c4ba5dc"
},
"customer_segment_entered": {
"customer": {
"metadata": {
"is_premium": "true",
"loyalty_score": 10
}
},
"member": {
"metadata": {
"channel": "mobile"
}
}
}
}
},
"Custom event": {
"value": {
"trigger": {
"type": "SPECIFIC",
"specific": {
"event": "customer.custom_event"
}
},
"customer_identification": {
"type": "member_id",
"member_id": "lmbr_128f962dbc8c4ba5dc"
},
"customer_custom_event": {
"type": "SPECIFIC",
"specific": {
"customer": {
"metadata": {
"plan": "pro"
}
},
"member": {
"metadata": {
"channel": "mobile"
}
},
"custom_event": {
"schema_id": "ms_68d7e3b1c2a04f19bd",
"metadata": {
"source": "mobile",
"score": 40
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "Earning rules examination result. An empty `memberships` array means no active membership has earning rules for the examined trigger.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBody"
},
"examples": {
"All triggers without additional data": {
"value": {
"event": null,
"customer": {
"id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"source_id": "lx-rdmptr",
"metadata": {
"VIP": true
},
"object": "customer"
},
"earning_rules": [
{
"id": "lern_128f577bd4d47c8e12",
"name": "EnterVipSegment",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f5822398c4bf78f",
"name": "AutumnPaid",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f5834b30c4bf7a3",
"name": "SummerPaid",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f57ec40cc4bf762",
"name": "Autumn Ethiopia",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_12cd26a685db3e63d8",
"name": "Birthday in more than 90 days",
"metadata": {},
"object": "earning_rule"
}
],
"memberships": [
{
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"metadata": {},
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"metadata": {},
"object": "program"
},
"cards": [
{
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": "AnnualTime-7M7ShPGfme",
"object": "card"
},
"points_estimation": 150,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f577bd4d47c8e12",
"object": "earning_rule"
},
"points_estimation": 150,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
},
{
"card": {
"id": "lcrd_128f962dbd8c4ba5e0",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"code": "AutumnTime-R02hVARx33",
"object": "card"
},
"points_estimation": 10,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f5822398c4bf78f",
"object": "earning_rule"
},
"points_estimation": 10,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
},
{
"card": {
"id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": "SummerTime-7z8dWawICd",
"object": "card"
},
"points_estimation": 10,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f5834b30c4bf7a3",
"object": "earning_rule"
},
"points_estimation": 10,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
}
],
"benefits": [
{
"benefit": {
"id": "lben_128f4bba81947c8542",
"name": "Coffee sample Ethiopia",
"type": "MATERIAL",
"object": "benefit"
},
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f57ec40cc4bf762",
"object": "earning_rule"
},
"object": "earning_rule_estimation"
},
{
"earning_rule": {
"id": "lern_12cd26a685db3e63d8",
"object": "earning_rule"
},
"object": "earning_rule_estimation"
}
],
"object": "benefit_estimation"
}
],
"object": "member_earnings_opportunity"
}
],
"object": "earnings_examine_result"
}
},
"All triggers with additional data": {
"value": {
"event": null,
"customer": {
"id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"source_id": "lx-rdmptr",
"metadata": {
"VIP": true
},
"object": "customer"
},
"earning_rules": [
{
"id": "lern_128f48ee44cc4bec34",
"name": "EarningRule-OrderPaid",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f577bd4d47c8e12",
"name": "EnterVipSegment",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f5822398c4bf78f",
"name": "AutumnPaid",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f5834b30c4bf7a3",
"name": "SummerPaid",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f57ec40cc4bf762",
"name": "Autumn Ethiopia",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_12cd26a685db3e63d8",
"name": "Birthday in more than 90 days",
"metadata": {},
"object": "earning_rule"
}
],
"memberships": [
{
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"metadata": {},
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"metadata": {},
"object": "program"
},
"cards": [
{
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": "AnnualTime-7M7ShPGfme",
"object": "card"
},
"points_estimation": 171150,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f48ee44cc4bec34",
"object": "earning_rule"
},
"points_estimation": 171000,
"object": "earning_rule_estimation"
},
{
"earning_rule": {
"id": "lern_128f577bd4d47c8e12",
"object": "earning_rule"
},
"points_estimation": 150,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
},
{
"card": {
"id": "lcrd_128f962dbd8c4ba5e0",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"code": "AutumnTime-R02hVARx33",
"object": "card"
},
"points_estimation": 10,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f5822398c4bf78f",
"object": "earning_rule"
},
"points_estimation": 10,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
},
{
"card": {
"id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": "SummerTime-7z8dWawICd",
"object": "card"
},
"points_estimation": 10,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f5834b30c4bf7a3",
"object": "earning_rule"
},
"points_estimation": 10,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
}
],
"benefits": [
{
"benefit": {
"id": "lben_128f4bba81947c8542",
"name": "Coffee sample Ethiopia",
"type": "MATERIAL",
"object": "benefit"
},
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f57ec40cc4bf762",
"object": "earning_rule"
},
"object": "earning_rule_estimation"
},
{
"earning_rule": {
"id": "lern_12cd26a685db3e63d8",
"object": "earning_rule"
},
"object": "earning_rule_estimation"
}
],
"object": "benefit_estimation"
}
],
"object": "member_earnings_opportunity"
}
],
"object": "earnings_examine_result"
}
},
"Order paid trigger": {
"value": {
"event": "customer.order.paid",
"customer": {
"id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"source_id": "lx-rdmptr",
"metadata": {
"VIP": true
},
"object": "customer"
},
"earning_rules": [
{
"id": "lern_128f48ee44cc4bec34",
"name": "EarningRule-OrderPaid",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f5822398c4bf78f",
"name": "AutumnPaid",
"metadata": {},
"object": "earning_rule"
},
{
"id": "lern_128f5834b30c4bf7a3",
"name": "SummerPaid",
"metadata": {},
"object": "earning_rule"
}
],
"memberships": [
{
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"metadata": {},
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"metadata": {},
"object": "program"
},
"cards": [
{
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": "AnnualTime-7M7ShPGfme",
"object": "card"
},
"points_estimation": 171000,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f48ee44cc4bec34",
"object": "earning_rule"
},
"points_estimation": 171000,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
},
{
"card": {
"id": "lcrd_128f962dbd8c4ba5e0",
"card_definition_id": "lcdef_128f49963c0c4becb7",
"card_type": "INDIVIDUAL",
"code": "AutumnTime-R02hVARx33",
"object": "card"
},
"points_estimation": 10,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f5822398c4bf78f",
"object": "earning_rule"
},
"points_estimation": 10,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
},
{
"card": {
"id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": "SummerTime-7z8dWawICd",
"object": "card"
},
"points_estimation": 10,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f5834b30c4bf7a3",
"object": "earning_rule"
},
"points_estimation": 10,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
}
],
"benefits": [],
"object": "member_earnings_opportunity"
}
],
"object": "earnings_examine_result"
}
},
"Customer entered segment": {
"value": {
"event": "customer.segment.entered",
"customer": {
"id": "cust_gFpoezLGF4YHnPPyUCHuuMv4",
"source_id": "d-brnd",
"metadata": {
"ghost": false,
"VIP": true
},
"object": "customer"
},
"earning_rules": [
{
"id": "lern_128f577bd4d47c8e12",
"name": "EnterVipSegment",
"metadata": {},
"object": "earning_rule"
}
],
"memberships": [
{
"member": {
"id": "lmbr_128f95ee624c4ba553",
"customer_id": "cust_gFpoezLGF4YHnPPyUCHuuMv4",
"program_id": "lprg_128f58429f4c4bf7b2",
"metadata": {},
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"metadata": {},
"object": "program"
},
"cards": [
{
"card": {
"id": "lcrd_128f95ee63cc4ba558",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": "AnnualTime-QANzXdzjLs",
"object": "card"
},
"points_estimation": 150,
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f577bd4d47c8e12",
"object": "earning_rule"
},
"points_estimation": 150,
"object": "earning_rule_estimation"
}
],
"object": "card_estimation"
}
],
"benefits": [],
"object": "member_earnings_opportunity"
}
],
"object": "earnings_examine_result"
}
},
"Custom event": {
"value": {
"event": "customer.custom_event",
"customer": {
"id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"source_id": "lx-rdmptr",
"metadata": {
"VIP": true
},
"object": "customer"
},
"earning_rules": [
{
"id": "lern_128f57ec40cc4bf762",
"name": "Autumn Ethiopia",
"metadata": {},
"object": "earning_rule"
}
],
"memberships": [
{
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"metadata": {},
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"metadata": {},
"object": "program"
},
"cards": [],
"benefits": [
{
"benefit": {
"id": "lben_128f4bba81947c8542",
"name": "Coffee sample Ethiopia",
"type": "MATERIAL",
"object": "benefit"
},
"earning_rules": [
{
"earning_rule": {
"id": "lern_128f57ec40cc4bf762",
"object": "earning_rule"
},
"object": "earning_rule_estimation"
}
],
"object": "benefit_estimation"
}
],
"object": "member_earnings_opportunity"
}
],
"object": "earnings_examine_result"
}
}
}
}
}
},
"400": {
"description": "Validation error - request body failed validation. Temporary customer, member, or order metadata that does not match its metadata schema returns key `metadata_validation_failed` and message `Metadata validation failed`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid payload": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .trigger.type must be equal to one of the allowed values [ ALL, SPECIFIC ]",
"request_id": "v-12cd3b16ae1a39a820"
}
}
}
}
}
},
"404": {
"description": "The `member_id` does not exist, or the `customer_id` or `customer_source_id` does not exist. An unknown `member_id` is checked first and returns `resource_type` `member` with details `Cannot find member with id {memberId}`. An unknown customer returns `resource_type` `customer` with details `Cannot find customer with id {id}`, where `{id}` is the `customer_id` or `customer_source_id` you sent. When a member exists but its customer record does not, that same customer error uses the `member_id` as `{id}`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f962db8c4ba5dc",
"request_id": "v-12cd3ae8271a39a7c6",
"resource_id": "lmbr_128f962db8c4ba5dc",
"resource_type": "member"
}
},
"Customer not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find customer with id cust_nonexistent",
"request_id": "v-12cd3ae8271a39a7c7",
"resource_id": "cust_nonexistent",
"resource_type": "customer"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
},
"/v2/loyalties/examine/rewards": {
"post": {
"tags": [
"Examine"
],
"operationId": "examineRewards",
"summary": "Examine rewards",
"description": "Evaluates rewards assigned to a customer's active Loyalty v2 program memberships. Applies temporary customer and member metadata overrides without updating stored data. Returns reward availability by card, including points costs and applicable unavailability reasons. Omits a reward when it is inactive, out of stock, has no matching cost, or the member has no card for that cost.\n\nThis endpoint can examine rewards for all loyalty programs the customer belongs to by using `customer_identification` with `customer_id` or `customer_source_id`. To examine rewards only for one program, use `member_id` in `customer_identification`, as `member_id` is loyalty program-specific. A customer who exists but has no active membership returns `200` with an empty `memberships` array.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineRequestBody"
}
}
}
},
"responses": {
"200": {
"description": "Rewards examination result. An empty `memberships` array means the customer has no active membership. An empty `cards` array means no assigned reward resolved onto a card.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBody"
},
"examples": {
"Examine reward": {
"value": {
"customer": {
"id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"source_id": "lx-rdmptr",
"metadata": {
"VIP": true
},
"object": "customer"
},
"rewards": [
{
"id": "lrew_128f4cab04147c8608",
"name": "Free item coupon",
"type": "DIGITAL",
"metadata": {},
"object": "reward",
"purchase_limits": {
"cooldown": {
"type": "FIXED_COOLDOWN",
"fixed_cooldown": {
"period": {
"value": 1,
"unit": "DAY"
}
}
},
"frequency": {
"type": "LIMITED",
"limits": [
{
"type": "TIME_BASED",
"period": {
"type": "CURRENT_PERIOD",
"current_period": {
"unit": "DAY"
}
},
"triggers": {
"max": 1
}
}
]
}
}
},
{
"id": "lrew_128f4c6710947c85d1",
"name": "Minas Gerais 500",
"type": "MATERIAL",
"metadata": {},
"object": "reward",
"purchase_limits": {
"cooldown": {
"type": "NO_COOLDOWN"
},
"frequency": {
"type": "NO_LIMIT",
"limits": []
}
}
},
{
"id": "lrew_1294cebb458e4904a0",
"name": "Carioca shirt",
"type": "MATERIAL",
"metadata": {},
"object": "reward",
"purchase_limits": {
"cooldown": {
"type": "NO_COOLDOWN"
},
"frequency": {
"type": "NO_LIMIT",
"limits": []
}
}
},
{
"id": "lrew_12b22d6ef31184e002",
"name": "Carioca shorts",
"type": "MATERIAL",
"metadata": {},
"object": "reward",
"purchase_limits": {
"cooldown": {
"type": "NO_COOLDOWN"
},
"frequency": {
"type": "NO_LIMIT",
"limits": []
}
}
},
{
"id": "lrew_12bb65405edf8d3dec",
"name": "Carioca longsleeve",
"type": "MATERIAL",
"metadata": {},
"object": "reward",
"purchase_limits": {
"cooldown": {
"type": "NO_COOLDOWN"
},
"frequency": {
"type": "NO_LIMIT",
"limits": []
}
}
}
],
"memberships": [
{
"member": {
"id": "lmbr_128f962dbc8c4ba5dc",
"customer_id": "cust_6onRrs4kCnvSVrTs5YtDPFBG",
"program_id": "lprg_128f58429f4c4bf7b2",
"metadata": {},
"object": "member"
},
"program": {
"id": "lprg_128f58429f4c4bf7b2",
"name": "AnnualProgram",
"metadata": {},
"object": "program"
},
"cards": [
{
"card": {
"id": "lcrd_128f962dbd8c4ba5e1",
"card_definition_id": "lcdef_128f4a88414c4bed69",
"card_type": "INDIVIDUAL",
"code": "AnnualTime-7M7ShPGfme",
"object": "card"
},
"rewards": [
{
"reward": {
"id": "lrew_128f4cab04147c8608",
"object": "reward"
},
"status": "AVAILABLE",
"cost": {
"points": 300,
"object": "reward_cost"
},
"object": "reward_estimation"
},
{
"reward": {
"id": "lrew_128f4c6710947c85d1",
"object": "reward"
},
"status": "AVAILABLE",
"cost": {
"points": 150,
"object": "reward_cost"
},
"object": "reward_estimation"
},
{
"reward": {
"id": "lrew_1294cebb458e4904a0",
"object": "reward"
},
"status": "AVAILABLE",
"cost": {
"points": 500,
"object": "reward_cost"
},
"object": "reward_estimation"
}
],
"object": "card_estimation"
},
{
"card": {
"id": "lcrd_128f962dbd8c4ba5df",
"card_definition_id": "lcdef_128f495f720c4bec8c",
"card_type": "INDIVIDUAL",
"code": "SummerTime-7z8dWawICd",
"object": "card"
},
"rewards": [
{
"reward": {
"id": "lrew_12b22d6ef31184e002",
"object": "reward"
},
"status": "UNAVAILABLE",
"cost": {
"points": 321,
"object": "reward_cost"
},
"unavailability_reasons": [
{
"reason": "insufficient_balance",
"details": {
"required": 321,
"available": 10,
"missing": 311
},
"object": "reward_unavailability_reason"
}
],
"object": "reward_estimation"
}
],
"object": "card_estimation"
}
],
"object": "member_rewards_opportunity"
}
],
"object": "rewards_examine_result"
}
}
}
}
}
},
"400": {
"description": "The request body failed validation. Sending `member` when `customer_identification.type` is not `member_id` returns key `invalid_payload`, message `Invalid payload`, and details `Property 'member' is only allowed when customer_identification.type is 'member_id'`. Customer or member metadata that does not match its metadata schema returns key `metadata_validation_failed` and message `Metadata validation failed`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Member override not allowed": {
"value": {
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property 'member' is only allowed when customer_identification.type is 'member_id'",
"request_id": "v-12c2e64d5d4a67cddd"
}
}
}
}
}
},
"404": {
"description": "The `member_id` does not exist, or the `customer_id` or `customer_source_id` does not exist. An unknown `member_id` is checked first and returns `resource_type` `member` with details `Cannot find member with id {memberId}`. An unknown customer returns `resource_type` `customer` with details `Cannot find customer with id {id}`, where `{id}` is the `customer_id` or `customer_source_id` you sent. When a member exists but its customer record does not, that same customer error uses the `member_id` as `{id}`.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Customer not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find customer with id cust_6onRrs4kCnvSVrTs5YtDPFB",
"request_id": "v-12c2e64d5d4a67cddc",
"resource_id": "cust_6onRrs4kCnvSVrTs5YtDPFB",
"resource_type": "customer"
}
},
"Member not found": {
"value": {
"code": 404,
"key": "not_found",
"message": "Resource not found",
"details": "Cannot find member with id lmbr_128f962db8c4ba5dc",
"request_id": "v-12c2e64d5d4a67cdde",
"resource_id": "lmbr_128f962db8c4ba5dc",
"resource_type": "member"
}
}
}
}
}
},
"500": {
"description": "Internal server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Internal server error": {
"value": {
"code": 500,
"key": "api_error",
"message": "Something went wrong. Don't worry, your campaigns are still safe and the Voucherify Team has been notified. Check out our Help Center and forums for help, or head back to home."
}
}
}
}
}
}
},
"security": [
{
"X-App-Id": [],
"X-App-Token": []
},
{
"bearerAuth": []
}
]
}
}
},
"components": {
"schemas": {
"V2LoyaltiesProgramsCreateRequestBody": {
"title": "V2 Loyalties Programs Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramCreateRequest"
}
]
},
"V2LoyaltiesProgramsCreateResponseBody": {
"title": "V2 Loyalties Programs Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramCreateResponse"
}
]
},
"ErrorResponse": {
"type": "object",
"description": "Standard error response returned by all Loyalty v2 endpoints.",
"properties": {
"code": {
"type": "integer",
"description": "HTTP status code of the error."
},
"key": {
"type": "string",
"description": "Machine-readable error key."
},
"message": {
"type": "string",
"description": "Human-readable error message."
},
"details": {
"type": "string",
"description": "Additional details about the error."
},
"request_id": {
"type": "string",
"description": "Unique identifier of the request that produced the error."
},
"resource_id": {
"type": "string",
"description": "Unique identifier of the resource that produced the error."
},
"resource_type": {
"type": "string",
"description": "Type of the resource that produced the error."
}
}
},
"LoyaltiesProgramsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by program ID. Format `lprg_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsListRequestQueryId"
},
{
"type": "null"
}
]
},
"name": {
"description": "Filters by program name.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsListRequestQueryName"
},
{
"type": "null"
}
]
},
"status": {
"description": "Filters by program status. Allowed values: `ACTIVE`, `INACTIVE`, `DRAFT`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsListRequestQueryStatus"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by program creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramDateFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Programs List Request Query"
},
"V2LoyaltiesProgramsListResponseBody": {
"title": "V2 Loyalties Programs List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramListResponse"
}
]
},
"V2LoyaltiesProgramsGetResponseBody": {
"title": "V2 Loyalties Programs Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Program"
}
]
},
"V2LoyaltiesProgramsUpdateRequestBody": {
"title": "V2 Loyalties Programs Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/programs/{programId}`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramUpdateRequest"
}
]
},
"V2LoyaltiesProgramsUpdateResponseBody": {
"title": "V2 Loyalties Programs Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/programs/{programId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Program"
}
]
},
"V2LoyaltiesProgramsDeleteResponseBody": {
"title": "V2 Loyalties Programs Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/programs/{programId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Program"
}
]
},
"V2LoyaltiesProgramsActivateResponseBody": {
"title": "V2 Loyalties Programs Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/activate`.",
"allOf": [
{
"$ref": "#/components/schemas/Program"
}
]
},
"V2LoyaltiesProgramsDeactivateResponseBody": {
"title": "V2 Loyalties Programs Deactivate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/deactivate`.",
"allOf": [
{
"$ref": "#/components/schemas/Program"
}
]
},
"LoyaltiesProgramsActivitiesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/activities`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by activity ID. Format `laprg_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsActivitiesListRequestQueryId"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filters by activity type. Allowed values: `vl.program.created`, `vl.program.updated`, `vl.program.deleted`, `vl.program.activated`, `vl.program.deactivated`, `vl.program.card_definition.assigned`, `vl.program.card_definition.unassigned`, `vl.program.earning_rule.assigned`, `vl.program.earning_rule.unassigned`, `vl.program.reward.assigned`, `vl.program.reward.unassigned`, `vl.program.reward.updated`, `vl.program.tier_structure.assigned`, `vl.program.tier_structure.unassigned`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsActivitiesListRequestQueryType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by activity creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramDateFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Programs Activities List Request Query"
},
"V2LoyaltiesProgramsActivitiesListResponseBody": {
"title": "V2 Loyalties Programs Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramActivityListResponse"
}
]
},
"V2LoyaltiesProgramsCardDefinitionsListResponseBody": {
"title": "V2 Loyalties Programs Card Definitions List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/card-definitions`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramCardDefinitionAssignmentListResponse"
}
]
},
"V2LoyaltiesProgramsCardDefinitionsBatchRequestBody": {
"title": "V2 Loyalties Programs Card Definitions Batch Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/card-definitions/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramCardDefinitionBatchRequest"
}
]
},
"V2LoyaltiesProgramsCardDefinitionsBatchResponseBody": {
"title": "V2 Loyalties Programs Card Definitions Batch Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/card-definitions/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramCardDefinitionBatchResponse"
}
]
},
"V2LoyaltiesProgramsEarningRulesListResponseBody": {
"title": "V2 Loyalties Programs Earning Rules List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/earning-rules`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramEarningRuleAssignmentListResponse"
}
]
},
"V2LoyaltiesProgramsEarningRulesBatchRequestBody": {
"title": "V2 Loyalties Programs Earning Rules Batch Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/earning-rules/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramEarningRuleBatchRequest"
}
]
},
"V2LoyaltiesProgramsEarningRulesBatchResponseBody": {
"title": "V2 Loyalties Programs Earning Rules Batch Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/earning-rules/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramEarningRuleBatchResponse"
}
]
},
"V2LoyaltiesProgramsTierStructuresListResponseBody": {
"title": "V2 Loyalties Programs Tier Structures List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/tier-structures`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramTierStructureAssignmentListResponse"
}
]
},
"V2LoyaltiesProgramsTierStructuresBatchRequestBody": {
"title": "V2 Loyalties Programs Tier Structures Batch Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/tier-structures/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramTierStructureBatchRequest"
}
]
},
"V2LoyaltiesProgramsTierStructuresBatchResponseBody": {
"title": "V2 Loyalties Programs Tier Structures Batch Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/tier-structures/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramTierStructureBatchResponse"
}
]
},
"V2LoyaltiesProgramsRewardsListResponseBody": {
"title": "V2 Loyalties Programs Rewards List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/rewards`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramRewardAssignmentListResponse"
}
]
},
"V2LoyaltiesProgramsRewardsBatchRequestBody": {
"title": "V2 Loyalties Programs Rewards Batch Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/rewards/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramRewardBatchRequest"
}
]
},
"V2LoyaltiesProgramsRewardsBatchResponseBody": {
"title": "V2 Loyalties Programs Rewards Batch Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/rewards/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramRewardBatchResponse"
}
]
},
"V2LoyaltiesProgramsRewardsUpdateRequestBody": {
"title": "V2 Loyalties Programs Rewards Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/programs/{programId}/rewards/{rewardId}`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramRewardAssignmentUpdateRequest"
}
]
},
"V2LoyaltiesProgramsRewardsUpdateResponseBody": {
"title": "V2 Loyalties Programs Rewards Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/programs/{programId}/rewards/{rewardId}`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramRewardAssignment"
}
]
},
"V2LoyaltiesProgramsMembersCreateRequestBody": {
"type": "object",
"title": "V2 Loyalties Programs Members Create Request Body",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members`.\n\nNo additional properties are allowed.",
"allOf": [
{
"$ref": "#/components/schemas/MemberCreate"
}
]
},
"V2LoyaltiesProgramsMembersCreateResponseBody": {
"title": "V2 Loyalties Programs Members Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberWithCards"
}
]
},
"V2LoyaltiesProgramsMembersListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by member ID. Format `lmbr_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersListRequestQueryId"
},
{
"type": "null"
}
]
},
"status": {
"description": "Filters by member status. Allowed values: `ACTIVE`, `INACTIVE`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersListRequestQueryStatus"
},
{
"type": "null"
}
]
},
"customer_id": {
"description": "Filters by customer ID. Format `cust_[a-zA-Z0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersListRequestQueryCustomerId"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/DateFilter"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members List Request Query"
},
"V2LoyaltiesProgramsMembersListResponseBody": {
"title": "V2 Loyalties Programs Members List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members`.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramMemberListResponse"
}
]
},
"V2LoyaltiesProgramsMembersCreateInBulkRequestBody": {
"title": "V2 Loyalties Programs Members Create In Bulk Request Body",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberCreateInBulk"
}
]
},
"V2LoyaltiesProgramsMembersCreateInBulkResponseBody": {
"title": "V2 Loyalties Programs Members Create In Bulk Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/batch`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberCreateInBulkResult"
}
]
},
"VLBadRequest": {
"type": "object",
"description": "Framework-level error returned when the raw request payload is rejected before reaching domain validation (for example, when it exceeds a configured size limit).",
"properties": {
"statusCode": {
"type": "integer",
"description": "HTTP status code of the error."
},
"error": {
"type": "string",
"description": "Short, human-readable description of the HTTP status."
},
"message": {
"type": "string",
"description": "Human-readable message with more details about the error."
}
}
},
"V2LoyaltiesProgramsMembersGetResponseBody": {
"title": "V2 Loyalties Programs Members Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberWithCards"
}
]
},
"V2LoyaltiesProgramsMembersUpdateRequestBody": {
"title": "V2 Loyalties Programs Members Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/programs/{programId}/members/{memberId}`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberUpdate"
}
]
},
"V2LoyaltiesProgramsMembersUpdateResponseBody": {
"title": "V2 Loyalties Programs Members Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/programs/{programId}/members/{memberId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Member"
}
]
},
"V2LoyaltiesProgramsMembersDeleteResponseBody": {
"title": "V2 Loyalties Programs Members Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/programs/{programId}/members/{memberId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Member"
}
]
},
"V2LoyaltiesMembershipsGetResponseBody": {
"title": "V2 Loyalties Memberships Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/memberships/{customerId}`.",
"allOf": [
{
"$ref": "#/components/schemas/MembershipsResult"
}
]
},
"V2LoyaltiesProgramsMembershipsGetResponseBody": {
"title": "V2 Loyalties Programs Memberships Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/memberships/{customerId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Membership"
}
]
},
"V2LoyaltiesProgramsMembersActivateResponseBody": {
"title": "V2 Loyalties Programs Members Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/activate`. On success, `status` is always `ACTIVE`.",
"allOf": [
{
"$ref": "#/components/schemas/Member"
}
]
},
"V2LoyaltiesProgramsMembersDeactivateResponseBody": {
"title": "V2 Loyalties Programs Members Deactivate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/deactivate`. On success, `status` is always `INACTIVE`.",
"allOf": [
{
"$ref": "#/components/schemas/Member"
}
]
},
"V2LoyaltiesProgramsMembersActivitiesListRequestQueryFilters": {
"type": "object",
"description": "Field-specific filters for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/activities`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by activity ID. Format `lambr_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersId"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filters by activity type. Allowed values: `vl.member.created`, `vl.member.updated`, `vl.member.deleted`, `vl.member.activated`, `vl.member.deactivated`, `vl.member.card.assigned`, `vl.member.card.unassigned`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by activity creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/DateFilter"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members Activities List Request Query Filters"
},
"V2LoyaltiesProgramsMembersActivitiesListResponseBody": {
"title": "V2 Loyalties Programs Members Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberActivityListResponse"
}
]
},
"V2LoyaltiesProgramsMembersCardsPointsAdjustRequestBody": {
"title": "V2 Loyalties Programs Members Cards Points Adjust Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/points`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPointsAdjust"
}
]
},
"V2LoyaltiesProgramsMembersCardsPointsAdjustResponseBody": {
"title": "V2 Loyalties Programs Members Cards Points Adjust Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/points`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPointsAdjustResult"
}
]
},
"V2LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFilters": {
"type": "object",
"description": "Field-specific filters for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/activities`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by activity ID. Format `lacrd_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersId"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filters by activity type. Allowed values: `vl.card.created`, `vl.card.assigned`, `vl.card.unassigned`, `vl.card.code_generation.succeeded`, `vl.card.code_generation.failed`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by activity creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/DateFilter"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members Cards Activities List Request Query Filters"
},
"V2LoyaltiesProgramsMembersCardsActivitiesListResponseBody": {
"title": "V2 Loyalties Programs Members Cards Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/CardActivityListResponse"
}
]
},
"V2LoyaltiesProgramsMembersCardsPendingPointsListRequestQuery": {
"title": "V2 Loyalties Programs Members Cards Pending Points List Request Query",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPointsListQuery"
}
],
"unevaluatedProperties": false
},
"V2LoyaltiesProgramsMembersCardsPendingPointsListResponseBody": {
"title": "V2 Loyalties Programs Members Cards Pending Points List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPendingPointsListResponse"
}
]
},
"V2LoyaltiesProgramsMembersCardsPendingPointsActivateResponseBody": {
"title": "V2 Loyalties Programs Members Cards Pending Points Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points/{bucketId}/activate`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPendingPointsActivateResult"
}
]
},
"V2LoyaltiesProgramsMembersCardsPendingPointsCancelResponseBody": {
"title": "V2 Loyalties Programs Members Cards Pending Points Cancel Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/pending-points/{bucketId}/cancel`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPendingPointsCancelResult"
}
]
},
"V2LoyaltiesProgramsMembersCardsExpiringPointsListRequestQuery": {
"title": "V2 Loyalties Programs Members Cards Expiring Points List Request Query",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPointsListQuery"
},
{
"type": "object",
"properties": {
"expiration_date": {
"description": "Filters by expiration date (date conditions).",
"oneOf": [
{
"$ref": "#/components/schemas/DateFilter"
},
{
"type": "null"
}
]
}
}
}
],
"unevaluatedProperties": false
},
"V2LoyaltiesProgramsMembersCardsExpiringPointsListResponseBody": {
"title": "V2 Loyalties Programs Members Cards Expiring Points List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points`.",
"allOf": [
{
"$ref": "#/components/schemas/CardExpiringPointsListResponse"
}
]
},
"V2LoyaltiesProgramsMembersCardsExpiringPointsExpireResponseBody": {
"title": "V2 Loyalties Programs Members Cards Expiring Points Expire Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points/{bucketId}/expire`.",
"allOf": [
{
"$ref": "#/components/schemas/CardPointsExpireResult"
}
]
},
"V2LoyaltiesProgramsMembersCardsTransactionsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/transactions`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by transaction ID. Format `lctx_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersCardsTransactionsListRequestQueryId"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by transaction creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/DateFilter"
},
{
"type": "null"
}
]
},
"card_definition_id": {
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionIdFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members Cards Transactions List Request Query"
},
"V2LoyaltiesProgramsMembersCardsTransactionsListResponseBody": {
"title": "V2 Loyalties Programs Members Cards Transactions List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/transactions`.",
"allOf": [
{
"$ref": "#/components/schemas/CardTransactionListResponse"
}
]
},
"V2LoyaltiesProgramsRewardsPurchasesRefundRequestBody": {
"title": "V2 Loyalties Programs Rewards Purchases Refund Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/rewards/purchases/{rewardTransactionId}/refund`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardPurchaseRefundRequest"
}
]
},
"V2LoyaltiesProgramsRewardsPurchasesRefundResponseBody": {
"title": "V2 Loyalties Programs Rewards Purchases Refund Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/rewards/purchases/{rewardTransactionId}/refund`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardPurchaseRefundResult"
}
]
},
"V2LoyaltiesProgramsMembersRewardsPurchasesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by reward transaction ID. Format `lrtx_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryId"
},
{
"type": "null"
}
]
},
"reward_id": {
"description": "Filters by reward ID. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryRewardId"
},
{
"type": "null"
}
]
},
"card_definition_id": {
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryCardDefinitionId"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/TransactionFilterDateConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members Rewards Purchases List Request Query"
},
"V2LoyaltiesProgramsMembersRewardsPurchasesListResponseBody": {
"title": "V2 Loyalties Programs Members Rewards Purchases List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberRewardPurchaseListResponse"
}
]
},
"V2LoyaltiesProgramsMembersRewardsPurchasesCreateRequestBody": {
"title": "V2 Loyalties Programs Members Rewards Purchases Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberRewardPurchaseRequest"
}
]
},
"V2LoyaltiesProgramsMembersRewardsPurchasesCreateDryRunResponseBody": {
"title": "V2 Loyalties Programs Members Rewards Purchases Create Dry Run Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberRewardPurchaseDryRunResult"
}
]
},
"V2LoyaltiesProgramsMembersRewardsPurchasesCreateTransactionResponseBody": {
"title": "V2 Loyalties Programs Members Rewards Purchases Create Transaction Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/rewards/purchases`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberRewardPurchaseTransactionResult"
}
]
},
"V2LoyaltiesProgramsMembersOrdersPaymentsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by order transaction ID. Format `lotx_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersOrdersPaymentsListRequestQueryId"
},
{
"type": "null"
}
]
},
"card_definition_id": {
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryCardDefinitionId"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/TransactionFilterDateConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members Orders Payments List Request Query"
},
"V2LoyaltiesProgramsMembersOrdersPaymentsListResponseBody": {
"title": "V2 Loyalties Programs Members Orders Payments List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberOrderPaymentListResponse"
}
]
},
"V2LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBody": {
"title": "V2 Loyalties Programs Members Orders Payments Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberOrderPaymentRequest"
}
]
},
"V2LoyaltiesProgramsMembersOrdersPaymentsCreateDryRunResponseBody": {
"title": "V2 Loyalties Programs Members Orders Payments Create Dry Run Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberOrderPaymentDryRunResult"
}
]
},
"V2LoyaltiesProgramsMembersOrdersPaymentsCreateTransactionResponseBody": {
"title": "V2 Loyalties Programs Members Orders Payments Create Transaction Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberOrderPaymentTransactionResult"
}
]
},
"V2LoyaltiesProgramsMembersBenefitsTransactionsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/benefits/transactions`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"benefit_id": {
"description": "Filters by benefit ID. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersBenefitsTransactionsListRequestQueryBenefitId"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/TransactionFilterDateConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members Benefits Transactions List Request Query"
},
"V2LoyaltiesProgramsMembersBenefitsTransactionsListResponseBody": {
"title": "V2 Loyalties Programs Members Benefits Transactions List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/benefits/transactions`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberBenefitTransactionListResponse"
}
]
},
"V2LoyaltiesProgramsMembersTiersTransactionsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/tiers/transactions`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"card_id": {
"description": "Filters by loyalty card ID. Format `lcrd_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardId"
},
{
"type": "null"
}
]
},
"card_definition_id": {
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardDefinitionId"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/TransactionFilterDateConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "V2 Loyalties Programs Members Tiers Transactions List Request Query"
},
"V2LoyaltiesProgramsMembersTiersTransactionsListResponseBody": {
"title": "V2 Loyalties Programs Members Tiers Transactions List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/tiers/transactions`.",
"allOf": [
{
"$ref": "#/components/schemas/MemberTierTransactionListResponse"
}
]
},
"LoyaltiesProgramsMembersCardsReportsDailyListResponseBody": {
"type": "object",
"title": "Loyalties Programs Members Cards Reports Daily List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/reports/daily`.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per aggregation period with recorded activity, ordered by `date` ascending. Empty when no activity was recorded in the range.",
"items": {
"$ref": "#/components/schemas/CardDailyReportEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"V2LoyaltiesProgramsMembersEarningRulesReportsDailyListResponseBody": {
"title": "V2 Loyalties Programs Members Earning Rules Reports Daily List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/members/{memberId}/earning-rules/{earningRuleId}/reports/daily`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleDailyReportResponse"
}
]
},
"SpendingReportListFilters": {
"type": "object",
"description": "Filters for spending reports.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"card_definition_id": {
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/ReportCardDefinitionIdFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"LoyaltiesProgramsReportsSpendingDailyListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Spending Daily List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/spending/daily`.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per card definition and aggregation period with recorded spending, ordered by `date` ascending. Empty when no spending was recorded in the range.",
"items": {
"$ref": "#/components/schemas/SpendingReportDailyEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"LoyaltiesProgramsReportsSpendingSummaryListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Spending Summary List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/spending/summary`.",
"properties": {
"data": {
"type": "array",
"description": "Lists summary rows, one per card definition that has recorded spending. Contains at most 10 rows (max number of card definitions per program), ordered by `id` descending.",
"items": {
"$ref": "#/components/schemas/SpendingReportSummaryEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"TiersReportListFilters": {
"type": "object",
"description": "Filters for program tiers reports.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"tier_structure_id": {
"description": "Filters by tier structure ID. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/TiersReportFilterTierStructureIdConditions"
},
{
"type": "null"
}
]
},
"tier_id": {
"description": "Filters by tier ID. Format `lt_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/TiersReportFilterTierIdConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"V2LoyaltiesProgramsReportsTiersDailyListResponseBody": {
"title": "V2 Loyalties Programs Reports Tiers Daily List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/tiers/daily`.",
"allOf": [
{
"$ref": "#/components/schemas/TiersReportDailyResponse"
}
]
},
"V2LoyaltiesProgramsReportsTiersSummaryListResponseBody": {
"title": "V2 Loyalties Programs Reports Tiers Summary List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/tiers/summary`.",
"allOf": [
{
"$ref": "#/components/schemas/TiersReportSummaryResponse"
}
]
},
"RewardsReportListFilters": {
"description": "Filters for program rewards reports.",
"allOf": [
{
"$ref": "#/components/schemas/RewardsReportFiltersBase"
}
],
"unevaluatedProperties": false
},
"LoyaltiesProgramsReportsRewardsDailyListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Rewards Daily List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/rewards/daily`.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per reward and aggregation period with recorded purchases, ordered by `date` ascending. Empty when no purchases were recorded in the range.",
"items": {
"$ref": "#/components/schemas/RewardsReportDailyEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"LoyaltiesProgramsReportsRewardsSummaryListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Rewards Summary List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/rewards/summary`.",
"properties": {
"data": {
"type": "array",
"description": "List of summary rows, one per reward with a recorded purchase attempt, ordered by `id` descending. Contains at most 100 rows. Empty when no purchase attempts were recorded.",
"items": {
"$ref": "#/components/schemas/RewardsReportSummaryEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"RewardsSpendingsReportListFilters": {
"description": "Filters for program rewards spendings reports.",
"allOf": [
{
"$ref": "#/components/schemas/RewardsReportFiltersBase"
},
{
"type": "object",
"properties": {
"card_definition_id": {
"description": "Filters by card definition ID.",
"oneOf": [
{
"$ref": "#/components/schemas/ReportCardDefinitionIdFilterConditions"
},
{
"type": "null"
}
]
},
"cost_id": {
"description": "Filters by reward cost ID.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardsSpendingsReportFilterCostIdConditions"
},
{
"type": "null"
}
]
},
"spending_id": {
"description": "Filters by reward spending ID.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardsSpendingsReportFilterSpendingIdConditions"
},
{
"type": "null"
}
]
}
}
}
],
"unevaluatedProperties": false
},
"LoyaltiesProgramsReportsRewardsSpendingsDailyListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Rewards Spendings Daily List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/rewards/spendings/daily`.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per reward, cost, spending, card definition, and aggregation period with an approved point spend, ordered by `date` ascending. Empty when no approved point spend was recorded in the range.",
"items": {
"$ref": "#/components/schemas/RewardsSpendingsReportDailyEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"LoyaltiesProgramsReportsRewardsSpendingsSummaryListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Rewards Spendings Summary List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/rewards/spendings/summary`.",
"properties": {
"data": {
"type": "array",
"description": "List of summary rows, one per reward, cost, spending, and card definition with an approved point spend, ordered by `id` descending. Contains at most 100 rows. Empty when no approved point spend was recorded.",
"items": {
"$ref": "#/components/schemas/RewardsSpendingsReportSummaryEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"LoyaltiesProgramsReportsMembersDailyListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Members Daily List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/members/daily`.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per aggregation period with recorded activity, ordered by `date` ascending. Empty when no activity was recorded in the range.",
"items": {
"$ref": "#/components/schemas/MembersReportDailyEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"LoyaltiesProgramsReportsMembersSummaryListResponseBody": {
"type": "object",
"title": "Loyalties Programs Reports Members Summary List Response Body",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/members/summary`.",
"properties": {
"data": {
"type": "array",
"description": "List of summary rows for the program. Contains one row when activity was recorded, ordered by `id` descending. Empty when no activity was recorded.",
"items": {
"$ref": "#/components/schemas/MembersReportSummaryEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"PointsEarningsReportListFilters": {
"type": "object",
"description": "Filters for program points-earnings reports.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"earning_rule_id": {
"description": "Filters by earning rule ID. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleIdFilterConditions"
},
{
"type": "null"
}
]
},
"card_definition_id": {
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/ReportCardDefinitionIdFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"V2LoyaltiesProgramsReportsPointsEarningsDailyListResponseBody": {
"title": "V2 Loyalties Programs Reports Points Earnings Daily List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/points-earnings/daily`.",
"allOf": [
{
"$ref": "#/components/schemas/PointsEarningsReportDailyResponse"
}
]
},
"V2LoyaltiesProgramsReportsPointsEarningsSummaryListResponseBody": {
"title": "V2 Loyalties Programs Reports Points Earnings Summary List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/points-earnings/summary`.",
"allOf": [
{
"$ref": "#/components/schemas/PointsEarningsReportSummaryResponse"
}
]
},
"EarningRulesReportListFilters": {
"type": "object",
"description": "Filters for program earning-rules reports.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"earning_rule_id": {
"description": "Filters by earning rule ID. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleIdFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"V2LoyaltiesProgramsReportsEarningRulesDailyListResponseBody": {
"title": "V2 Loyalties Programs Reports Earning Rules Daily List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/earning-rules/daily`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRulesReportDailyResponse"
}
]
},
"V2LoyaltiesProgramsReportsEarningRulesSummaryListResponseBody": {
"title": "V2 Loyalties Programs Reports Earning Rules Summary List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/programs/{programId}/reports/earning-rules/summary`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRulesReportSummaryResponse"
}
]
},
"LoyaltiesCardDefinitionsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/card-definitions`.",
"properties": {
"junction": {
"type": [
"string",
"null"
],
"enum": [
"AND",
"OR",
null
],
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`."
},
"id": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsListRequestQueryId"
},
{
"type": "null"
}
],
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`."
},
"name": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsListRequestQueryName"
},
{
"type": "null"
}
],
"description": "Filters by card definition name."
},
"type": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsListRequestQueryType"
},
{
"type": "null"
}
],
"description": "Filters by card definition type. Allowed values: `INDIVIDUAL`."
},
"status": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsListRequestQueryStatus"
},
{
"type": "null"
}
],
"description": "Filters by card definition status. Allowed values: `ACTIVE`, `DRAFT`. Deleted card definitions are not listable."
},
"created_at": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionDateFilter"
},
{
"type": "null"
}
],
"description": "Filters by creation date."
},
"updated_at": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionDateFilter"
},
{
"type": "null"
}
],
"description": "Filters by last update date."
}
},
"additionalProperties": false,
"title": "Loyalties Card Definitions List Request Query"
},
"V2LoyaltiesCardDefinitionsListResponseBody": {
"title": "V2 Loyalties Card Definitions List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/card-definitions`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionListResponse"
}
]
},
"V2LoyaltiesCardDefinitionsCreateRequestBody": {
"title": "V2 Loyalties Card Definitions Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/card-definitions`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionCreateRequest"
}
]
},
"V2LoyaltiesCardDefinitionsCreateResponseBody": {
"title": "V2 Loyalties Card Definitions Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/card-definitions`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinition"
}
]
},
"V2LoyaltiesCardDefinitionsGetResponseBody": {
"title": "V2 Loyalties Card Definitions Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/card-definitions/{cardDefinitionId}`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinition"
}
]
},
"V2LoyaltiesCardDefinitionsUpdateRequestBody": {
"title": "V2 Loyalties Card Definitions Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/card-definitions/{cardDefinitionId}`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionUpdateRequest"
}
]
},
"V2LoyaltiesCardDefinitionsUpdateResponseBody": {
"title": "V2 Loyalties Card Definitions Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/card-definitions/{cardDefinitionId}`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinition"
}
]
},
"V2LoyaltiesCardDefinitionsDeleteResponseBody": {
"title": "V2 Loyalties Card Definitions Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/card-definitions/{cardDefinitionId}`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinition"
}
]
},
"V2LoyaltiesCardDefinitionsActivateResponseBody": {
"title": "V2 Loyalties Card Definitions Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/card-definitions/{cardDefinitionId}/activate`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinition"
}
]
},
"V2LoyaltiesCardDefinitionsDraftResponseBody": {
"title": "V2 Loyalties Card Definitions Draft Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/card-definitions/{cardDefinitionId}/draft`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinition"
}
]
},
"LoyaltiesCardDefinitionsActivitiesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/card-definitions/{cardDefinitionId}/activities`.",
"properties": {
"junction": {
"type": [
"string",
"null"
],
"enum": [
"AND",
"OR",
null
],
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`."
},
"id": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsActivitiesListRequestQueryId"
},
{
"type": "null"
}
],
"description": "Filters by activity ID. Format `lacd_[a-f0-9]+`."
},
"type": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesCardDefinitionsActivitiesListRequestQueryType"
},
{
"type": "null"
}
],
"description": "Filters by activity type. Allowed values: `vl.card_definition.created`, `vl.card_definition.updated`, `vl.card_definition.deleted`, `vl.card_definition.activated`, `vl.card_definition.deactivated`, `vl.card_definition.drafted`, `vl.card_definition.assigned`, `vl.card_definition.unassigned`."
},
"created_at": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionDateFilter"
},
{
"type": "null"
}
],
"description": "Filters by activity creation date."
}
},
"additionalProperties": false,
"title": "Loyalties Card Definitions Activities List Request Query"
},
"V2LoyaltiesCardDefinitionsActivitiesListResponseBody": {
"title": "V2 Loyalties Card Definitions Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/card-definitions/{cardDefinitionId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionActivityListResponse"
}
]
},
"V2LoyaltiesEarningRulesCreateRequestBody": {
"title": "V2 Loyalties Earning Rules Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/earning-rules`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleCreateRequest"
}
]
},
"V2LoyaltiesEarningRulesCreateResponseBody": {
"title": "V2 Loyalties Earning Rules Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/earning-rules`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleResponse"
}
]
},
"LoyaltiesEarningRulesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/earning-rules`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "ID filter. Allowed conditions: `$is`, `$is_not` (single value), `$in`, `$not_in` (up to 100 values). Values must match `^lern_[a-f0-9]+$`. Can be `null`.",
"oneOf": [
{
"type": "object",
"required": [
"conditions"
],
"additionalProperties": false,
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
}
}
]
}
}
}
}
},
{
"type": "null"
}
]
},
"name": {
"description": "Name filter (string type). Allowed conditions: `$is`, `$is_not`, `$contains`, `$not_contain`, `$starts_with`, `$ends_with` (single value), `$in`, `$not_in` (up to 10 values), `$has_value`, `$is_unknown`. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesEarningRulesListRequestQueryName"
},
{
"type": "null"
}
]
},
"status": {
"description": "Status filter (enum type). Allowed conditions: `$is`, `$is_not` (single value), `$in`, `$not_in` (up to 10 values). Allowed values: `ACTIVE`, `INACTIVE`, `DRAFT`. Can be `null`.",
"oneOf": [
{
"type": "object",
"required": [
"conditions"
],
"additionalProperties": false,
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
}
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
}
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
}
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
}
}
]
}
}
}
}
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleDateFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Earning Rules List Request Query"
},
"V2LoyaltiesEarningRulesListResponseBody": {
"title": "V2 Loyalties Earning Rules List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/earning-rules`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleListResponse"
}
]
},
"V2LoyaltiesEarningRulesGetResponseBody": {
"title": "V2 Loyalties Earning Rules Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/earning-rules/{earningRuleId}`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleResponse"
}
]
},
"V2LoyaltiesEarningRulesUpdateRequestBody": {
"title": "V2 Loyalties Earning Rules Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/earning-rules/{earningRuleId}`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleUpdateRequest"
}
]
},
"V2LoyaltiesEarningRulesUpdateResponseBody": {
"title": "V2 Loyalties Earning Rules Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/earning-rules/{earningRuleId}`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleResponse"
}
]
},
"V2LoyaltiesEarningRulesDeleteResponseBody": {
"title": "V2 Loyalties Earning Rules Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/earning-rules/{earningRuleId}`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleResponse"
}
]
},
"V2LoyaltiesEarningRulesActivateResponseBody": {
"title": "V2 Loyalties Earning Rules Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/earning-rules/{earningRuleId}/activate`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleResponse"
}
]
},
"V2LoyaltiesEarningRulesDeactivateResponseBody": {
"title": "V2 Loyalties Earning Rules Deactivate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/earning-rules/{earningRuleId}/deactivate`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleResponse"
}
]
},
"V2LoyaltiesEarningRulesDraftResponseBody": {
"title": "V2 Loyalties Earning Rules Draft Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/earning-rules/{earningRuleId}/draft`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleResponse"
}
]
},
"LoyaltiesEarningRulesActivitiesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/earning-rules/{earningRuleId}/activities`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Activity ID filter. Allowed conditions: `$is`, `$is_not` (single value), `$in`, `$not_in` (up to 100 values). Values must match `^laer_[a-f0-9]+$`. Can be `null`.",
"oneOf": [
{
"type": "object",
"required": [
"conditions"
],
"additionalProperties": false,
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `laer_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
}
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `laer_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
}
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `laer_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
}
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `laer_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^laer_[a-f0-9]+$"
}
}
]
}
}
}
}
},
{
"type": "null"
}
]
},
"type": {
"description": "Activity type filter (enum type). Allowed conditions: `$is`, `$is_not` (single value), `$in`, `$not_in` (up to 10 values). Can be `null`.",
"oneOf": [
{
"type": "object",
"required": [
"conditions"
],
"additionalProperties": false,
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/EarningRuleActivityType"
}
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/EarningRuleActivityType"
}
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"$ref": "#/components/schemas/EarningRuleActivityType"
}
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"$ref": "#/components/schemas/EarningRuleActivityType"
}
}
]
}
}
}
}
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleDateFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Earning Rules Activities List Request Query"
},
"V2LoyaltiesEarningRulesActivitiesListResponseBody": {
"title": "V2 Loyalties Earning Rules Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/earning-rules/{earningRuleId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleActivitiesListResponse"
}
]
},
"V2LoyaltiesTierStructuresCreateRequestBody": {
"title": "V2 Loyalties Tier Structures Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/tier-structures`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructureCreateRequest"
}
]
},
"V2LoyaltiesTierStructuresCreateResponseBody": {
"title": "V2 Loyalties Tier Structures Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/tier-structures`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructure"
}
]
},
"LoyaltiesTierStructuresListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/tier-structures`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by tier structure id. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresListRequestQueryId"
},
{
"type": "null"
}
]
},
"name": {
"description": "Filters by tier structure name.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresListRequestQueryName"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filters by tier structure type. Allowed values: `POINT_BALANCE`, `POINT_EARNED`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresListRequestQueryType"
},
{
"type": "null"
}
]
},
"status": {
"description": "Filters by tier structure status. Allowed values: `DRAFT`, `ACTIVE`, `INACTIVE`, `DELETED`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresListRequestQueryStatus"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureFilterDateField"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Tier Structures List Request Query"
},
"V2LoyaltiesTierStructuresListResponseBody": {
"title": "V2 Loyalties Tier Structures List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/tier-structures`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructureListResponse"
}
]
},
"V2LoyaltiesTierStructuresGetResponseBody": {
"title": "V2 Loyalties Tier Structures Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/tier-structures/{tierStructureId}`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructure"
}
]
},
"V2LoyaltiesTierStructuresUpdateRequestBody": {
"title": "V2 Loyalties Tier Structures Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/tier-structures/{tierStructureId}`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructureUpdateRequest"
}
]
},
"V2LoyaltiesTierStructuresUpdateResponseBody": {
"title": "V2 Loyalties Tier Structures Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/tier-structures/{tierStructureId}`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructure"
}
]
},
"V2LoyaltiesTierStructuresDeleteResponseBody": {
"title": "V2 Loyalties Tier Structures Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/tier-structures/{tierStructureId}`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructure"
}
]
},
"V2LoyaltiesTierStructuresActivateResponseBody": {
"title": "V2 Loyalties Tier Structures Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/tier-structures/{tierStructureId}/activate`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructure"
}
]
},
"V2LoyaltiesTierStructuresDeactivateResponseBody": {
"title": "V2 Loyalties Tier Structures Deactivate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/tier-structures/{tierStructureId}/deactivate`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructure"
}
]
},
"V2LoyaltiesTierStructuresDraftResponseBody": {
"title": "V2 Loyalties Tier Structures Draft Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/tier-structures/{tierStructureId}/draft`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructure"
}
]
},
"V2LoyaltiesTierStructuresTiersCreateRequestBody": {
"title": "V2 Loyalties Tier Structures Tiers Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/tier-structures/{tierStructureId}/tiers`.",
"allOf": [
{
"$ref": "#/components/schemas/TierCreateRequest"
}
]
},
"V2LoyaltiesTierStructuresTiersCreateResponseBody": {
"title": "V2 Loyalties Tier Structures Tiers Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/tier-structures/{tierStructureId}/tiers`.",
"allOf": [
{
"$ref": "#/components/schemas/Tier"
}
]
},
"V2LoyaltiesTierStructuresTiersListResponseBody": {
"title": "V2 Loyalties Tier Structures Tiers List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/tier-structures/{tierStructureId}/tiers`.",
"allOf": [
{
"$ref": "#/components/schemas/TierListResponse"
}
]
},
"V2LoyaltiesTierStructuresTiersUpdateRequestBody": {
"title": "V2 Loyalties Tier Structures Tiers Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/tier-structures/{tierStructureId}/tiers/{tierId}`.",
"allOf": [
{
"$ref": "#/components/schemas/TierUpdateRequest"
}
]
},
"V2LoyaltiesTierStructuresTiersUpdateResponseBody": {
"title": "V2 Loyalties Tier Structures Tiers Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/tier-structures/{tierStructureId}/tiers/{tierId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Tier"
}
]
},
"V2LoyaltiesTierStructuresTiersDeleteResponseBody": {
"title": "V2 Loyalties Tier Structures Tiers Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/tier-structures/{tierStructureId}/tiers/{tierId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Tier"
}
]
},
"LoyaltiesTierStructuresActivitiesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/tier-structures/{tierStructureId}/activities`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by activity id. Format `lats_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresActivitiesListRequestQueryId"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filters by activity type. Allowed values: `vl.tier_structure.created`, `vl.tier_structure.updated`, `vl.tier_structure.deleted`, `vl.tier_structure.activated`, `vl.tier_structure.deactivated`, `vl.tier_structure.drafted`, `vl.tier_structure.assigned`, `vl.tier_structure.unassigned`, `vl.tier_structure.tier.created`, `vl.tier_structure.tier.updated`, `vl.tier_structure.tier.deleted`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesTierStructuresActivitiesListRequestQueryType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by activity creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureFilterDateField"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Tier Structures Activities List Request Query"
},
"V2LoyaltiesTierStructuresActivitiesListResponseBody": {
"title": "V2 Loyalties Tier Structures Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/tier-structures/{tierStructureId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructureActivityListResponse"
}
]
},
"LoyaltiesBenefitsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/benefits`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filter by benefit ID.\nAllowed conditions: `$is`, `$is_not`, `$in`, `$not_in`. Values must match `^lben_[a-f0-9]+$`.\n`$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in`\naccept up to 100 values.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsListRequestQueryId"
},
{
"type": "null"
}
]
},
"name": {
"description": "Filter by benefit name.\nAllowed conditions: `$is`, `$is_not`, `$contains`, `$not_contain`, `$starts_with`,\n`$ends_with`, `$in`, `$not_in`, `$has_value`, `$is_unknown`. `$in`/`$not_in` accept\nup to 10 values; the other value conditions accept a single value (string or\n1-element array); `$has_value`/`$is_unknown` are presence checks.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsListRequestQueryName"
},
{
"type": "null"
}
]
},
"status": {
"description": "Filter by benefit status.\nAllowed conditions: `$is`, `$is_not`, `$in`, `$not_in`. Allowed values: `ACTIVE`, `DRAFT`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsListRequestQueryStatus"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filter by benefit type.\nAllowed conditions: `$is`, `$is_not`, `$in`, `$not_in`. Allowed values: `POINTS`,\n`POINTS_PROPORTIONAL`, `MATERIAL`, `DIGITAL`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsListRequestQueryType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filter by creation date.\nAllowed conditions: `$before`, `$after` (ISO 8601 date-time strings), `$is`,\n`$more_than`, `$less_than` (non-negative integers, number of days), `$has_value`,\n`$is_unknown` (presence checks).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitDateFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Benefits List Request Query"
},
"V2LoyaltiesBenefitsListResponseBody": {
"title": "V2 Loyalties Benefits List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/benefits`.",
"allOf": [
{
"$ref": "#/components/schemas/BenefitListResponse"
}
]
},
"V2LoyaltiesBenefitsCreateRequestBody": {
"title": "V2 Loyalties Benefits Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/benefits`.",
"allOf": [
{
"$ref": "#/components/schemas/BenefitCreateRequest"
}
]
},
"V2LoyaltiesBenefitsCreateResponseBody": {
"title": "V2 Loyalties Benefits Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/benefits`.",
"allOf": [
{
"$ref": "#/components/schemas/Benefit"
}
]
},
"V2LoyaltiesBenefitsGetResponseBody": {
"title": "V2 Loyalties Benefits Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/benefits/{benefitId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Benefit"
}
]
},
"V2LoyaltiesBenefitsUpdateRequestBody": {
"title": "V2 Loyalties Benefits Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/benefits/{benefitId}`.",
"allOf": [
{
"$ref": "#/components/schemas/BenefitUpdateRequest"
}
]
},
"V2LoyaltiesBenefitsUpdateResponseBody": {
"title": "V2 Loyalties Benefits Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/benefits/{benefitId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Benefit"
}
]
},
"V2LoyaltiesBenefitsDeleteResponseBody": {
"title": "V2 Loyalties Benefits Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/benefits/{benefitId}`.",
"allOf": [
{
"$ref": "#/components/schemas/Benefit"
}
]
},
"V2LoyaltiesBenefitsActivateResponseBody": {
"title": "V2 Loyalties Benefits Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/benefits/{benefitId}/activate`.",
"allOf": [
{
"$ref": "#/components/schemas/Benefit"
}
]
},
"V2LoyaltiesBenefitsDraftResponseBody": {
"title": "V2 Loyalties Benefits Draft Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/benefits/{benefitId}/draft`.",
"allOf": [
{
"$ref": "#/components/schemas/Benefit"
}
]
},
"LoyaltiesBenefitsActivitiesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/benefits/{benefitId}/activities`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filter by activity ID.\nAllowed conditions: `$is`, `$is_not`, `$in`, `$not_in`. Values must match `^laben_[a-f0-9]+$`.\n`$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in`\naccept up to 100 values.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsActivitiesListRequestQueryId"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filter by activity type.\nAllowed conditions: `$is`, `$is_not`, `$in`, `$not_in`. Allowed values:\n`vl.benefit.created`, `vl.benefit.updated`, `vl.benefit.deleted`,\n`vl.benefit.activated`, `vl.benefit.drafted`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesBenefitsActivitiesListRequestQueryType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filter by activity creation date.\nAllowed conditions: `$before`, `$after` (ISO 8601 date-time strings), `$is`,\n`$more_than`, `$less_than` (non-negative integers, number of days), `$has_value`,\n`$is_unknown` (presence checks).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitDateFilterConditions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Benefits Activities List Request Query"
},
"V2LoyaltiesBenefitsActivitiesListResponseBody": {
"title": "V2 Loyalties Benefits Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/benefits/{benefitId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/BenefitActivityListResponse"
}
]
},
"LoyaltiesRewardsListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/rewards`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by reward ID. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesRewardsListRequestQueryId"
},
{
"type": "null"
}
]
},
"name": {
"description": "Filters by reward name.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesRewardsListRequestQueryName"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filters by reward type. Allowed values: `MATERIAL`, `DIGITAL`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesRewardsListRequestQueryType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardDateFilter"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Rewards List Request Query"
},
"V2LoyaltiesRewardsListResponseBody": {
"title": "V2 Loyalties Rewards List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/rewards`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardListResponse"
}
]
},
"V2LoyaltiesRewardsCreateRequestBody": {
"title": "V2 Loyalties Rewards Create Request Body",
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/rewards`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardCreateRequest"
}
]
},
"V2LoyaltiesRewardsCreateResponseBody": {
"title": "V2 Loyalties Rewards Create Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/rewards`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardResponse"
}
]
},
"V2LoyaltiesRewardsGetResponseBody": {
"title": "V2 Loyalties Rewards Get Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/rewards/{rewardId}`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardResponse"
}
]
},
"V2LoyaltiesRewardsUpdateRequestBody": {
"title": "V2 Loyalties Rewards Update Request Body",
"type": "object",
"description": "Request body schema for **PUT** `/v2/loyalties/rewards/{rewardId}`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardUpdateRequest"
}
]
},
"V2LoyaltiesRewardsUpdateResponseBody": {
"title": "V2 Loyalties Rewards Update Response Body",
"type": "object",
"description": "Response body schema for **PUT** `/v2/loyalties/rewards/{rewardId}`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardResponse"
}
]
},
"V2LoyaltiesRewardsDeleteResponseBody": {
"title": "V2 Loyalties Rewards Delete Response Body",
"type": "object",
"description": "Response body schema for **DELETE** `/v2/loyalties/rewards/{rewardId}`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardResponse"
}
]
},
"V2LoyaltiesRewardsActivateResponseBody": {
"title": "V2 Loyalties Rewards Activate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/rewards/{rewardId}/activate`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardResponse"
}
]
},
"V2LoyaltiesRewardsDeactivateResponseBody": {
"title": "V2 Loyalties Rewards Deactivate Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/rewards/{rewardId}/deactivate`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardResponse"
}
]
},
"V2LoyaltiesRewardsDraftResponseBody": {
"title": "V2 Loyalties Rewards Draft Response Body",
"type": "object",
"description": "Response body schema for **POST** `/v2/loyalties/rewards/{rewardId}/draft`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardResponse"
}
]
},
"LoyaltiesRewardsActivitiesListRequestQuery": {
"type": "object",
"description": "Request query schema for **GET** `/v2/loyalties/rewards/{rewardId}/activities`.",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"id": {
"description": "Filters by activity ID. Format `larew_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesRewardsActivitiesListRequestQueryId"
},
{
"type": "null"
}
]
},
"type": {
"description": "Filters by activity type.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesRewardsActivitiesListRequestQueryType"
},
{
"type": "null"
}
]
},
"created_at": {
"description": "Filters by activity creation date.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardDateFilter"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Rewards Activities List Request Query"
},
"V2LoyaltiesRewardsActivitiesListResponseBody": {
"title": "V2 Loyalties Rewards Activities List Response Body",
"type": "object",
"description": "Response body schema for **GET** `/v2/loyalties/rewards/{rewardId}/activities`.",
"allOf": [
{
"$ref": "#/components/schemas/RewardActivityListResponse"
}
]
},
"LoyaltiesExamineEarningRulesExamineRequestBody": {
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/examine/earning-rules`.\n\nWhen `trigger.type` is `SPECIFIC`, the context object matching the specific event is required and the other context objects must not be present: `customer.order.paid` > `customer_order_paid`, `customer.segment.entered` > `customer_segment_entered`, `customer.custom_event` > `customer_custom_event`.",
"properties": {
"trigger": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyTrigger"
},
"customer_identification": {
"$ref": "#/components/schemas/ExamineCustomerIdentification"
},
"customer_order_paid": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerOrderPaid"
},
"customer_segment_entered": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerSegmentEntered"
},
"customer_custom_event": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEvent"
}
},
"required": [
"trigger",
"customer_identification"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"trigger"
],
"properties": {
"trigger": {
"properties": {
"type": {
"const": "SPECIFIC"
},
"specific": {
"properties": {
"event": {
"const": "customer.order.paid"
}
}
}
}
}
}
},
"then": {
"required": [
"customer_order_paid"
],
"not": {
"anyOf": [
{
"required": [
"customer_segment_entered"
]
},
{
"required": [
"customer_custom_event"
]
}
]
}
}
},
{
"if": {
"required": [
"trigger"
],
"properties": {
"trigger": {
"properties": {
"type": {
"const": "SPECIFIC"
},
"specific": {
"properties": {
"event": {
"const": "customer.segment.entered"
}
}
}
}
}
}
},
"then": {
"required": [
"customer_segment_entered"
],
"not": {
"anyOf": [
{
"required": [
"customer_order_paid"
]
},
{
"required": [
"customer_custom_event"
]
}
]
}
}
},
{
"if": {
"required": [
"trigger"
],
"properties": {
"trigger": {
"properties": {
"type": {
"const": "SPECIFIC"
},
"specific": {
"properties": {
"event": {
"const": "customer.custom_event"
}
}
}
}
}
}
},
"then": {
"required": [
"customer_custom_event"
],
"not": {
"anyOf": [
{
"required": [
"customer_order_paid"
]
},
{
"required": [
"customer_segment_entered"
]
}
]
}
}
}
],
"title": "Loyalties Examine Earning Rules Examine Request Body"
},
"LoyaltiesExamineEarningRulesExamineResponseBody": {
"type": "object",
"properties": {
"event": {
"type": [
"string",
"null"
],
"description": "Examined trigger event (e.g. `customer.order.paid`, `customer.segment.entered`, `customer.custom_event`). `null` when `trigger.type` is `ALL`."
},
"customer": {
"$ref": "#/components/schemas/ExamineCustomerReference"
},
"earning_rules": {
"type": "array",
"description": "Lists earning rules that produced a points or benefit estimation, deduplicated across memberships.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyEarningRuleDetail"
}
},
"memberships": {
"type": "array",
"description": "Lists one entry for each active membership whose program has earning rules for the examined trigger. Includes a card only when its estimated points are greater than 0, and a benefit only when an earning rule can grant it. Both arrays can be empty.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyMembership"
}
},
"object": {
"type": "string",
"const": "earnings_examine_result",
"description": "Object type marker. Always `earnings_examine_result`."
}
},
"title": "Loyalties Examine Earning Rules Examine Response Body",
"description": "Response body schema for **POST** `/v2/loyalties/examine/earning-rules`."
},
"LoyaltiesExamineRewardsExamineRequestBody": {
"type": "object",
"description": "Request body schema for **POST** `/v2/loyalties/examine/rewards`.",
"properties": {
"customer_identification": {
"$ref": "#/components/schemas/ExamineCustomerIdentification",
"description": "Identifies the customer or loyalty member to examine."
},
"customer": {
"type": "object",
"description": "Provides temporary customer metadata overrides for the examination. Merges them with stored metadata without updating the customer.",
"additionalProperties": false,
"properties": {
"metadata": {
"description": "Overrides customer metadata for this examination. Set to `null` to apply no override.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
}
},
"member": {
"type": "object",
"description": "Overrides member metadata for this examination. Send it only when `customer_identification.type` is `member_id`. Merges the override with stored metadata without updating the member.",
"additionalProperties": false,
"properties": {
"metadata": {
"description": "Overrides member metadata for this examination. Set to `null` to apply no override.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"customer_identification"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"not": {
"required": [
"customer_identification"
],
"properties": {
"customer_identification": {
"required": [
"type"
],
"properties": {
"type": {
"const": "member_id"
}
}
}
}
}
},
"then": {
"not": {
"required": [
"member"
]
}
}
}
],
"title": "Loyalties Examine Rewards Examine Request Body"
},
"LoyaltiesExamineRewardsExamineResponseBody": {
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/ExamineCustomerReference",
"description": "Identifies the customer used for the examination."
},
"rewards": {
"type": "array",
"description": "Lists rewards that resolved a points cost and appear on a returned card. Omits a reward when it is inactive, out of stock, has no matching cost, or the member has no card for that cost.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBodyRewardDetail"
}
},
"memberships": {
"type": "array",
"description": "Lists one entry for each active membership whose program has reward assignments. `cards` can be empty when none of those rewards resolve onto a card.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBodyMembership"
}
},
"object": {
"type": "string",
"const": "rewards_examine_result",
"description": "Object type marker. Always `rewards_examine_result`."
}
},
"required": [
"customer",
"rewards",
"memberships",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body",
"description": "Response body schema for **POST** `/v2/loyalties/examine/rewards`."
},
"ProgramCreateRequest": {
"type": "object",
"description": "Payload for creating a loyalty program.",
"properties": {
"name": {
"type": "string",
"description": "Program name.",
"minLength": 1,
"maxLength": 200
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Program validity start date, in ISO 8601 date-time format."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Program validity end date, in ISO 8601 date-time format."
},
"validity_hours": {
"description": "Validity hours configuration. Defaults to `ANY_TIME` when omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramValidityHoursUpsert"
},
{
"type": "null"
}
]
},
"status": {
"description": "Initial program status. Only `ACTIVE` and `DRAFT` are allowed at creation. Defaults to `DRAFT`.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Arbitrary key-value metadata. Validated against the `vl_program` metadata schema definition of the project. Defaults to `{}`.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"card_definitions": {
"description": "Card definitions to assign at creation. Required (with active card definitions) when creating the program with status `ACTIVE`.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCardDefinitionAssignItem"
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"earning_rules": {
"description": "Earning rules to assign at creation. Required (with active earning rules) when creating the program with status `ACTIVE`.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramEarningRuleAssignItem"
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"rewards": {
"description": "Rewards to assign at creation, each with its stock configuration.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramRewardAssignItem"
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"tier_structures": {
"description": "Tier structures to assign at creation. A program can have at most one tier structure.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramTierStructureAssignItem"
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
}
},
"required": [
"name"
],
"additionalProperties": false
},
"ProgramCreateResponse": {
"description": "Program create response - the program extended with the ids of resources assigned at creation.",
"allOf": [
{
"$ref": "#/components/schemas/Program"
},
{
"type": "object",
"properties": {
"card_definitions": {
"description": "Card definitions assigned at creation, or `null` when none were provided.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCreateAssignedCardDefinition"
}
},
{
"type": "null"
}
]
},
"earning_rules": {
"description": "Earning rules assigned at creation, or `null` when none were provided.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCreateAssignedEarningRule"
}
},
{
"type": "null"
}
]
},
"rewards": {
"description": "Rewards assigned at creation, or `null` when none were provided.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCreateAssignedReward"
}
},
{
"type": "null"
}
]
},
"tier_structures": {
"description": "Tier structures assigned at creation, or `null` when none were provided.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCreateAssignedTierStructure"
}
},
{
"type": "null"
}
]
}
}
}
]
},
"LoyaltiesProgramsListRequestQueryId": {
"type": "object",
"description": "Filter conditions for the program `id` field (ID field type). Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`. Values must match the program id pattern\n`^lprg_[a-f0-9]+$`. Each condition accepts a single string or an array of strings\n(max 1 item for `$is`/`$is_not`, max 100 items for `$in`/`$not_in`).",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsListRequestQueryName": {
"type": "object",
"description": "Filter conditions for string fields (STRING field type). Allowed conditions:\n`$is`, `$is_not`, `$contains`, `$not_contain`, `$starts_with`, `$ends_with`,\n`$in`, `$not_in`, `$has_value`, `$is_unknown`. Each condition accepts a single\nstring or an array of strings (max 1 item, except `$in`/`$not_in` which allow\nup to 10 items).",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$contains": {
"description": "Matches when the value contains the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$not_contain": {
"description": "Excludes values that contain the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$starts_with": {
"description": "Matches when the value starts with the prefix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$ends_with": {
"description": "Matches when the value ends with the suffix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsListRequestQueryStatus": {
"type": "object",
"description": "Filter conditions for the program `status` field (ENUM field type). Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`. Allowed values: `ACTIVE`, `INACTIVE`, `DRAFT`.\nEach condition accepts a single value or an array of values (max 1 item for\n`$is`/`$is_not`, up to 10 items for `$in`/`$not_in`).",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"ProgramDateFilterConditions": {
"type": "object",
"description": "Filter conditions for date fields (DATE field type). Allowed conditions:\n`$before`, `$after` (date values), `$is`, `$more_than`, `$less_than`\n(non-negative integers, interpreted as a number of days), `$has_value`, `$is_unknown`.\nEach condition accepts a single value or an array with a single value.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$before": {
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "array",
"items": {
"type": "string",
"format": "date-time"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$after": {
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "array",
"items": {
"type": "string",
"format": "date-time"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is": {
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$more_than": {
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$less_than": {
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"ProgramListResponse": {
"type": "object",
"description": "Cursor-paginated list of programs.",
"properties": {
"object": {
"type": "string",
"description": "Object type marker.",
"const": "list"
},
"data": {
"type": "array",
"description": "Programs on the current page.",
"items": {
"$ref": "#/components/schemas/Program"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramListCursor"
},
{
"type": "null"
}
]
}
}
},
"Program": {
"type": "object",
"description": "A loyalty program.",
"properties": {
"id": {
"type": "string",
"description": "Unique program identifier.",
"pattern": "^lprg_[a-f0-9]+$"
},
"name": {
"type": "string",
"description": "Program name."
},
"status": {
"type": "string",
"description": "Program status.",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Program validity start date (ISO 8601), or `null` when not set."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Program validity end date (ISO 8601), or `null` when not set."
},
"validity_hours": {
"$ref": "#/components/schemas/ProgramValidityHours",
"description": "Validity hours configuration. Defaults to type `ANY_TIME`."
},
"metadata": {
"type": "object",
"description": "Arbitrary key-value metadata. Defaults to `{}`."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Last update timestamp (ISO 8601), or `null` when never updated."
},
"object": {
"type": "string",
"description": "Object type marker.",
"const": "program"
}
}
},
"ProgramUpdateRequest": {
"type": "object",
"description": "Payload for updating a loyalty program. All properties are optional. When the program is\nnot in `DRAFT` status, only `name`, `end_date`, and `metadata` may be changed.",
"properties": {
"name": {
"type": "string",
"description": "Program name.",
"minLength": 1,
"maxLength": 200
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Program validity start date, in ISO 8601 date-time format."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Program validity end date, in ISO 8601 date-time format."
},
"validity_hours": {
"description": "Validity hours configuration.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramValidityHoursUpsert"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Arbitrary key-value metadata. Validated against the `vl_program` metadata schema definition of the project.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"LoyaltiesProgramsActivitiesListRequestQueryId": {
"type": "object",
"description": "Filter conditions for the activity `id` field (ID field type). Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`. Values must match the program activity id pattern\n`^laprg_[a-f0-9]+$`. Each condition accepts a single string or an array of strings\n(max 1 item for `$is`/`$is_not`, max 100 items for `$in`/`$not_in`).",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `laprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `laprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `laprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `laprg_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^laprg_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsActivitiesListRequestQueryType": {
"type": "object",
"description": "Filter conditions for the activity `type` field (ENUM field type). Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`. Allowed values are the program activity types.\nEach condition accepts a single value or an array of values (max 1 item for\n`$is`/`$is_not`, up to 10 items for `$in`/`$not_in`).",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"ProgramActivityListResponse": {
"type": "object",
"description": "Cursor-paginated list of program activities.",
"properties": {
"object": {
"type": "string",
"description": "Object type marker.",
"const": "list"
},
"data": {
"type": "array",
"description": "Activities on the current page.",
"items": {
"$ref": "#/components/schemas/ProgramActivity"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramListCursor"
},
{
"type": "null"
}
]
}
}
},
"ProgramCardDefinitionAssignmentListResponse": {
"type": "object",
"description": "Cursor-paginated list of card definition assignments.",
"properties": {
"object": {
"type": "string",
"description": "Object type marker.",
"const": "list"
},
"data": {
"type": "array",
"description": "Card definition assignments on the current page.",
"items": {
"$ref": "#/components/schemas/ProgramCardDefinitionAssignment"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramListCursor"
},
{
"type": "null"
}
]
}
}
},
"ProgramCardDefinitionBatchRequest": {
"type": "object",
"description": "Batch of card definition assignment operations. `unassign` operations are processed\nbefore `assign` operations. Duplicate ids within a batch are rejected.",
"properties": {
"assign": {
"description": "Card definitions to assign.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCardDefinitionAssignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"unassign": {
"description": "Card definitions to unassign.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCardDefinitionUnassignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"options": {
"description": "Batch behavior. Defaults to strict mode when omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramCardDefinitionBatchOptions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"ProgramCardDefinitionBatchResponse": {
"type": "object",
"description": "Result of a card definition assignment batch. Keys are null when the corresponding operation list was not provided.",
"properties": {
"assigned": {
"description": "Assignments created by the batch, or `null` when no assign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCardDefinitionAssignment"
}
},
{
"type": "null"
}
]
},
"unassigned": {
"description": "Assignments removed by the batch, or `null` when no unassign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramCardDefinitionAssignment"
}
},
{
"type": "null"
}
]
}
}
},
"ProgramEarningRuleAssignmentListResponse": {
"type": "object",
"description": "Cursor-paginated list of earning rule assignments.",
"properties": {
"object": {
"type": "string",
"description": "Object type marker. Always `list`.",
"const": "list"
},
"data": {
"type": "array",
"description": "Earning rule assignments on the current page.",
"items": {
"$ref": "#/components/schemas/ProgramEarningRuleAssignment"
}
},
"cursor": {
"description": "Pagination cursor. `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramListCursor"
},
{
"type": "null"
}
]
}
},
"required": [
"object",
"data",
"cursor"
]
},
"ProgramEarningRuleBatchRequest": {
"type": "object",
"description": "Batch of earning rule assignment operations. `unassign` operations are processed\nbefore `assign` operations. Duplicate ids within a batch are rejected.",
"properties": {
"assign": {
"description": "Earning rules to assign.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramEarningRuleAssignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"unassign": {
"description": "Earning rules to unassign.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramEarningRuleUnassignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"options": {
"description": "Batch behavior. Defaults to strict mode when omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramEarningRuleBatchOptions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"ProgramEarningRuleBatchResponse": {
"type": "object",
"description": "Result of an earning rule assignment batch. Keys are null when the corresponding operation list was not provided.",
"properties": {
"assigned": {
"description": "Assignments created by the batch, or `null` when no assign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramEarningRuleAssignment"
}
},
{
"type": "null"
}
]
},
"unassigned": {
"description": "Assignments removed by the batch, or `null` when no unassign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramEarningRuleAssignment"
}
},
{
"type": "null"
}
]
}
}
},
"ProgramTierStructureAssignmentListResponse": {
"type": "object",
"description": "Cursor-paginated list of tier structure assignments.",
"properties": {
"object": {
"type": "string",
"description": "Object type marker.",
"const": "list"
},
"data": {
"type": "array",
"description": "Tier structure assignments on the current page.",
"items": {
"$ref": "#/components/schemas/ProgramTierStructureAssignment"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramListCursor"
},
{
"type": "null"
}
]
}
},
"required": [
"object",
"data",
"cursor"
]
},
"ProgramTierStructureBatchRequest": {
"type": "object",
"description": "Batch of tier structure assignment operations. `unassign` operations are processed\nbefore `assign` operations. Duplicate ids within a batch are rejected.",
"properties": {
"assign": {
"description": "Tier structures to assign.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramTierStructureAssignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"unassign": {
"description": "Tier structures to unassign.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramTierStructureUnassignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"options": {
"description": "Batch behavior. Defaults to strict mode when omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramTierStructureBatchOptions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"ProgramTierStructureBatchResponse": {
"type": "object",
"description": "Result of a tier structure assignment batch. Keys are null when the corresponding operation list was not provided.",
"properties": {
"assigned": {
"description": "Assignments created by the batch, or `null` when no assign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramTierStructureAssignment"
}
},
{
"type": "null"
}
]
},
"unassigned": {
"description": "Assignments removed by the batch, or `null` when no unassign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramTierStructureAssignment"
}
},
{
"type": "null"
}
]
}
}
},
"ProgramRewardAssignmentListResponse": {
"type": "object",
"description": "Cursor-paginated list of reward assignments.",
"properties": {
"object": {
"type": "string",
"description": "Object type marker. Always `list`.",
"const": "list"
},
"data": {
"type": "array",
"description": "Reward assignments on the current page.",
"items": {
"$ref": "#/components/schemas/ProgramRewardAssignment"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramListCursor"
},
{
"type": "null"
}
]
}
},
"required": [
"object",
"data",
"cursor"
]
},
"ProgramRewardBatchRequest": {
"type": "object",
"description": "Batch of reward assignment operations. `unassign` operations are processed\nbefore `assign` operations. Duplicate ids within a batch are rejected.",
"properties": {
"assign": {
"description": "Rewards to assign, each with its stock configuration.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramRewardAssignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"unassign": {
"description": "Rewards to unassign.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramRewardUnassignItem"
},
"maxItems": 10
},
{
"type": "null"
}
]
},
"options": {
"description": "Batch behavior. Defaults to strict mode when omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/ProgramRewardBatchOptions"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"ProgramRewardBatchResponse": {
"type": "object",
"description": "Result of a reward assignment batch. Keys are null when the corresponding operation list was not provided.",
"properties": {
"assigned": {
"description": "Assignments created by the batch, or `null` when no assign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramRewardAssignment"
}
},
{
"type": "null"
}
]
},
"unassigned": {
"description": "Assignments removed by the batch, or `null` when no unassign operations were requested.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/ProgramRewardAssignment"
}
},
{
"type": "null"
}
]
}
}
},
"ProgramRewardAssignmentUpdateRequest": {
"type": "object",
"description": "Payload for updating the stock configuration of a reward assigned to a program.",
"properties": {
"stock": {
"$ref": "#/components/schemas/ProgramRewardAssignmentStock"
}
},
"required": [
"stock"
],
"minProperties": 1,
"additionalProperties": false
},
"ProgramRewardAssignment": {
"type": "object",
"description": "A reward assigned to a program, with stock configuration and redemption counter.",
"properties": {
"reward_id": {
"type": "string",
"description": "Unique reward identifier.",
"pattern": "^lrew_[a-f0-9]+$"
},
"stock": {
"$ref": "#/components/schemas/ProgramRewardAssignmentStock",
"description": "Stock configuration of the assignment."
},
"redeemed": {
"type": "number",
"description": "Number of times the reward has been redeemed within the program. Defaults to 0."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Assignment creation timestamp (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Last update timestamp (ISO 8601), or `null` when never updated."
},
"object": {
"type": "string",
"description": "Object type marker. Always `program_reward`.",
"const": "program_reward"
}
},
"required": [
"reward_id",
"stock",
"redeemed",
"created_at",
"updated_at",
"object"
]
},
"MemberCreate": {
"type": "object",
"description": "Fields for creating one loyalty program member. No additional properties are allowed.",
"additionalProperties": false,
"properties": {
"customer_identification": {
"description": "Identifies the existing customer to enroll. Send exactly one identifier, matching `type`.",
"oneOf": [
{
"type": "object",
"title": "Customer ID",
"description": "Identifies the customer by Voucherify customer ID.",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "customer_id",
"description": "Identifies the customer by `customer_id`."
},
"customer_id": {
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+",
"description": "Identifies an existing customer by Voucherify customer ID."
},
"customer_source_id": {
"type": "null",
"description": "Omit this field or set it to `null` when `type` is `customer_id`."
}
},
"required": [
"type",
"customer_id"
]
},
{
"type": "object",
"title": "Customer source ID",
"description": "Identifies the customer by source ID.",
"additionalProperties": false,
"properties": {
"type": {
"type": "string",
"const": "customer_source_id",
"description": "Identifies the customer by `customer_source_id`."
},
"customer_source_id": {
"type": "string",
"description": "Identifies an existing customer by source ID."
},
"customer_id": {
"type": "null",
"description": "Omit this field or set it to `null` when `type` is `customer_source_id`."
}
},
"required": [
"type",
"customer_source_id"
]
}
]
},
"status": {
"description": "Sets the initial member status. Allowed values are `ACTIVE` and `INACTIVE`. Defaults to `ACTIVE` when omitted or `null`.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
{
"type": "null"
}
],
"default": "ACTIVE"
},
"metadata": {
"description": "Stores custom metadata on the member. Validated against the metadata schema for the `vl_member` related object when one is configured. Defaults to an empty object when omitted or `null`.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"default": {}
}
},
"required": [
"customer_identification"
]
},
"MemberWithCards": {
"description": "A loyalty program member together with its loyalty cards. Returned by member create and get endpoints.",
"allOf": [
{
"$ref": "#/components/schemas/Member"
},
{
"type": "object",
"properties": {
"cards": {
"description": "Member's loyalty cards - one per card definition assigned to the program. Card codes are generated asynchronously, so `card.code` may be `null` right after member creation.",
"type": "array",
"items": {
"$ref": "#/components/schemas/MemberCard"
}
}
},
"required": [
"cards"
]
}
]
},
"LoyaltiesProgramsMembersListRequestQueryId": {
"type": "object",
"description": "ID conditions. Format `lmbr_[a-f0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lmbr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lmbr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lmbr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lmbr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsMembersListRequestQueryStatus": {
"type": "object",
"description": "Enum filter conditions for member status. Allowed values are `ACTIVE` and\n`INACTIVE`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsMembersListRequestQueryCustomerId": {
"type": "object",
"description": "ID conditions. Format `cust_[a-zA-Z0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `cust_[a-zA-Z0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `cust_[a-zA-Z0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `cust_[a-zA-Z0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `cust_[a-zA-Z0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"DateFilter": {
"type": "object",
"description": "Date filter conditions. `$before`/`$after` take date strings (ISO 8601); `$is`, `$more_than`, `$less_than` take non-negative integers; `$has_value`/`$is_unknown` are presence checks. Each condition accepts a single value or an array with exactly one value. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$before": {
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "array",
"items": {
"type": "string",
"format": "date-time"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$after": {
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "array",
"items": {
"type": "string",
"format": "date-time"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is": {
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"pattern": "^[0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$more_than": {
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"pattern": "^[0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$less_than": {
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"pattern": "^[0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^[0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"ProgramMemberListResponse": {
"type": "object",
"description": "Cursor-paginated list of members.",
"properties": {
"data": {
"type": "array",
"description": "Members on the current page (without the `cards` array).",
"items": {
"$ref": "#/components/schemas/Member"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker, always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"MemberCreateInBulk": {
"type": "array",
"description": "A JSON array of member entries. The raw body is limited to 10485760 bytes (10 MB). The array isn't validated before the `202` response. Entries are processed asynchronously in batches of 100. Each entry should use the same fields as a single member create. Invalid entries are skipped and listed in the async action report.",
"items": {
"$ref": "#/components/schemas/MemberCreate"
}
},
"MemberCreateInBulkResult": {
"type": "object",
"description": "Async action created to process a member creation batch.",
"properties": {
"async_action_id": {
"type": "string",
"pattern": "^aa_[a-f0-9]+$",
"description": "Identifies the async action that processes the batch."
}
},
"required": [
"async_action_id"
]
},
"MemberUpdate": {
"type": "object",
"description": "Only metadata is updatable. No additional properties are allowed.",
"properties": {
"metadata": {
"description": "Member metadata to apply. Object keys are merged into existing metadata (omitted keys are preserved). Validated against the `vl_member` metadata schema when configured. Pass `null` to clear all metadata.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"metadata"
],
"additionalProperties": false
},
"Member": {
"type": "object",
"description": "A loyalty program member.",
"properties": {
"id": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$",
"description": "Identifies the member."
},
"customer_id": {
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+",
"description": "Identifies the enrolled customer."
},
"program_id": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$",
"description": "Identifies the loyalty program."
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"INACTIVE",
"DELETED"
],
"description": "Current member status. Allowed values: `ACTIVE`, `INACTIVE`, `DELETED`. `INACTIVE` members cannot earn points or redeem rewards."
},
"metadata": {
"type": "object",
"description": "Stores custom member metadata. Empty object when none is set."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Records when the member was created (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Records the last update (ISO 8601). `null` if the member has never been updated."
},
"object": {
"type": "string",
"const": "member",
"description": "Object type. Always `member`."
}
},
"required": [
"id",
"customer_id",
"program_id",
"status",
"metadata",
"created_at",
"updated_at",
"object"
]
},
"MembershipsResult": {
"type": "object",
"description": "Cross-program memberships result for a customer.",
"properties": {
"customer": {
"$ref": "#/components/schemas/MembershipsCustomer",
"description": "Returns the resolved customer. Present for `customer_id`, `customer_source_id`, and `member_id`."
},
"memberships": {
"type": "array",
"description": "List of memberships. For `customer_id` and `customer_source_id`, includes every program the customer belongs to. For `member_id`, includes only that member's program. Empty when the customer has no memberships.",
"items": {
"$ref": "#/components/schemas/MembershipWithoutTierProgress"
}
},
"object": {
"type": "string",
"const": "memberships_result",
"description": "Object type marker. Always `memberships_result`."
}
},
"required": [
"customer",
"memberships",
"object"
]
},
"Membership": {
"description": "A loyalty membership - the member's full loyalty profile within a program, combining the member, the program, and the member's loyalty cards with tier progress.",
"allOf": [
{
"$ref": "#/components/schemas/MembershipBase"
},
{
"type": "object",
"properties": {
"cards": {
"type": "array",
"description": "Member's loyalty cards, one per card definition assigned to the program. `tier_progress` is present when that card definition has a tier structure and the member has a tier on the card. Otherwise it is omitted. `card.code` can be `null` right after member creation, while code generation is still running.",
"items": {
"$ref": "#/components/schemas/MembershipCard"
}
}
},
"required": [
"cards"
]
}
]
},
"LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersId": {
"type": "object",
"description": "ID conditions. Format `lambr_[a-f0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lambr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lambr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lambr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lambr_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lambr_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsMembersActivitiesListRequestQueryFiltersType": {
"type": "object",
"description": "Enum conditions. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"MemberActivityListResponse": {
"type": "object",
"description": "Cursor-paginated list of member activities.",
"properties": {
"data": {
"type": "array",
"description": "Member activities on the current page.",
"items": {
"$ref": "#/components/schemas/VLMemberActivity"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker, always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"CardPointsAdjust": {
"type": "object",
"description": "No additional properties are allowed.",
"properties": {
"points": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Number of points to adjust. Positive values add points (`ADMIN_CREDIT` transaction), negative values subtract points (`ADMIN_DEBIT` transaction), zero results in no transaction (`NO_CHANGE`)."
},
"reason": {
"type": "string",
"maxLength": 255,
"description": "Optional reason for the adjustment, stored in the transaction details."
}
},
"required": [
"points"
],
"additionalProperties": false
},
"CardPointsAdjustResult": {
"type": "object",
"description": "Result of a manual card points adjustment.",
"properties": {
"transaction": {
"description": "The created card transaction (`ADMIN_CREDIT` or `ADMIN_DEBIT`), or `null` when no transaction was created (status `NO_CHANGE`).",
"anyOf": [
{
"$ref": "#/components/schemas/CardTransaction"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"TRANSACTION_CREATED",
"NO_CHANGE"
],
"description": "`TRANSACTION_CREATED` when a transaction was created, `NO_CHANGE` when the requested points amount was zero."
},
"message": {
"type": "string",
"enum": [
"Points addition transaction created",
"Points subtraction transaction created",
"Provided amount is zero, transaction was not created"
],
"description": "Human-readable result message:\n- \"Points addition transaction created\",\n- \"Points subtraction transaction created\",\n- \"Provided amount is zero, transaction was not created\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersId": {
"type": "object",
"description": "ID conditions. Format `lacrd_[a-f0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lacrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lacrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lacrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lacrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsMembersCardsActivitiesListRequestQueryFiltersType": {
"type": "object",
"description": "Enum conditions. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
]
},
"minItems": 1,
"maxItems": 10
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"CardActivityListResponse": {
"type": "object",
"description": "Cursor-paginated list of card activities.",
"properties": {
"data": {
"type": "array",
"description": "Card activities on the current page.",
"items": {
"$ref": "#/components/schemas/CardActivity"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker, always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"CardPointsListQuery": {
"type": "object",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"card_definition_id": {
"description": "Filters by card definition ID. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionIdFilterConditions"
},
{
"type": "null"
}
]
}
}
},
"CardPendingPointsListResponse": {
"type": "object",
"description": "Cursor-paginated list of pending point buckets.",
"properties": {
"data": {
"type": "array",
"description": "Pending point buckets on the current page.",
"items": {
"$ref": "#/components/schemas/CardPendingPointsBucket"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker, always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"CardPendingPointsActivateResult": {
"type": "object",
"description": "Result of a manual pending points activation. This endpoint always returns status `TRANSACTION_CREATED` on success.",
"properties": {
"transaction": {
"description": "The created `PENDING_POINTS_ACTIVATED` card transaction.",
"$ref": "#/components/schemas/CardTransaction"
},
"status": {
"type": "string",
"enum": [
"TRANSACTION_CREATED"
],
"description": "Result status. Always `TRANSACTION_CREATED`."
},
"message": {
"type": "string",
"enum": [
"Points activation transaction created"
],
"description": "Human-readable result message - \"Points activation transaction created\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"CardPendingPointsCancelResult": {
"type": "object",
"description": "Result of a pending points cancellation. This endpoint always returns status `TRANSACTION_CREATED` on success.",
"properties": {
"transaction": {
"description": "The created `PENDING_POINTS_CANCELED` card transaction.",
"$ref": "#/components/schemas/CardTransaction"
},
"status": {
"type": "string",
"enum": [
"TRANSACTION_CREATED"
],
"description": "Result status. The API endpoint returns `TRANSACTION_CREATED`."
},
"message": {
"type": "string",
"enum": [
"Points cancellation transaction created"
],
"description": "Human-readable result message - \"Points cancellation transaction created\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"CardExpiringPointsListResponse": {
"type": "object",
"description": "Cursor-paginated list of points expiration buckets.",
"properties": {
"data": {
"type": "array",
"description": "Points expiration buckets on the current page.",
"items": {
"$ref": "#/components/schemas/CardPointsBucket"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker, always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"CardPointsExpireResult": {
"type": "object",
"description": "Result of expiring an expiration point bucket. This endpoint always returns status `TRANSACTION_CREATED` on success.",
"properties": {
"transaction": {
"description": "The created `ADMIN_POINTS_EXPIRATION` card transaction.",
"$ref": "#/components/schemas/CardTransaction"
},
"status": {
"type": "string",
"enum": [
"TRANSACTION_CREATED"
],
"description": "Result status. The API endpoint returns `TRANSACTION_CREATED`."
},
"message": {
"type": "string",
"enum": [
"Points expiration transaction created"
],
"description": "Human-readable result message - \"Points expiration transaction created\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"LoyaltiesProgramsMembersCardsTransactionsListRequestQueryId": {
"type": "object",
"description": "ID conditions. Format `lctx_[a-f0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lctx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lctx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lctx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lctx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lctx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false,
"title": "Loyalties Programs Members Cards Transactions List Request Query Id"
},
"CardDefinitionIdFilterConditions": {
"type": "object",
"description": "ID conditions. Format `lcdef_[a-f0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"CardTransactionListResponse": {
"type": "object",
"description": "Cursor-paginated list of card transactions.",
"properties": {
"data": {
"type": "array",
"description": "Card transactions on the current page.",
"items": {
"$ref": "#/components/schemas/CardTransaction"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker, always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"RewardPurchaseRefundRequest": {
"type": "object",
"description": "Fields for refunding a reward purchase.",
"properties": {
"policies": {
"description": "Refund policies. When omitted or `null`, defaults are applied.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseRefundPolicies"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"RewardPurchaseRefundResult": {
"type": "object",
"description": "Result of a reward purchase refund.",
"properties": {
"transaction": {
"description": "The created REFUND-type reward transaction.",
"$ref": "#/components/schemas/RewardPurchaseTransaction"
},
"status": {
"type": "string",
"enum": [
"APPROVED"
],
"description": "Result status. Always `APPROVED` on success."
},
"message": {
"type": "string",
"description": "Returns the result message: \"Reward refund transaction created. Points will be returned to the member's card shortly.\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryId": {
"type": "object",
"description": "ID filter conditions for reward transaction ids. Values must match pattern `^lrtx_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lrtx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lrtx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lrtx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lrtx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrtx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false,
"title": "Loyalties Programs Members Rewards Purchases List Request Query Id"
},
"LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryRewardId": {
"type": "object",
"description": "ID filter conditions for reward ids. Values must match pattern `^lrew_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false,
"title": "Loyalties Programs Members Rewards Purchases List Request Query Reward Id"
},
"LoyaltiesProgramsMembersRewardsPurchasesListRequestQueryCardDefinitionId": {
"type": "object",
"description": "ID filter conditions for card definition IDs. Values must match pattern `^lcdef_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false,
"title": "Loyalties Programs Members Rewards Purchases List Request Query Card Definition Id"
},
"TransactionFilterDateConditions": {
"type": "object",
"description": "Date filter conditions. `$before`/`$after` accept an ISO date-time string. `$is`/`$more_than`/`$less_than` accept a non-negative integer number of days ago. `$has_value`/`$is_unknown` accept any single value and match rows where the field is set / not set. Single values may also be passed as 1-element arrays.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$before": {
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$after": {
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is": {
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$more_than": {
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$less_than": {
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"MemberRewardPurchaseListResponse": {
"type": "object",
"description": "Cursor-paginated list of reward purchase transactions.",
"properties": {
"data": {
"type": "array",
"description": "Reward purchase transactions (type `PURCHASE` only).",
"items": {
"$ref": "#/components/schemas/RewardPurchaseTransaction"
}
},
"cursor": {
"description": "Pagination cursor. `null` when there are no more results.",
"oneOf": [
{
"type": "object",
"properties": {
"next": {
"type": "string",
"description": "Cursor to pass as the `cursor` query parameter to fetch the next page (format `lcrstrx_...`)."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the cursor expires."
}
}
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
}
},
"MemberRewardPurchaseRequest": {
"type": "object",
"description": "Fields for purchasing a reward.",
"properties": {
"reward_id": {
"type": "string",
"description": "Unique identifier of the reward to purchase (format `lrew_...`)."
},
"mode": {
"type": "string",
"enum": [
"TRANSACTION",
"DRY_RUN"
],
"default": "TRANSACTION",
"description": "Purchase mode. `TRANSACTION` creates a `PENDING` reward transaction processed asynchronously (HTTP `202`). `DRY_RUN` only simulates the purchase and returns the calculation result (HTTP `200`); no transaction is created. Defaults to `TRANSACTION` when omitted."
}
},
"required": [
"reward_id"
],
"additionalProperties": false
},
"MemberRewardPurchaseDryRunResult": {
"type": "object",
"description": "Result of a reward purchase request in dry-run mode.",
"properties": {
"transaction": {
"type": "object",
"description": "The simulated reward transaction.",
"properties": {
"card_id": {
"type": "string",
"description": "Unique identifier of the loyalty card the points are to be spent from (format `lcrd_...`)."
},
"card_definition_id": {
"type": "string",
"description": "Unique identifier of the card definition for that card (format `lcdef_...`)."
},
"card_transaction_id": {
"type": "null",
"description": "`null` for `DRY_RUN` (SIMULATED) transactions."
},
"program_id": {
"type": "string",
"description": "Unique identifier of the loyalty program (format `lprg_...`)."
},
"member_id": {
"type": "string",
"description": "Unique identifier of the program member (format `lmbr_...`)."
},
"reward_id": {
"type": "string",
"description": "Unique identifier of the purchased reward (format `lrew_...`)."
},
"status": {
"type": "string",
"enum": [
"SIMULATED"
],
"description": "Transaction status is `SIMULATED` for a dry-run result that is not persisted."
},
"type": {
"type": "string",
"const": "PURCHASE",
"description": "Transaction type. It contains purchase details for the simulated transaction."
},
"details": {
"description": "Transaction details. For a dry run purchase, it's always `PURCHASE`.",
"$ref": "#/components/schemas/RewardPurchaseTransactionDetailsPurchase"
},
"updated_at": {
"type": "null",
"description": "For `DRY_RUN` transactions, this is always `null`."
},
"object": {
"type": "string",
"const": "reward_transaction",
"description": "Object type marker. Always `reward_transaction`."
}
},
"required": [
"card_id",
"card_definition_id",
"card_transaction_id",
"program_id",
"member_id",
"reward_id",
"status",
"type",
"details",
"updated_at",
"object"
]
},
"status": {
"type": "string",
"enum": [
"DRY_RUN"
],
"description": "Result status. Always `DRY_RUN` for the dry-run mode."
},
"message": {
"type": "string",
"description": "Human-readable result message. `DRY_RUN` mode: \"Dry run mode. No transaction was created. This is only a simulation.\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"MemberRewardPurchaseTransactionResult": {
"type": "object",
"description": "Result of a reward purchase request.",
"properties": {
"transaction": {
"type": "object",
"description": "A reward transaction. Represents a reward purchase transaction.",
"properties": {
"id": {
"type": "string",
"description": "Unique reward transaction identifier (format `lrtx_...`)."
},
"card_id": {
"type": "string",
"description": "Unique identifier of the loyalty card the points were spent from (format `lcrd_...`)."
},
"card_definition_id": {
"type": "string",
"description": "Unique identifier of the card definition for that card (format `lcdef_...`)."
},
"card_transaction_id": {
"type": "string",
"description": "Unique identifier of the underlying card transaction (format `lctx_...`)."
},
"program_id": {
"type": "string",
"description": "Unique identifier of the loyalty program (format `lprg_...`)."
},
"member_id": {
"type": "string",
"description": "Unique identifier of the program member (format `lmbr_...`)."
},
"reward_id": {
"type": "string",
"description": "Unique identifier of the purchased reward (format `lrew_...`)."
},
"status": {
"type": "string",
"enum": [
"PENDING"
],
"description": "Transaction status:\n\n- `PENDING`: Created and awaiting processing."
},
"type": {
"type": "string",
"enum": [
"PURCHASE"
],
"description": "Transaction type."
},
"details": {
"description": "Purchase details. `result` is `null` until processing finishes.",
"$ref": "#/components/schemas/RewardPurchaseTransactionDetailsPurchase"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the transaction was created (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the transaction was last updated (ISO 8601), or `null`."
},
"object": {
"type": "string",
"const": "reward_transaction",
"description": "Object type marker. Always `reward_transaction`."
}
},
"required": [
"id",
"card_id",
"card_definition_id",
"card_transaction_id",
"program_id",
"member_id",
"reward_id",
"status",
"type",
"details",
"created_at",
"updated_at",
"object"
]
},
"status": {
"type": "string",
"enum": [
"TRANSACTION_CREATED"
],
"description": "Result status. `TRANSACTION_CREATED` for `TRANSACTION` mode."
},
"message": {
"type": "string",
"description": "Human-readable result message. `TRANSACTION` mode: \"Reward purchase transaction created\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"LoyaltiesProgramsMembersOrdersPaymentsListRequestQueryId": {
"type": "object",
"description": "ID filter conditions for order transaction ids. Values must match pattern `^lotx_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lotx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lotx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lotx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lotx_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lotx_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false,
"title": "Loyalties Programs Members Orders Payments List Request Query Id"
},
"MemberOrderPaymentListResponse": {
"type": "object",
"description": "Cursor-paginated list of order payment transactions.",
"properties": {
"data": {
"type": "array",
"description": "Order payment transactions.",
"items": {
"$ref": "#/components/schemas/OrderPaymentTransaction"
}
},
"cursor": {
"description": "Pagination cursor. `null` when there are no more results.",
"oneOf": [
{
"type": "object",
"properties": {
"next": {
"type": "string",
"description": "Pass as the `cursor` query parameter to fetch the next page (format `lcrsotx_...`)."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the cursor expires (ISO 8601)."
}
}
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
}
},
"MemberOrderPaymentRequest": {
"type": "object",
"description": "Fields for paying an order with points.",
"properties": {
"card_id": {
"type": "string",
"description": "Unique identifier of the member's loyalty card to spend points from (format `lcrd_...`)."
},
"order": {
"$ref": "#/components/schemas/OrderPaymentOrder"
},
"payment_limit": {
"description": "Optional payment limit. When omitted or `null`, the default `CARD_BALANCE` limit is applied (spend up to the card balance).",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimit"
},
{
"type": "null"
}
]
},
"mode": {
"description": "Payment mode. `TRANSACTION` creates a `PENDING` order transaction processed asynchronously (HTTP `202`). `DRY_RUN` only simulates the payment and returns the calculation result (HTTP `200`); no transaction is created. Defaults to `TRANSACTION` when omitted or `null`.",
"oneOf": [
{
"type": "string",
"enum": [
"TRANSACTION",
"DRY_RUN"
]
},
{
"type": "null"
}
]
}
},
"required": [
"card_id",
"order"
],
"additionalProperties": false
},
"MemberOrderPaymentDryRunResult": {
"type": "object",
"description": "Result of a pay-with-points dry-run request.",
"properties": {
"transaction": {
"type": "object",
"description": "An order transaction representing a pay-with-points `SIMULATED` payment.",
"properties": {
"program_id": {
"type": "string",
"description": "Unique identifier of the loyalty program (format `lprg_...`)."
},
"member_id": {
"type": "string",
"description": "Unique identifier of the program member (format `lmbr_...`)."
},
"card_id": {
"type": "string",
"description": "Unique identifier of the loyalty card the points were spent from (format `lcrd_...`)."
},
"card_definition_id": {
"type": "string",
"description": "Identifies the card definition (format `lcdef_...`)."
},
"card_transaction_id": {
"type": [
"null"
],
"description": "`null` for `DRY_RUN` (`SIMULATED`) transactions."
},
"order_id": {
"type": "string",
"description": "Identifies the paid order (format `ord_...`)."
},
"status": {
"type": "string",
"enum": [
"SIMULATED"
],
"description": "Transaction status. `SIMULATED` - dry-run create result, not persisted."
},
"type": {
"type": "string",
"enum": [
"PAY_WITH_POINTS"
],
"description": "Defines the transaction type. Always `PAY_WITH_POINTS`."
},
"details": {
"description": "Transaction details for the `PAY_WITH_POINTS` type.",
"oneOf": [
{
"$ref": "#/components/schemas/OrderPaymentTransactionDetails"
},
{
"type": "null"
}
]
},
"updated_at": {
"type": [
"null"
],
"description": "Timestamp when the transaction was last updated (ISO 8601), or `null` for `DRY_RUN` (`SIMULATED`) transactions."
},
"object": {
"type": "string",
"const": "order_transaction",
"description": "Object type marker. Always `order_transaction`."
}
}
},
"status": {
"type": "string",
"enum": [
"DRY_RUN"
],
"description": "Result status. `DRY_RUN` for dry-run mode."
},
"message": {
"type": "string",
"description": "Human-readable result message. `DRY_RUN` mode: \"Dry run mode. No transaction was created. This is only a simulation.\"."
}
},
"required": [
"transaction",
"status",
"message"
]
},
"MemberOrderPaymentTransactionResult": {
"type": "object",
"description": "Result of a pay-with-points request.",
"properties": {
"transaction": {
"description": "The created (or simulated) order transaction.",
"oneOf": [
{
"$ref": "#/components/schemas/OrderPaymentTransaction"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"TRANSACTION_CREATED"
],
"description": "Result status. `TRANSACTION_CREATED` for `TRANSACTION` mode."
},
"message": {
"type": "string",
"description": "Human-readable result message. `TRANSACTION` mode: \"Pay with points transaction created\"."
}
}
},
"LoyaltiesProgramsMembersBenefitsTransactionsListRequestQueryBenefitId": {
"type": "object",
"description": "ID filter conditions for benefit ids. Values must match pattern `^lben_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"MemberBenefitTransactionListResponse": {
"type": "object",
"description": "Cursor-paginated list of benefit transactions.",
"properties": {
"data": {
"type": "array",
"description": "List of benefit transactions.",
"items": {
"$ref": "#/components/schemas/BenefitTransaction"
}
},
"cursor": {
"description": "Pagination cursor. `null` when there are no more results.",
"oneOf": [
{
"type": "object",
"properties": {
"next": {
"type": "string",
"description": "Cursor to pass as the `cursor` query parameter to fetch the next page (format `lcrsbtx_...`)."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the cursor expires."
}
},
"required": [
"next",
"expires_at"
]
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardId": {
"type": "object",
"description": "ID filter conditions for loyalty card ids. Values must match pattern `^lcrd_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lcrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lcrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lcrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lcrd_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesProgramsMembersTiersTransactionsListRequestQueryCardDefinitionId": {
"type": "object",
"description": "ID filter conditions for card definition IDs. Values must match pattern `^lcdef_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"MemberTierTransactionListResponse": {
"type": "object",
"description": "Cursor-paginated list of tier transactions.",
"properties": {
"data": {
"type": "array",
"description": "List of tier transactions.",
"items": {
"$ref": "#/components/schemas/TierTransaction"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/ListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"CardDailyReportEntry": {
"type": "object",
"description": "Aggregated card points statistics for one period. Each field sums the operations of one kind recorded in the period. All numeric fields default to 0.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"points_total": {
"type": "number",
"description": "Points credited to the card in the period. Sums `points_earned`, `points_added`, and `points_purchased`. Points spent, expired, subtracted, refunded, returned, or reversed are not deducted."
},
"points_earned": {
"type": "number",
"description": "Points earned through earning rules in the period. Includes pending points activated in the period."
},
"points_added": {
"type": "number",
"description": "Points added manually in the period."
},
"points_purchased": {
"type": "number",
"description": "Points purchased (e.g. via loyalty-card-points rewards) in the period."
},
"points_purchased_reversed": {
"type": "number",
"description": "Purchased points reversed (e.g. by reward refunds) in the period."
},
"points_subtracted": {
"type": "number",
"description": "Points subtracted manually in the period."
},
"points_expired": {
"type": "number",
"description": "Points expired in the period."
},
"points_spent": {
"type": "number",
"description": "Points spent (on rewards and order payments) in the period."
},
"points_refunded": {
"type": "number",
"description": "Points refunded in the period."
},
"points_returned": {
"type": "number",
"description": "Points returned in the period."
},
"points_locked": {
"type": "number",
"description": "Points locked in the period."
},
"points_unlocked": {
"type": "number",
"description": "Points unlocked in the period. Includes points released when a spending transaction is approved (also counted in `points_spent`) or rejected."
},
"pending_points_total": {
"type": "number",
"description": "Pending points added in the period. Activated and canceled pending points are not deducted."
},
"pending_points_activated": {
"type": "number",
"description": "Pending points activated in the period. Also counted in `points_earned` and `points_total`."
},
"pending_points_canceled": {
"type": "number",
"description": "Pending points canceled in the period."
},
"object": {
"type": "string",
"const": "card_daily_report",
"description": "Object type marker. Always `card_daily_report`."
}
},
"required": [
"date",
"points_total",
"points_earned",
"points_added",
"points_purchased",
"points_purchased_reversed",
"points_subtracted",
"points_expired",
"points_spent",
"points_refunded",
"points_returned",
"points_locked",
"points_unlocked",
"pending_points_total",
"pending_points_activated",
"pending_points_canceled",
"object"
]
},
"EarningRuleDailyReportResponse": {
"type": "object",
"description": "Member earning-rule daily report result.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per aggregation period with recorded activity, ordered by `date` ascending. Empty when no activity was recorded in the range.",
"items": {
"$ref": "#/components/schemas/EarningRuleDailyReportEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"ReportCardDefinitionIdFilterConditions": {
"type": "object",
"description": "ID filter conditions for card definition IDs. Values must match pattern `^lcdef_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"SpendingReportDailyEntry": {
"type": "object",
"description": "Aggregated program spending statistics for one period and card definition. Numeric fields default to `0`.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"card_definition_id": {
"type": "string",
"description": "Identifies the card definition (`lcdef_...`)."
},
"success": {
"type": "number",
"description": "Counts successful spending operations in the period."
},
"success_on_reward": {
"type": "number",
"description": "Counts successful reward purchases in the period."
},
"success_on_order": {
"type": "number",
"description": "Counts successful order payments in the period."
},
"points": {
"type": "number",
"description": "Totals points spent in the period."
},
"points_on_rewards": {
"type": "number",
"description": "Totals points spent on reward purchases in the period."
},
"points_on_order": {
"type": "number",
"description": "Totals points spent on order payments in the period."
},
"amount_on_order": {
"type": "number",
"description": "Totals order amount paid with points in the period."
},
"object": {
"type": "string",
"const": "spending_daily_report",
"description": "Object type marker. Always `spending_daily_report`."
}
},
"required": [
"date",
"card_definition_id",
"success",
"success_on_reward",
"success_on_order",
"points",
"points_on_rewards",
"points_on_order",
"amount_on_order",
"object"
]
},
"SpendingReportSummaryEntry": {
"type": "object",
"description": "Total program spending statistics for one card definition that has recorded spending. Numeric fields default to `0`.",
"properties": {
"id": {
"type": "string",
"description": "Identifies the summary row (`lssum_...`)."
},
"card_definition_id": {
"type": "string",
"description": "Identifies the card definition (`lcdef_...`)."
},
"success": {
"type": "number",
"description": "Counts successful spending operations."
},
"success_on_reward": {
"type": "number",
"description": "Counts successful reward purchases."
},
"success_on_order": {
"type": "number",
"description": "Counts successful order payments."
},
"points": {
"type": "number",
"description": "Totals points spent."
},
"points_on_rewards": {
"type": "number",
"description": "Totals points spent on reward purchases."
},
"points_on_order": {
"type": "number",
"description": "Totals points spent on order payments."
},
"amount_on_order": {
"type": "number",
"description": "Totals order amount paid with points."
},
"object": {
"type": "string",
"const": "spending_summary_report",
"description": "Object type marker. Always `spending_summary_report`."
}
},
"required": [
"id",
"card_definition_id",
"success",
"success_on_reward",
"success_on_order",
"points",
"points_on_rewards",
"points_on_order",
"amount_on_order",
"object"
]
},
"TiersReportFilterTierStructureIdConditions": {
"type": "object",
"description": "ID filter conditions for tier structure ID. Values must match pattern `^lts_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"TiersReportFilterTierIdConditions": {
"type": "object",
"description": "ID filter conditions for tier ID. Values must match pattern `^lt_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lt_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lt_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lt_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lt_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"TiersReportDailyResponse": {
"type": "object",
"description": "Program tiers daily report result.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per tier structure, tier, and aggregation period with recorded movement, ordered by `date` ascending. Empty when no movement was recorded in the range.",
"items": {
"$ref": "#/components/schemas/TiersReportDailyEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"TiersReportSummaryResponse": {
"type": "object",
"description": "Program tiers summary report result.",
"properties": {
"data": {
"type": "array",
"description": "List of summary rows, one per tier structure and tier with recorded movement, ordered by `id` descending. Contains at most 100 rows. Empty when no movement was recorded.",
"items": {
"$ref": "#/components/schemas/TiersReportSummaryEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"RewardsReportFiltersBase": {
"type": "object",
"properties": {
"junction": {
"description": "Joins the field filters. Allowed values are `AND` and `OR`. Defaults to `AND`.",
"oneOf": [
{
"type": "string",
"enum": [
"AND",
"OR"
]
},
{
"type": "null"
}
]
},
"reward_id": {
"description": "Filters by reward ID. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardsReportFilterRewardIdConditions"
},
{
"type": "null"
}
]
}
}
},
"RewardsReportDailyEntry": {
"type": "object",
"description": "Aggregated reward-purchase counts for one period and reward. Counts that did not occur in the period are 0.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"reward_id": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$",
"description": "Identifies the reward (`lrew_...`)."
},
"success_count": {
"type": "number",
"description": "Counts approved reward purchases in the period."
},
"failures_count": {
"type": "number",
"description": "Counts reward purchase attempts that failed in the period."
},
"failures_breakdown": {
"type": "object",
"description": "Always an empty object even if `failures_count` is above zero.",
"additionalProperties": false
},
"object": {
"type": "string",
"const": "program_rewards_daily_report",
"description": "Object type marker. Always `program_rewards_daily_report`."
}
},
"required": [
"date",
"reward_id",
"success_count",
"failures_count",
"failures_breakdown",
"object"
]
},
"RewardsReportSummaryEntry": {
"type": "object",
"description": "All-time reward-purchase counts for one reward. Counts that did not occur are 0.",
"properties": {
"id": {
"type": "string",
"pattern": "^lprrs_[a-f0-9]+$",
"description": "Identifies the summary row (format: `lprrs_` followed by hexadecimal characters)."
},
"reward_id": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$",
"description": "Identifies the reward (`lrew_...`)."
},
"success_count": {
"type": "number",
"description": "Counts approved reward purchases."
},
"failures_count": {
"type": "number",
"description": "Counts reward purchase attempts that failed."
},
"failures_breakdown": {
"$ref": "#/components/schemas/RewardsReportFailuresBreakdown",
"description": "Counts failed reward purchase attempts by reason. Empty when no failures were recorded."
},
"object": {
"type": "string",
"const": "program_rewards_summary_report",
"description": "Object type marker. Always `program_rewards_summary_report`."
}
},
"required": [
"id",
"reward_id",
"success_count",
"failures_count",
"failures_breakdown",
"object"
]
},
"RewardsSpendingsReportFilterCostIdConditions": {
"type": "object",
"description": "ID filter conditions for reward cost ID. Values must match pattern `^lrcst_[a-f0-9]+$`. `$is` and `$is_not` accept a single value (string or 1-element array). `$in` and `$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lrcst_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lrcst_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lrcst_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lrcst_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"RewardsSpendingsReportFilterSpendingIdConditions": {
"type": "object",
"description": "ID filter conditions for reward spending ID. Values must match pattern `^lrspn_[a-f0-9]+$`. `$is` and `$is_not` accept a single value (string or 1-element array). `$in` and `$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lrspn_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lrspn_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lrspn_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lrspn_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"RewardsSpendingsReportDailyEntry": {
"description": "Aggregated points spent on one reward cost and spending for one period and card definition. Counts and points that did not occur in the period are 0.",
"allOf": [
{
"$ref": "#/components/schemas/RewardsSpendingsReportEntryBase"
},
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"success_count": {
"type": "number",
"description": "Counts approved reward point spends in the period."
},
"points": {
"type": "number",
"description": "Totals points spent on those reward spends in the period."
},
"object": {
"type": "string",
"const": "program_rewards_spendings_daily_report",
"description": "Object type marker. Always `program_rewards_spendings_daily_report`."
}
},
"required": [
"date",
"success_count",
"points",
"object"
]
}
]
},
"RewardsSpendingsReportSummaryEntry": {
"description": "All-time points spent on one reward cost and spending for one card definition. Counts and points that did not occur are 0.",
"allOf": [
{
"$ref": "#/components/schemas/RewardsSpendingsReportEntryBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lprss_[a-f0-9]+$",
"description": "Identifies the summary row (format: `lprss_` followed by hexadecimal characters)."
},
"success_count": {
"type": "number",
"description": "Counts approved reward point spends."
},
"points": {
"type": "number",
"description": "Totals points spent on those reward spends."
},
"object": {
"type": "string",
"const": "program_rewards_spendings_summary_report",
"description": "Object type marker. Always `program_rewards_spendings_summary_report`."
}
},
"required": [
"id",
"success_count",
"points",
"object"
]
}
]
},
"MembersReportDailyEntry": {
"type": "object",
"description": "Member and card changes for one aggregation period. Counters that did not change in the period are 0.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"members_joined": {
"type": "number",
"description": "Counts members who joined the program in the period."
},
"members_deactivated": {
"type": "number",
"description": "Counts members deactivated in the period. Decreases by 1 when a member is activated again."
},
"members_deleted": {
"type": "number",
"description": "Counts members deleted in the period."
},
"cards": {
"type": "number",
"description": "Counts cards created in the period. Decreases by 1 when a card is unassigned (e.g. when a member is deleted)."
},
"object": {
"type": "string",
"const": "program_members_daily_report",
"description": "Object type marker. Always `program_members_daily_report`."
}
},
"required": [
"date",
"members_joined",
"members_deactivated",
"members_deleted",
"cards",
"object"
]
},
"MembersReportSummaryEntry": {
"type": "object",
"description": "All-time member and card changes for the program. Counters that did not change are 0.",
"properties": {
"id": {
"type": "string",
"pattern": "^lpmrs_[a-f0-9]+$",
"description": "Identifies the summary row (format: `lpmrs_` followed by hexadecimal characters)."
},
"members_joined": {
"type": "number",
"description": "Counts members who joined the program."
},
"members_deactivated": {
"type": "number",
"description": "Counts members deactivated. Decreases by 1 when a member is activated again."
},
"members_deleted": {
"type": "number",
"description": "Counts members deleted."
},
"cards": {
"type": "number",
"description": "Counts cards created. Decreases by 1 when a card is unassigned (e.g. when a member is deleted)."
},
"object": {
"type": "string",
"const": "program_members_summary_report",
"description": "Object type marker. Always `program_members_summary_report`."
}
},
"required": [
"id",
"members_joined",
"members_deactivated",
"members_deleted",
"cards",
"object"
]
},
"EarningRuleIdFilterConditions": {
"type": "object",
"description": "ID filter conditions for earning rule ID. Values must match pattern `^lern_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lern_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"PointsEarningsReportDailyResponse": {
"type": "object",
"description": "Program points-earnings daily report result.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per aggregation period, earning rule, earning item, and card definition with recorded activity, ordered by `date` ascending. Empty when no activity was recorded in the range.",
"items": {
"$ref": "#/components/schemas/PointsEarningsReportDailyEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"PointsEarningsReportSummaryResponse": {
"type": "object",
"description": "Program points-earnings summary report result.",
"properties": {
"data": {
"type": "array",
"description": "List of summary rows, one per earning rule, earning item, and card definition with recorded activity, ordered by `id` descending. Contains at most 100 rows. Empty when no activity was recorded.",
"items": {
"$ref": "#/components/schemas/PointsEarningsReportSummaryEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"EarningRulesReportDailyResponse": {
"type": "object",
"description": "Program earning-rules daily report result.",
"properties": {
"data": {
"type": "array",
"description": "List of report entries, one per aggregation period and earning rule with recorded activity, ordered by `date` ascending. Empty when no activity was recorded in the range.",
"items": {
"$ref": "#/components/schemas/EarningRulesReportDailyEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"EarningRulesReportSummaryResponse": {
"type": "object",
"description": "Program earning-rules summary report result.",
"properties": {
"data": {
"type": "array",
"description": "List of summary rows, one per earning rule with recorded activity, ordered by `id` descending. Contains at most 100 rows. Empty when no activity was recorded.",
"items": {
"$ref": "#/components/schemas/EarningRulesReportSummaryEntry"
}
},
"object": {
"type": "string",
"const": "report",
"description": "Object type marker. Always `report`."
}
},
"required": [
"data",
"object"
]
},
"LoyaltiesCardDefinitionsListRequestQueryId": {
"type": "object",
"description": "ID field filter. Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`. Values must match the card definition ID pattern\n`^lcdef_[a-f0-9]+$`. `$is`/`$is_not` accept a single value (string or 1-element array);\n`$in`/`$not_in` accept 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`."
},
"$is_not": {
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Excludes one value. A string or a one-element array. Format `lcdef_[a-f0-9]+`."
},
"$in": {
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
}
],
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`."
},
"$not_in": {
"oneOf": [
{
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
}
],
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lcdef_[a-f0-9]+`."
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesCardDefinitionsListRequestQueryName": {
"type": "object",
"description": "String field filter. Allowed conditions: `$is`, `$is_not`, `$contains`, `$not_contain`,\n`$starts_with`, `$ends_with`, `$in`, `$not_in`, `$has_value`, `$is_unknown`.\nSingle-value conditions accept a string or a 1-element array; `$in`/`$not_in`\naccept 1-10 values; `$has_value`/`$is_unknown` are presence checks and ignore the value.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches one value. A string or a one-element array."
},
"$is_not": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Excludes one value. A string or a one-element array."
},
"$contains": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches when the value contains the substring. A string or a one-element array."
},
"$not_contain": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Excludes values that contain the substring. A string or a one-element array."
},
"$starts_with": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches when the value starts with the prefix. A string or a one-element array."
},
"$ends_with": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches when the value ends with the suffix. A string or a one-element array."
},
"$in": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Matches any of the values. A string or an array of 1 to 10 values."
},
"$not_in": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Excludes any of the values. A string or an array of 1 to 10 values."
},
"$has_value": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
],
"description": "Matches when the field is set. The condition value is ignored."
},
"$is_unknown": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
],
"description": "Matches when the field is not set. The condition value is ignored."
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesCardDefinitionsListRequestQueryType": {
"type": "object",
"description": "Enum field filter for the card definition `type` field. Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`.\nValues must be one of: `INDIVIDUAL`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"oneOf": [
{
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches one value. A string or a one-element array."
},
"$is_not": {
"oneOf": [
{
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Excludes one value. A string or a one-element array."
},
"$in": {
"oneOf": [
{
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Matches any of the values. A string or an array of 1 to 10 values."
},
"$not_in": {
"oneOf": [
{
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"INDIVIDUAL"
]
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Excludes any of the values. A string or an array of 1 to 10 values."
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesCardDefinitionsListRequestQueryStatus": {
"type": "object",
"description": "Enum field filter for the card definition `status` field. Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`.\nValues must be one of: `ACTIVE`, `DRAFT` (deleted card definitions are not listable).",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches one value. A string or a one-element array."
},
"$is_not": {
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Excludes one value. A string or a one-element array."
},
"$in": {
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Matches any of the values. A string or an array of 1 to 10 values."
},
"$not_in": {
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Excludes any of the values. A string or an array of 1 to 10 values."
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"CardDefinitionDateFilter": {
"type": "object",
"description": "Date field filter. Allowed conditions:\n`$before`, `$after`, `$is`, `$more_than`, `$less_than`, `$has_value`, `$is_unknown`.\n`$before`/`$after` accept a date string; `$is`/`$more_than`/`$less_than` accept a\nnon-negative integer (number of days); `$has_value`/`$is_unknown` are presence checks.\nSingle values may be passed as a string or a 1-element array.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$before": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array."
},
"$after": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array."
},
"$is": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array."
},
"$more_than": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array."
},
"$less_than": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array."
},
"$has_value": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
],
"description": "Matches when the field is set. The condition value is ignored."
},
"$is_unknown": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
],
"description": "Matches when the field is not set. The condition value is ignored."
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"CardDefinitionListResponse": {
"type": "object",
"description": "Cursor-paginated list of card definitions.",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CardDefinition"
},
"description": "The card definitions in the current page."
},
"cursor": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionListCursor"
},
{
"type": "null"
}
],
"description": "Pagination cursor. `null` when there are no more results."
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"CardDefinitionCreateRequest": {
"type": "object",
"description": "Request body for creating a card definition.\nCross-field rules apply: `balance_settings.allow_negative: true` requires\n`points_expiration.type` to be `NO_EXPIRATION`; the earned points refund mode\n`REVOKE_BELOW_ZERO` requires `allow_negative: true`; and the earned points refund\nmethod `REVOKE_FROM_PENDING` requires `pending_points.type` to be `PERIOD_BASED`,\n`FIXED_DATES` or `EVENT_BASED`.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Card definition name."
},
"type": {
"type": "string",
"enum": [
"INDIVIDUAL"
],
"description": "Card definition type. Currently only `INDIVIDUAL` is supported."
},
"status": {
"type": [
"string",
"null"
],
"enum": [
"DRAFT",
"ACTIVE",
null
],
"description": "Initial status. Allowed values on create are `DRAFT` and `ACTIVE`. Defaults to `DRAFT` when omitted."
},
"code_config": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionCodeConfigInput"
},
{
"type": "null"
}
],
"description": "Card code generation configuration. Defaults to a 10-character alphanumeric pattern."
},
"points_expiration": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPointsExpirationInput"
},
{
"type": "null"
}
],
"description": "Points expiration policy. Defaults to `NO_EXPIRATION`."
},
"pending_points": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPendingPointsInput"
},
{
"type": "null"
}
],
"description": "Pending points activation policy. Defaults to `IMMEDIATE`."
},
"earning_limits": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionEarningLimitsInput"
},
{
"type": "null"
}
],
"description": "Points earning limits. Defaults to `NO_LIMIT` for both global and transaction limits."
},
"spending_limits": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsInput"
},
{
"type": "null"
}
],
"description": "Points spending limits. Defaults to `NO_LIMIT` for both global and transaction limits."
},
"refunds": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionRefundsInput"
},
{
"type": "null"
}
],
"description": "Refund handling configuration. Defaults to `NONE` for both spent and earned points."
},
"balance_settings": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionBalanceSettingsInput"
},
{
"type": "null"
}
],
"description": "Card balance settings. Defaults to `allow_negative: false`."
},
"pay_with_points": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPayWithPointsInput"
},
{
"type": "null"
}
],
"description": "Pay-with-points configuration. Defaults to `NO_PAYMENTS`."
},
"metadata": {
"type": [
"object",
"null"
],
"description": "Arbitrary key-value metadata attached to the card definition."
}
},
"required": [
"name",
"type"
],
"additionalProperties": false
},
"CardDefinition": {
"type": "object",
"description": "A card definition.",
"properties": {
"id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique card definition ID."
},
"name": {
"type": "string",
"description": "Card definition name."
},
"type": {
"type": "string",
"enum": [
"INDIVIDUAL"
],
"description": "Card definition type."
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"DELETED"
],
"description": "Current card definition status."
},
"code_config": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionCodeConfig"
},
"points_expiration": {
"$ref": "#/components/schemas/CardDefinitionPointsExpiration"
},
"pending_points": {
"$ref": "#/components/schemas/CardDefinitionPendingPoints"
},
"earning_limits": {
"$ref": "#/components/schemas/CardDefinitionEarningLimits"
},
"spending_limits": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimits"
},
"refunds": {
"$ref": "#/components/schemas/CardDefinitionRefunds"
},
"balance_settings": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionBalanceSettings"
},
"pay_with_points": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionPayWithPoints"
},
"metadata": {
"type": "object",
"description": "Arbitrary key-value metadata. Empty object when not set."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Last update timestamp (ISO 8601). `null` when the card definition has never been updated."
},
"object": {
"type": "string",
"const": "card_definition",
"description": "Object type marker. Always `card_definition`."
}
},
"required": [
"id",
"name",
"type",
"status",
"code_config",
"points_expiration",
"pending_points",
"earning_limits",
"spending_limits",
"refunds",
"balance_settings",
"pay_with_points",
"metadata",
"created_at",
"updated_at",
"object"
]
},
"CardDefinitionUpdateRequest": {
"type": "object",
"description": "Request body for updating a card definition.\nAll properties are optional. `type` and `status` cannot be updated.",
"properties": {
"name": {
"type": [
"string",
"null"
],
"minLength": 1,
"maxLength": 200,
"description": "Card definition name."
},
"code_config": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionCodeConfigInput"
},
{
"type": "null"
}
],
"description": "Card code generation configuration."
},
"points_expiration": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPointsExpirationInput"
},
{
"type": "null"
}
],
"description": "Points expiration policy."
},
"pending_points": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPendingPointsInput"
},
{
"type": "null"
}
],
"description": "Pending points activation policy."
},
"earning_limits": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionEarningLimitsInput"
},
{
"type": "null"
}
],
"description": "Points earning limits."
},
"spending_limits": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsInput"
},
{
"type": "null"
}
],
"description": "Points spending limits."
},
"refunds": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionRefundsInput"
},
{
"type": "null"
}
],
"description": "Refund handling configuration."
},
"balance_settings": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionBalanceSettingsInput"
},
{
"type": "null"
}
],
"description": "Card balance settings."
},
"pay_with_points": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPayWithPointsInput"
},
{
"type": "null"
}
],
"description": "Pay-with-points configuration."
},
"metadata": {
"type": [
"object",
"null"
],
"description": "Arbitrary key-value metadata attached to the card definition."
}
},
"additionalProperties": false
},
"LoyaltiesCardDefinitionsActivitiesListRequestQueryId": {
"type": "object",
"description": "ID field filter for activity IDs. Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`.\nValues must match the card definition activity ID pattern `^lacd_[a-f0-9]+$`.\n`$is`/`$is_not` accept a single value; `$in`/`$not_in` accept 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"oneOf": [
{
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches one value. A string or a one-element array. Format `lacd_[a-f0-9]+`."
},
"$is_not": {
"oneOf": [
{
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Excludes one value. A string or a one-element array. Format `lacd_[a-f0-9]+`."
},
"$in": {
"oneOf": [
{
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
}
],
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lacd_[a-f0-9]+`."
},
"$not_in": {
"oneOf": [
{
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lacd_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
}
],
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lacd_[a-f0-9]+`."
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesCardDefinitionsActivitiesListRequestQueryType": {
"type": "object",
"description": "Enum field filter for activity types. Allowed conditions:\n`$is`, `$is_not`, `$in`, `$not_in`.\nValues must be one of: `vl.card_definition.created`, `vl.card_definition.updated`,\n`vl.card_definition.deleted`, `vl.card_definition.activated`,\n`vl.card_definition.deactivated`, `vl.card_definition.drafted`,\n`vl.card_definition.assigned`, `vl.card_definition.unassigned`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"properties": {
"$is": {
"oneOf": [
{
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Matches one value. A string or a one-element array."
},
"$is_not": {
"oneOf": [
{
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
"minItems": 1,
"maxItems": 1
}
],
"description": "Excludes one value. A string or a one-element array."
},
"$in": {
"oneOf": [
{
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Matches any of the values. A string or an array of 1 to 10 values."
},
"$not_in": {
"oneOf": [
{
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
]
},
"minItems": 1,
"maxItems": 10
}
],
"description": "Excludes any of the values. A string or an array of 1 to 10 values."
}
},
"additionalProperties": false
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"CardDefinitionActivityListResponse": {
"type": "object",
"description": "Cursor-paginated list of card definition activities.",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CardDefinitionActivity"
},
"description": "The activities in the current page."
},
"cursor": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionActivityListCursor"
},
{
"type": "null"
}
],
"description": "Pagination cursor. `null` when there are no more results."
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"EarningRuleCreateRequest": {
"description": "Request body for creating an earning rule.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleRequestBase"
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Earning rule name."
},
"trigger": {
"$ref": "#/components/schemas/EarningRuleTrigger"
},
"earnings": {
"type": "array",
"minItems": 1,
"description": "Defines the earnings evaluated when the trigger fires. Required. At least one item.",
"items": {
"$ref": "#/components/schemas/EarningRuleEarningCreate"
}
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE"
],
"description": "Initial status. Only `DRAFT` and `ACTIVE` are allowed at creation. Defaults to `DRAFT`."
},
"validity_hours": {
"description": "Hours during which the rule is active. Omit the field or set it to `null` to use `{ \"type\": \"ANY_TIME\" }`. The response always returns `validity_hours`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleValidityHours"
},
{
"type": "null"
}
]
},
"trigger_limits": {
"description": "Cooldown and frequency limits for the trigger. Omit the field or set it to `null` to use `{ \"cooldown\": { \"type\": \"NO_COOLDOWN\" }, \"frequency\": { \"type\": \"NO_LIMIT\" } }`. The response always returns `trigger_limits`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleTriggerLimits"
},
{
"type": "null"
}
]
},
"earning_limits": {
"description": "Limits how many points this rule can award. Omit the field or set it to `null` to use `{ \"global\": { \"type\": \"NO_LIMIT\", \"limits\": [] } }`. The response always returns `earning_limits`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimits"
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"trigger",
"earnings"
]
}
],
"unevaluatedProperties": false
},
"EarningRuleResponse": {
"type": "object",
"description": "Earning rule as returned by the API.",
"properties": {
"id": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$",
"description": "Earning rule ID (`lern_...`)."
},
"name": {
"type": "string",
"maxLength": 200,
"description": "Earning rule name."
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE"
],
"description": "Current status. `DELETED` also exists internally but deleted rules are excluded from API reads."
},
"earnings": {
"type": "array",
"minItems": 1,
"description": "Earning definitions of the rule. Contains at least one earning.",
"items": {
"$ref": "#/components/schemas/EarningRuleEarning"
}
},
"trigger": {
"$ref": "#/components/schemas/EarningRuleTrigger"
},
"error": {
"description": "Default error configuration. Absent when not configured.",
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleError"
},
"validity_hours": {
"$ref": "#/components/schemas/EarningRuleValidityHours",
"description": "Validity hours. Always present; defaults to `{ \"type\": \"ANY_TIME\" }`."
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date-time from which the rule is active. Can be `null`."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date-time until which the rule is active. Can be `null`."
},
"trigger_limits": {
"description": "Cooldown and frequency limits. Always present. `cooldown` and `frequency` are always objects. `frequency.limits` is always an array and is empty when `frequency.type` is `NO_LIMIT`.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleTriggerLimits"
},
{
"type": "object",
"required": [
"cooldown",
"frequency"
],
"properties": {
"cooldown": {
"$ref": "#/components/schemas/EarningRuleTriggerLimitsCooldown"
},
"frequency": {
"$ref": "#/components/schemas/EarningRuleTriggerLimitsFrequency"
}
}
}
]
},
"earning_limits": {
"description": "Limits how many points this rule can award. Always present. Defaults to no global limit (`global.type` `NO_LIMIT` and `global.limits` `[]`).",
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimits"
},
"metadata": {
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata",
"description": "Arbitrary key-value metadata. Always present (empty object when unset)."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Last update timestamp (ISO 8601). `null` when never updated."
},
"object": {
"type": "string",
"const": "earning_rule",
"description": "Object type marker. Always `earning_rule`."
}
},
"required": [
"id",
"name",
"status",
"earnings",
"trigger",
"validity_hours",
"start_date",
"end_date",
"trigger_limits",
"earning_limits",
"metadata",
"created_at",
"updated_at",
"object"
]
},
"LoyaltiesEarningRulesListRequestQueryName": {
"type": "object",
"description": "String field filter conditions. `$is`, `$is_not`, `$contains`, `$not_contain`, `$starts_with` and `$ends_with` take a single value (string or one-element array); `$in` and `$not_in` take up to 10 values; `$has_value` and `$is_unknown` are presence checks (value is ignored).",
"required": [
"conditions"
],
"additionalProperties": false,
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$contains": {
"description": "Matches when the value contains the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$not_contain": {
"description": "Excludes values that contain the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$starts_with": {
"description": "Matches when the value starts with the prefix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$ends_with": {
"description": "Matches when the value ends with the suffix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
]
}
}
}
}
},
"EarningRuleDateFilterConditions": {
"type": "object",
"description": "Date field filter conditions. `$before` and `$after` take a date string; `$is`, `$more_than` and `$less_than` take a non-negative integer number of days (relative comparison); `$has_value` and `$is_unknown` are presence checks.",
"required": [
"conditions"
],
"additionalProperties": false,
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$before": {
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$after": {
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$is": {
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$more_than": {
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$less_than": {
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
}
]
}
}
}
}
},
"EarningRuleListResponse": {
"type": "object",
"description": "Cursor-paginated list of earning rules.",
"properties": {
"data": {
"type": "array",
"description": "Earning rules on the current page.",
"items": {
"$ref": "#/components/schemas/EarningRuleResponse"
}
},
"cursor": {
"$ref": "#/components/schemas/EarningRuleListCursor"
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
}
},
"EarningRuleUpdateRequest": {
"description": "Request body for updating an earning rule. All properties are optional; `status` is not updatable here.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleRequestBase"
},
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Earning rule name."
},
"trigger": {
"$ref": "#/components/schemas/EarningRuleTrigger"
},
"earnings": {
"type": "array",
"minItems": 1,
"description": "Earning definitions. Items with an `id` update existing earning items; items without an `id` are created. Omitted existing items are removed.",
"items": {
"$ref": "#/components/schemas/EarningRuleEarningUpdate"
}
},
"validity_hours": {
"description": "Hours during which the rule is active. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleValidityHours"
},
{
"type": "null"
}
]
},
"trigger_limits": {
"description": "Cooldown and frequency limits for the trigger. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleTriggerLimits"
},
{
"type": "null"
}
]
}
}
}
],
"unevaluatedProperties": false
},
"EarningRuleActivityType": {
"type": "string",
"description": "Earning rule activity type.",
"enum": [
"vl.earning_rule.created",
"vl.earning_rule.updated",
"vl.earning_rule.deleted",
"vl.earning_rule.activated",
"vl.earning_rule.deactivated",
"vl.earning_rule.drafted",
"vl.earning_rule.assigned",
"vl.earning_rule.unassigned"
]
},
"EarningRuleActivitiesListResponse": {
"type": "object",
"description": "Cursor-paginated list of earning rule activities.",
"properties": {
"data": {
"type": "array",
"description": "Activities on the current page.",
"items": {
"$ref": "#/components/schemas/EarningRuleActivityResponse"
}
},
"cursor": {
"type": [
"object",
"null"
],
"description": "Pagination cursor. `null` when there are no more results.",
"properties": {
"next": {
"type": "string",
"description": "Cursor ID to pass as the `cursor` query parameter (matches `^lcrsaer_[a-f0-9]+$`)."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Cursor expiration timestamp."
}
}
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker. Always `list`."
}
}
},
"TierStructureCreateRequest": {
"type": "object",
"description": "Request body for creating a tier structure. No additional properties are allowed.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name of the tier structure. Required."
},
"type": {
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
],
"description": "Tier qualification tracking model. `POINT_BALANCE` qualifies members by their\ncurrent point balance; `POINT_EARNED` qualifies members by points earned within\na tracking period. Required."
},
"point_balance": {
"description": "Point balance tracking settings. Required (non-null) when `type` is\n`POINT_BALANCE`; must be null/omitted when `type` is `POINT_EARNED`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructurePointBalanceUpsert"
},
{
"type": "null"
}
]
},
"point_earned": {
"description": "Points earned tracking settings. Required (non-null) when `type` is\n`POINT_EARNED`; must be null/omitted when `type` is `POINT_BALANCE`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructurePointEarnedUpsert"
},
{
"type": "null"
}
]
},
"expiration": {
"description": "Tier membership expiration settings. If omitted, defaults to\n`{ \"type\": \"NO_RETENTION\" }`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureExpirationUpsert"
},
{
"type": "null"
}
]
},
"downgrade": {
"description": "Downgrade behavior applied when tier membership expires. If omitted, defaults to\n`{ \"type\": \"NO_DOWNGRADE\" }`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureDowngradeUpsert"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Free-form key/value object holding custom attributes.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE"
],
"description": "Initial status of the tier structure. Defaults to `DRAFT` when omitted."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"name",
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "POINT_EARNED"
}
}
},
"then": {
"required": [
"point_earned"
],
"properties": {
"point_earned": {
"$ref": "#/components/schemas/TierStructurePointEarnedUpsert"
},
"point_balance": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "POINT_BALANCE"
}
}
},
"then": {
"required": [
"point_balance"
],
"properties": {
"point_balance": {
"$ref": "#/components/schemas/TierStructurePointBalanceUpsert"
},
"point_earned": {
"type": "null"
}
}
}
}
]
},
"TierStructure": {
"description": "Tier structure resource.",
"allOf": [
{
"$ref": "#/components/schemas/TierMetadataBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Unique tier structure identifier."
},
"name": {
"type": "string",
"description": "Display name of the tier structure."
},
"type": {
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
],
"description": "Tier qualification tracking model."
},
"point_balance": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierStructurePointBalance",
"description": "Point balance tracking settings. Present only when `type` is `POINT_BALANCE`;\nomitted otherwise."
},
"point_earned": {
"$ref": "#/components/schemas/TierStructurePointEarned",
"description": "Points earned tracking settings. Present only when `type` is `POINT_EARNED`;\nomitted otherwise."
},
"expiration": {
"$ref": "#/components/schemas/TierStructureExpiration",
"description": "Tier membership expiration settings."
},
"downgrade": {
"$ref": "#/components/schemas/TierStructureDowngrade",
"description": "Downgrade behavior applied when tier membership expires."
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
],
"description": "Current lifecycle status of the tier structure."
},
"object": {
"type": "string",
"const": "tier_structure",
"description": "Object type discriminator. Always `tier_structure`."
}
},
"required": [
"id",
"name",
"type",
"expiration",
"downgrade",
"status",
"object"
]
}
]
},
"LoyaltiesTierStructuresListRequestQueryId": {
"type": "object",
"description": "ID field filter for tier structure ids. Allowed conditions: `$is`, `$is_not`,\n`$in`, `$not_in`. Each condition accepts a single string or an array of strings\nmatching `^lts_[a-f0-9]+$`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "Condition operators applied to the field.",
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lts_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesTierStructuresListRequestQueryName": {
"type": "object",
"description": "String field filter. Allowed conditions: `$is`, `$is_not`, `$contains`,\n`$not_contain`, `$starts_with`, `$ends_with`, `$in`, `$not_in`, `$has_value`,\n`$is_unknown`. Each condition accepts a single string or an array of strings.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "Condition operators applied to the field.",
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$contains": {
"description": "Matches when the value contains the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$not_contain": {
"description": "Excludes values that contain the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$starts_with": {
"description": "Matches when the value starts with the prefix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$ends_with": {
"description": "Matches when the value ends with the suffix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesTierStructuresListRequestQueryType": {
"type": "object",
"description": "Enum field filter for tier structure `type`. Allowed conditions: `$is`, `$is_not`,\n`$in`, `$not_in`. Allowed values: `POINT_BALANCE`, `POINT_EARNED`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "Condition operators applied to the field.",
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesTierStructuresListRequestQueryStatus": {
"type": "object",
"description": "Enum field filter for tier structure `status`. Allowed conditions: `$is`,\n`$is_not`, `$in`, `$not_in`. Allowed values: `DRAFT`, `ACTIVE`, `INACTIVE`,\n`DELETED`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "Condition operators applied to the field.",
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"TierStructureFilterDateField": {
"type": "object",
"description": "Date field filter. Allowed conditions: `$before`, `$after`, `$is`, `$more_than`,\n`$less_than`, `$has_value`, `$is_unknown`. `$before`/`$after` accept valid date\nstrings; `$is`/`$more_than`/`$less_than` accept non-negative integer values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "Condition operators applied to the field.",
"properties": {
"$before": {
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$after": {
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$is": {
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$more_than": {
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$less_than": {
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"TierStructureListResponse": {
"type": "object",
"description": "Cursor-paginated list of tier structures.",
"properties": {
"data": {
"type": "array",
"description": "Tier structures on the current page.",
"items": {
"$ref": "#/components/schemas/TierStructure"
}
},
"cursor": {
"description": "Pagination cursor for fetching the next page, or `null` when there are no more\nresults.",
"oneOf": [
{
"type": "object",
"properties": {
"next": {
"type": "string",
"pattern": "^lcrsts_[a-f0-9]+$",
"description": "Cursor id to pass as the `cursor` query parameter for the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp after which the cursor expires (ISO 8601)."
}
}
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type discriminator. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"TierStructureUpdateRequest": {
"type": "object",
"description": "Request body for updating a tier structure. All properties are optional; no\nadditional properties are allowed. When the tier structure is not in `DRAFT`\nstatus, only `name` and `metadata` may be updated.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name of the tier structure."
},
"type": {
"type": "string",
"enum": [
"POINT_BALANCE",
"POINT_EARNED"
],
"description": "Tier qualification tracking model. If provided, the matching tracking settings\nobject (`point_balance` or `point_earned`) becomes required."
},
"point_balance": {
"description": "Point balance tracking settings. Required (non-null) when `type` is provided as\n`POINT_BALANCE`; must be null when `type` is provided as `POINT_EARNED`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructurePointBalanceUpsert"
},
{
"type": "null"
}
]
},
"point_earned": {
"description": "Points earned tracking settings. Required (non-null) when `type` is provided as\n`POINT_EARNED`; must be null when `type` is provided as `POINT_BALANCE`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructurePointEarnedUpsert"
},
{
"type": "null"
}
]
},
"expiration": {
"description": "Tier membership expiration settings.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureExpirationUpsert"
},
{
"type": "null"
}
]
},
"downgrade": {
"description": "Downgrade behavior applied when tier membership expires.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureDowngradeUpsert"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Free-form key/value object holding custom attributes.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "POINT_EARNED"
}
},
"required": [
"type"
]
},
"then": {
"required": [
"point_earned"
],
"properties": {
"point_earned": {
"$ref": "#/components/schemas/TierStructurePointEarnedUpsert"
},
"point_balance": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "POINT_BALANCE"
}
},
"required": [
"type"
]
},
"then": {
"required": [
"point_balance"
],
"properties": {
"point_balance": {
"$ref": "#/components/schemas/TierStructurePointBalanceUpsert"
},
"point_earned": {
"type": "null"
}
}
}
}
]
},
"TierCreateRequest": {
"type": "object",
"description": "Request body for creating a tier. No additional properties are allowed.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name of the tier. Required."
},
"qualification_rules": {
"description": "Rules determining which members qualify for this tier. Required.",
"oneOf": [
{
"$ref": "#/components/schemas/TierQualificationRulesUpsert"
}
]
},
"downgrade": {
"description": "Tier-level downgrade behavior. If omitted, defaults to `{ \"type\": \"INHERIT\" }`\n(inherits the tier structure downgrade settings).",
"oneOf": [
{
"$ref": "#/components/schemas/TierDowngradeUpsert"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Free-form key/value object holding custom attributes.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
},
"required": [
"name",
"qualification_rules"
],
"additionalProperties": false
},
"Tier": {
"description": "Tier resource.",
"allOf": [
{
"$ref": "#/components/schemas/TierMetadataBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$",
"description": "Unique tier identifier."
},
"tier_structure_id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Unique identifier of the parent tier structure."
},
"name": {
"type": "string",
"description": "Display name of the tier."
},
"qualification_rules": {
"$ref": "#/components/schemas/TierQualificationRules",
"description": "Rules determining which members qualify for this tier."
},
"downgrade": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierDowngrade",
"description": "Tier-level downgrade behavior. Always present; when the tier has no downgrade\nconfigured, an empty object (no `type`) is returned."
},
"object": {
"type": "string",
"const": "tier",
"description": "Object type discriminator. Always `tier`."
}
},
"required": [
"id",
"tier_structure_id",
"name",
"downgrade",
"object"
]
}
]
},
"TierListResponse": {
"type": "object",
"description": "Cursor-paginated list of tiers.",
"properties": {
"data": {
"type": "array",
"description": "Tiers on the current page.",
"items": {
"$ref": "#/components/schemas/Tier"
}
},
"cursor": {
"description": "Pagination cursor for fetching the next page, or `null` when there are no more\nresults.",
"oneOf": [
{
"type": "object",
"properties": {
"next": {
"type": "string",
"pattern": "^lcrst_[a-f0-9]+$",
"description": "Cursor id to pass as the `cursor` query parameter for the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp after which the cursor expires (ISO 8601)."
}
}
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type discriminator. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"TierUpdateRequest": {
"type": "object",
"description": "Request body for updating a tier. All properties are optional; no additional\nproperties are allowed. When the parent tier structure is not in `DRAFT` status,\nonly `name` and `metadata` may be updated.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name of the tier."
},
"qualification_rules": {
"description": "Rules determining which members qualify for this tier.",
"oneOf": [
{
"$ref": "#/components/schemas/TierQualificationRulesUpsert"
},
{
"type": "null"
}
]
},
"downgrade": {
"description": "Tier-level downgrade behavior.",
"oneOf": [
{
"$ref": "#/components/schemas/TierDowngradeUpsert"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Free-form key/value object holding custom attributes.",
"oneOf": [
{
"type": "object"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"LoyaltiesTierStructuresActivitiesListRequestQueryId": {
"type": "object",
"description": "ID field filter for tier structure activity ids. Allowed conditions: `$is`,\n`$is_not`, `$in`, `$not_in`. Each condition accepts a single string or an array\nof strings matching `^lats_[a-f0-9]+$`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "Condition operators applied to the field.",
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lats_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lats_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lats_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lats_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lats_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesTierStructuresActivitiesListRequestQueryType": {
"type": "object",
"description": "Enum field filter for activity `type`. Allowed conditions: `$is`, `$is_not`,\n`$in`, `$not_in`. Allowed values are the tier structure activity types.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"description": "Condition operators applied to the field.",
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"TierStructureActivityListResponse": {
"type": "object",
"description": "Cursor-paginated list of tier structure activities.",
"properties": {
"data": {
"type": "array",
"description": "Activities on the current page.",
"items": {
"$ref": "#/components/schemas/TierStructureActivity"
}
},
"cursor": {
"description": "Pagination cursor for fetching the next page, or `null` when there are no more\nresults.",
"oneOf": [
{
"type": "object",
"properties": {
"next": {
"type": "string",
"pattern": "^lcrsats_[a-f0-9]+$",
"description": "Cursor id to pass as the `cursor` query parameter for the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp after which the cursor expires (ISO 8601)."
}
}
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type discriminator. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"LoyaltiesBenefitsListRequestQueryId": {
"type": "object",
"description": "ID conditions. Format `lben_[a-f0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesBenefitsListRequestQueryName": {
"type": "object",
"description": "String conditions. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$contains": {
"description": "Matches when the value contains the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$not_contain": {
"description": "Excludes values that contain the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$starts_with": {
"description": "Matches when the value starts with the prefix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$ends_with": {
"description": "Matches when the value ends with the suffix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesBenefitsListRequestQueryStatus": {
"type": "object",
"description": "Enum conditions. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT"
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesBenefitsListRequestQueryType": {
"type": "object",
"description": "Enum conditions. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"BenefitDateFilterConditions": {
"type": "object",
"description": "Date conditions. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$before": {
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"format": "date-time"
}
},
{
"type": "null"
}
]
},
"$after": {
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"format": "date-time"
}
},
{
"type": "null"
}
]
},
"$is": {
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$more_than": {
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$less_than": {
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"BenefitListResponse": {
"type": "object",
"description": "Cursor-paginated list of benefits.",
"properties": {
"data": {
"type": "array",
"description": "Benefits matching the query, in the requested order.",
"items": {
"$ref": "#/components/schemas/Benefit"
}
},
"cursor": {
"description": "Pagination cursor. `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Type of the object. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"BenefitCreateRequest": {
"type": "object",
"description": "Request body for creating a benefit. Exactly one type-specific configuration object\nis required, matching the `type`; the remaining type-specific properties must be\nomitted or `null`.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Benefit name. Must be unique within the project."
},
"type": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
],
"description": "Benefit type. Determines which configuration object is required."
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE"
],
"description": "Initial status of the benefit. Defaults to `DRAFT` when omitted."
},
"points": {
"description": "Fixed points configuration. Required when `type` is `POINTS`, must be null otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPoints"
},
{
"type": "null"
}
]
},
"points_proportional": {
"description": "Proportional points configuration. Required when `type` is `POINTS_PROPORTIONAL`, must be null otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportional"
},
{
"type": "null"
}
]
},
"material": {
"description": "Material (physical product/SKU) configuration. Required when `type` is `MATERIAL`, must be null otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitMaterial"
},
{
"type": "null"
}
]
},
"digital": {
"description": "Digital (campaign-based) configuration. Required when `type` is `DIGITAL`, must be null otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitDigital"
},
{
"type": "null"
}
]
},
"stock": {
"description": "Stock configuration. Defaults to `{ \"type\": \"UNLIMITED\" }` when omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitStock"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"name",
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "POINTS"
}
}
},
"then": {
"required": [
"points"
],
"properties": {
"points": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPoints"
},
"points_proportional": {
"type": "null"
},
"material": {
"type": "null"
},
"digital": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "POINTS_PROPORTIONAL"
}
}
},
"then": {
"required": [
"points_proportional"
],
"properties": {
"points": {
"type": "null"
},
"points_proportional": {
"$ref": "#/components/schemas/BenefitPointsProportional"
},
"material": {
"type": "null"
},
"digital": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "MATERIAL"
}
}
},
"then": {
"required": [
"material"
],
"properties": {
"points": {
"type": "null"
},
"points_proportional": {
"type": "null"
},
"material": {
"$ref": "#/components/schemas/BenefitMaterial"
},
"digital": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "DIGITAL"
}
}
},
"then": {
"required": [
"digital"
],
"properties": {
"points": {
"type": "null"
},
"points_proportional": {
"type": "null"
},
"material": {
"type": "null"
},
"digital": {
"$ref": "#/components/schemas/BenefitDigital"
}
}
}
}
]
},
"Benefit": {
"type": "object",
"description": "A benefit object. Exactly one type-specific configuration object (`points`, `points_proportional`, `material`, or `digital`) is present, matching the `type`; the others are omitted.",
"properties": {
"id": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$",
"description": "Unique benefit ID, prefixed with `lben_`."
},
"name": {
"type": "string",
"description": "Benefit name, unique within the project."
},
"type": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
],
"description": "Benefit type."
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE",
"DELETED"
],
"description": "Current benefit status. `DELETED` appears only in the response of the delete endpoint and in activity snapshots."
},
"stock": {
"description": "Stock configuration. Always present. Null stock is returned as `UNLIMITED` with `limited` omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitStock"
}
]
},
"points": {
"description": "Fixed points configuration. Present only when `type` is `POINTS`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPoints"
}
]
},
"points_proportional": {
"description": "Proportional points configuration. Present only when `type` is `POINTS_PROPORTIONAL`.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportional"
}
]
},
"material": {
"description": "Material configuration. Present only when `type` is `MATERIAL`.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitMaterial"
}
]
},
"digital": {
"description": "Digital configuration. Present only when `type` is `DIGITAL`.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitDigital"
}
]
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the benefit was created, in ISO 8601 format."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp of the last update, in ISO 8601 format. `null` when the benefit was never updated."
},
"object": {
"type": "string",
"const": "benefit",
"description": "Type of the object. Always `benefit`."
}
},
"required": [
"id",
"name",
"type",
"status",
"stock",
"created_at",
"updated_at",
"object"
]
},
"BenefitUpdateRequest": {
"type": "object",
"description": "Request body for updating a benefit. All properties are optional; omitted properties keep\ntheir current values. When the benefit is `ACTIVE`, only `name` and `stock` may be updated.\nAfter the update, the type-specific configuration must stay consistent with the (possibly\nupdated) `type`.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Benefit name. Must be unique within the project."
},
"type": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
],
"description": "Benefit type. Determines which configuration object is required."
},
"points": {
"description": "Fixed points configuration (for `type` `POINTS`).",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPoints"
},
{
"type": "null"
}
]
},
"points_proportional": {
"description": "Proportional points configuration (for `type` `POINTS_PROPORTIONAL`).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportional"
},
{
"type": "null"
}
]
},
"material": {
"description": "Material (physical product/SKU) configuration (for `type` `MATERIAL`).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitMaterial"
},
{
"type": "null"
}
]
},
"digital": {
"description": "Digital (campaign-based) configuration (for `type` `DIGITAL`).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitDigital"
},
{
"type": "null"
}
]
},
"stock": {
"description": "Stock configuration.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitStock"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"LoyaltiesBenefitsActivitiesListRequestQueryId": {
"type": "object",
"description": "ID conditions. Format `laben_[a-f0-9]+`. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `laben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `laben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `laben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `laben_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^laben_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesBenefitsActivitiesListRequestQueryType": {
"type": "object",
"description": "Enum conditions. At least one condition is required.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"BenefitActivityListResponse": {
"type": "object",
"description": "Cursor-paginated list of benefit activities.",
"properties": {
"data": {
"type": "array",
"description": "Activities matching the query, in the requested order.",
"items": {
"$ref": "#/components/schemas/BenefitActivity"
}
},
"cursor": {
"description": "Pagination cursor. `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Type of the object. Always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"LoyaltiesRewardsListRequestQueryId": {
"type": "object",
"description": "ID filter conditions. `$is`/`$is_not` accept a single value (string or 1-element\narray); `$in`/`$not_in` accept a string or an array of 1-100 values. All values\nmust match the reward ID pattern `^lrew_[a-f0-9]+$`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesRewardsListRequestQueryName": {
"type": "object",
"description": "String filter conditions. `$is`, `$is_not`, `$contains`, `$not_contain`,\n`$starts_with` and `$ends_with` accept a single value (string or 1-element array);\n`$in`/`$not_in` accept a string or an array of 1-10 values; `$has_value` and\n`$is_unknown` take no meaningful value (string or array with at most 1 item).",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$contains": {
"description": "Matches when the value contains the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$not_contain": {
"description": "Excludes values that contain the substring. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$starts_with": {
"description": "Matches when the value starts with the prefix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$ends_with": {
"description": "Matches when the value ends with the suffix. A string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesRewardsListRequestQueryType": {
"type": "object",
"description": "Enum filter conditions for the reward `type` field. Allowed values are MATERIAL\nand DIGITAL. `$is`/`$is_not` accept a single value (string or 1-element array);\n`$in`/`$not_in` accept a string or an array of 1-10 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
]
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"RewardDateFilter": {
"type": "object",
"description": "Date filter conditions. `$before`/`$after` accept an ISO-8601 date string (or a\n1-element array of one); `$is`, `$more_than` and `$less_than` accept a\nnon-negative integer value passed as a string;\n`$has_value` and `$is_unknown` take no meaningful value.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$before": {
"description": "Matches dates before the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$after": {
"description": "Matches dates after the given value. An ISO 8601 date-time, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$is": {
"description": "Matches a date exactly the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$more_than": {
"description": "Matches dates more than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$less_than": {
"description": "Matches dates less than the given number of days ago. A non-negative integer, as a string or a one-element array.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"$has_value": {
"description": "Matches when the field is set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_unknown": {
"description": "Matches when the field is not set. The condition value is ignored.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"maxItems": 1
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"RewardListResponse": {
"type": "object",
"description": "Cursor-paginated list of rewards.",
"properties": {
"data": {
"type": "array",
"description": "The rewards on the current page.",
"items": {
"$ref": "#/components/schemas/RewardResponse"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker; always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"RewardCreateRequest": {
"type": "object",
"description": "Request body for creating a reward.\nWhen `type` is `MATERIAL`, `material` is required and\n`digital` must be null; when `type` is `DIGITAL`, `digital` is required and\n`material` must be null.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name of the reward."
},
"type": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
],
"description": "Reward type. MATERIAL rewards deliver a product or SKU; DIGITAL rewards deliver discount coupons, gift vouchers or loyalty card points."
},
"status": {
"type": "string",
"enum": [
"DRAFT",
"ACTIVE"
],
"description": "Initial status of the reward. Defaults to DRAFT behavior when omitted."
},
"validity_hours": {
"description": "Hours during which the reward can be purchased. Defaults to `{ \"type\": \"ANY_TIME\" }` when omitted or `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardValidityHoursRequest"
},
{
"type": "null"
}
]
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date from which the reward is available. Must be an ISO-8601 compliant date."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date until which the reward is available. Must be an ISO-8601 compliant date."
},
"material": {
"description": "Material reward definition. Required when `type` is MATERIAL; must be null when `type` is DIGITAL.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardMaterialRequest"
},
{
"type": "null"
}
]
},
"digital": {
"description": "Digital reward definition. Required when `type` is DIGITAL; must be null when `type` is MATERIAL.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardDigitalRequest"
},
{
"type": "null"
}
]
},
"costs": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"description": "Point costs of the reward. Each cost defines the points to spend on a specific card definition, optionally guarded by rules.",
"items": {
"$ref": "#/components/schemas/RewardCostCreateRequest"
}
},
"purchase_limits": {
"description": "Optional purchase limits. When omitted, defaults to no cooldown and no frequency limit.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseLimitsInput"
},
{
"type": "null"
}
]
},
"refunds": {
"description": "Refund policy for the reward. Defaults to `{ \"type\": \"NONE\" }` when omitted.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardRefunds"
},
{
"type": "null"
}
]
},
"metadata": {
"type": [
"object",
"null"
],
"description": "Arbitrary key-value metadata attached to the reward, as a free-form object."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"name",
"type",
"costs"
]
},
{
"if": {
"properties": {
"type": {
"const": "MATERIAL"
}
}
},
"then": {
"required": [
"material"
],
"properties": {
"material": {
"$ref": "#/components/schemas/RewardMaterialRequest"
},
"digital": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "DIGITAL"
}
}
},
"then": {
"required": [
"digital"
],
"properties": {
"digital": {
"$ref": "#/components/schemas/RewardDigitalRequest"
},
"material": {
"type": "null"
}
}
}
}
]
},
"RewardResponse": {
"type": "object",
"description": "A reward, as returned by the API.",
"properties": {
"id": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$",
"description": "Unique reward identifier, prefixed with `lrew_`."
},
"name": {
"type": "string",
"description": "Display name of the reward."
},
"type": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
],
"description": "Reward type."
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"DRAFT",
"INACTIVE",
"DELETED"
],
"description": "Current lifecycle status of the reward."
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date from which the reward is available, or `null` when not set."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date until which the reward is available, or `null` when not set."
},
"validity_hours": {
"$ref": "#/components/schemas/RewardValidityHoursResponse",
"description": "Hours during which the reward can be purchased. Always present; defaults to `{ \"type\": \"ANY_TIME\" }`."
},
"material": {
"$ref": "#/components/schemas/RewardMaterialResponse",
"description": "Material reward definition. Present only when `type` is MATERIAL; omitted otherwise."
},
"digital": {
"$ref": "#/components/schemas/RewardDigitalResponse",
"description": "Digital reward definition. Present only when `type` is DIGITAL; omitted otherwise."
},
"refunds": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardRefunds",
"description": "Refund policy. Always present; defaults to `{ \"type\": \"NONE\" }`."
},
"costs": {
"type": "array",
"description": "Point costs of the reward. Empty array when no costs are defined.",
"items": {
"$ref": "#/components/schemas/RewardCostResponse"
}
},
"purchase_limits": {
"$ref": "#/components/schemas/RewardPurchaseLimits",
"description": "Purchase limits. Always present; defaults to `{ \"cooldown\": { \"type\": \"NO_COOLDOWN\" }, \"frequency\": { \"type\": \"NO_LIMIT\", \"limits\": [] } }`."
},
"metadata": {
"type": "object",
"description": "Arbitrary key-value metadata attached to the reward. Empty object when not set."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the reward was created (ISO-8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the reward was last updated (ISO-8601), or `null` when never updated."
},
"object": {
"type": "string",
"const": "reward",
"description": "Object type marker; always `reward`."
}
},
"required": [
"id",
"name",
"type",
"status",
"start_date",
"end_date",
"validity_hours",
"refunds",
"costs",
"purchase_limits",
"metadata",
"created_at",
"updated_at",
"object"
]
},
"RewardUpdateRequest": {
"type": "object",
"description": "Request body for updating a reward.\nAll properties are optional. When `type` is provided as\n`MATERIAL`, `material` is required and `digital` must be null; when `type` is\nprovided as `DIGITAL`, `digital` is required and `material` must be null.\nIn ACTIVE/INACTIVE status only `name`, `metadata`, `refunds`, `validity_hours`,\n`start_date`, `end_date`, `costs`, and `purchase_limits` can be updated.",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Display name of the reward."
},
"type": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
],
"description": "Reward type. Can only be changed while the reward is in DRAFT status."
},
"validity_hours": {
"description": "Hours during which the reward can be purchased.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardValidityHoursRequest"
},
{
"type": "null"
}
]
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date from which the reward is available. Must be an ISO-8601 compliant date."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date until which the reward is available. Must be an ISO-8601 compliant date."
},
"material": {
"description": "Material reward definition. Required when `type` is provided as MATERIAL.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardMaterialRequest"
},
{
"type": "null"
}
]
},
"digital": {
"description": "Digital reward definition. Required when `type` is provided as DIGITAL.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardDigitalRequest"
},
{
"type": "null"
}
]
},
"refunds": {
"description": "Refund policy for the reward.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardRefunds"
},
{
"type": "null"
}
]
},
"costs": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"description": "Point costs of the reward. Include the `id` of an existing cost to update it; omit `id` to create a new cost.",
"items": {
"$ref": "#/components/schemas/RewardCostUpdateRequest"
}
},
"purchase_limits": {
"description": "Purchase limits. Omit to leave unchanged; send `null` to reset to no cooldown and no frequency limit.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseLimitsInput"
},
{
"type": "null"
}
]
},
"metadata": {
"type": [
"object",
"null"
],
"description": "Arbitrary key-value metadata attached to the reward, as a free-form object."
}
},
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "MATERIAL"
}
},
"required": [
"type"
]
},
"then": {
"required": [
"material"
],
"properties": {
"material": {
"$ref": "#/components/schemas/RewardMaterialRequest"
},
"digital": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "DIGITAL"
}
},
"required": [
"type"
]
},
"then": {
"required": [
"digital"
],
"properties": {
"digital": {
"$ref": "#/components/schemas/RewardDigitalRequest"
},
"material": {
"type": "null"
}
}
}
}
]
},
"LoyaltiesRewardsActivitiesListRequestQueryId": {
"type": "object",
"description": "ID filter conditions for reward activities. `$is`/`$is_not` accept a single value\n(string or 1-element array); `$in`/`$not_in` accept a string or an array of 1-100\nvalues. All values must match the activity ID pattern `^larew_[a-f0-9]+$`.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `larew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `larew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `larew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `larew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
},
{
"type": "array",
"minItems": 1,
"maxItems": 100,
"items": {
"type": "string",
"pattern": "^larew_[a-f0-9]+$"
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"LoyaltiesRewardsActivitiesListRequestQueryType": {
"type": "object",
"description": "Enum filter conditions for the activity `type` field. `$is`/`$is_not` accept a\nsingle value (string or 1-element array); `$in`/`$not_in` accept a string or an\narray of 1-10 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/RewardActivityType"
}
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/RewardActivityType"
}
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"$ref": "#/components/schemas/RewardActivityType"
}
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 10 values.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardActivityType"
},
{
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"$ref": "#/components/schemas/RewardActivityType"
}
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"RewardActivityListResponse": {
"type": "object",
"description": "Cursor-paginated list of reward activities.",
"properties": {
"data": {
"type": "array",
"description": "The activities on the current page.",
"items": {
"$ref": "#/components/schemas/RewardActivity"
}
},
"cursor": {
"description": "Pagination cursor, or `null` when there are no more results.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardListCursor"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "list",
"description": "Object type marker; always `list`."
}
},
"required": [
"data",
"cursor",
"object"
]
},
"LoyaltiesExamineEarningRulesExamineRequestBodyTrigger": {
"type": "object",
"description": "Which trigger events to examine. With `ALL`, all trigger events are examined and `specific` must be `null`/absent. With `SPECIFIC`, `specific` is required.",
"properties": {
"type": {
"type": "string",
"enum": [
"ALL",
"SPECIFIC"
],
"description": "Trigger examination mode."
},
"specific": {
"description": "Specific event selection. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyTriggerSpecific"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "ALL"
}
}
},
"then": {
"properties": {
"specific": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "SPECIFIC"
}
}
},
"then": {
"required": [
"specific"
],
"properties": {
"specific": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyTriggerSpecific"
}
}
}
}
],
"title": "Loyalties Examine Earning Rules Examine Request Body Trigger"
},
"ExamineCustomerIdentification": {
"type": "object",
"description": "Identifies the customer to examine. Depending on `type`, requires one of `customer_id`, `customer_source_id`, or `member_id`. Non-selected identifiers may be omitted or set to `null`.",
"properties": {
"type": {
"type": "string",
"enum": [
"customer_id",
"customer_source_id",
"member_id"
],
"description": "Identification method."
},
"customer_id": {
"type": [
"string",
"null"
],
"pattern": "^cust_[a-zA-Z0-9]+",
"description": "Unique customer ID (`cust_...`). Required when `type` is `customer_id`."
},
"customer_source_id": {
"type": [
"string",
"number",
"null"
],
"description": "Customer source ID, e.g. from an external system. May be provided as a string or a number. Required when `type` is `customer_source_id`."
},
"member_id": {
"type": [
"string",
"null"
],
"pattern": "^lmbr_[a-f0-9]+$",
"description": "Loyalty member ID (`lmbr_...`). Required when `type` is `member_id`."
}
},
"required": [
"type"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "customer_id"
}
}
},
"then": {
"required": [
"customer_id"
],
"properties": {
"customer_source_id": {
"type": "null"
},
"member_id": {
"type": "null"
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "customer_source_id"
}
}
},
"then": {
"required": [
"customer_source_id"
],
"properties": {
"customer_id": {
"type": "null"
},
"member_id": {
"type": "null"
}
}
}
},
{
"if": {
"required": [
"type"
],
"properties": {
"type": {
"const": "member_id"
}
}
},
"then": {
"required": [
"member_id"
],
"properties": {
"customer_id": {
"type": "null"
},
"customer_source_id": {
"type": "null"
}
}
}
}
]
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomerOrderPaid": {
"title": "Loyalties Examine Earning Rules Examine Request Body Customer Order Paid",
"description": "Context for examining `customer.order.paid` earning rules.",
"allOf": [
{
"$ref": "#/components/schemas/ExamineCustomerContextBase"
},
{
"type": "object",
"properties": {
"order": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyOrder"
}
}
}
],
"unevaluatedProperties": false
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomerSegmentEntered": {
"title": "Loyalties Examine Earning Rules Examine Request Body Customer Segment Entered",
"description": "Context for examining `customer.segment.entered` earning rules. Examine earning rule will work only for dynamic segments whose entry criteria are based on customer or member metadata, among other criteria. However, earning rules based on segments can be checked with the `ALL` scenario.",
"allOf": [
{
"$ref": "#/components/schemas/ExamineCustomerContextBase"
}
],
"unevaluatedProperties": false
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEvent": {
"type": "object",
"description": "Context for examining `customer.custom_event` earning rules. With `type` = `ALL`, `all` is required and `specific` must be `null`/absent. With `SPECIFIC`, `specific` is required and `all` must be null/absent.",
"properties": {
"type": {
"type": "string",
"enum": [
"ALL",
"SPECIFIC"
],
"description": "Whether to examine all custom events or one specific event."
},
"all": {
"description": "Context for all custom events. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEventAll"
},
{
"type": "null"
}
]
},
"specific": {
"description": "Context for a specific custom event. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEventSpecific"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "ALL"
}
}
},
"then": {
"required": [
"all"
],
"properties": {
"specific": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "SPECIFIC"
}
}
},
"then": {
"required": [
"specific"
],
"properties": {
"all": {
"type": "null"
},
"specific": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEventSpecific"
}
}
}
}
],
"title": "Loyalties Examine Earning Rules Examine Request Body Customer Custom Event"
},
"ExamineCustomerReference": {
"type": "object",
"description": "Customer reference in examine results.",
"properties": {
"id": {
"type": "string",
"description": "Unique customer ID (`cust_...`)."
},
"source_id": {
"type": [
"string",
"null"
],
"description": "Customer source ID."
},
"metadata": {
"type": "object",
"description": "Customer metadata (empty object when unset).",
"additionalProperties": true
},
"object": {
"type": "string",
"const": "customer",
"description": "Object type marker. Always `customer`."
}
},
"required": [
"id",
"source_id",
"metadata",
"object"
]
},
"LoyaltiesExamineEarningRulesExamineResponseBodyEarningRuleDetail": {
"type": "object",
"description": "Earning rule detail in examine results.",
"properties": {
"id": {
"type": "string",
"description": "Earning rule ID (`lern_...`)."
},
"name": {
"type": "string",
"description": "Earning rule name."
},
"metadata": {
"type": "object",
"description": "Earning rule metadata (empty object when unset).",
"additionalProperties": true
},
"object": {
"type": "string",
"const": "earning_rule",
"description": "Object type marker. Always `earning_rule`."
}
},
"title": "Loyalties Examine Earning Rules Examine Response Body Earning Rule Detail"
},
"LoyaltiesExamineEarningRulesExamineResponseBodyMembership": {
"type": "object",
"description": "Earning opportunities for one program membership.",
"properties": {
"member": {
"$ref": "#/components/schemas/ExamineMemberReference"
},
"program": {
"$ref": "#/components/schemas/ExamineProgramReference"
},
"cards": {
"type": "array",
"description": "Point estimations per card.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyCardEstimation"
}
},
"benefits": {
"type": "array",
"description": "Benefit estimations.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyBenefitEstimation"
}
},
"object": {
"type": "string",
"const": "member_earnings_opportunity",
"description": "Object type marker. Always `member_earnings_opportunity`."
}
},
"title": "Loyalties Examine Earning Rules Examine Response Body Membership"
},
"LoyaltyV2ActivityMetadata": {
"type": "object",
"description": "Arbitrary key-value metadata; any JSON object is accepted.",
"additionalProperties": true
},
"LoyaltiesExamineRewardsExamineResponseBodyRewardDetail": {
"type": "object",
"description": "Reward detail.",
"properties": {
"id": {
"type": "string",
"description": "Unique reward ID (`lrew_...`)."
},
"name": {
"type": "string",
"description": "Reward name."
},
"type": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
],
"description": "Reward type."
},
"metadata": {
"type": "object",
"description": "Reward metadata (empty object when unset).",
"additionalProperties": true
},
"object": {
"type": "string",
"const": "reward",
"description": "Object type marker. Always `reward`."
},
"purchase_limits": {
"$ref": "#/components/schemas/RewardPurchaseLimits",
"description": "Purchase limits configured on the reward. Present when the reward has purchase limits configured."
}
},
"required": [
"id",
"name",
"type",
"metadata",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body Reward Detail"
},
"LoyaltiesExamineRewardsExamineResponseBodyMembership": {
"type": "object",
"description": "Reward opportunities for one program membership.",
"properties": {
"member": {
"$ref": "#/components/schemas/ExamineMemberReference",
"description": "Identifies the examined loyalty program member."
},
"program": {
"$ref": "#/components/schemas/ExamineProgramReference",
"description": "Identifies the loyalty program for this membership."
},
"cards": {
"type": "array",
"description": "Lists cards that have at least one reward with a resolved points cost. Can be empty.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBodyCardEstimation"
}
},
"object": {
"type": "string",
"const": "member_rewards_opportunity",
"description": "Object type marker. Always `member_rewards_opportunity`."
}
},
"required": [
"member",
"program",
"cards",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body Membership"
},
"ProgramValidityHoursUpsert": {
"type": "object",
"description": "Validity hours configuration. When `type` is `ANY_TIME`, `daily` must be omitted or `null`.\nWhen `type` is `DAILY`, `daily` is required and must contain at least one window.",
"properties": {
"type": {
"type": "string",
"description": "Validity hours mode. `ANY_TIME` means the program is always valid; `DAILY` restricts validity to configured daily windows.",
"enum": [
"DAILY",
"ANY_TIME"
]
},
"daily": {
"description": "Daily validity windows. Required when `type` is `DAILY`; must be null/omitted when `type` is `ANY_TIME`.",
"oneOf": [
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/ProgramValidityDailyHoursUpsert"
}
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "ANY_TIME"
}
}
},
"then": {
"properties": {
"daily": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "DAILY"
}
}
},
"then": {
"required": [
"daily"
],
"properties": {
"daily": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/ProgramValidityDailyHoursUpsert"
}
}
}
}
}
]
},
"ProgramCardDefinitionAssignItem": {
"description": "Card definition to assign to the program.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramCardDefinitionAssignmentItem"
}
],
"unevaluatedProperties": false
},
"ProgramEarningRuleAssignItem": {
"description": "Earning rule to assign to the program.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramEarningRuleAssignmentItem"
}
],
"unevaluatedProperties": false
},
"ProgramRewardAssignItem": {
"type": "object",
"description": "Reward to assign to the program, together with its stock configuration.",
"properties": {
"id": {
"type": "string",
"description": "Unique reward identifier.",
"pattern": "^lrew_[a-f0-9]+$"
},
"stock": {
"$ref": "#/components/schemas/ProgramRewardAssignmentStock"
}
},
"required": [
"id",
"stock"
],
"additionalProperties": false
},
"ProgramTierStructureAssignItem": {
"description": "Tier structure to assign to the program.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramTierStructureAssignmentItem"
}
],
"unevaluatedProperties": false
},
"ProgramCreateAssignedCardDefinition": {
"type": "object",
"description": "Card definition assigned during program creation.",
"properties": {
"id": {
"type": "string",
"description": "Unique card definition identifier.",
"pattern": "^lcdef_[a-f0-9]+$"
}
}
},
"ProgramCreateAssignedEarningRule": {
"type": "object",
"description": "Earning rule assigned during program creation.",
"properties": {
"id": {
"type": "string",
"description": "Unique earning rule identifier.",
"pattern": "^lern_[a-f0-9]+$"
}
}
},
"ProgramCreateAssignedReward": {
"type": "object",
"description": "Reward assigned during program creation.",
"properties": {
"id": {
"type": "string",
"description": "Unique reward identifier.",
"pattern": "^lrew_[a-f0-9]+$"
},
"stock": {
"$ref": "#/components/schemas/ProgramRewardAssignmentStock",
"description": "Stock configuration provided at assignment. Omitted when not provided."
}
}
},
"ProgramCreateAssignedTierStructure": {
"type": "object",
"description": "Tier structure assigned during program creation.",
"properties": {
"id": {
"type": "string",
"description": "Unique tier structure identifier.",
"pattern": "^lts_[a-f0-9]+$"
}
}
},
"ProgramListCursor": {
"type": "object",
"description": "Cursor for fetching the next page of results. Present only when more results are available.",
"properties": {
"next": {
"type": "string",
"description": "Cursor id to pass as the `cursor` query parameter in the next request."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp after which the cursor expires and can no longer be used."
}
}
},
"ProgramValidityHours": {
"type": "object",
"description": "Validity hours configuration of the program.",
"properties": {
"type": {
"type": "string",
"description": "Validity hours mode.",
"enum": [
"DAILY",
"ANY_TIME"
]
},
"daily": {
"type": "array",
"description": "Daily validity windows. Present only when `type` is `DAILY`.",
"items": {
"$ref": "#/components/schemas/ProgramValidityDailyHours"
}
}
}
},
"ProgramActivity": {
"type": "object",
"description": "An activity recorded for a program. The `data` payload always contains the `program`\nobject snapshot; assignment activities additionally include the related resource\n(`card_definition`/`earning_rule`/`reward`/`tier_structure`) and the assignment object\n(`program_card_definition`/`program_earning_rule`/`program_reward`/`program_tier_structure`).",
"properties": {
"id": {
"type": "string",
"description": "Unique activity identifier.",
"pattern": "^laprg_[a-f0-9]+$"
},
"program_id": {
"type": "string",
"description": "Unique identifier of the program the activity relates to.",
"pattern": "^lprg_[a-f0-9]+$"
},
"type": {
"type": "string",
"description": "Activity type.",
"enum": [
"vl.program.created",
"vl.program.updated",
"vl.program.deleted",
"vl.program.activated",
"vl.program.deactivated",
"vl.program.card_definition.assigned",
"vl.program.card_definition.unassigned",
"vl.program.earning_rule.assigned",
"vl.program.earning_rule.unassigned",
"vl.program.reward.assigned",
"vl.program.reward.unassigned",
"vl.program.reward.updated",
"vl.program.tier_structure.assigned",
"vl.program.tier_structure.unassigned"
]
},
"data": {
"type": "object",
"description": "Activity payload. Always includes a `program` snapshot; assignment activities also include the assigned/unassigned resource and assignment objects."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Activity timestamp (ISO 8601)."
},
"group_id": {
"type": "string",
"description": "Unique identifier grouping activities recorded within the same operation."
},
"source": {
"$ref": "#/components/schemas/ProgramActivitySource",
"description": "Origin of the activity. Omitted when unknown."
}
}
},
"ProgramCardDefinitionAssignment": {
"type": "object",
"description": "A card definition assigned to a program.",
"properties": {
"card_type": {
"type": "string",
"description": "Card type of the assigned card definition.",
"enum": [
"INDIVIDUAL"
]
},
"card_definition_id": {
"type": "string",
"description": "Unique card definition identifier.",
"pattern": "^lcdef_[a-f0-9]+$"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Assignment creation timestamp (ISO 8601)."
},
"object": {
"type": "string",
"description": "Object type marker.",
"const": "program_card_definition"
}
}
},
"ProgramCardDefinitionUnassignItem": {
"description": "Card definition to unassign from the program.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramCardDefinitionAssignmentItem"
}
],
"unevaluatedProperties": false
},
"ProgramCardDefinitionBatchOptions": {
"type": "object",
"description": "Options for a card definition assignment batch.",
"properties": {
"strict": {
"type": "boolean",
"description": "Fails the batch when a card definition is missing or inactive, or when an assignment to remove is missing. Defaults to `true`.",
"default": true
}
},
"additionalProperties": false
},
"ProgramEarningRuleAssignment": {
"type": "object",
"description": "An earning rule assigned to a program.",
"properties": {
"earning_rule_id": {
"type": "string",
"description": "Unique earning rule identifier.",
"pattern": "^lern_[a-f0-9]+$"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Assignment creation timestamp (ISO 8601)."
},
"object": {
"type": "string",
"description": "Object type marker. Always `program_earning_rule`.",
"const": "program_earning_rule"
}
},
"required": [
"earning_rule_id",
"created_at",
"object"
]
},
"ProgramEarningRuleUnassignItem": {
"description": "Earning rule to unassign from the program.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramEarningRuleAssignmentItem"
}
],
"unevaluatedProperties": false
},
"ProgramEarningRuleBatchOptions": {
"type": "object",
"description": "Options for an earning rule assignment batch.",
"properties": {
"strict": {
"type": "boolean",
"description": "Fails the batch when an earning rule is missing, or when an assignment to remove is missing. Defaults to `true`.",
"default": true
}
},
"additionalProperties": false
},
"ProgramTierStructureAssignment": {
"type": "object",
"description": "A tier structure assigned to a program.",
"properties": {
"tier_structure_id": {
"type": "string",
"description": "Unique tier structure identifier.",
"pattern": "^lts_[a-f0-9]+$"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Assignment creation timestamp (ISO 8601)."
},
"object": {
"type": "string",
"description": "Object type marker.",
"const": "program_tier_structure"
}
},
"required": [
"tier_structure_id",
"created_at",
"object"
]
},
"ProgramTierStructureUnassignItem": {
"description": "Tier structure to unassign from the program.",
"allOf": [
{
"$ref": "#/components/schemas/ProgramTierStructureAssignmentItem"
}
],
"unevaluatedProperties": false
},
"ProgramTierStructureBatchOptions": {
"type": "object",
"description": "Options for a tier structure assignment batch.",
"properties": {
"strict": {
"type": "boolean",
"description": "Fails the batch when a tier structure is missing or inactive, or when an assignment to remove is missing. Defaults to `true`.",
"default": true
}
},
"additionalProperties": false
},
"ProgramRewardUnassignItem": {
"type": "object",
"description": "Reward to unassign from the program.",
"properties": {
"id": {
"type": "string",
"description": "Unique reward identifier.",
"pattern": "^lrew_[a-f0-9]+$"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"ProgramRewardBatchOptions": {
"type": "object",
"description": "Options for a reward assignment batch.",
"properties": {
"strict": {
"type": "boolean",
"description": "Fails the batch when a reward is missing, or when an assignment to remove is missing. Defaults to `true`.",
"default": true
}
},
"additionalProperties": false
},
"ProgramRewardAssignmentStock": {
"type": "object",
"description": "Reward stock configuration. When `type` is `UNLIMITED`, `limited` must not be provided. When `type` is `LIMITED`, `limited` is required.",
"properties": {
"type": {
"type": "string",
"description": "Stock type.",
"enum": [
"UNLIMITED",
"LIMITED"
]
},
"limited": {
"description": "Limited stock details. Required when `type` is `LIMITED`. Absent when `type` is `UNLIMITED`.",
"$ref": "#/components/schemas/ProgramRewardAssignmentStockLimited"
}
},
"required": [
"type"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "UNLIMITED"
}
}
},
"then": {
"not": {
"required": [
"limited"
]
}
}
},
{
"if": {
"properties": {
"type": {
"const": "LIMITED"
}
}
},
"then": {
"required": [
"limited"
],
"properties": {
"limited": {
"$ref": "#/components/schemas/ProgramRewardAssignmentStockLimited"
}
}
}
}
]
},
"MemberCard": {
"type": "object",
"description": "A member's loyalty card - the member's assignment to the card (`member_role`, `created_at`) combined with the card details in the `card` object.",
"properties": {
"member_role": {
"type": "string",
"enum": [
"OWNER",
"MEMBER"
],
"description": "Role of the member on this card. Currently, loyalty program members can have only the `OWNER` role."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the card was assigned to the member (ISO 8601)."
},
"card": {
"description": "The loyalty card details, or `null` when the card is not available.",
"oneOf": [
{
"$ref": "#/components/schemas/CardSimple"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "member_card",
"description": "Object type marker, always `member_card`."
}
},
"required": [
"member_role",
"created_at",
"card",
"object"
]
},
"ListCursor": {
"type": "object",
"description": "Pagination cursor.",
"properties": {
"next": {
"type": "string",
"description": "Cursor value to pass as the `cursor` query parameter to fetch the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the cursor expires."
}
},
"required": [
"next",
"expires_at"
]
},
"MembershipsCustomer": {
"type": "object",
"description": "Customer identity returned by the cross-program memberships endpoint.",
"properties": {
"id": {
"type": "string",
"description": "Identifies the customer."
},
"source_id": {
"description": "Returns the customer's `source_id`, or `null` when none is set.",
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "customer",
"description": "Object type marker. Always `customer`."
}
},
"required": [
"id",
"source_id",
"object"
]
},
"MembershipWithoutTierProgress": {
"description": "A loyalty membership without tier-progress enrichment on cards. Combines the member, the program, and the member's loyalty cards.",
"allOf": [
{
"$ref": "#/components/schemas/MembershipBase"
},
{
"type": "object",
"properties": {
"cards": {
"type": "array",
"description": "List of the member's loyalty cards for the program. `card.code` may be `null` right after member creation, while code generation is still running. Tier progress is omitted.",
"items": {
"$ref": "#/components/schemas/MemberCard"
}
}
},
"required": [
"cards"
]
}
]
},
"MembershipBase": {
"type": "object",
"properties": {
"member": {
"$ref": "#/components/schemas/Member",
"description": "The loyalty program member."
},
"program": {
"$ref": "#/components/schemas/ProgramSimple",
"description": "The loyalty program the member belongs to."
},
"object": {
"type": "string",
"const": "membership",
"description": "Object type marker, always `membership`."
}
},
"required": [
"member",
"program",
"object"
]
},
"MembershipCard": {
"type": "object",
"description": "A membership's loyalty card - the member's assignment to the card (`member_role`, `created_at`) combined with the card details in the `card` object and the member's tier progress on this card.",
"allOf": [
{
"$ref": "#/components/schemas/MemberCard"
},
{
"type": "object",
"properties": {
"tier_progress": {
"$ref": "#/components/schemas/MemberTierProgress",
"description": "The member's tier progress on this card. Omitted when the card definition has no tier structure, or the member has no tier on this card."
}
}
}
]
},
"VLMemberActivity": {
"description": "An activity recorded for a member.",
"allOf": [
{
"$ref": "#/components/schemas/RecordedActivityBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lambr_[a-f0-9]+$",
"description": "Unique activity ID."
},
"member_id": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$",
"description": "ID of the member the activity relates to."
},
"type": {
"type": "string",
"enum": [
"vl.member.created",
"vl.member.updated",
"vl.member.deleted",
"vl.member.activated",
"vl.member.deactivated",
"vl.member.card.assigned",
"vl.member.card.unassigned"
],
"description": "Activity type. Allowed values: `vl.member.created`, `vl.member.updated`, `vl.member.deleted`, `vl.member.activated`, `vl.member.deactivated`, `vl.member.card.assigned`, and `vl.member.card.unassigned`."
},
"data": {
"$ref": "#/components/schemas/VLMemberActivityData",
"description": "Contains snapshots of the objects involved at the time of the activity."
}
},
"required": [
"id",
"member_id",
"type",
"data"
]
}
]
},
"CardTransaction": {
"type": "object",
"description": "A card transaction.",
"properties": {
"id": {
"type": "string",
"pattern": "^lctx_[a-f0-9]+$",
"description": "Unique card transaction ID assigned by Voucherify."
},
"card_id": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$",
"description": "ID of the card the transaction belongs to. Assigned by Voucherify."
},
"program_id": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$",
"description": "ID of the loyalty program. Assigned by Voucherify."
},
"member_id": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$",
"description": "ID of the member owning the card. Assigned by Voucherify."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "ID of the card definition of the card. Assigned by Voucherify."
},
"card_type": {
"type": "string",
"enum": [
"INDIVIDUAL"
],
"description": "Card type."
},
"type": {
"type": "string",
"enum": [
"ADMIN_CREDIT",
"ADMIN_DEBIT",
"ADMIN_POINTS_EXPIRATION",
"POINTS_EARNED",
"POINTS_SPENT_ON_REWARD",
"POINTS_PURCHASED",
"POINTS_PURCHASE_REVERSED",
"POINTS_SPENT_ON_ORDER",
"POINTS_REFUNDED",
"POINTS_RETURNED",
"POINTS_EXPIRED",
"PENDING_POINTS_ADDED",
"PENDING_POINTS_ACTIVATED",
"PENDING_POINTS_CANCELED"
],
"description": "Transaction type. Options depend on the endpoint and the transaction variant."
},
"details": {
"description": "Card transaction details. `reason`, `rejection` and `metadata` are present on all variants; the remaining fields depend on the transaction `type`:\n\n- `ADMIN_CREDIT`: `points` (`total`, `expiration_date`)\n- `ADMIN_DEBIT`: `points` (`total`)\n- `ADMIN_POINTS_EXPIRATION`: `bucket` (the point bucket expired manually by an admin)\n- `POINTS_EARNED`: `points` (`total`, `expiration_date`)\n- `POINTS_EXPIRED`: `points` (`total`), `date`, `buckets`\n- `POINTS_SPENT_ON_REWARD`: `points` (`total`), `reward`, `reward_transaction`,`target_card`, `purchase_transaction`\n- `POINTS_PURCHASED`: `points` (`total`, `expiration_date`, `expiration_type`), `reward`, `reward_transaction`, `card_transaction`\n- `POINTS_PURCHASE_REVERSED`: `points` (`total`, `expiration_date`,\n `expiration_type`), `reward`, `purchase`, `reward_transaction`\n- `POINTS_SPENT_ON_ORDER`: `points` (`total`), `order`, `order_transaction`\n- `POINTS_REFUNDED`: `points` (`total`)\n- `POINTS_RETURNED`: `points` (`total`, `expiration_date`, `expiration_type`), `reward`, `purchase`, `reward_transaction`\n- `PENDING_POINTS_ADDED` / `PENDING_POINTS_ACTIVATED` / `PENDING_POINTS_CANCELED`: `points` (`total`, `date`, `type`)",
"oneOf": [
{
"$ref": "#/components/schemas/CardTransactionDetails"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"PENDING",
"PROCESSING",
"APPROVED",
"REJECTED"
],
"description": "Transaction processing status. Transactions are created as `PENDING` and processed asynchronously."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the transaction was created (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the transaction was last updated (ISO 8601), or `null`."
},
"object": {
"type": "string",
"const": "card_transaction",
"description": "Object type marker, always `card_transaction`."
}
},
"required": [
"id",
"card_id",
"program_id",
"member_id",
"card_definition_id",
"card_type",
"type",
"details",
"status",
"created_at",
"updated_at",
"object"
]
},
"CardActivity": {
"description": "An activity recorded for a card.",
"allOf": [
{
"$ref": "#/components/schemas/RecordedActivityBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lacrd_[a-f0-9]+$",
"description": "Unique activity ID."
},
"card_id": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$",
"description": "ID of the card the activity relates to."
},
"type": {
"type": "string",
"enum": [
"vl.card.created",
"vl.card.assigned",
"vl.card.unassigned",
"vl.card.code_generation.succeeded",
"vl.card.code_generation.failed"
],
"description": "Activity type. Allowed values: `vl.card.created`, `vl.card.assigned`, `vl.card.unassigned`, `vl.card.code_generation.succeeded`, and `vl.card.code_generation.failed`."
},
"data": {
"$ref": "#/components/schemas/CardActivityData",
"description": "Contains snapshots of the objects involved at the time of the activity."
}
},
"required": [
"id",
"card_id",
"type",
"data"
]
}
]
},
"CardPendingPointsBucket": {
"description": "A pending point bucket of a card.",
"allOf": [
{
"$ref": "#/components/schemas/CardBucketBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lcppb_[a-f0-9]+$",
"description": "Unique pending point bucket ID."
},
"points": {
"type": "object",
"description": "Points held in the bucket.",
"properties": {
"total": {
"type": "number",
"description": "Number of pending points in the bucket."
}
},
"required": [
"total"
]
},
"date": {
"type": "string",
"format": "date",
"description": "Scheduled activation date of the pending points (`YYYY-MM-DD`). For the `EVENT_BASED` type this is the cancellation deadline."
},
"type": {
"type": "string",
"enum": [
"PERIOD_BASED",
"FIXED_DATES",
"EVENT_BASED"
],
"description": "Pending points activation type from the card definition."
},
"status": {
"type": "string",
"enum": [
"PENDING",
"ACTIVATED",
"CANCELED",
"DELETED"
],
"description": "Bucket status."
},
"object": {
"type": "string",
"const": "card_pending_points_bucket",
"description": "Object type marker, always `card_pending_points_bucket`."
}
},
"required": [
"id",
"card_type",
"points",
"date",
"type",
"status",
"object"
]
}
]
},
"CardPointsBucket": {
"description": "A points expiration bucket of a card.",
"allOf": [
{
"$ref": "#/components/schemas/CardBucketBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lcpeb_[a-f0-9]+$",
"description": "Unique points expiration bucket ID."
},
"customer_id": {
"type": "string",
"pattern": "^cust_[a-zA-Z0-9]+",
"description": "Voucherify ID of the customer owning the card."
},
"points": {
"type": "object",
"description": "Points held in the bucket. The bucket may include points from multiple transactions.",
"properties": {
"total": {
"type": "number",
"description": "Number of points in the bucket."
}
},
"required": [
"total"
]
},
"expiration_date": {
"type": "string",
"format": "date",
"description": "Date when the points in the bucket expire (`YYYY-MM-DD`)."
},
"expiration_type": {
"type": "string",
"enum": [
"NO_EXPIRATION",
"ROLLING_EXPIRATION",
"CALENDAR_EXPIRATION",
"SLIDING_EXPIRATION"
],
"description": "Points expiration type for the bucket. It can be inherited from the card definition or overridden by the earning rule."
},
"status": {
"type": "string",
"enum": [
"ACTIVE",
"DELETED",
"EXPIRED"
],
"description": "Bucket status. For the List card expiring points buckets, returns only `ACTIVE` buckets."
},
"object": {
"type": "string",
"const": "card_points_bucket",
"description": "Object type marker, always `card_points_bucket`."
}
},
"required": [
"id",
"customer_id",
"card_type",
"points",
"expiration_date",
"expiration_type",
"status",
"object"
]
}
]
},
"RewardPurchaseRefundPolicies": {
"type": "object",
"description": "Refund policies for a reward purchase refund.",
"properties": {
"refund": {
"description": "Applies the refund override. `DEFAULT` follows the reward's refunds setting. `ALLOW` refunds even when the reward is not refundable. Defaults to `DEFAULT`.",
"oneOf": [
{
"type": "string",
"enum": [
"DEFAULT",
"ALLOW"
]
},
{
"type": "null"
}
]
},
"stock": {
"description": "Controls assignment stock. `DEFAULT` restores one unit when stock is limited. `WRITE_OFF` does not restore stock. Unlimited (`null`) stock is unchanged. Defaults to `DEFAULT`.",
"oneOf": [
{
"type": "string",
"enum": [
"DEFAULT",
"WRITE_OFF"
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"RewardPurchaseTransaction": {
"description": "A reward transaction. Represents a reward purchase or a reward refund.",
"allOf": [
{
"$ref": "#/components/schemas/MemberCardTransactionBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique reward transaction identifier (format `lrtx_...`). Absent for `DRY_RUN` (SIMULATED) transactions, which are never persisted."
},
"card_definition_id": {
"type": [
"string",
"null"
],
"description": "Unique identifier of the card definition for that card (format `lcdef_...`). `null` when none is stored."
},
"card_transaction_id": {
"type": [
"string",
"null"
],
"description": "Identifies of the underlying card transaction (format `lctx_...`). `null` for `DRY_RUN` (SIMULATED) transactions."
},
"reward_id": {
"type": "string",
"description": "Unique identifier of the purchased reward (format `lrew_...`)."
},
"status": {
"type": "string",
"enum": [
"PENDING",
"PROCESSING",
"APPROVED",
"REJECTED",
"SIMULATED",
"REFUNDED"
],
"description": "Transaction status:\n\n- `PENDING`: Created and awaiting processing.\n\n- `PROCESSING`: Being processed.\n\n- `APPROVED`: Completed successfully.\n\n- `REJECTED`: Rejected (see `details.rejection`).\n\n- `SIMULATED`: Dry-run result that is not persisted.\n\n- `REFUNDED`: Purchase has been refunded."
},
"type": {
"type": "string",
"enum": [
"PURCHASE",
"REFUND"
],
"description": "Transaction type."
},
"details": {
"description": "Transaction details. Shape depends on `type` - purchase details for `PURCHASE`, refund details for `REFUND`.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseTransactionDetailsPurchase"
},
{
"$ref": "#/components/schemas/RewardPurchaseTransactionDetailsRefund"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "reward_transaction",
"description": "Object type marker. Always `reward_transaction`."
}
}
}
]
},
"RewardPurchaseTransactionDetailsPurchase": {
"type": "object",
"title": "Purchase details",
"description": "Details of a `PURCHASE` reward transaction.",
"properties": {
"reason": {
"type": "string",
"description": "Human-readable reason. For purchases: \"Points spent on reward\"."
},
"rejection": {
"description": "Rejection details, present when the transaction was rejected. `null` otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseRejection"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"description": "Transaction metadata. Empty object when not set.",
"additionalProperties": true
},
"points": {
"description": "Points spent on the purchase.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchasePoints"
},
{
"type": "null"
}
]
},
"result": {
"description": "Fulfillment result, populated once the purchase is processed (APPROVED). `null` for `PENDING`/`SIMULATED` transactions.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseResult"
},
{
"type": "null"
}
]
}
},
"required": [
"reason",
"rejection",
"metadata",
"points",
"result"
]
},
"OrderPaymentTransaction": {
"description": "An order transaction representing a pay-with-points payment. List endpoints return only persisted transactions; `SIMULATED` appears only on dry-run create responses.",
"allOf": [
{
"$ref": "#/components/schemas/MemberCardTransactionBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifies the order transaction (`lotx_...`). Absent on dry-run (`SIMULATED`) create responses, which are never persisted. Always present in list responses."
},
"card_definition_id": {
"type": "string",
"description": "Identifies the card definition (format `lcdef_...`)."
},
"card_transaction_id": {
"type": [
"string",
"null"
],
"description": "Identifies of the underlying card transaction (format `lctx_...`). `null` for DRY_RUN (SIMULATED) transactions."
},
"order_id": {
"type": "string",
"description": "Identifies the paid order (format `ord_...`)."
},
"status": {
"type": "string",
"enum": [
"PENDING",
"PROCESSING",
"APPROVED",
"REJECTED",
"SIMULATED"
],
"description": "Transaction status. `PENDING` - created, awaiting processing; `PROCESSING` - being processed; `APPROVED` - completed successfully; `REJECTED` - rejected (see `details.rejection`); `SIMULATED` - dry-run create result, not persisted (not returned by list)."
},
"type": {
"type": "string",
"enum": [
"PAY_WITH_POINTS"
],
"description": "Defines the transaction type. Always `PAY_WITH_POINTS`."
},
"details": {
"description": "Transaction details for the `PAY_WITH_POINTS` type.",
"oneOf": [
{
"$ref": "#/components/schemas/OrderPaymentTransactionDetails"
},
{
"type": "null"
}
]
},
"object": {
"type": "string",
"const": "order_transaction",
"description": "Object type marker. Always `order_transaction`."
}
}
}
]
},
"OrderPaymentOrder": {
"type": "object",
"description": "Reference to the order being paid. The order must already exist in the Voucherify system. At least one of `id` or `source_id` must be provided.",
"properties": {
"id": {
"description": "Voucherify order identifier.",
"oneOf": [
{
"type": "string",
"pattern": "^ord_[a-f0-9]+$"
},
{
"type": "null"
}
]
},
"source_id": {
"description": "External (source) order identifier.",
"oneOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimit": {
"title": "Loyalties Programs Members Orders Payments Create Request Body Limit",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimitCardBalance"
},
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimitPointsLimit"
},
{
"$ref": "#/components/schemas/LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimitAmountLimit"
}
]
},
"OrderPaymentTransactionDetails": {
"type": "object",
"description": "Details of a `PAY_WITH_POINTS` order transaction.",
"properties": {
"reason": {
"type": "string",
"description": "Human-readable reason: \"Points spent on order payment\"."
},
"rejection": {
"description": "Rejection details, present when the transaction was rejected.",
"oneOf": [
{
"$ref": "#/components/schemas/OrderPaymentRejection"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"description": "Transaction metadata. For pay-with-points transactions this contains the flattened payment limits used for the calculation: `amount_limit` for the `AMOUNT_LIMIT` type and/or `points_limit` for the `POINTS_LIMIT` type. Empty object when the default `CARD_BALANCE` limit was used or when not set.",
"properties": {
"amount_limit": {
"type": "integer",
"description": "Maximum amount limit applied to the payment (if any)."
},
"points_limit": {
"type": "integer",
"description": "Maximum points limit applied to the payment (if any)."
}
},
"additionalProperties": true
},
"payment": {
"$ref": "#/components/schemas/OrderPaymentPaymentDetails"
},
"spending_cap": {
"description": "The cap that limited this payment. Create always returns it. Older list rows omit it.",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"CARD_SPENDING_GLOBAL_SPENDING_BASED_LIMIT",
"CARD_SPENDING_GLOBAL_TIME_BASED_LIMIT",
"CARD_SPENDING_TRANSACTIONS_LIMIT",
"REQUEST_PAYMENT_LIMIT",
"ORDER_TOTAL_AMOUNT",
"CARD_BALANCE_POINTS"
],
"description": "Identifies which cap limited the payment."
},
"unit": {
"type": "string",
"enum": [
"POINTS",
"AMOUNT"
],
"description": "Whether `value` is points or an amount."
},
"value": {
"type": "number",
"description": "Cap value in `unit`."
}
},
"required": [
"type",
"unit",
"value"
],
"additionalProperties": false
}
}
},
"BenefitTransaction": {
"description": "A benefit transaction. Represents a benefit fulfillment.",
"allOf": [
{
"$ref": "#/components/schemas/MemberTransactionBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique benefit transaction identifier (format `lbtx_...`)."
},
"benefit_id": {
"type": "string",
"description": "Unique identifier of the fulfilled benefit (format `lben_...`)."
},
"earning_rule_id": {
"type": "string",
"description": "Unique identifier of the earning rule that triggered the fulfillment (format `lern_...`)."
},
"type": {
"type": "string",
"enum": [
"FULFILLMENT"
],
"description": "Transaction type. Always `FULFILLMENT`."
},
"details": {
"description": "Transaction details for the `FULFILLMENT` type.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitTransactionDetails"
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"PENDING",
"APPROVED",
"REJECTED"
],
"description": "Transaction status. `PENDING` - created, awaiting processing; `APPROVED` - completed successfully; `REJECTED` - rejected (see `details.rejection`)."
},
"object": {
"type": "string",
"const": "benefit_transaction",
"description": "Object type marker. Always `benefit_transaction`."
}
}
}
]
},
"TierTransaction": {
"type": "object",
"description": "A tier transaction. Records the outcome of a tier evaluation for a member card.",
"properties": {
"id": {
"type": "string",
"description": "Unique tier transaction identifier (format `lttx_...`)."
},
"card_id": {
"type": "string",
"description": "Unique identifier of the related loyalty card (format `lcrd_...`)."
},
"program_id": {
"type": "string",
"description": "Unique identifier of the loyalty program (format `lprg_...`)."
},
"member_id": {
"type": "string",
"description": "Unique identifier of the program member (format `lmbr_...`)."
},
"card_definition_id": {
"type": "string",
"description": "Identifies the card definition (format `lcdef_...`)."
},
"tier_structure_id": {
"type": "string",
"description": "Unique identifier of the tier structure (format `lts_...`)."
},
"tier_id": {
"type": [
"string",
"null"
],
"description": "Unique identifier of the related tier (format `lt_...`), or `null`."
},
"type": {
"type": "string",
"enum": [
"UPGRADED",
"DOWNGRADED",
"JOINED",
"LEFT",
"EXPIRATION_CHANGED",
"EVALUATION_REFRESHED"
],
"description": "Transaction type. `JOINED` - member joined a tier. `LEFT` - member left a tier. `UPGRADED` - member moved to a higher tier. `DOWNGRADED` - member moved to a lower tier. `EXPIRATION_CHANGED` - current tier unchanged; the expiration date was set, extended, or cleared. `EVALUATION_REFRESHED` - current tier and expiration day unchanged; the stored evaluation and points were recalculated."
},
"details": {
"$ref": "#/components/schemas/TierTransactionDetails"
},
"status": {
"type": "string",
"enum": [
"PENDING",
"APPROVED",
"REJECTED"
],
"description": "Transaction status. `PENDING` - created, awaiting processing; `APPROVED` - completed successfully; `REJECTED` - rejected (see `details.rejection`)."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the transaction was created (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the transaction was last updated (ISO 8601), or `null`."
},
"object": {
"type": "string",
"const": "tier_transaction",
"description": "Object type marker. Always `tier_transaction`."
}
},
"required": [
"id",
"card_id",
"program_id",
"member_id",
"card_definition_id",
"tier_structure_id",
"tier_id",
"type",
"details",
"status",
"created_at",
"updated_at",
"object"
]
},
"EarningRuleDailyReportEntry": {
"type": "object",
"description": "Aggregated daily earning-rule usage statistics for one member and earning rule in one period. Numeric fields default to 0.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"count": {
"type": "number",
"description": "Counts successful earning-rule triggers for the member in the period. A trigger rejected by its limit check is not included."
},
"object": {
"type": "string",
"const": "earning_rule_daily_report",
"description": "Object type marker. Always `earning_rule_daily_report`."
}
},
"required": [
"date",
"count",
"object"
]
},
"TiersReportDailyEntry": {
"type": "object",
"description": "Aggregated daily program tier-movement statistics for one period, tier structure, and tier. All numeric fields default to 0.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the aggregation period on the project-local calendar (`YYYY-MM-DD`). The date is truncated to the resolution. For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"tier_structure_id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Unique identifier of the tier structure (format `lts_...`)."
},
"tier_id": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$",
"description": "Unique identifier of the tier (format `lt_...`)."
},
"joins": {
"type": "number",
"description": "Number of members who joined this tier in the period."
},
"upgrades": {
"type": "number",
"description": "Number of upgrades into this tier in the period."
},
"downgrades": {
"type": "number",
"description": "Number of downgrades into this tier in the period."
},
"lefts": {
"type": "number",
"description": "Number of members who left this tier in the period."
},
"prolongs": {
"type": "number",
"description": "Counts expiration-date changes for members who stayed on this tier in the period."
},
"object": {
"type": "string",
"const": "program_tiers_daily_report",
"description": "Object type marker. Always `program_tiers_daily_report`."
}
},
"required": [
"date",
"tier_structure_id",
"tier_id",
"joins",
"upgrades",
"downgrades",
"lefts",
"prolongs",
"object"
]
},
"TiersReportSummaryEntry": {
"type": "object",
"description": "Total program tier-movement statistics for one tier structure and tier. All numeric fields default to 0.",
"properties": {
"id": {
"type": "string",
"pattern": "^lptrs_[a-f0-9]+$",
"description": "Identifies the summary row (format: `lptrs_` followed by hexadecimal characters)."
},
"tier_structure_id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Unique identifier of the tier structure (format `lts_...`)."
},
"tier_id": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$",
"description": "Unique identifier of the tier (format `lt_...`)."
},
"joins": {
"type": "number",
"description": "Total number of members who joined this tier."
},
"upgrades": {
"type": "number",
"description": "Total number of upgrades into this tier."
},
"downgrades": {
"type": "number",
"description": "Total number of downgrades into this tier."
},
"lefts": {
"type": "number",
"description": "Total number of members who left this tier."
},
"prolongs": {
"type": "number",
"description": "Counts expiration-date changes for members who stayed on this tier."
},
"object": {
"type": "string",
"const": "program_tiers_summary_report",
"description": "Object type marker. Always `program_tiers_summary_report`."
}
},
"required": [
"id",
"tier_structure_id",
"tier_id",
"joins",
"upgrades",
"downgrades",
"lefts",
"prolongs",
"object"
]
},
"RewardsReportFilterRewardIdConditions": {
"type": "object",
"description": "ID filter conditions for reward ID. Values must match pattern `^lrew_[a-f0-9]+$`. `$is` and `$is_not` accept a single value (string or 1-element array). `$in` and `$not_in` accept a string or an array of 1-100 values.",
"properties": {
"conditions": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"$is": {
"description": "Matches one value. A string or a one-element array. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$is_not": {
"description": "Excludes one value. A string or a one-element array. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 1
},
{
"type": "null"
}
]
},
"$in": {
"description": "Matches any of the values. A string or an array of 1 to 100 values. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
},
"$not_in": {
"description": "Excludes any of the values. A string or an array of 1 to 100 values. Format `lrew_[a-f0-9]+`.",
"oneOf": [
{
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$"
},
"minItems": 1,
"maxItems": 100
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"conditions"
],
"additionalProperties": false
},
"RewardsReportFailuresBreakdown": {
"description": "Counts failed reward purchase attempts by reason. A reason is present only when it was recorded. Empty when no failures were recorded. Keys can also be a card-transaction rejection reason or a publication error key.",
"allOf": [
{
"$ref": "#/components/schemas/ReportLimitFailureCountBase"
},
{
"type": "object",
"properties": {
"OUT_OF_STOCK": {
"type": "number",
"description": "Counts failures caused by missing stock."
},
"REWARD_NOT_FOUND": {
"type": "number",
"description": "Counts failures caused by a missing reward."
},
"REWARD_NOT_ACTIVE": {
"type": "number",
"description": "Counts failures caused by an inactive reward."
},
"PROGRAM_NOT_FOUND": {
"type": "number",
"description": "Counts failures caused by a missing program."
},
"MEMBER_NOT_FOUND": {
"type": "number",
"description": "Counts failures caused by a missing member."
},
"MEMBER_NOT_ACTIVE": {
"type": "number",
"description": "Counts failures caused by an inactive member."
},
"PUBLICATION_FAILED": {
"type": "number",
"description": "Counts failures caused by a failed voucher publication."
},
"TARGET_CARD_NOT_FOUND": {
"type": "number",
"description": "Counts failures caused by a missing target card."
},
"POINTS_PURCHASE_FAILED": {
"type": "number",
"description": "Counts failures caused by a failed points purchase."
},
"UNEXPECTED_ERROR": {
"type": "number",
"description": "Counts failures caused by an unexpected error."
}
}
}
],
"additionalProperties": {
"type": "number"
}
},
"RewardsSpendingsReportEntryBase": {
"type": "object",
"properties": {
"reward_id": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$",
"description": "Identifies the reward (`lrew_...`)."
},
"cost_id": {
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$",
"description": "Identifies the reward cost (`lrcst_...`)."
},
"spending_id": {
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$",
"description": "Identifies the reward spending (`lrspn_...`)."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Identifies the card definition (`lcdef_...`)."
}
},
"required": [
"reward_id",
"cost_id",
"spending_id",
"card_definition_id"
]
},
"PointsEarningsReportDailyEntry": {
"description": "Aggregated daily program points-earnings statistics for one period, earning rule, earning item, and card definition. All numeric fields default to 0.",
"allOf": [
{
"$ref": "#/components/schemas/PointsEarningsReportEntryBase"
},
{
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"success_count": {
"type": "number",
"description": "Counts earning operations that credited points or added pending points in the period."
},
"points": {
"type": "number",
"description": "Sums points credited immediately by earning rules in the period. Pending points activated in the period are not included."
},
"pending_points": {
"type": "number",
"description": "Sums pending points added in the period. Activated and canceled pending points are not deducted."
},
"object": {
"type": "string",
"const": "program_points_earnings_daily_report",
"description": "Object type marker. Always `program_points_earnings_daily_report`."
}
},
"required": [
"date",
"success_count",
"points",
"pending_points",
"object"
]
}
]
},
"PointsEarningsReportSummaryEntry": {
"description": "Total program points-earnings statistics for one earning rule, earning item, and card definition. All numeric fields default to 0.",
"allOf": [
{
"$ref": "#/components/schemas/PointsEarningsReportEntryBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lppes_[a-f0-9]+$",
"description": "Identifies the summary row (format: `lppes_` followed by hexadecimal characters)."
},
"success_count": {
"type": "number",
"description": "Counts earning operations that credited points or added pending points."
},
"points": {
"type": "number",
"description": "Sums points credited immediately by earning rules. Pending points activated later are not included."
},
"pending_points": {
"type": "number",
"description": "Sums pending points added. Activated and canceled pending points are not deducted."
},
"object": {
"type": "string",
"const": "program_points_earnings_summary_report",
"description": "Object type marker. Always `program_points_earnings_summary_report`."
}
},
"required": [
"id",
"success_count",
"points",
"pending_points",
"object"
]
}
]
},
"EarningRulesReportDailyEntry": {
"type": "object",
"description": "Aggregated daily program earning-rule evaluation statistics for one period and earning rule. All numeric fields default to 0.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Identifies the start of the truncated aggregation period (`YYYY-MM-DD`). For `week` this is Monday. For `month` this is the first day. For `quarter` this is the quarter start."
},
"earning_rule_id": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$",
"description": "Identifies the earning rule (format `lern_...`)."
},
"success_count": {
"type": "number",
"description": "Counts eligibility checks that passed the trigger limit in the period."
},
"failures_count": {
"type": "number",
"description": "Counts eligibility checks that failed the trigger limit in the period."
},
"failures_breakdown": {
"type": "object",
"description": "Always an empty object even if `failures_count` is above zero.",
"additionalProperties": false
},
"object": {
"type": "string",
"const": "program_earning_rules_daily_report",
"description": "Object type marker. Always `program_earning_rules_daily_report`."
}
},
"required": [
"date",
"earning_rule_id",
"success_count",
"failures_count",
"failures_breakdown",
"object"
]
},
"EarningRulesReportSummaryEntry": {
"type": "object",
"description": "Total program earning-rule evaluation statistics for one earning rule. All numeric fields default to 0.",
"properties": {
"id": {
"type": "string",
"pattern": "^lpers_[a-f0-9]+$",
"description": "Identifies the summary row (format: `lpers_` followed by hexadecimal characters)."
},
"earning_rule_id": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$",
"description": "Identifies the earning rule (format `lern_...`)."
},
"success_count": {
"type": "number",
"description": "Counts eligibility checks that passed the trigger limit."
},
"failures_count": {
"type": "number",
"description": "Counts eligibility checks that failed the trigger limit."
},
"failures_breakdown": {
"$ref": "#/components/schemas/EarningRulesReportFailuresBreakdown",
"description": "Counts failed trigger-limit checks by reason. Either key may be absent or `0`. The object is empty when no failure counts are stored yet."
},
"object": {
"type": "string",
"const": "program_earning_rules_summary_report",
"description": "Object type marker. Always `program_earning_rules_summary_report`."
}
},
"required": [
"id",
"earning_rule_id",
"success_count",
"failures_count",
"failures_breakdown",
"object"
]
},
"CardDefinitionListCursor": {
"type": "object",
"description": "Pagination cursor.",
"properties": {
"next": {
"type": "string",
"pattern": "^lcrscdef_[a-f0-9]+$",
"description": "Cursor ID to pass as the `cursor` query parameter to fetch the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp after which the cursor expires."
}
},
"required": [
"next"
]
},
"CardDefinitionCodeConfigInput": {
"type": "object",
"description": "Card code generation configuration.\nWhen `pattern` is provided, the effective code length is the number of `#`\nplaceholders in the pattern; otherwise `length` (default 10) `#` placeholders are used.",
"properties": {
"length": {
"type": [
"integer",
"null"
],
"description": "Number of generated characters in the code (ignored when `pattern` is provided).\nA positive integer. Defaults to 10."
},
"charset": {
"type": [
"string",
"null"
],
"description": "Characters used for code generation. Defaults to alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`."
},
"prefix": {
"type": [
"string",
"null"
],
"description": "Fixed prefix prepended to every generated code. Defaults to an empty string."
},
"postfix": {
"type": [
"string",
"null"
],
"description": "Fixed postfix appended to every generated code. Defaults to an empty string."
},
"pattern": {
"type": [
"string",
"null"
],
"description": "Code pattern where each `#` is replaced with a random character from the charset, e.g. `###-###`. Defaults to `#` repeated `length` times."
}
},
"additionalProperties": false
},
"CardDefinitionPointsExpirationInput": {
"type": "object",
"description": "Points expiration policy.\nConditional requirements based on `type`:\n- `NO_EXPIRATION`: `rolling_expiration`, `calendar_expiration` and `sliding_expiration` must be null/absent.\n- `ROLLING_EXPIRATION`: `rolling_expiration` is required; the other two must be null/absent.\n- `CALENDAR_EXPIRATION`: `calendar_expiration` is required; the other two must be null/absent.\n- `SLIDING_EXPIRATION`: `sliding_expiration` is required; the other two must be null/absent.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_EXPIRATION",
"ROLLING_EXPIRATION",
"CALENDAR_EXPIRATION",
"SLIDING_EXPIRATION"
],
"description": "Points expiration type."
},
"rolling_expiration": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPointsExpirationRollingExpirationInput"
},
{
"type": "null"
}
],
"description": "Rolling expiration configuration. Required when `type` is `ROLLING_EXPIRATION`, must be null otherwise."
},
"calendar_expiration": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPointsExpirationCalendarExpirationInput"
},
{
"type": "null"
}
],
"description": "Calendar expiration configuration. Required when `type` is `CALENDAR_EXPIRATION`, must be null otherwise."
},
"sliding_expiration": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPointsExpirationSlidingExpirationInput"
},
{
"type": "null"
}
],
"description": "Sliding expiration configuration. Required when `type` is `SLIDING_EXPIRATION`, must be null otherwise."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionPendingPointsInput": {
"type": "object",
"description": "Pending points activation policy.\nConditional requirements based on `type`:\n- `IMMEDIATE`: `period_based`, `fixed_dates` and `event_based` must be null/absent.\n- `PERIOD_BASED`: `period_based` is required; the other two must be null/absent.\n- `FIXED_DATES`: `fixed_dates` is required; the other two must be null/absent.\n- `EVENT_BASED`: `event_based` is required; the other two must be null/absent.",
"properties": {
"type": {
"type": "string",
"enum": [
"IMMEDIATE",
"PERIOD_BASED",
"FIXED_DATES",
"EVENT_BASED"
],
"description": "Pending points activation type. `IMMEDIATE` means no pending period."
},
"period_based": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPendingPointsPeriodBasedInput"
},
{
"type": "null"
}
],
"description": "Period-based activation. Required when `type` is `PERIOD_BASED`, must be null otherwise."
},
"fixed_dates": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPendingPointsFixedDatesInput"
},
{
"type": "null"
}
],
"description": "Fixed-dates activation. Required when `type` is `FIXED_DATES`, must be null otherwise."
},
"event_based": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPendingPointsEventBasedInput"
},
{
"type": "null"
}
],
"description": "Event-based activation. Required when `type` is `EVENT_BASED`, must be null otherwise."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionEarningLimitsInput": {
"type": "object",
"description": "Points earning limits.",
"properties": {
"global": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsGlobalInput"
},
"transactions": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsTransactionsInput"
}
},
"required": [
"global",
"transactions"
],
"additionalProperties": false
},
"CardDefinitionSpendingLimitsInput": {
"type": "object",
"description": "Points spending limits.",
"properties": {
"global": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobalInput"
},
"transactions": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsTransactionsInput"
}
},
"required": [
"global",
"transactions"
],
"additionalProperties": false
},
"CardDefinitionRefundsInput": {
"type": "object",
"description": "Refund handling configuration.",
"properties": {
"spent_points": {
"$ref": "#/components/schemas/CardDefinitionRefundsSpentPointsInput"
},
"earned_points": {
"$ref": "#/components/schemas/CardDefinitionRefundsEarnedPointsInput"
}
},
"required": [
"spent_points",
"earned_points"
],
"additionalProperties": false
},
"CardDefinitionBalanceSettingsInput": {
"type": "object",
"description": "Card balance settings. `allow_negative` can only be `true` when\n`points_expiration.type` is `NO_EXPIRATION`.",
"properties": {
"allow_negative": {
"type": "boolean",
"description": "Whether the card balance is allowed to go below zero."
}
},
"required": [
"allow_negative"
],
"additionalProperties": false
},
"CardDefinitionPayWithPointsInput": {
"description": "Pay-with-points configuration, discriminated by `type`:\n`NO_PAYMENTS` (paying with points disabled) or `EXCHANGE_RATIO`\n(points can be exchanged for money using a formula).",
"oneOf": [
{
"type": "object",
"description": "Paying with points is disabled.",
"properties": {
"type": {
"type": "string",
"const": "NO_PAYMENTS",
"description": "Pay-with-points type."
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Points can be exchanged for money at the configured ratio.",
"properties": {
"type": {
"type": "string",
"const": "EXCHANGE_RATIO",
"description": "Pay-with-points type."
},
"exchange_ratio": {
"$ref": "#/components/schemas/CardDefinitionPayWithPointsExchangeRatioInput"
}
},
"required": [
"type",
"exchange_ratio"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "type"
}
},
"LoyaltyV2ActivityCardDefinitionCodeConfig": {
"type": "object",
"description": "Card code generation configuration. Always present with server-side defaults applied.",
"properties": {
"pattern": {
"type": "string",
"description": "Code pattern where each `#` is replaced with a random character from the charset."
},
"length": {
"type": "integer",
"description": "Number of `#` placeholders in the pattern."
},
"charset": {
"type": "string",
"description": "Characters used for code generation."
},
"prefix": {
"type": "string",
"description": "Fixed prefix prepended to every generated code. Empty string when not set."
},
"postfix": {
"type": "string",
"description": "Fixed postfix appended to every generated code. Empty string when not set."
}
},
"required": [
"pattern",
"length",
"charset",
"prefix",
"postfix"
]
},
"CardDefinitionPointsExpiration": {
"type": "object",
"description": "Points expiration policy. Always present; defaults to `NO_EXPIRATION`.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_EXPIRATION",
"ROLLING_EXPIRATION",
"CALENDAR_EXPIRATION",
"SLIDING_EXPIRATION"
],
"description": "Points expiration type."
},
"rolling_expiration": {
"$ref": "#/components/schemas/CardDefinitionPointsExpirationRollingExpiration",
"description": "Rolling expiration configuration. Only present when `type` is `ROLLING_EXPIRATION`."
},
"calendar_expiration": {
"$ref": "#/components/schemas/CardDefinitionPointsExpirationCalendarExpiration",
"description": "Calendar expiration configuration. Only present when `type` is `CALENDAR_EXPIRATION`."
},
"sliding_expiration": {
"$ref": "#/components/schemas/CardDefinitionPointsExpirationSlidingExpiration",
"description": "Sliding expiration configuration. Only present when `type` is `SLIDING_EXPIRATION`."
}
},
"required": [
"type"
]
},
"CardDefinitionPendingPoints": {
"type": "object",
"description": "Pending points activation policy. Always present; defaults to `IMMEDIATE`.",
"properties": {
"type": {
"type": "string",
"enum": [
"IMMEDIATE",
"PERIOD_BASED",
"FIXED_DATES",
"EVENT_BASED"
],
"description": "Pending points activation type."
},
"period_based": {
"$ref": "#/components/schemas/CardDefinitionPendingPointsPeriodBased",
"description": "Period-based activation. Only present when `type` is `PERIOD_BASED`."
},
"fixed_dates": {
"$ref": "#/components/schemas/CardDefinitionPendingPointsFixedDates",
"description": "Fixed-dates activation. Only present when `type` is `FIXED_DATES`."
},
"event_based": {
"$ref": "#/components/schemas/CardDefinitionPendingPointsEventBased",
"description": "Event-based activation. Only present when `type` is `EVENT_BASED`."
}
},
"required": [
"type"
]
},
"CardDefinitionEarningLimits": {
"type": "object",
"description": "Points earning limits. Always present; defaults to `NO_LIMIT` for both scopes.",
"properties": {
"global": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsGlobal"
},
"transactions": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsTransactions"
}
}
},
"CardDefinitionSpendingLimits": {
"type": "object",
"description": "Points spending limits. Always present; defaults to `NO_LIMIT` for both scopes.",
"properties": {
"global": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobal"
},
"transactions": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsTransactions"
}
}
},
"CardDefinitionRefunds": {
"type": "object",
"description": "Refund handling configuration. Always present; defaults to `NONE` for both scopes.",
"properties": {
"spent_points": {
"$ref": "#/components/schemas/CardDefinitionRefundsSpentPoints"
},
"earned_points": {
"$ref": "#/components/schemas/CardDefinitionRefundsEarnedPoints"
}
},
"required": [
"spent_points",
"earned_points"
]
},
"LoyaltyV2ActivityCardDefinitionBalanceSettings": {
"type": "object",
"description": "Card balance settings. Always present; defaults to `allow_negative: false`.",
"properties": {
"allow_negative": {
"type": "boolean",
"description": "Whether the card balance is allowed to go below zero."
}
},
"required": [
"allow_negative"
]
},
"LoyaltyV2ActivityCardDefinitionPayWithPoints": {
"type": "object",
"description": "Pay-with-points configuration. Always present; defaults to `NO_PAYMENTS`.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_PAYMENTS",
"EXCHANGE_RATIO"
],
"description": "Pay-with-points type."
},
"exchange_ratio": {
"type": "object",
"description": "Exchange ratio. Only present when `type` is `EXCHANGE_RATIO`.",
"properties": {
"formula": {
"type": "string",
"description": "Exchange ratio formula (always returned as a string)."
}
},
"required": [
"formula"
]
}
},
"required": [
"type"
]
},
"CardDefinitionActivity": {
"type": "object",
"description": "A card definition activity entry.",
"properties": {
"id": {
"type": "string",
"pattern": "^lacd_[a-f0-9]+$",
"description": "Unique activity ID."
},
"type": {
"type": "string",
"enum": [
"vl.card_definition.created",
"vl.card_definition.updated",
"vl.card_definition.deleted",
"vl.card_definition.activated",
"vl.card_definition.deactivated",
"vl.card_definition.drafted",
"vl.card_definition.assigned",
"vl.card_definition.unassigned"
],
"description": "Activity type."
},
"data": {
"type": "object",
"description": "Activity payload. For created/updated/deleted/activated/deactivated/drafted\nactivities it contains a `card_definition` snapshot (the state of the card\ndefinition at the time of the activity). For assigned/unassigned activities\nit additionally contains `program` and `program_card_definition` snapshots.",
"properties": {
"card_definition": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinition"
},
{
"type": "null"
}
],
"description": "Snapshot of the card definition at the time of the activity."
}
}
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Activity timestamp (ISO 8601)."
},
"group_id": {
"type": "string",
"description": "Groups related activities triggered by the same operation."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "ID of the card definition this activity belongs to."
},
"source": {
"$ref": "#/components/schemas/CardDefinitionActivitySource",
"description": "Source of the activity. Omitted when unknown."
}
},
"required": [
"id",
"type",
"data",
"created_at",
"card_definition_id"
]
},
"CardDefinitionActivityListCursor": {
"type": "object",
"description": "Pagination cursor for the activities list.",
"properties": {
"next": {
"type": "string",
"pattern": "^lcrsacd_[a-f0-9]+$",
"description": "Cursor ID to pass as the `cursor` query parameter to fetch the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp after which the cursor expires."
}
},
"required": [
"next"
]
},
"EarningRuleRequestBase": {
"type": "object",
"properties": {
"error": {
"description": "Default error returned when rule validation fails. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleError"
},
{
"type": "null"
}
]
},
"start_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date-time from which the rule is active. Can be `null`. When both `start_date` and `end_date` are set, `start_date` must be earlier than `end_date`."
},
"end_date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date-time until which the rule is active. Can be `null`."
},
"metadata": {
"description": "Arbitrary key-value metadata. A request may omit this field or set it to `null`. `null` is stored as an empty object. The response always returns an object.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
}
},
"EarningRuleTrigger": {
"type": "object",
"description": "Event that triggers the earning rule. Depending on `event`, either `custom_event` or `segment` is required and the other trigger contexts must be `null`/absent.",
"properties": {
"event": {
"type": "string",
"enum": [
"customer.order.paid",
"customer.custom_event",
"customer.segment.entered"
],
"description": "Triggering event type."
},
"custom_event": {
"description": "Required when `event` is `customer.custom_event`. Absent for other events.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerCustomEvent"
},
{
"type": "null"
}
]
},
"segment": {
"description": "Required when `event` is `customer.segment.entered`. Absent for other events.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerSegment"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"event"
]
},
{
"if": {
"properties": {
"event": {
"const": "customer.order.paid"
}
}
},
"then": {
"properties": {
"custom_event": {
"type": "null"
},
"segment": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"event": {
"const": "customer.custom_event"
}
}
},
"then": {
"required": [
"custom_event"
],
"properties": {
"custom_event": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerCustomEvent"
},
"segment": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"event": {
"const": "customer.segment.entered"
}
}
},
"then": {
"required": [
"segment"
],
"properties": {
"custom_event": {
"type": "null"
},
"segment": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerSegment"
}
}
}
}
]
},
"EarningRuleEarningCreate": {
"description": "A single earning definition combining optional validation rules with effects.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleEarningBase"
}
],
"unevaluatedProperties": false
},
"EarningRuleValidityHours": {
"type": "object",
"description": "Hours during which the earning rule is active. With `ANY_TIME`, `daily` must be null/absent. With `DAILY`, `daily` is required (at least one entry).",
"properties": {
"type": {
"type": "string",
"enum": [
"DAILY",
"ANY_TIME"
],
"description": "Validity hours type."
},
"daily": {
"description": "Daily validity windows. Can be `null`.",
"oneOf": [
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleValidityDailyHours"
}
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "ANY_TIME"
}
}
},
"then": {
"properties": {
"daily": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "DAILY"
}
}
},
"then": {
"required": [
"daily"
],
"properties": {
"daily": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleValidityDailyHours"
}
}
}
}
}
]
},
"EarningRuleTriggerLimits": {
"type": "object",
"description": "Cooldown and frequency limits applied to the earning rule trigger.",
"properties": {
"cooldown": {
"description": "Cooldown configuration. `null`able (defaults to `NO_COOLDOWN`).",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleTriggerLimitsCooldown"
},
{
"type": "null"
}
]
},
"frequency": {
"description": "Frequency limit configuration. `null`able (defaults to `NO_LIMIT`).",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleTriggerLimitsFrequency"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRuleEarningLimits": {
"type": "object",
"description": "Limits on points earned through this rule. Always present. Defaults to `{ \"global\": { \"type\": \"NO_LIMIT\", \"limits\": [] } }`. Unlike card definition earning limits, this object has no `transactions` key.",
"properties": {
"global": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobal"
}
},
"required": [
"global"
],
"additionalProperties": false
},
"EarningRuleEarning": {
"type": "object",
"description": "An earning definition as returned by the API.",
"properties": {
"id": {
"type": "string",
"pattern": "^lernei_[a-f0-9]+$",
"description": "Earning item ID (`lernei_...`)."
},
"name": {
"type": [
"string",
"null"
],
"maxLength": 200,
"description": "Earning item name. Can be `null`."
},
"rules": {
"description": "Validation rules group. Absent when the earning has no rules.",
"$ref": "#/components/schemas/EarningRuleRulesGroup"
},
"tier_rules": {
"description": "Tier requirements. Defaults to `{ \"type\": \"NO_REQUIREMENTS\" }` when not explicitly configured.",
"$ref": "#/components/schemas/EarningRuleTierRules"
},
"effects": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"description": "Effects applied when the rules match. Contains 1 to 10 effects.",
"items": {
"$ref": "#/components/schemas/EarningRuleEffect"
}
}
},
"required": [
"id",
"tier_rules",
"effects"
]
},
"LoyaltyV2ActivityEarningRuleError": {
"type": "object",
"title": "Custom error message configuration",
"description": "Custom error message configuration.",
"properties": {
"message": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Error message shown when validation fails."
}
},
"required": [
"message"
],
"additionalProperties": false
},
"EarningRuleTriggerLimitsCooldown": {
"type": "object",
"description": "Cooldown between consecutive triggers per member. With `NO_COOLDOWN`, `fixed_cooldown` must be null/absent. With `FIXED_COOLDOWN`, `fixed_cooldown` is required.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_COOLDOWN",
"FIXED_COOLDOWN"
],
"description": "Cooldown type."
},
"fixed_cooldown": {
"description": "Fixed cooldown configuration. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleTriggerLimitsCooldownFixedCooldown"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "NO_COOLDOWN"
}
}
},
"then": {
"properties": {
"fixed_cooldown": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "FIXED_COOLDOWN"
}
}
},
"then": {
"required": [
"fixed_cooldown"
],
"properties": {
"fixed_cooldown": {
"$ref": "#/components/schemas/EarningRuleTriggerLimitsCooldownFixedCooldown"
}
}
}
}
]
},
"EarningRuleTriggerLimitsFrequency": {
"type": "object",
"description": "Frequency limit for triggers per member. With `NO_LIMIT`, `limits` must be null or an empty array. With `LIMITED`, `limits` is required and must contain exactly one limit.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Frequency limit type."
},
"limits": {
"description": "Frequency limits (at most one). Can be `null`.",
"oneOf": [
{
"type": "null"
},
{
"type": "array",
"minItems": 0,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/EarningRuleTriggerLimitsFrequencyLimit"
}
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "NO_LIMIT"
}
}
},
"then": {
"properties": {
"limits": {
"oneOf": [
{
"type": "array",
"minItems": 0,
"maxItems": 0,
"items": {
"$ref": "#/components/schemas/EarningRuleTriggerLimitsFrequencyLimit"
}
},
{
"type": "null"
}
]
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "LIMITED"
}
}
},
"then": {
"required": [
"limits"
],
"properties": {
"limits": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/EarningRuleTriggerLimitsFrequencyLimit"
}
}
}
}
}
]
},
"EarningRuleListCursor": {
"type": [
"object",
"null"
],
"description": "Pagination cursor. `null` when there are no more results.",
"properties": {
"next": {
"type": "string",
"description": "Cursor ID to pass as the `cursor` query parameter to fetch the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Cursor expiration timestamp."
}
}
},
"EarningRuleEarningUpdate": {
"description": "A single earning definition for updates. Same as the create variant plus an optional `id` referencing an existing earning item.",
"allOf": [
{
"$ref": "#/components/schemas/EarningRuleEarningBase"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lernei_[a-f0-9]+$",
"description": "Existing earning item ID (`lernei_...`). Omit to create a new item."
}
}
}
],
"unevaluatedProperties": false
},
"EarningRuleActivityResponse": {
"type": "object",
"description": "A single earning rule activity.",
"properties": {
"id": {
"type": "string",
"pattern": "^laer_[a-f0-9]+$",
"description": "Activity ID (`laer_...`)."
},
"earning_rule_id": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$",
"description": "ID of the earning rule the activity belongs to."
},
"type": {
"$ref": "#/components/schemas/EarningRuleActivityType"
},
"data": {
"type": "object",
"description": "Activity payload. For created/updated/deleted/activated/deactivated/drafted activities it contains an `earning_rule` snapshot (the full earning rule object at the time of the change).",
"additionalProperties": true
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Activity timestamp (ISO 8601)."
},
"group_id": {
"type": "string",
"description": "Groups related activities recorded together."
},
"source": {
"$ref": "#/components/schemas/EarningRuleActivitySource",
"description": "Origin of the activity. Absent when not recorded."
}
}
},
"TierStructurePointBalanceUpsert": {
"type": "object",
"description": "Point balance tracking settings. Members qualify for tiers based on the current\nbalance of the referenced card definition.",
"properties": {
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition whose point balance is tracked."
}
},
"required": [
"card_definition_id"
],
"additionalProperties": false
},
"TierStructurePointEarnedUpsert": {
"type": "object",
"description": "Points earned tracking settings. Members qualify for tiers based on points earned\non the referenced card definition within a tracking period.",
"properties": {
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition whose earned points are tracked."
},
"period": {
"$ref": "#/components/schemas/TierStructurePointEarnedPeriodUpsert",
"description": "Tracking period during which earned points are accumulated."
},
"type": {
"type": "string",
"enum": [
"IMMEDIATELY",
"NEXT_TRACKING_PERIOD"
],
"description": "When a tier change resulting from earned points takes effect: `IMMEDIATELY`\nor at the start of the `NEXT_TRACKING_PERIOD`."
}
},
"required": [
"card_definition_id",
"period",
"type"
],
"additionalProperties": false
},
"TierStructureExpirationUpsert": {
"type": "object",
"description": "Tier membership expiration settings. Exactly the sub-object matching `type` is\nrequired; the remaining sub-objects must be null/omitted.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_RETENTION",
"SLIDING_EXPIRATION",
"FIXED_DURATION",
"CALENDAR_EXPIRATION"
],
"description": "Expiration model for tier membership. Required."
},
"fixed_duration": {
"description": "Fixed duration expiration settings. Required (non-null) when `type` is\n`FIXED_DURATION`; must be null/omitted otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureExpirationFixedDurationUpsert"
},
{
"type": "null"
}
]
},
"calendar_expiration": {
"description": "Calendar expiration settings. Required (non-null) when `type` is\n`CALENDAR_EXPIRATION`; must be null/omitted otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureExpirationCalendarExpirationUpsert"
},
{
"type": "null"
}
]
},
"sliding_expiration": {
"description": "Sliding expiration settings. Required (non-null) when `type` is\n`SLIDING_EXPIRATION`; must be null/omitted otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureExpirationSlidingExpirationUpsert"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "NO_RETENTION"
}
}
},
"then": {
"properties": {
"fixed_duration": {
"type": "null"
},
"calendar_expiration": {
"type": "null"
},
"sliding_expiration": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "FIXED_DURATION"
}
}
},
"then": {
"required": [
"fixed_duration"
],
"properties": {
"fixed_duration": {
"$ref": "#/components/schemas/TierStructureExpirationFixedDurationUpsert"
},
"calendar_expiration": {
"type": "null"
},
"sliding_expiration": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "CALENDAR_EXPIRATION"
}
}
},
"then": {
"required": [
"calendar_expiration"
],
"properties": {
"fixed_duration": {
"type": "null"
},
"calendar_expiration": {
"$ref": "#/components/schemas/TierStructureExpirationCalendarExpirationUpsert"
},
"sliding_expiration": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "SLIDING_EXPIRATION"
}
}
},
"then": {
"required": [
"sliding_expiration"
],
"properties": {
"fixed_duration": {
"type": "null"
},
"calendar_expiration": {
"type": "null"
},
"sliding_expiration": {
"$ref": "#/components/schemas/TierStructureExpirationSlidingExpirationUpsert"
}
}
}
}
]
},
"TierStructureDowngradeUpsert": {
"type": "object",
"description": "Downgrade settings. Controls how members are moved to lower tiers on expiration.\nWhen `type` is `NO_DOWNGRADE`, `grace_period` must be null/omitted.",
"properties": {
"type": {
"type": "string",
"enum": [
"MULTI_LEVEL",
"SINGLE_LEVEL",
"NO_DOWNGRADE"
],
"description": "Downgrade model. `MULTI_LEVEL` allows dropping multiple tiers at once,\n`SINGLE_LEVEL` drops one tier at a time, `NO_DOWNGRADE` disables downgrades.\nRequired."
},
"grace_period": {
"description": "Grace period before the downgrade takes effect. Must be null/omitted when\n`type` is `NO_DOWNGRADE`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureDowngradeGracePeriodUpsert"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "NO_DOWNGRADE"
}
}
},
"then": {
"properties": {
"grace_period": {
"type": "null"
}
}
}
}
]
},
"TierMetadataBase": {
"type": "object",
"properties": {
"metadata": {
"type": "object",
"description": "Free-form key/value object holding custom attributes. Defaults to `{}`."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Creation timestamp (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Last update timestamp (ISO 8601), or `null` if never updated."
}
},
"required": [
"metadata",
"created_at",
"updated_at"
]
},
"LoyaltyV2ActivityTierStructurePointBalance": {
"type": "object",
"description": "Point balance tracking settings.",
"properties": {
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition whose point balance is tracked."
}
}
},
"TierStructurePointEarned": {
"type": "object",
"description": "Points earned tracking settings.",
"properties": {
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition whose earned points are tracked."
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierStructurePointEarnedPeriod",
"description": "Tracking period during which earned points are accumulated."
},
"type": {
"type": "string",
"enum": [
"IMMEDIATELY",
"NEXT_TRACKING_PERIOD"
],
"description": "When a tier change resulting from earned points takes effect."
}
}
},
"TierStructureExpiration": {
"type": "object",
"description": "Tier membership expiration settings. Only the sub-object matching `type` is\npresent; the others are omitted.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_RETENTION",
"SLIDING_EXPIRATION",
"FIXED_DURATION",
"CALENDAR_EXPIRATION"
],
"description": "Expiration model for tier membership."
},
"fixed_duration": {
"$ref": "#/components/schemas/TierStructureExpirationFixedDuration",
"description": "Fixed duration settings. Present only when `type` is `FIXED_DURATION`."
},
"calendar_expiration": {
"$ref": "#/components/schemas/TierStructureExpirationCalendarExpiration",
"description": "Calendar expiration settings. Present only when `type` is `CALENDAR_EXPIRATION`."
},
"sliding_expiration": {
"$ref": "#/components/schemas/TierStructureExpirationSlidingExpiration",
"description": "Sliding expiration settings. Present only when `type` is `SLIDING_EXPIRATION`."
}
}
},
"TierStructureDowngrade": {
"type": "object",
"description": "Downgrade settings.",
"properties": {
"type": {
"type": "string",
"enum": [
"MULTI_LEVEL",
"SINGLE_LEVEL",
"NO_DOWNGRADE"
],
"description": "Downgrade model."
},
"grace_period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierStructureDowngradeGracePeriod",
"description": "Grace period before the downgrade takes effect. Omitted when not configured."
}
}
},
"TierQualificationRulesUpsert": {
"type": "object",
"description": "Tier qualification rules. When `type` is `POINTS`, `points` is required and\n`segment` must be null/omitted; when `type` is `POINTS_AND_SEGMENT`, both `points`\nand `segment` are required.",
"properties": {
"type": {
"type": "string",
"enum": [
"POINTS",
"POINTS_AND_SEGMENT"
],
"description": "Qualification model. `POINTS` qualifies by point thresholds only;\n`POINTS_AND_SEGMENT` additionally requires membership in a customer segment.\nRequired."
},
"points": {
"description": "Point thresholds for the tier. Required (non-null) when `type` is `POINTS`\nor `POINTS_AND_SEGMENT`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierQualificationRulesPointsUpsert"
},
{
"type": "null"
}
]
},
"segment": {
"description": "Customer segment reference. Required (non-null) when `type` is\n`POINTS_AND_SEGMENT`; must be null/omitted when `type` is `POINTS`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierQualificationRulesSegmentUpsert"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "POINTS"
}
}
},
"then": {
"required": [
"points"
],
"properties": {
"points": {
"$ref": "#/components/schemas/TierQualificationRulesPointsUpsert"
},
"segment": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "POINTS_AND_SEGMENT"
}
}
},
"then": {
"required": [
"points",
"segment"
],
"properties": {
"points": {
"$ref": "#/components/schemas/TierQualificationRulesPointsUpsert"
},
"segment": {
"$ref": "#/components/schemas/TierQualificationRulesSegmentUpsert"
}
}
}
}
]
},
"TierDowngradeUpsert": {
"type": "object",
"description": "Tier-level downgrade behavior.",
"properties": {
"type": {
"type": "string",
"enum": [
"INHERIT",
"NO_DOWNGRADE"
],
"description": "`INHERIT` uses the parent tier structure downgrade settings; `NO_DOWNGRADE`\ndisables downgrades from this tier. Required."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"TierQualificationRules": {
"type": "object",
"description": "Tier qualification rules.",
"properties": {
"type": {
"type": "string",
"enum": [
"POINTS",
"POINTS_AND_SEGMENT"
],
"description": "Qualification model."
},
"points": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierQualificationRulesPoints",
"description": "Point thresholds for the tier. Omitted when not configured."
},
"segment": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierQualificationRulesSegment",
"description": "Customer segment reference. Present only when `type` is `POINTS_AND_SEGMENT`."
}
}
},
"LoyaltyV2ActivityTierDowngrade": {
"type": "object",
"description": "Tier-level downgrade behavior.",
"properties": {
"type": {
"type": "string",
"enum": [
"INHERIT",
"NO_DOWNGRADE"
],
"description": "Downgrade model. Omitted when the tier has no downgrade configured."
}
}
},
"TierStructureActivity": {
"type": "object",
"description": "A tier structure activity record.",
"properties": {
"id": {
"type": "string",
"pattern": "^lats_[a-f0-9]+$",
"description": "Unique activity identifier."
},
"type": {
"type": "string",
"enum": [
"vl.tier_structure.created",
"vl.tier_structure.updated",
"vl.tier_structure.deleted",
"vl.tier_structure.activated",
"vl.tier_structure.deactivated",
"vl.tier_structure.drafted",
"vl.tier_structure.assigned",
"vl.tier_structure.unassigned",
"vl.tier_structure.tier.created",
"vl.tier_structure.tier.updated",
"vl.tier_structure.tier.deleted"
],
"description": "Activity type."
},
"data": {
"$ref": "#/components/schemas/TierStructureActivityData",
"description": "Activity payload snapshot."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the activity occurred (ISO 8601)."
},
"group_id": {
"type": "string",
"description": "Unique identifier grouping related activities that were produced by the same operation.\nOmitted when not set."
},
"source": {
"$ref": "#/components/schemas/TierStructureActivitySource",
"description": "Origin of the activity (channel, user, API key). Omitted when not set."
},
"tier_structure_id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Unique identifier of the tier structure the activity relates to."
}
},
"required": [
"id",
"type",
"data",
"created_at",
"tier_structure_id"
]
},
"BenefitListCursor": {
"type": "object",
"description": "Pagination cursor pointing to the next page of results.",
"properties": {
"next": {
"type": "string",
"description": "Cursor ID to pass as the `cursor` query parameter to fetch the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp after which the cursor expires."
}
},
"required": [
"next"
]
},
"LoyaltyV2ActivityBenefitPoints": {
"type": "object",
"description": "Fixed points effect - adds a fixed amount of points to a card of the given card definition.",
"properties": {
"value": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Number of points to add."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "ID of the card definition whose cards receive the points. The card definition must exist and be `ACTIVE`."
}
},
"required": [
"value",
"card_definition_id"
],
"additionalProperties": false
},
"BenefitPointsProportional": {
"type": "object",
"description": "Proportional points effect - points are calculated from an order amount, order items, or a metadata property. Exactly one calculation source object (`order`, `customer`, `custom_event`, or `order_items`) is required, determined by `calculation_type`. In requests, the remaining source properties may be omitted or set to `null`. In responses, they are omitted.",
"properties": {
"calculation_type": {
"type": "string",
"enum": [
"PRE_DISCOUNT_ORDER_AMOUNT",
"POST_DISCOUNT_ORDER_AMOUNT",
"PRE_DISCOUNT_ORDER_ITEMS_AMOUNT",
"POST_DISCOUNT_ORDER_ITEMS_AMOUNT",
"ORDER_ITEMS_QUANTITY",
"ORDER_METADATA_VALUE",
"CUSTOMER_METADATA_VALUE",
"CUSTOM_EVENT_METADATA_VALUE"
],
"description": "How the points are calculated:\n- `PRE_DISCOUNT_ORDER_AMOUNT` - points per every specified order amount before discounts (requires `order.amount`)\n- `POST_DISCOUNT_ORDER_AMOUNT` - points per every specified order amount after discounts (requires `order.total_amount`)\n- `PRE_DISCOUNT_ORDER_ITEMS_AMOUNT` - points per every specified amount spent on selected products before discounts (requires `order_items.amount`)\n- `POST_DISCOUNT_ORDER_ITEMS_AMOUNT` - points per every specified amount spent on selected products after discounts (requires `order_items.subtotal_amount`)\n- `ORDER_ITEMS_QUANTITY` - points per every specified quantity of selected products, excluding free items (requires `order_items.quantity`)\n- `ORDER_METADATA_VALUE` - points per every specified value in the order metadata (requires `order.metadata`)\n- `CUSTOMER_METADATA_VALUE` - points per every specified value in the customer metadata (requires `customer.metadata`)\n- `CUSTOM_EVENT_METADATA_VALUE` - points per every specified value in the custom event metadata (requires `custom_event.metadata`)"
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "ID of the card definition whose cards receive the points. The card definition must exist and be ACTIVE."
},
"order": {
"description": "Order-based calculation configuration. Required for `PRE_DISCOUNT_ORDER_AMOUNT`, `POST_DISCOUNT_ORDER_AMOUNT`, and `ORDER_METADATA_VALUE`. For other calculation types, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportionalOrder"
},
{
"type": "null"
}
]
},
"customer": {
"description": "Customer-metadata-based calculation configuration. Required for `CUSTOMER_METADATA_VALUE`. For other calculation types, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportionalCustomer"
},
{
"type": "null"
}
]
},
"custom_event": {
"description": "Custom-event-metadata-based calculation configuration. Required for `CUSTOM_EVENT_METADATA_VALUE`. For other calculation types, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportionalCustomEvent"
},
{
"type": "null"
}
]
},
"order_items": {
"description": "Order-items-based calculation configuration. Required for `PRE_DISCOUNT_ORDER_ITEMS_AMOUNT`, `POST_DISCOUNT_ORDER_ITEMS_AMOUNT`, and `ORDER_ITEMS_QUANTITY`. For other calculation types, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportionalOrderItems"
},
{
"type": "null"
}
]
}
},
"required": [
"calculation_type",
"card_definition_id"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"calculation_type": {
"const": "PRE_DISCOUNT_ORDER_AMOUNT"
}
}
},
"then": {
"required": [
"order"
],
"properties": {
"order": {
"type": "object",
"required": [
"amount"
]
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "POST_DISCOUNT_ORDER_AMOUNT"
}
}
},
"then": {
"required": [
"order"
],
"properties": {
"order": {
"type": "object",
"required": [
"total_amount"
]
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "ORDER_METADATA_VALUE"
}
}
},
"then": {
"required": [
"order"
],
"properties": {
"order": {
"type": "object",
"required": [
"metadata"
]
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "CUSTOMER_METADATA_VALUE"
}
}
},
"then": {
"required": [
"customer"
],
"properties": {
"customer": {
"$ref": "#/components/schemas/BenefitPointsProportionalCustomer"
},
"order": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "CUSTOM_EVENT_METADATA_VALUE"
}
}
},
"then": {
"required": [
"custom_event"
],
"properties": {
"custom_event": {
"$ref": "#/components/schemas/BenefitPointsProportionalCustomEvent"
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "PRE_DISCOUNT_ORDER_ITEMS_AMOUNT"
}
}
},
"then": {
"required": [
"order_items"
],
"properties": {
"order_items": {
"type": "object",
"required": [
"amount"
]
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "POST_DISCOUNT_ORDER_ITEMS_AMOUNT"
}
}
},
"then": {
"required": [
"order_items"
],
"properties": {
"order_items": {
"type": "object",
"required": [
"subtotal_amount"
]
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "ORDER_ITEMS_QUANTITY"
}
}
},
"then": {
"required": [
"order_items"
],
"properties": {
"order_items": {
"type": "object",
"required": [
"quantity"
]
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
}
}
}
}
]
},
"BenefitMaterial": {
"type": "object",
"description": "Material benefit - a physical product or SKU. Exactly one of `product` or `sku` is required, matching the `type`. In requests, the other property may be omitted or set to `null`. In responses, it is omitted.",
"properties": {
"type": {
"type": "string",
"enum": [
"PRODUCT",
"SKU"
],
"description": "Whether the benefit is a whole product or a specific SKU."
},
"product": {
"description": "Product reference. Required when `type` is `PRODUCT`. When `type` is `SKU`, requests may omit it or set it to `null`; responses omit it. The product must exist.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitMaterialProduct"
},
{
"type": "null"
}
]
},
"sku": {
"description": "SKU reference. Required when `type` is `SKU`. When `type` is `PRODUCT`, requests may omit it or set it to `null`; responses omit it. The SKU must exist under the given product.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitMaterialSKU"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "PRODUCT"
}
}
},
"then": {
"required": [
"product"
],
"properties": {
"product": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitMaterialProduct"
},
"sku": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "SKU"
}
}
},
"then": {
"required": [
"sku"
],
"properties": {
"sku": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitMaterialSKU"
},
"product": {
"type": "null"
}
}
}
}
]
},
"BenefitDigital": {
"type": "object",
"description": "Digital benefit - a reward sourced from a Voucherify campaign. Exactly one of `gift_vouchers` or `discount_coupons` is required, matching the `type`. In requests, the other property may be omitted or set to `null`. In responses, it is omitted. The referenced campaign must exist and its campaign type must match the benefit's digital type.",
"properties": {
"type": {
"type": "string",
"enum": [
"GIFT_VOUCHERS",
"DISCOUNT_COUPONS"
],
"description": "Type of the digital reward."
},
"gift_vouchers": {
"description": "Gift vouchers configuration. Required when `type` is `GIFT_VOUCHERS`. When `type` is `DISCOUNT_COUPONS`, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitDigitalGiftVouchers"
},
{
"type": "null"
}
]
},
"discount_coupons": {
"description": "Discount coupons configuration. Required when `type` is `DISCOUNT_COUPONS`. When `type` is `GIFT_VOUCHERS`, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitDigitalDiscountCoupons"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "DISCOUNT_COUPONS"
}
}
},
"then": {
"required": [
"discount_coupons"
],
"properties": {
"discount_coupons": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitDigitalDiscountCoupons"
},
"gift_vouchers": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "GIFT_VOUCHERS"
}
}
},
"then": {
"required": [
"gift_vouchers"
],
"properties": {
"gift_vouchers": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitDigitalGiftVouchers"
},
"discount_coupons": {
"type": "null"
}
}
}
}
]
},
"BenefitStock": {
"type": "object",
"description": "Stock configuration of the benefit. When `type` is `LIMITED`, the `limited` object is required. When `type` is `UNLIMITED`, requests may omit `limited` or set it to `null`; responses omit it.",
"properties": {
"type": {
"type": "string",
"enum": [
"UNLIMITED",
"LIMITED"
],
"description": "Whether the benefit has unlimited or limited stock."
},
"limited": {
"description": "Limited stock configuration. Required when `type` is `LIMITED`. When `type` is `UNLIMITED`, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitStockLimited"
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "UNLIMITED"
}
}
},
"then": {
"properties": {
"limited": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "LIMITED"
}
}
},
"then": {
"required": [
"limited"
],
"properties": {
"limited": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitStockLimited"
}
}
}
}
]
},
"BenefitActivity": {
"type": "object",
"description": "A single benefit activity.",
"properties": {
"id": {
"type": "string",
"pattern": "^laben_[a-f0-9]+$",
"description": "Unique activity ID, prefixed with `laben_`."
},
"type": {
"type": "string",
"enum": [
"vl.benefit.created",
"vl.benefit.updated",
"vl.benefit.deleted",
"vl.benefit.activated",
"vl.benefit.drafted"
],
"description": "Type of the recorded activity."
},
"data": {
"$ref": "#/components/schemas/BenefitActivityData"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp of when the activity was recorded, in ISO 8601 format."
},
"group_id": {
"type": "string",
"description": "ID grouping activities recorded within the same operation."
},
"source": {
"description": "Origin of the activity. Omitted when unknown.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitActivitySource"
}
]
},
"benefit_id": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$",
"description": "ID of the benefit the activity relates to."
}
},
"required": [
"id",
"type",
"data",
"created_at",
"benefit_id"
]
},
"RewardListCursor": {
"type": "object",
"description": "Pagination cursor.",
"properties": {
"next": {
"type": "string",
"description": "Cursor value to pass as the `cursor` query parameter to fetch the next page."
},
"expires_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the cursor expires."
}
},
"required": [
"next"
]
},
"RewardValidityHoursRequest": {
"type": "object",
"description": "Validity hours definition. `type` is\nrequired. When `type` is `ANY_TIME`, `daily` must be null; when `type` is `DAILY`,\n`daily` is required and must contain at least one entry.",
"properties": {
"type": {
"type": "string",
"enum": [
"DAILY",
"ANY_TIME"
],
"description": "Whether the reward is purchasable at any time or only during specific daily windows."
},
"daily": {
"description": "Daily time windows. Required when `type` is DAILY; must be null when `type` is ANY_TIME.",
"oneOf": [
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/RewardValidityDailyHoursRequest"
}
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
"RewardMaterialRequest": {
"type": "object",
"description": "Material reward definition.\n`type` is required. When `type` is `PRODUCT`, `product` is required and `sku` must\nbe null; when `type` is `SKU`, `sku` is required and `product` must be null.",
"properties": {
"type": {
"type": "string",
"enum": [
"PRODUCT",
"SKU"
],
"description": "Kind of material reward."
},
"product": {
"description": "Product delivered by the reward. Required when `type` is PRODUCT; must be null when `type` is SKU.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardMaterialProduct"
},
{
"type": "null"
}
]
},
"sku": {
"description": "SKU delivered by the reward. Required when `type` is SKU; must be null when `type` is PRODUCT.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardMaterialSKU"
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
"RewardDigitalRequest": {
"type": "object",
"description": "Digital reward definition. `type` is\nrequired. Exactly the object matching `type` is required and the other two must be\nnull: `DISCOUNT_COUPONS` requires `discount_coupons`, `GIFT_VOUCHERS` requires\n`gift_vouchers`, `LOYALTY_CARD_POINTS` requires `loyalty_card_points`.",
"properties": {
"type": {
"type": "string",
"enum": [
"DISCOUNT_COUPONS",
"GIFT_VOUCHERS",
"LOYALTY_CARD_POINTS"
],
"description": "Kind of digital reward."
},
"discount_coupons": {
"description": "Discount coupons configuration. Required when `type` is DISCOUNT_COUPONS; must be null otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardDigitalDiscountCoupons"
},
{
"type": "null"
}
]
},
"gift_vouchers": {
"description": "Gift vouchers configuration. Required when `type` is GIFT_VOUCHERS; must be null otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardDigitalGiftVouchersRequest"
},
{
"type": "null"
}
]
},
"loyalty_card_points": {
"description": "Loyalty card points configuration. Required when `type` is LOYALTY_CARD_POINTS; must be null otherwise.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardDigitalLoyaltyCardPointsRequest"
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
"RewardCostCreateRequest": {
"type": "object",
"description": "A reward cost for creation. `spending`\nis required. `rules`, when provided, must have between 1 and 10 properties (in\naddition to the constraints of the rules object itself).",
"properties": {
"rules": {
"$ref": "#/components/schemas/RewardCostRulesRequest",
"description": "Rules guarding this cost. Only members matching the rules can purchase the reward at this cost. Must have between 1 and 10 properties."
},
"spending": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"description": "Points to spend on a specific card definition. Exactly one entry is allowed.",
"items": {
"$ref": "#/components/schemas/RewardCostSpendingRequest"
}
}
},
"required": [
"spending"
],
"additionalProperties": false
},
"RewardPurchaseLimitsInput": {
"type": "object",
"description": "Limits on how often a member can purchase the reward. On create, omitted values default to no cooldown and no frequency limit. On update, omit to leave unchanged; send `null` to reset to defaults.",
"properties": {
"cooldown": {
"description": "Cooldown after a purchase.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseLimitsCooldownInput"
},
{
"type": "null"
}
]
},
"frequency": {
"description": "How many times the reward can be purchased in a period.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseLimitsFrequencyInput"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"LoyaltyV2ActivityRewardRefunds": {
"type": "object",
"description": "Refund policy for the reward.",
"properties": {
"type": {
"type": "string",
"enum": [
"NONE",
"REFUNDABLE"
],
"description": "Whether reward purchases can be refunded."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"RewardValidityHoursResponse": {
"type": "object",
"description": "Validity hours. `daily` is present only when `type` is DAILY; omitted otherwise.",
"properties": {
"type": {
"type": "string",
"enum": [
"DAILY",
"ANY_TIME"
],
"description": "Whether the reward is purchasable at any time or only during specific daily windows."
},
"daily": {
"type": "array",
"description": "Daily time windows. Present only when `type` is DAILY.",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardValidityDailyHoursResponse"
}
}
},
"required": [
"type"
]
},
"RewardMaterialResponse": {
"type": "object",
"description": "Material reward definition.",
"properties": {
"type": {
"type": "string",
"enum": [
"PRODUCT",
"SKU"
],
"description": "Kind of material reward."
},
"product": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardMaterialProduct",
"description": "Product delivered by the reward. Present only when `type` is PRODUCT; omitted otherwise."
},
"sku": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardMaterialSKU",
"description": "SKU delivered by the reward. Present only when `type` is SKU; omitted otherwise."
}
},
"required": [
"type"
]
},
"RewardDigitalResponse": {
"type": "object",
"description": "Digital reward definition. Only the object matching `type` is present; the others are omitted.",
"properties": {
"type": {
"type": "string",
"enum": [
"DISCOUNT_COUPONS",
"GIFT_VOUCHERS",
"LOYALTY_CARD_POINTS"
],
"description": "Kind of digital reward."
},
"discount_coupons": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardDigitalDiscountCoupons",
"description": "Discount coupons configuration. Present only when `type` is DISCOUNT_COUPONS."
},
"gift_vouchers": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardDigitalGiftVouchersResponse",
"description": "Gift vouchers configuration. Present only when `type` is GIFT_VOUCHERS."
},
"loyalty_card_points": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardDigitalLoyaltyCardPointsResponse",
"description": "Loyalty card points configuration. Present only when `type` is LOYALTY_CARD_POINTS."
}
},
"required": [
"type"
]
},
"RewardCostResponse": {
"type": "object",
"description": "A reward cost. `rules` is omitted when the cost has no rule definitions; `spending` is `null` when no spending is defined. `tier_rules` is always present and defaults to `NO_REQUIREMENTS`.",
"properties": {
"id": {
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$",
"description": "Unique cost identifier, prefixed with `lrcst_`."
},
"name": {
"type": [
"string",
"null"
],
"maxLength": 200,
"description": "Display name of the cost. Omitted when not set. `null` when cleared."
},
"rules": {
"$ref": "#/components/schemas/RewardCostRuleGroupResponse",
"description": "Rules guarding this cost. Omitted when the cost has no rule definitions."
},
"spending": {
"type": [
"array",
"null"
],
"description": "Points spending definitions, or `null` when none are defined.",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardCostSpendingResponse"
}
},
"tier_rules": {
"$ref": "#/components/schemas/RewardCostTierRulesResponse",
"description": "Defines which tiers can use this cost. Always present. Defaults to `NO_REQUIREMENTS`."
}
},
"required": [
"id",
"tier_rules"
]
},
"RewardPurchaseLimits": {
"type": "object",
"description": "Limits on how often a member can purchase the reward. Always present on reward responses; defaults to no cooldown and no frequency limit.",
"properties": {
"cooldown": {
"$ref": "#/components/schemas/RewardPurchaseLimitsCooldown",
"description": "Cooldown after a purchase."
},
"frequency": {
"$ref": "#/components/schemas/RewardPurchaseLimitsFrequency",
"description": "How many times the reward can be purchased in a period."
}
},
"required": [
"cooldown",
"frequency"
]
},
"RewardCostUpdateRequest": {
"type": "object",
"description": "A reward cost for update. Same as the\ncreate variant plus an optional `id` referencing an existing cost.",
"properties": {
"id": {
"type": "string",
"pattern": "^lrcst_[a-f0-9]+$",
"description": "Unique identifier of an existing cost to update, prefixed with `lrcst_`. Omit to create a new cost."
},
"rules": {
"$ref": "#/components/schemas/RewardCostRulesRequest",
"description": "Rules guarding this cost. Must have between 1 and 10 properties."
},
"spending": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"description": "Points to spend on a specific card definition. Exactly one entry is allowed.",
"items": {
"$ref": "#/components/schemas/RewardCostSpendingRequest"
}
}
},
"required": [
"spending"
],
"additionalProperties": false
},
"RewardActivityType": {
"type": "string",
"description": "Reward activity type.",
"enum": [
"vl.reward.created",
"vl.reward.updated",
"vl.reward.deleted",
"vl.reward.assigned",
"vl.reward.unassigned",
"vl.reward.activated",
"vl.reward.deactivated",
"vl.reward.drafted"
]
},
"RewardActivity": {
"type": "object",
"description": "A reward activity entry.",
"properties": {
"id": {
"type": "string",
"pattern": "^larew_[a-f0-9]+$",
"description": "Unique activity identifier, prefixed with `larew_`."
},
"type": {
"$ref": "#/components/schemas/RewardActivityType",
"description": "Type of the activity."
},
"data": {
"$ref": "#/components/schemas/RewardActivityData",
"description": "Activity payload. Always contains a snapshot of the reward; assigned/unassigned activities also contain the program and the program-reward assignment."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the activity occurred (ISO-8601)."
},
"group_id": {
"type": [
"string",
"null"
],
"description": "Unique identifier grouping related activities recorded together. Omitted or `null` when the activity is not part of a group."
},
"source": {
"$ref": "#/components/schemas/RewardActivitySource",
"description": "Origin of the activity. Omitted when not recorded."
},
"reward_id": {
"type": "string",
"pattern": "^lrew_[a-f0-9]+$",
"description": "Unique identifier of the reward the activity belongs to, prefixed with `lrew_`."
}
},
"required": [
"id",
"type",
"data",
"created_at",
"reward_id"
]
},
"LoyaltiesExamineEarningRulesExamineRequestBodyTriggerSpecific": {
"type": "object",
"description": "Specific trigger event to examine.",
"properties": {
"event": {
"type": "string",
"enum": [
"customer.order.paid",
"customer.segment.entered",
"customer.custom_event"
],
"description": "Trigger event."
}
},
"required": [
"event"
],
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Trigger Specific"
},
"ExamineCustomerContextBase": {
"type": "object",
"properties": {
"customer": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomer"
},
"member": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyMember"
}
}
},
"LoyaltiesExamineEarningRulesExamineRequestBodyOrder": {
"type": "object",
"description": "A hypothetical order used for estimation. For earning rules that calculate points proportionally, pass the whole cart content, including `items`, `discount_amount`, etc.",
"properties": {
"amount": {
"type": [
"string",
"number",
"null"
],
"description": "Order amount after discounts - a non-negative integer. May be provided as a string or a number. Can be `null`."
},
"initial_amount": {
"type": [
"string",
"number",
"null"
],
"description": "Order amount before discounts - a non-negative integer. May be provided as a string or a number. Can be `null`."
},
"discount_amount": {
"type": [
"string",
"number",
"null"
],
"description": "Total discount amount - a non-negative integer. May be provided as a string or a number. Can be `null`."
},
"items": {
"type": [
"array",
"null"
],
"maxItems": 500,
"description": "Order line items (up to 500). Can be `null`.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyOrderItem"
}
},
"metadata": {
"description": "Order metadata. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Order"
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEventAll": {
"title": "Loyalties Examine Earning Rules Examine Request Body Customer Custom Event All",
"description": "Context for examining all custom events.",
"allOf": [
{
"$ref": "#/components/schemas/ExamineCustomerContextBase"
},
{
"type": "object",
"properties": {
"custom_event": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomEventAll"
}
}
}
],
"unevaluatedProperties": false
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomerCustomEventSpecific": {
"title": "Loyalties Examine Earning Rules Examine Request Body Customer Custom Event Specific",
"description": "Context for examining a specific custom event.",
"allOf": [
{
"$ref": "#/components/schemas/ExamineCustomerContextBase"
},
{
"type": "object",
"properties": {
"custom_event": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyCustomEventSpecific"
}
},
"required": [
"custom_event"
]
}
],
"unevaluatedProperties": false
},
"ExamineMemberReference": {
"type": "object",
"description": "Member reference in examine results.",
"properties": {
"id": {
"type": "string",
"description": "Unique member ID (`lmbr_...`)."
},
"customer_id": {
"type": "string",
"description": "Unique customer ID the member belongs to."
},
"program_id": {
"type": "string",
"description": "Unique program ID the member belongs to."
},
"metadata": {
"type": "object",
"description": "Member metadata (empty object when unset).",
"additionalProperties": true
},
"object": {
"type": "string",
"const": "member",
"description": "Object type marker. Always `member`."
}
},
"required": [
"id",
"customer_id",
"program_id",
"metadata",
"object"
]
},
"ExamineProgramReference": {
"type": "object",
"description": "Program reference in examine results.",
"properties": {
"id": {
"type": "string",
"description": "Unique program ID (`lprg_...`)."
},
"name": {
"type": "string",
"description": "Program name."
},
"metadata": {
"type": "object",
"description": "Program metadata (empty object when unset).",
"additionalProperties": true
},
"object": {
"type": "string",
"const": "program",
"description": "Object type marker. Always `program`."
}
},
"required": [
"id",
"name",
"metadata",
"object"
]
},
"LoyaltiesExamineEarningRulesExamineResponseBodyCardEstimation": {
"type": "object",
"description": "Point estimation for a single card.",
"properties": {
"card": {
"$ref": "#/components/schemas/ExamineCardReference"
},
"points_estimation": {
"type": "number",
"description": "Total estimated points for the card across matching earning rules."
},
"earning_rules": {
"type": "array",
"description": "Per-earning-rule estimations contributing to the total.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyCardEarningRuleEstimation"
}
},
"object": {
"type": "string",
"const": "card_estimation",
"description": "Object type marker. Always `card_estimation`."
}
},
"title": "Loyalties Examine Earning Rules Examine Response Body Card Estimation"
},
"LoyaltiesExamineEarningRulesExamineResponseBodyBenefitEstimation": {
"type": "object",
"description": "Benefit estimation.",
"properties": {
"benefit": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyBenefitReference"
},
"earning_rules": {
"type": "array",
"description": "Earning rules that would grant this benefit.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyBenefitEarningRuleEstimation"
}
},
"object": {
"type": "string",
"const": "benefit_estimation",
"description": "Object type marker. Always `benefit_estimation`."
}
},
"title": "Loyalties Examine Earning Rules Examine Response Body Benefit Estimation"
},
"LoyaltiesExamineRewardsExamineResponseBodyCardEstimation": {
"type": "object",
"description": "Reward estimations for a single card.",
"properties": {
"card": {
"$ref": "#/components/schemas/ExamineCardReference",
"description": "Identifies the card used for the reward estimations."
},
"rewards": {
"type": "array",
"description": "Reward availability estimations for this card.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBodyCardRewardEstimation"
}
},
"object": {
"type": "string",
"const": "card_estimation",
"description": "Object type marker. Always `card_estimation`."
}
},
"required": [
"card",
"rewards",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body Card Estimation"
},
"ProgramValidityDailyHoursUpsert": {
"type": "object",
"description": "A single daily validity-hours window definition.",
"properties": {
"days_of_week": {
"type": "array",
"description": "Days of week the window applies to. 0 = Sunday through 6 = Saturday. Items must be unique.",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
},
"minItems": 1,
"maxItems": 7,
"uniqueItems": true
},
"start_time": {
"type": "string",
"description": "Window start time in `HH:mm` format. If seconds are provided, they are ignored.",
"example": "09:00"
},
"end_time": {
"type": "string",
"description": "Window end time in `HH:mm` format. If seconds are provided, they are ignored.",
"example": "17:00"
}
},
"required": [
"days_of_week",
"start_time",
"end_time"
],
"additionalProperties": false
},
"ProgramCardDefinitionAssignmentItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique card definition identifier.",
"pattern": "^lcdef_[a-f0-9]+$"
}
},
"required": [
"id"
]
},
"ProgramEarningRuleAssignmentItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique earning rule identifier.",
"pattern": "^lern_[a-f0-9]+$"
}
},
"required": [
"id"
]
},
"ProgramTierStructureAssignmentItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique tier structure identifier.",
"pattern": "^lts_[a-f0-9]+$"
}
},
"required": [
"id"
]
},
"ProgramValidityDailyHours": {
"type": "object",
"description": "A single daily validity-hours window.",
"properties": {
"days_of_week": {
"type": "array",
"description": "Days of week the window applies to. 0 = Sunday through 6 = Saturday.",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
},
"start_time": {
"type": "string",
"description": "Window start time in `HH:mm` format."
},
"end_time": {
"type": "string",
"description": "Window end time in `HH:mm` format."
}
}
},
"ProgramActivitySource": {
"type": "object",
"description": "Origin of the activity.",
"properties": {
"channel": {
"type": "string",
"description": "Channel the activity originated from.",
"enum": [
"USER_PORTAL",
"API",
"CLIENT_API",
"INTERNAL"
]
},
"user": {
"type": "object",
"description": "User that triggered the activity. Present for user-originated activities.",
"properties": {
"id": {
"type": "string",
"description": "User identifier."
}
}
},
"api_key": {
"type": "object",
"description": "API key that triggered the activity. Present for API-originated activities.",
"properties": {
"name": {
"type": "string",
"description": "API key name."
},
"app_id": {
"type": "string",
"description": "Application id of the API key."
},
"client_app_id": {
"type": "string",
"description": "Client application id of the API key."
}
}
}
}
},
"ProgramRewardAssignmentStockLimited": {
"type": "object",
"description": "Limited stock configuration.",
"properties": {
"quantity": {
"type": "integer",
"description": "Available stock quantity. For responses, updates with each reward purchase.",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"quantity"
],
"additionalProperties": false
},
"CardSimple": {
"description": "A loyalty card in its simple representation, as embedded in member responses.",
"allOf": [
{
"$ref": "#/components/schemas/CardBase"
},
{
"type": "object",
"properties": {
"next_expiration": {
"description": "The nearest upcoming point expiration, or `null` when none is scheduled.",
"oneOf": [
{
"$ref": "#/components/schemas/CardNextExpiration"
},
{
"type": "null"
}
]
},
"next_activation": {
"description": "The nearest upcoming pending point activation, or `null` when none is scheduled.",
"oneOf": [
{
"$ref": "#/components/schemas/CardNextActivation"
},
{
"type": "null"
}
]
}
},
"required": [
"next_expiration",
"next_activation"
]
}
]
},
"ProgramSimple": {
"type": "object",
"description": "A loyalty program in its simple representation, as embedded in membership responses.",
"properties": {
"id": {
"type": "string",
"description": "Unique program identifier.",
"pattern": "^lprg_[a-f0-9]+$"
},
"name": {
"type": "string",
"description": "Program name."
},
"status": {
"type": "string",
"description": "Program status.",
"enum": [
"DRAFT",
"ACTIVE",
"INACTIVE",
"DELETED"
]
},
"metadata": {
"type": "object",
"description": "User-defined key-value metadata. Defaults to `{}`."
},
"object": {
"type": "string",
"description": "Object type marker. Always `program`.",
"const": "program"
}
},
"required": [
"id",
"name",
"status",
"metadata",
"object"
]
},
"MemberTierProgress": {
"type": "object",
"description": "Member's tier progress on a card.",
"properties": {
"current": {
"description": "The member's current tier, or `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/MemberTierProgressCurrent"
},
{
"type": "null"
}
]
},
"tier_structure": {
"description": "Reference to the tier structure the progress relates to, or `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/MemberTierProgressTierStructure"
},
{
"type": "null"
}
]
},
"deferred": {
"type": "array",
"description": "Upcoming tier assignments scheduled to start later, when the tier structure defers tier changes. The member will be assigned to the deferred tier at the start date.",
"items": {
"$ref": "#/components/schemas/MemberTierProgressDeferred"
}
},
"risks": {
"type": "array",
"description": "Upcoming risks of losing or downgrading the current tier.",
"items": {
"$ref": "#/components/schemas/MemberTierProgressRisk"
}
},
"opportunities": {
"type": "array",
"description": "Opportunities to reach higher tiers. Deferred tiers are not included in this list.",
"items": {
"$ref": "#/components/schemas/MemberTierProgressOpportunity"
}
},
"object": {
"type": "string",
"const": "member_tier_progress",
"description": "Object type marker, always `member_tier_progress`."
}
},
"required": [
"current",
"tier_structure",
"deferred",
"risks",
"opportunities",
"object"
]
},
"RecordedActivityBase": {
"type": "object",
"properties": {
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the activity was recorded (ISO 8601)."
},
"group_id": {
"type": "string",
"description": "ID grouping activities recorded within the same request."
},
"source": {
"$ref": "#/components/schemas/ActivitySource",
"description": "Origin of the activity. Omitted when not available."
}
},
"required": [
"created_at"
]
},
"VLMemberActivityData": {
"type": "object",
"description": "Snapshots of the objects involved at the time of the activity. Always contains `member` and `program`. For `vl.member.card.assigned` and `vl.member.card.unassigned`, also contains `card` and `member_card`.",
"properties": {
"member": {
"$ref": "#/components/schemas/Member",
"description": "Member snapshot at the time of the activity."
},
"program": {
"$ref": "#/components/schemas/Program",
"description": "Program snapshot at the time of the activity."
},
"card": {
"$ref": "#/components/schemas/Card",
"description": "Full card snapshot. Present only for `vl.member.card.assigned` and `vl.member.card.unassigned`."
},
"member_card": {
"$ref": "#/components/schemas/MemberCard",
"description": "Assignment snapshot. Present for `vl.member.card.assigned` and `vl.member.card.unassigned`. Omits `tier_progress`."
}
},
"required": [
"member",
"program"
],
"additionalProperties": false
},
"CardTransactionDetails": {
"type": "object",
"description": "Card transaction details. Variant-dependent fields are not present on all variants.",
"properties": {
"reason": {
"type": [
"string",
"null"
],
"description": "Reason for the transaction (e.g. the reason provided in a manual adjustment request)."
},
"rejection": {
"description": "Rejection details when the transaction was rejected, or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Rejection reason."
},
"details": {
"type": "string",
"description": "Detailed rejection description."
}
}
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"description": "Transaction metadata (empty object when none)."
},
"points": {
"type": "object",
"description": "Points affected by the transaction (variant-dependent fields; pending points don't return `expiration_date` and `expiration_type`.).",
"properties": {
"total": {
"type": "number",
"description": "Number of points. Negative for debits."
},
"expiration_date": {
"type": [
"string",
"null"
],
"format": "date",
"description": "Expiration date of the affected points (`YYYY-MM-DD`), or `null`."
},
"expiration_type": {
"type": [
"string",
"null"
],
"enum": [
"NO_EXPIRATION",
"ROLLING_EXPIRATION",
"CALENDAR_EXPIRATION",
"SLIDING_EXPIRATION",
null
],
"description": "Points expiration type of the affected points, or `null`."
},
"date": {
"type": "string",
"format": "date",
"description": "Activation date of the pending points (`YYYY-MM-DD`). Pending points variants only."
},
"type": {
"type": "string",
"enum": [
"IMMEDIATE",
"PERIOD_BASED",
"FIXED_DATES",
"EVENT_BASED"
],
"description": "Pending points activation type. Pending points variants only."
}
}
},
"bucket": {
"$ref": "#/components/schemas/LoyaltyV2CardPointsBucketSimple",
"description": "The points bucket being expired (`ADMIN_POINTS_EXPIRATION` only)."
},
"buckets": {
"type": "array",
"description": "The points buckets that expired (`POINTS_EXPIRED` only).",
"items": {
"$ref": "#/components/schemas/LoyaltyV2CardPointsBucketSimple"
}
},
"date": {
"type": "string",
"format": "date",
"description": "Expiration date (`POINTS_EXPIRED` only, `YYYY-MM-DD`)."
},
"reward": {
"description": "Reference to the reward involved, or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Reward ID (`lrew_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
},
"reward_transaction": {
"description": "Reference to the related reward transaction, or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Reward transaction ID (`lrtx_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
},
"card_transaction": {
"description": "Reference to the linked card transaction (e.g. the spend side of a points purchase), or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Card transaction ID (`lctx_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
},
"purchase": {
"description": "References to the original purchase transactions (reversal/return variants), or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"card_transaction": {
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Card transaction ID (`lctx_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
},
"reward_transaction": {
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Reward transaction ID (`lrtx_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
}
}
},
{
"type": "null"
}
]
},
"order": {
"description": "Reference to the order paid with points (`POINTS_SPENT_ON_ORDER` only), or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Order ID assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
},
"order_transaction": {
"description": "Reference to the related order transaction (`POINTS_SPENT_ON_ORDER` only), or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Order transaction ID (`lotx_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
},
"target_card": {
"description": "Reference to the target card credited by a points purchase (`POINTS_SPENT_ON_REWARD` only), or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Card ID (`lcrd_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
},
"purchase_transaction": {
"description": "Reference to the linked purchase card transaction (`POINTS_SPENT_ON_REWARD` only), or `null`.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Card transaction ID (`lctx_[a-f0-9]+`) assigned by Voucherify."
}
}
},
{
"type": "null"
}
]
}
}
},
"CardActivityData": {
"type": "object",
"description": "Snapshots of the objects involved at the time of the activity. Always contains `card` and `program`. For `vl.card.assigned` and `vl.card.unassigned`, also contains `member` and `member_card`. For `vl.card.code_generation.failed`, also contains `result`.",
"properties": {
"card": {
"$ref": "#/components/schemas/Card",
"description": "Full card snapshot at the time of the activity."
},
"program": {
"$ref": "#/components/schemas/Program",
"description": "Program snapshot at the time of the activity."
},
"member": {
"$ref": "#/components/schemas/Member",
"description": "Member snapshot. Present only for `vl.card.assigned` and `vl.card.unassigned`."
},
"member_card": {
"$ref": "#/components/schemas/MemberCard",
"description": "Assignment snapshot. Present for `vl.card.assigned` and `vl.card.unassigned`. Omits `tier_progress`."
},
"result": {
"$ref": "#/components/schemas/CardCodeGenerationFailureResult",
"description": "Failure details. Present only for `vl.card.code_generation.failed`."
}
},
"required": [
"card",
"program"
],
"additionalProperties": false
},
"CardBucketBase": {
"type": "object",
"properties": {
"card_id": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$",
"description": "ID of the card the bucket belongs to."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "ID of the card definition of the card."
},
"program_id": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$",
"description": "ID of the loyalty program."
},
"member_id": {
"type": "string",
"pattern": "^lmbr_[a-f0-9]+$",
"description": "ID of the member owning the card."
},
"card_type": {
"type": "string",
"enum": [
"INDIVIDUAL"
],
"description": "Card type. Currently, only `INDIVIDUAL` is supported."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the bucket was created (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the bucket was last updated (ISO 8601), or `null`."
}
},
"required": [
"card_id",
"card_definition_id",
"program_id",
"member_id",
"card_type",
"created_at",
"updated_at"
]
},
"MemberCardTransactionBase": {
"allOf": [
{
"$ref": "#/components/schemas/MemberTransactionBase"
},
{
"type": "object",
"properties": {
"card_id": {
"type": "string",
"description": "Unique identifier of the loyalty card the points were spent from (format `lcrd_...`)."
}
}
}
]
},
"RewardPurchaseTransactionDetailsRefund": {
"type": "object",
"title": "Refund details",
"description": "Details of a REFUND reward transaction.",
"properties": {
"reason": {
"type": "string",
"description": "Sets the refund reason. Always `Manual reward refund` for this endpoint."
},
"rejection": {
"description": "Rejection details, present when the transaction was rejected.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseRejection"
},
{
"type": "null"
}
]
},
"metadata": {
"type": "object",
"description": "Transaction metadata. Empty object when not set.",
"additionalProperties": true
},
"points": {
"description": "Points returned by the refund.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchasePoints"
},
{
"type": "null"
}
]
},
"result": {
"description": "Refunded reward result (what was reverted).",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseResult"
},
{
"type": "null"
}
]
},
"purchase": {
"description": "References to the refunded purchase transactions.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseRefundPurchaseReference"
},
{
"type": "null"
}
]
}
},
"required": [
"reason",
"rejection",
"metadata",
"points",
"result",
"purchase"
]
},
"RewardPurchaseRejection": {
"type": "object",
"description": "Details about a rejected reward purchase transaction.",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable rejection reason."
},
"details": {
"type": "object",
"description": "Additional structured context about the rejection. Fields depend on the rejection reason.",
"additionalProperties": true
}
},
"required": [
"reason"
]
},
"RewardPurchasePoints": {
"type": "object",
"description": "Points involved in the transaction.",
"properties": {
"total": {
"type": "number",
"description": "Total number of points."
}
},
"required": [
"total"
]
},
"RewardPurchaseResult": {
"type": "object",
"description": "Reward fulfillment result. Contains the fulfilled reward reference, quantity and the material or digital fulfillment payload.",
"properties": {
"reward": {
"description": "Reference to the fulfilled reward.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseResultReward"
},
{
"type": "null"
}
]
},
"quantity": {
"type": [
"number",
"null"
],
"description": "Fulfilled quantity."
},
"material": {
"description": "Material reward fulfillment payload. Present for `MATERIAL` rewards.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseResultMaterial"
},
{
"type": "null"
}
]
},
"digital": {
"description": "Digital reward fulfillment payload. Present for `DIGITAL` rewards.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseResultDigital"
},
{
"type": "null"
}
]
}
}
},
"LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimitCardBalance": {
"title": "Card Balance",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "CARD_BALANCE",
"description": "Payment limit type."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimitPointsLimit": {
"title": "Points Limit",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "POINTS_LIMIT",
"description": "Payment limit type."
},
"points_limit": {
"description": "Maximum number of points to spend.",
"$ref": "#/components/schemas/OrderPaymentLimitDefinition"
}
},
"required": [
"type",
"points_limit"
],
"additionalProperties": false
},
"LoyaltiesProgramsMembersOrdersPaymentsCreateRequestBodyLimitAmountLimit": {
"title": "Amount Limit",
"description": "Request body schema for **POST** `/v2/loyalties/programs/{programId}/members/{memberId}/orders/payments`.",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "AMOUNT_LIMIT",
"description": "Payment limit type."
},
"amount_limit": {
"description": "Maximum amount to pay.",
"$ref": "#/components/schemas/OrderPaymentLimitDefinition"
}
},
"required": [
"type",
"amount_limit"
],
"additionalProperties": false
},
"OrderPaymentRejection": {
"type": "object",
"description": "Rejection details for a rejected order payment transaction.",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable rejection reason. Order-side: `ORDER_NOT_FOUND`, `PAYMENT_EXCEEDS_ORDER_TOTAL_AMOUNT`. Card-side (when the linked card transaction fails first): `NOT_ENOUGH_BALANCE`, `GLOBAL_SPENDING_LIMIT_EXCEEDED`, `TRANSACTION_SPENDING_LIMIT_EXCEEDED`."
},
"details": {
"description": "Structured rejection context. Omitted when the reason carries no extra data (`ORDER_NOT_FOUND`, `PAYMENT_EXCEEDS_ORDER_TOTAL_AMOUNT`, `NOT_ENOUGH_BALANCE`). For `GLOBAL_SPENDING_LIMIT_EXCEEDED`: `type`, `limit`, `spendings`. For `TRANSACTION_SPENDING_LIMIT_EXCEEDED`: `type`, `limit`.",
"oneOf": [
{
"type": "object",
"additionalProperties": true,
"properties": {
"type": {
"type": "string",
"description": "Spending cap type that was exceeded."
},
"limit": {
"type": "number",
"description": "Configured spending limit."
},
"spendings": {
"type": "number",
"description": "Projected total spendings that exceeded the limit. Present for `GLOBAL_SPENDING_LIMIT_EXCEEDED`."
}
}
},
{
"type": "null"
}
]
}
}
},
"OrderPaymentPaymentDetails": {
"type": "object",
"description": "Payment calculation details.",
"properties": {
"id": {
"type": "string",
"description": "Payment identifier. Omitted when not set."
},
"amount": {
"type": "number",
"description": "Amount of the order paid with points."
},
"points_spent": {
"type": "number",
"description": "Number of points spent on the payment."
},
"exchange_ratio": {
"type": "number",
"description": "Points-to-amount exchange ratio evaluated from the card definition's pay-with-points formula."
}
}
},
"MemberTransactionBase": {
"type": "object",
"properties": {
"program_id": {
"type": "string",
"description": "Unique identifier of the loyalty program (format `lprg_...`)."
},
"member_id": {
"type": "string",
"description": "Unique identifier of the program member (format `lmbr_...`)."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the transaction was created (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the transaction was last updated (ISO 8601), or `null`."
}
}
},
"BenefitTransactionDetails": {
"type": "object",
"description": "Details of a `FULFILLMENT` benefit transaction.",
"properties": {
"reason": {
"type": [
"string",
"null"
],
"description": "Human-readable reason for the fulfillment. Typically `{program name} / {earning rule name}`."
},
"rejection": {
"description": "Rejection details. Populated for `REJECTED` transactions. `null` for `APPROVED` and `PENDING`.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitTransactionRejection"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Transaction metadata. Empty object when not set.",
"$ref": "#/components/schemas/BenefitTransactionDetailsMetadata"
},
"result": {
"description": "Fulfillment result. Populated for `APPROVED` transactions. `null` for `REJECTED` and `PENDING`.",
"oneOf": [
{
"type": "object",
"description": "Benefit fulfillment result envelope.",
"properties": {
"details": {
"type": "object",
"description": "Fulfillment payload. Shape depends on the benefit type (`MATERIAL` or `DIGITAL`). Digital fulfillments also include published voucher fields at this level.",
"properties": {
"material": {
"description": "Material benefit effect that was fulfilled. Present for `MATERIAL` benefits. Absent for `DIGITAL` benefits.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitMaterial"
},
{
"type": "null"
}
]
},
"digital": {
"description": "Digital benefit effect that was fulfilled. Present for `DIGITAL` benefits. Absent for `MATERIAL` benefits.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitDigital"
},
{
"type": "null"
}
]
},
"voucher_id": {
"type": "string",
"description": "Published voucher ID for digital fulfillments."
},
"code": {
"type": "string",
"description": "Published voucher code for digital fulfillments."
},
"balance": {
"type": "number",
"description": "Gift voucher balance after credit. Present for `GIFT_VOUCHERS` digital fulfillments. Distinct from `digital.gift_vouchers.balance`, which is the configured credit amount."
}
},
"additionalProperties": true
}
}
},
{
"type": "null"
}
]
}
}
},
"TierTransactionDetails": {
"type": "object",
"description": "Details of the tier evaluation. Fields that do not apply to the transaction type are `null`. `JOINED` - `tier_to` set, `tier_from` null. `LEFT` - `tier_from` set, `tier_to` null. `UPGRADED` and `DOWNGRADED` - both `tier_from` and `tier_to` set. `EXPIRATION_CHANGED` - `expires_at` holds the new expiration; `tier_from` and `tier_to` null. `EVALUATION_REFRESHED` - `points` holds the recalculated value; `tier_from` and `tier_to` null.",
"properties": {
"points": {
"type": [
"number",
"null"
],
"description": "Qualifying points at the time of evaluation. Returns the point balance or the points earned in the tracking period, depending on the tier structure. `null` when points were not calculated."
},
"tier_from": {
"type": [
"string",
"null"
],
"description": "Unique identifier of the tier the member moved from (format `lt_...`). `null` when there is no source tier, including `JOINED`, `EXPIRATION_CHANGED`, and `EVALUATION_REFRESHED` transactions."
},
"tier_to": {
"type": [
"string",
"null"
],
"description": "Unique identifier of the tier the member moved to (format `lt_...`). `null` when there is no destination tier, including `LEFT`, `EXPIRATION_CHANGED`, and `EVALUATION_REFRESHED` transactions."
},
"origin": {
"description": "What triggered the transaction.",
"oneOf": [
{
"$ref": "#/components/schemas/TierTransactionOrigin"
},
{
"type": "null"
}
]
},
"rejection": {
"description": "Rejection details, present when the transaction was rejected. Known rejection reason: `SUPERSEDED_BY_LATER_TRANSACTION`.",
"oneOf": [
{
"$ref": "#/components/schemas/TierTransactionRejection"
},
{
"type": "null"
}
]
},
"start_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Start of the tier membership period, or `null`."
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Expiration of the tier membership period, or `null`."
}
},
"required": [
"points",
"tier_from",
"tier_to",
"origin",
"rejection",
"start_at",
"expires_at"
]
},
"ReportLimitFailureCountBase": {
"type": "object",
"properties": {
"COOLDOWN": {
"type": "number",
"description": "Counts failures caused by the cooldown limit."
},
"FREQUENCY": {
"type": "number",
"description": "Counts failures caused by the frequency limit."
}
}
},
"PointsEarningsReportEntryBase": {
"type": "object",
"properties": {
"earning_rule_id": {
"type": "string",
"pattern": "^lern_[a-f0-9]+$",
"description": "Identifies the earning rule (format `lern_...`)."
},
"earning_item_id": {
"type": "string",
"pattern": "^lernei_[a-f0-9]+$",
"description": "Identifies the earning item that produced the points (format: `lernei_` followed by hexadecimal characters)."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Identifies the card definition (format `lcdef_...`)."
}
},
"required": [
"earning_rule_id",
"earning_item_id",
"card_definition_id"
]
},
"EarningRulesReportFailuresBreakdown": {
"description": "Counts failed trigger-limit checks by reason. `COOLDOWN` and `FREQUENCY` are the only keys. Either key may be absent. A present key is `0` when that reason has no failures. The object is empty when no failure counts are stored yet.",
"allOf": [
{
"$ref": "#/components/schemas/ReportLimitFailureCountBase"
}
],
"unevaluatedProperties": false
},
"CardDefinitionPointsExpirationRollingExpirationInput": {
"type": "object",
"description": "Rolling expiration configuration - points expire after a fixed period from earning.",
"properties": {
"period": {
"$ref": "#/components/schemas/CardDefinitionPointsExpirationRollingExpirationPeriodInput"
},
"rounding": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionPointsExpirationRollingExpirationRoundingInput"
},
{
"type": "null"
}
],
"description": "Optional rounding applied to the calculated expiration date."
}
},
"required": [
"period"
],
"additionalProperties": false
},
"CardDefinitionPointsExpirationCalendarExpirationInput": {
"type": "object",
"description": "Calendar expiration configuration - points expire on fixed calendar dates.",
"properties": {
"expiration_dates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CardDefinitionCalendarDateInput"
},
"minItems": 1,
"maxItems": 20,
"description": "List of calendar dates on which points expire (1-20 dates)."
}
},
"required": [
"expiration_dates"
],
"additionalProperties": false
},
"CardDefinitionPointsExpirationSlidingExpirationInput": {
"description": "Sliding expiration configuration - points expiration slides on member activity.\nAt least one of `earning_activity`, `spending_activity` or `custom_activity` must be `true`.\nWhen `custom_activity` is `true`, `custom_activity_types` is required with 1-10 unique\ncustom event schema IDs.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionSlidingExpirationActivityBase"
},
{
"type": "object",
"properties": {
"custom_activity_types": {
"type": [
"array",
"null"
],
"items": {
"type": "string",
"pattern": "^ms_[a-zA-Z0-9]+"
},
"maxItems": 10,
"description": "Custom event schema IDs (pattern `^ms_[a-zA-Z0-9]+`) that reset the expiration window.\nRequired with 1-10 unique items when `custom_activity` is `true`."
},
"period": {
"$ref": "#/components/schemas/CardDefinitionPointsExpirationSlidingExpirationPeriodInput"
}
},
"required": [
"period"
]
}
],
"unevaluatedProperties": false
},
"CardDefinitionPendingPointsPeriodBasedInput": {
"type": "object",
"description": "Period-based pending points activation - points activate after a fixed period.",
"properties": {
"period": {
"$ref": "#/components/schemas/CardDefinitionPendingPointsPeriodBasedPeriodInput"
}
},
"required": [
"period"
],
"additionalProperties": false
},
"CardDefinitionPendingPointsFixedDatesInput": {
"type": "object",
"description": "Fixed-dates pending points activation - points activate on fixed calendar dates.",
"properties": {
"dates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CardDefinitionCalendarDateInput"
},
"minItems": 1,
"maxItems": 20,
"description": "List of calendar dates on which pending points activate (1-20 dates)."
}
},
"required": [
"dates"
],
"additionalProperties": false
},
"CardDefinitionPendingPointsEventBasedInput": {
"type": "object",
"description": "Event-based pending points activation - points activate when one of the configured custom events occurs, or are cancelled after the cancel period.",
"properties": {
"event_types": {
"type": "array",
"items": {
"type": "string",
"pattern": "^ms_[a-zA-Z0-9]+"
},
"minItems": 1,
"maxItems": 10,
"description": "Custom event schema IDs (pattern `^ms_[a-zA-Z0-9]+`) that activate pending points. 1-10 unique items."
},
"cancel_period": {
"$ref": "#/components/schemas/CardDefinitionPendingPointsEventBasedCancelPeriodInput"
}
},
"required": [
"event_types",
"cancel_period"
],
"additionalProperties": false
},
"CardDefinitionEarningLimitsGlobalInput": {
"type": "object",
"description": "Global (per card) earning limits. When `type` is `NO_LIMIT`, `limits` must be\nempty or `null`; when `type` is `LIMITED`, `limits` must contain exactly 1 limit.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether global earning limits apply."
},
"limits": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsGlobalLimitInput"
},
"maxItems": 1,
"description": "Limit definitions. Empty/null when `type` is `NO_LIMIT`; exactly 1 item required when `type` is `LIMITED`."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionEarningLimitsTransactionsInput": {
"type": "object",
"description": "Per-transaction earning limits. When `type` is `NO_LIMIT`, `limits` must be\nempty or `null`; when `type` is `LIMITED`, `limits` must contain at least 1 limit.\nEach limit `type` may appear at most once in the array.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether per-transaction earning limits apply."
},
"limits": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsTransactionsLimitInput"
},
"description": "Limit definitions with unique types. Empty/null when `type` is `NO_LIMIT`; at least 1 item required when `type` is `LIMITED`."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionSpendingLimitsGlobalInput": {
"type": "object",
"description": "Global (per card) spending limits. When `type` is `NO_LIMIT`, `limits` must be\nempty or `null`; when `type` is `LIMITED`, `limits` must contain exactly 1 limit.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether global spending limits apply."
},
"limits": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobalLimitInput"
},
"maxItems": 1,
"description": "Limit definitions. Empty/null when `type` is `NO_LIMIT`; exactly 1 item required when `type` is `LIMITED`."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionSpendingLimitsTransactionsInput": {
"type": "object",
"description": "Per-transaction spending limits. When `type` is `NO_LIMIT`, `limits` must be\nempty or `null`; when `type` is `LIMITED`, `limits` must contain exactly 1 limit.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether per-transaction spending limits apply."
},
"limits": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsTransactionsLimitInput"
},
"maxItems": 1,
"description": "Limit definitions. Empty/null when `type` is `NO_LIMIT`; exactly 1 item required when `type` is `LIMITED`."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionRefundsSpentPointsInput": {
"type": "object",
"description": "How points spent on a refunded order are handled. When `type` is `NONE`,\n`methods` must be empty or `null`; when `type` is `REFUNDABLE`, `methods`\nmust contain exactly 1 method.",
"properties": {
"type": {
"type": "string",
"enum": [
"NONE",
"REFUNDABLE"
],
"description": "Whether spent points are refundable."
},
"methods": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/CardDefinitionRefundsSpentPointsMethodInput"
},
"maxItems": 1,
"description": "Refund methods. Empty/null when `type` is `NONE`; exactly 1 item required when `type` is `REFUNDABLE`. Currently only one method is allowed."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionRefundsEarnedPointsInput": {
"type": "object",
"description": "How points earned on a refunded order are handled. When `type` is `NONE`,\n`methods` must be empty or `null`; when `type` is `REFUNDABLE`, `methods`\nmust contain exactly 1 method.",
"properties": {
"type": {
"type": "string",
"enum": [
"NONE",
"REFUNDABLE"
],
"description": "Whether earned points are revocable on refund."
},
"methods": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/components/schemas/CardDefinitionRefundsEarnedPointsMethodInput"
},
"maxItems": 1,
"description": "Revoke methods. Empty/null when `type` is `NONE`; exactly 1 item required when `type` is `REFUNDABLE`."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionPayWithPointsExchangeRatioInput": {
"type": "object",
"description": "Exchange ratio used to convert points into money.",
"properties": {
"formula": {
"oneOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 2000
},
{
"type": "number"
}
],
"description": "Exchange ratio formula. A string expression (1-2000 characters) or a number.\nNumbers are converted to strings server-side."
}
},
"required": [
"formula"
],
"additionalProperties": false
},
"CardDefinitionPointsExpirationRollingExpiration": {
"type": "object",
"description": "Rolling expiration configuration.",
"properties": {
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionPeriod",
"description": "Rolling expiration period. Unit is one of `DAY`, `MONTH`, `YEAR`."
},
"rounding": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionPointsExpirationRollingExpirationRounding"
},
{
"type": "null"
}
],
"description": "Rounding applied to the calculated expiration date. `null` when not configured."
}
},
"required": [
"period"
]
},
"CardDefinitionPointsExpirationCalendarExpiration": {
"type": "object",
"description": "Calendar expiration configuration.",
"properties": {
"expiration_dates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionCalendarDate"
},
"description": "Calendar dates on which points expire."
}
},
"required": [
"expiration_dates"
]
},
"CardDefinitionPointsExpirationSlidingExpiration": {
"description": "Sliding expiration configuration.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionSlidingExpirationActivityBase"
},
{
"type": "object",
"properties": {
"custom_activity_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Custom event schema IDs that reset the expiration window. Empty array when `custom_activity` is false."
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionPeriod",
"description": "Sliding expiration period. Unit is one of `DAY`, `MONTH`, `YEAR`."
}
},
"required": [
"custom_activity_types",
"period"
]
}
]
},
"CardDefinitionPendingPointsPeriodBased": {
"type": "object",
"description": "Period-based pending points activation.",
"properties": {
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionPeriod",
"description": "Pending period. Unit is one of `DAY`, `MONTH`, `YEAR`."
}
},
"required": [
"period"
]
},
"CardDefinitionPendingPointsFixedDates": {
"type": "object",
"description": "Fixed-dates pending points activation.",
"properties": {
"dates": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionCalendarDate"
},
"description": "Calendar dates on which pending points activate."
}
},
"required": [
"dates"
]
},
"CardDefinitionPendingPointsEventBased": {
"type": "object",
"description": "Event-based pending points activation.",
"properties": {
"event_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Custom event schema IDs that activate pending points."
},
"cancel_period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionPeriod",
"description": "Period after which non-activated pending points are cancelled. Unit is one of `DAY`, `MONTH`, `YEAR`."
}
},
"required": [
"event_types",
"cancel_period"
]
},
"CardDefinitionEarningLimitsGlobal": {
"type": "object",
"description": "Global (per card) earning limits.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether global earning limits apply."
},
"limits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsGlobalLimit"
},
"description": "Limit definitions. Empty array when `type` is `NO_LIMIT`."
}
},
"required": [
"type",
"limits"
]
},
"CardDefinitionEarningLimitsTransactions": {
"type": "object",
"description": "Per-transaction earning limits.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether per-transaction earning limits apply."
},
"limits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionEarningLimitsTransactionsLimit"
},
"description": "Limit definitions. Empty array when `type` is `NO_LIMIT`."
}
},
"required": [
"type",
"limits"
]
},
"CardDefinitionSpendingLimitsGlobal": {
"type": "object",
"description": "Global (per card) spending limits.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether global spending limits apply."
},
"limits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobalLimit"
},
"description": "Limit definitions. Empty array when `type` is `NO_LIMIT`."
}
},
"required": [
"type",
"limits"
]
},
"CardDefinitionSpendingLimitsTransactions": {
"type": "object",
"description": "Per-transaction spending limits.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether per-transaction spending limits apply."
},
"limits": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionSpendingLimitsTransactionsLimit"
},
"description": "Limit definitions. Empty array when `type` is `NO_LIMIT`."
}
},
"required": [
"type",
"limits"
]
},
"CardDefinitionRefundsSpentPoints": {
"type": "object",
"description": "How points spent on a refunded order are handled.",
"properties": {
"type": {
"type": "string",
"enum": [
"NONE",
"REFUNDABLE"
],
"description": "Whether spent points are refundable."
},
"methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionRefundsSpentPointsMethod"
},
"description": "Refund methods. Empty array when `type` is `NONE`."
}
},
"required": [
"type",
"methods"
]
},
"CardDefinitionRefundsEarnedPoints": {
"type": "object",
"description": "How points earned on a refunded order are handled.",
"properties": {
"type": {
"type": "string",
"enum": [
"NONE",
"REFUNDABLE"
],
"description": "Whether earned points are revocable on refund."
},
"methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionRefundsEarnedPointsMethod"
},
"description": "Revoke methods. Empty array when `type` is `NONE`."
}
},
"required": [
"type",
"methods"
]
},
"CardDefinitionActivitySource": {
"type": "object",
"description": "Source that triggered the activity.",
"properties": {
"channel": {
"type": "string",
"enum": [
"USER_PORTAL",
"API",
"CLIENT_API",
"INTERNAL"
],
"description": "Channel through which the activity was triggered."
},
"user": {
"type": "object",
"description": "User that triggered the activity. Omitted when not applicable.",
"properties": {
"id": {
"type": "string",
"description": "User ID."
}
}
},
"api_key": {
"type": "object",
"description": "API key used to trigger the activity. Omitted when not applicable.",
"properties": {
"name": {
"type": "string",
"description": "API key name."
},
"app_id": {
"type": "string",
"description": "Application ID of the API key."
},
"client_app_id": {
"type": "string",
"description": "Client application ID of the API key."
}
}
}
}
},
"LoyaltyV2ActivityEarningRuleTriggerCustomEvent": {
"type": "object",
"description": "Custom event trigger configuration.",
"properties": {
"schema_id": {
"type": "string",
"pattern": "^ms_[a-zA-Z0-9]+",
"description": "Custom event schema ID (`ms_...`)."
}
},
"required": [
"schema_id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRuleTriggerSegment": {
"type": "object",
"description": "Segment trigger configuration.",
"properties": {
"id": {
"type": "string",
"pattern": "^seg_[a-zA-Z0-9]+",
"description": "Segment ID (`seg_...`)."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"EarningRuleEarningBase": {
"type": "object",
"properties": {
"rules": {
"description": "Validation rules group evaluated before applying effects. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleRulesGroup"
},
{
"type": "null"
}
]
},
"effects": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"description": "Lists the effects applied when the rules match. Required. Contains 1 to 10 effects.",
"items": {
"$ref": "#/components/schemas/EarningRuleEffect"
}
},
"name": {
"type": [
"string",
"null"
],
"maxLength": 200,
"description": "Optional earning item name. Can be `null`."
},
"tier_rules": {
"description": "Tier requirements restricting which members can earn. Omit the field or set it to `null` to use `{ \"type\": \"NO_REQUIREMENTS\" }`. The response always includes `tier_rules`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleTierRules"
},
{
"type": "null"
}
]
}
},
"required": [
"effects"
]
},
"LoyaltyV2ActivityEarningRuleValidityDailyHours": {
"type": "object",
"description": "Daily validity window on selected days of the week.",
"properties": {
"days_of_week": {
"type": "array",
"minItems": 1,
"maxItems": 7,
"uniqueItems": true,
"description": "Days of week (0 = Sunday ... 6 = Saturday). Items must be unique.",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
},
"start_time": {
"type": "string",
"description": "Window start time in `HH:mm` format."
},
"end_time": {
"type": "string",
"description": "Window end time in `HH:mm` format."
}
},
"required": [
"days_of_week",
"start_time",
"end_time"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRuleEarningLimitsGlobal": {
"type": "object",
"description": "Global (per member, across this rule) earning limits. With `NO_LIMIT`, `limits` is an empty array. With `LIMITED`, `limits` contains exactly one `TIME_BASED` limit.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Whether global earning limits apply."
},
"limits": {
"type": "array",
"description": "Earning limits (at most one). Empty array when `type` is `NO_LIMIT`.",
"minItems": 0,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobalLimit"
}
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "NO_LIMIT"
}
}
},
"then": {
"properties": {
"limits": {
"type": "array",
"minItems": 0,
"maxItems": 0,
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobalLimit"
}
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "LIMITED"
}
}
},
"then": {
"required": [
"limits"
],
"properties": {
"limits": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobalLimit"
}
}
}
}
}
]
},
"EarningRuleRulesGroup": {
"type": "object",
"description": "Group of rule definitions combined by a logical formula. Besides `logic`, only positive-integer keys are allowed (property names must match `^[1-9]\\d*$`), each referencing a rule definition. The `logic` value is a logical expression referencing the numbered rules, e.g. `\"1 and 2\"` or `\"1 and (2 or 3)\"`. At least one numbered rule is required (`minProperties: 2` including `logic`).",
"properties": {
"logic": {
"type": "string",
"description": "Logical expression combining the numbered rule definitions, e.g. `\"1 and 2\"`."
}
},
"patternProperties": {
"^[1-9]\\d*$": {
"$ref": "#/components/schemas/EarningRuleDefinition"
}
},
"required": [
"logic"
],
"minProperties": 2,
"additionalProperties": false
},
"EarningRuleTierRules": {
"type": "object",
"description": "Tier requirements for an earning. With `NO_REQUIREMENTS`, `any_of` must be null/absent. With `ANY_OF`, `any_of` is required (at least one entry) and the member must be in any of the listed tiers to earn.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_REQUIREMENTS",
"ANY_OF"
],
"description": "Tier requirement type."
},
"any_of": {
"description": "Tier structure/tier combinations, any of which satisfies the requirement. Can be `null`.",
"oneOf": [
{
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTierRulesAnyOfEntry"
}
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "NO_REQUIREMENTS"
}
}
},
"then": {
"properties": {
"any_of": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "ANY_OF"
}
}
},
"then": {
"required": [
"any_of"
],
"properties": {
"any_of": {
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTierRulesAnyOfEntry"
}
}
}
}
}
]
},
"EarningRuleEffect": {
"type": "object",
"description": "Effect applied when an earning is triggered. Depending on `type`, exactly one of `points`, `points_proportional` or `benefit` is required and the others must be null/absent.",
"properties": {
"type": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"BENEFIT"
],
"description": "Effect type."
},
"points": {
"$ref": "#/components/schemas/EarningRuleEffectPoints"
},
"points_proportional": {
"$ref": "#/components/schemas/EarningRuleEffectPointsProportional"
},
"benefit": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEffectBenefit"
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "POINTS"
}
}
},
"then": {
"required": [
"points"
],
"properties": {
"points": {
"$ref": "#/components/schemas/EarningRuleEffectPoints"
},
"points_proportional": {
"type": "null"
},
"benefit": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "POINTS_PROPORTIONAL"
}
}
},
"then": {
"required": [
"points_proportional"
],
"properties": {
"points": {
"type": "null"
},
"points_proportional": {
"$ref": "#/components/schemas/EarningRuleEffectPointsProportional"
},
"benefit": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "BENEFIT"
}
}
},
"then": {
"required": [
"benefit"
],
"properties": {
"points": {
"type": "null"
},
"points_proportional": {
"type": "null"
},
"benefit": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEffectBenefit"
}
}
}
}
]
},
"EarningRuleTriggerLimitsCooldownFixedCooldown": {
"type": "object",
"description": "Fixed cooldown period configuration.",
"properties": {
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerLimitsCooldownFixedCooldownPeriod"
}
},
"required": [
"period"
],
"additionalProperties": false
},
"EarningRuleTriggerLimitsFrequencyLimit": {
"type": "object",
"description": "A single frequency limit. Currently only the `TIME_BASED` variant exists (discriminated by `type`), which requires `period` and `triggers`.",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"TIME_BASED"
],
"description": "Frequency limit variant."
}
},
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "TIME_BASED"
},
"period": {
"$ref": "#/components/schemas/EarningRuleTriggerLimitsFrequencyLimitTimeBasedPeriod"
},
"triggers": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerLimitsFrequencyLimitTimeBasedTriggers"
}
},
"required": [
"period",
"triggers"
],
"additionalProperties": false
}
]
},
"EarningRuleActivitySource": {
"type": "object",
"description": "Origin of the activity.",
"properties": {
"channel": {
"type": "string",
"enum": [
"USER_PORTAL",
"API",
"CLIENT_API",
"INTERNAL"
],
"description": "Channel through which the change was made."
},
"user": {
"type": "object",
"description": "User who made the change (present for USER_PORTAL channel).",
"properties": {
"id": {
"type": "string",
"description": "User ID."
}
}
},
"api_key": {
"type": "object",
"description": "API key used to make the change (present for API/CLIENT_API channels).",
"properties": {
"name": {
"type": "string",
"description": "API key name."
},
"app_id": {
"type": "string",
"description": "Application ID of the API key."
},
"client_app_id": {
"type": "string",
"description": "Client application ID (for CLIENT_API keys)."
}
}
}
}
},
"TierStructurePointEarnedPeriodUpsert": {
"type": "object",
"description": "Points earned tracking period. The maximum `value` depends on `unit`: 90 for\n`DAY`, 52 for `WEEK`, 12 for `MONTH`, 5 for `YEAR`.",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"description": "Length of the tracking period, expressed in `unit` units. Minimum 1. Maximum\ndepends on `unit` (DAY: 90, WEEK: 52, MONTH: 12, YEAR: 5)."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"WEEK",
"MONTH",
"YEAR"
],
"description": "Unit of the tracking period."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"value",
"unit"
]
},
{
"if": {
"properties": {
"unit": {
"const": "DAY"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 90
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "WEEK"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 52
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "MONTH"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 12
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "YEAR"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 5
}
}
}
}
]
},
"TierStructureExpirationFixedDurationUpsert": {
"type": "object",
"description": "Fixed duration expiration settings. Tier membership expires after a fixed period.",
"properties": {
"period": {
"$ref": "#/components/schemas/TierStructureExpirationFixedDurationPeriodUpsert",
"description": "Duration after which the tier membership expires."
}
},
"required": [
"period"
],
"additionalProperties": false
},
"TierStructureExpirationCalendarExpirationUpsert": {
"type": "object",
"description": "Calendar expiration settings. Tier membership expires on fixed calendar dates.",
"properties": {
"calendar_dates": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"description": "Calendar dates (day + month) on which tier membership expires. 1-20 items.",
"items": {
"$ref": "#/components/schemas/TierStructureExpirationCalendarDateUpsert"
}
}
},
"required": [
"calendar_dates"
],
"additionalProperties": false
},
"TierStructureExpirationSlidingExpirationUpsert": {
"description": "Sliding expiration settings. Tier membership expiration slides forward on the\nconfigured member activities.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructureSlidingExpirationActivityBase"
},
{
"type": "object",
"properties": {
"custom_activity_types": {
"type": "array",
"maxItems": 10,
"uniqueItems": true,
"description": "Custom activity type names that extend the tier membership. Up to 10 unique\nitems. Defaults to an empty array when omitted.",
"items": {
"type": "string",
"minLength": 1,
"description": "Custom activity type name."
}
},
"period": {
"description": "Sliding period after the last qualifying activity. Required (may be null).",
"oneOf": [
{
"$ref": "#/components/schemas/TierStructureExpirationSlidingExpirationPeriodUpsert"
},
{
"type": "null"
}
]
}
},
"required": [
"period"
]
}
],
"unevaluatedProperties": false
},
"TierStructureDowngradeGracePeriodUpsert": {
"type": "object",
"description": "Downgrade grace period.",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"description": "Length of the grace period, expressed in `unit` units. Minimum 1."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Unit of the grace period."
},
"round_up": {
"type": "boolean",
"description": "Whether the grace period end is rounded up to the end of the unit."
}
},
"required": [
"value",
"unit"
],
"additionalProperties": false
},
"LoyaltyV2ActivityTierStructurePointEarnedPeriod": {
"type": "object",
"description": "Points earned tracking period.",
"properties": {
"value": {
"type": "integer",
"description": "Length of the tracking period, expressed in `unit` units."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"WEEK",
"MONTH",
"YEAR"
],
"description": "Unit of the tracking period."
}
}
},
"TierStructureExpirationFixedDuration": {
"type": "object",
"description": "Fixed duration expiration settings.",
"properties": {
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierStructureExpirationPeriod",
"description": "Duration after which the tier membership expires."
}
}
},
"TierStructureExpirationCalendarExpiration": {
"type": "object",
"description": "Calendar expiration settings.",
"properties": {
"calendar_dates": {
"type": "array",
"description": "Calendar dates on which tier membership expires.",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierStructureExpirationCalendarDate"
}
}
}
},
"TierStructureExpirationSlidingExpiration": {
"description": "Sliding expiration settings.",
"allOf": [
{
"$ref": "#/components/schemas/TierStructureSlidingExpirationActivityBase"
},
{
"type": "object",
"properties": {
"custom_activity_types": {
"type": "array",
"description": "Custom activity type names that extend the tier membership.",
"items": {
"type": "string",
"description": "Custom activity type name."
}
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityTierStructureExpirationPeriod",
"description": "Sliding period after the last qualifying activity."
}
}
}
]
},
"LoyaltyV2ActivityTierStructureDowngradeGracePeriod": {
"type": "object",
"description": "Downgrade grace period.",
"properties": {
"value": {
"type": "integer",
"description": "Length of the grace period, expressed in `unit` units."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Unit of the grace period."
},
"round_up": {
"type": "boolean",
"description": "Whether the grace period end is rounded up to the end of the unit."
}
}
},
"TierQualificationRulesPointsUpsert": {
"type": "object",
"description": "Point thresholds for tier qualification. Values must be non-negative numbers\nbetween 0 and 1,000,000,000.",
"properties": {
"min_value": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Minimum number of points required to qualify for the tier. Required."
},
"max_value": {
"type": "number",
"minimum": 0,
"maximum": 1000000000,
"description": "Optional upper bound of points for the tier."
}
},
"required": [
"min_value"
],
"additionalProperties": false
},
"TierQualificationRulesSegmentUpsert": {
"type": "object",
"description": "Customer segment reference for tier qualification.",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Unique identifier of the customer segment."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityTierQualificationRulesPoints": {
"type": "object",
"description": "Point thresholds for tier qualification.",
"properties": {
"min_value": {
"type": "number",
"description": "Minimum number of points required to qualify for the tier."
},
"max_value": {
"type": "number",
"description": "Optional upper bound of points for the tier. Omitted when not set."
}
}
},
"LoyaltyV2ActivityTierQualificationRulesSegment": {
"type": "object",
"description": "Customer segment reference.",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the customer segment."
}
}
},
"TierStructureActivityData": {
"type": "object",
"description": "Activity payload. Always contains a `tier_structure` snapshot. For\n`vl.tier_structure.tier.*` activities it additionally contains a `tier` snapshot;\nfor `vl.tier_structure.assigned`/`vl.tier_structure.unassigned` activities it\nadditionally contains `program` and `program_tier_structure` snapshots.",
"properties": {
"tier_structure": {
"$ref": "#/components/schemas/TierStructure",
"description": "Snapshot of the tier structure at the time of the activity."
},
"tier": {
"$ref": "#/components/schemas/Tier",
"description": "Snapshot of the tier. Present only for `vl.tier_structure.tier.created`,\n`vl.tier_structure.tier.updated` and `vl.tier_structure.tier.deleted` activities."
},
"program": {
"type": "object",
"description": "Snapshot of the loyalty program (documented in the Programs domain).\nPresent only for `vl.tier_structure.assigned` and\n`vl.tier_structure.unassigned` activities."
},
"program_tier_structure": {
"type": "object",
"description": "Snapshot of the program-to-tier-structure assignment (documented in the\nPrograms domain). Present only for `vl.tier_structure.assigned` and\n`vl.tier_structure.unassigned` activities."
}
},
"required": [
"tier_structure"
]
},
"TierStructureActivitySource": {
"type": "object",
"description": "Origin of an activity.",
"properties": {
"channel": {
"type": "string",
"enum": [
"USER_PORTAL",
"API",
"CLIENT_API",
"INTERNAL"
],
"description": "Channel through which the activity was triggered."
},
"user": {
"type": "object",
"description": "User who triggered the activity. Omitted when not applicable.",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the user."
}
}
},
"api_key": {
"type": "object",
"description": "API key used to trigger the activity. Omitted when not applicable.",
"properties": {
"name": {
"type": "string",
"description": "Name of the API key."
},
"app_id": {
"type": "string",
"description": "Application id of the API key."
},
"client_app_id": {
"type": "string",
"description": "Client application id of the API key."
}
}
}
}
},
"BenefitPointsProportionalOrder": {
"type": "object",
"description": "Order-based proportional calculation. Provide the property matching the `calculation_type`.",
"properties": {
"amount": {
"description": "Points per every specified pre-discount order amount (for `PRE_DISCOUNT_ORDER_AMOUNT`).",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalEvery"
}
]
},
"total_amount": {
"description": "Points per every specified post-discount order amount (for `POST_DISCOUNT_ORDER_AMOUNT`).",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalEvery"
}
]
},
"metadata": {
"description": "Points per every specified value of an order metadata property (for `ORDER_METADATA_VALUE`).",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalMetadata"
}
]
}
},
"additionalProperties": false
},
"BenefitPointsProportionalCustomer": {
"type": "object",
"description": "Customer-metadata-based proportional calculation.",
"properties": {
"metadata": {
"description": "Points per every specified value of a customer metadata property.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalMetadata"
}
]
}
},
"required": [
"metadata"
],
"additionalProperties": false
},
"BenefitPointsProportionalCustomEvent": {
"type": "object",
"description": "Custom-event-metadata-based proportional calculation.",
"properties": {
"metadata": {
"description": "Points per every specified value of a custom event metadata property.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalMetadata"
}
]
}
},
"required": [
"metadata"
],
"additionalProperties": false
},
"BenefitPointsProportionalOrderItems": {
"type": "object",
"description": "Order-items-based proportional calculation. Provide the property matching the `calculation_type`.",
"properties": {
"amount": {
"description": "Points per every specified pre-discount amount spent on the selected items (for `PRE_DISCOUNT_ORDER_ITEMS_AMOUNT`).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportionalOrderItemsCalculation"
}
]
},
"subtotal_amount": {
"description": "Points per every specified post-discount amount spent on the selected items (for `POST_DISCOUNT_ORDER_ITEMS_AMOUNT`).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportionalOrderItemsCalculation"
}
]
},
"quantity": {
"description": "Points per every specified quantity of the selected items, excluding free items (for `ORDER_ITEMS_QUANTITY`).",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitPointsProportionalOrderItemsCalculation"
}
]
}
},
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitMaterialProduct": {
"type": "object",
"title": "Benefit Material Product",
"description": "Product reference for a material benefit.",
"properties": {
"id": {
"type": "string",
"pattern": "^prod_[a-f0-9]+",
"description": "Product ID, prefixed with `prod_`."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitMaterialSKU": {
"type": "object",
"title": "Benefit Material SKU",
"description": "SKU reference for a material benefit.",
"properties": {
"product_id": {
"type": "string",
"pattern": "^prod_[a-f0-9]+",
"description": "ID of the product the SKU belongs to, prefixed with `prod_`."
},
"id": {
"type": "string",
"pattern": "^sku_[a-f0-9]+",
"description": "SKU ID, prefixed with `sku_`."
}
},
"required": [
"product_id",
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitDigitalGiftVouchers": {
"type": "object",
"title": "Benefit Digital Gift Vouchers",
"description": "Gift vouchers digital benefit configuration.",
"properties": {
"campaign_id": {
"type": "string",
"pattern": "^camp_[a-zA-Z0-9]+",
"description": "ID of the `GIFT_VOUCHERS` campaign the vouchers are sourced from, prefixed with `camp_`."
},
"balance": {
"type": "number",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Balance loaded onto the gift voucher."
}
},
"required": [
"campaign_id",
"balance"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitDigitalDiscountCoupons": {
"type": "object",
"title": "Benefit Digital Discount Coupons",
"description": "Discount coupons digital benefit configuration.",
"properties": {
"campaign_id": {
"type": "string",
"pattern": "^camp_[a-zA-Z0-9]+",
"description": "ID of the `DISCOUNT_COUPONS` campaign the coupons are sourced from, prefixed with `camp_`."
}
},
"required": [
"campaign_id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitStockLimited": {
"type": "object",
"title": "Benefit Stock Limited",
"description": "Limited stock configuration.",
"properties": {
"quantity": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Available Remaining stock quantity. For responses, updates with each benefit purchase."
}
},
"required": [
"quantity"
],
"additionalProperties": false
},
"BenefitActivityData": {
"type": "object",
"description": "Activity payload containing a snapshot of the benefit at the time of the activity.",
"properties": {
"benefit": {
"$ref": "#/components/schemas/Benefit"
}
},
"required": [
"benefit"
]
},
"BenefitActivitySource": {
"type": "object",
"description": "Origin of the activity.",
"properties": {
"channel": {
"type": "string",
"enum": [
"USER_PORTAL",
"API",
"CLIENT_API",
"INTERNAL"
],
"description": "Channel the activity originated from."
},
"user": {
"description": "User who triggered the activity. Present for user-originated activities.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitActivitySourceUser"
}
]
},
"api_key": {
"description": "API key used to trigger the activity. Present for API-originated activities.",
"oneOf": [
{
"$ref": "#/components/schemas/BenefitActivitySourceApiKey"
}
]
}
}
},
"RewardValidityDailyHoursRequest": {
"type": "object",
"description": "A single daily validity window.",
"properties": {
"days_of_week": {
"type": "array",
"minItems": 1,
"maxItems": 7,
"description": "Days of the week the window applies to, as integers 0-6 (0 = Sunday). Values must be unique.",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
},
"start_time": {
"type": "string",
"description": "Window start time in `HH:mm` format.",
"example": "09:00"
},
"end_time": {
"type": "string",
"description": "Window end time in `HH:mm` format.",
"example": "17:00"
}
},
"required": [
"days_of_week",
"start_time",
"end_time"
],
"additionalProperties": false
},
"LoyaltyV2ActivityRewardMaterialProduct": {
"type": "object",
"description": "Product reference for a material reward.",
"properties": {
"id": {
"type": "string",
"pattern": "^prod_[a-f0-9]+",
"description": "Product identifier, prefixed with `prod_`."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityRewardMaterialSKU": {
"type": "object",
"description": "SKU reference for a material reward.",
"properties": {
"product_id": {
"type": "string",
"pattern": "^prod_[a-f0-9]+",
"description": "Unique identifier of the product the SKU belongs to, prefixed with `prod_`."
},
"id": {
"type": "string",
"pattern": "^sku_[a-f0-9]+",
"description": "SKU identifier, prefixed with `sku_`."
}
},
"required": [
"product_id",
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityRewardDigitalDiscountCoupons": {
"type": "object",
"description": "Discount coupons digital reward configuration.",
"properties": {
"campaign_id": {
"type": "string",
"pattern": "^camp_[a-zA-Z0-9]+",
"description": "Unique identifier of the discount coupons campaign to publish a coupon from, prefixed with `camp_`."
}
},
"required": [
"campaign_id"
],
"additionalProperties": false
},
"RewardDigitalGiftVouchersRequest": {
"type": "object",
"description": "Gift vouchers digital reward configuration.",
"properties": {
"campaign_id": {
"type": "string",
"pattern": "^camp_[a-zA-Z0-9]+",
"description": "Unique identifier of the gift vouchers campaign to publish a voucher from, prefixed with `camp_`."
},
"balance": {
"type": "number",
"minimum": 0,
"description": "Gift card balance credited when the reward is delivered."
}
},
"required": [
"campaign_id",
"balance"
],
"additionalProperties": false
},
"RewardDigitalLoyaltyCardPointsRequest": {
"type": "object",
"description": "Loyalty card points digital reward configuration.",
"properties": {
"points": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Number of points credited to the member's card when the reward is delivered."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition to credit points to, prefixed with `lcdef_`."
}
},
"required": [
"points",
"card_definition_id"
],
"additionalProperties": false
},
"RewardCostRulesRequest": {
"type": "object",
"description": "Rules group for a reward cost. Contains a required `logic` property plus numbered\nrule definitions. Every property other than `logic` must be a positive-integer\nkey (`^[1-9]\\d*$`) mapping to a rule definition. At least one rule definition is\nrequired. No other properties are allowed.",
"properties": {
"logic": {
"type": "string",
"description": "A logical formula referencing the numbered rule definitions, e.g. `\"1 AND 2\"`."
}
},
"patternProperties": {
"^[1-9]\\d*$": {
"$ref": "#/components/schemas/RewardCostRuleDefinitionRequest"
}
},
"required": [
"logic"
],
"minProperties": 2,
"additionalProperties": false
},
"RewardCostSpendingRequest": {
"type": "object",
"description": "Points spending definition for a cost.",
"properties": {
"id": {
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$",
"description": "Optional spending identifier, prefixed with `lrspn_`. Provide on update to keep the same spending entry; omit on create to auto-assign."
},
"name": {
"type": [
"string",
"null"
],
"maxLength": 200,
"description": "Optional display name of the spending definition (max 200 characters), or `null`."
},
"points": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Number of points the member must spend."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition the points are spent from, prefixed with `lcdef_`."
}
},
"required": [
"points",
"card_definition_id"
],
"additionalProperties": false
},
"RewardPurchaseLimitsCooldownInput": {
"type": "object",
"description": "Purchase cooldown limits for a reward.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_COOLDOWN",
"FIXED_COOLDOWN"
],
"description": "Cooldown type. `NO_COOLDOWN` requires `fixed_cooldown` to be null/omitted. `FIXED_COOLDOWN` requires `fixed_cooldown`."
},
"fixed_cooldown": {
"description": "Fixed cooldown details. Required when `type` is `FIXED_COOLDOWN`; must be null when `type` is `NO_COOLDOWN`.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseLimitsCooldownFixedCooldownInput"
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
"RewardPurchaseLimitsFrequencyInput": {
"type": "object",
"description": "Purchase frequency limits for a reward.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Frequency limit type. `NO_LIMIT` allows empty/null `limits`. `LIMITED` requires exactly one limit."
},
"limits": {
"description": "Frequency limit definitions. Empty or null when `type` is `NO_LIMIT`; exactly one entry when `type` is `LIMITED`.",
"oneOf": [
{
"type": "array",
"items": {
"$ref": "#/components/schemas/RewardPurchaseLimitsFrequencyLimitInput"
},
"minItems": 0,
"maxItems": 1
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false
},
"LoyaltyV2ActivityRewardValidityDailyHoursResponse": {
"type": "object",
"description": "A single daily validity window.",
"properties": {
"days_of_week": {
"type": "array",
"description": "Days of the week the window applies to, as integers 0-6 (0 = Sunday).",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
},
"start_time": {
"type": "string",
"description": "Window start time in `HH:mm` format.",
"example": "09:00"
},
"end_time": {
"type": "string",
"description": "Window end time in `HH:mm` format.",
"example": "17:00"
}
},
"required": [
"days_of_week",
"start_time",
"end_time"
]
},
"LoyaltyV2ActivityRewardDigitalGiftVouchersResponse": {
"type": "object",
"description": "Gift vouchers configuration.",
"properties": {
"campaign_id": {
"type": "string",
"pattern": "^camp_[a-zA-Z0-9]+",
"description": "Unique identifier of the gift vouchers campaign, prefixed with `camp_`."
},
"balance": {
"type": "number",
"description": "Gift card balance credited when the reward is delivered."
}
},
"required": [
"campaign_id",
"balance"
]
},
"LoyaltyV2ActivityRewardDigitalLoyaltyCardPointsResponse": {
"type": "object",
"description": "Loyalty card points configuration.",
"properties": {
"points": {
"type": "integer",
"description": "Number of points credited when the reward is delivered."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition points are credited to, prefixed with `lcdef_`."
}
},
"required": [
"points",
"card_definition_id"
]
},
"RewardCostRuleGroupResponse": {
"type": "object",
"description": "Rules group. Contains a `logic` formula string plus numbered rule definition properties (positive-integer keys).",
"properties": {
"logic": {
"type": "string",
"description": "Logical formula combining the numbered rule definitions, e.g. `\"1 AND 2\"`."
}
},
"patternProperties": {
"^[1-9]\\d*$": {
"$ref": "#/components/schemas/RewardCostRuleDefinitionResponse"
}
}
},
"LoyaltyV2ActivityRewardCostSpendingResponse": {
"type": "object",
"description": "Points spending definition.",
"properties": {
"id": {
"type": "string",
"pattern": "^lrspn_[a-f0-9]+$",
"description": "Unique spending identifier, prefixed with `lrspn_`. Assigned by the API when omitted on create/update."
},
"name": {
"type": [
"string",
"null"
],
"maxLength": 200,
"description": "Optional display name of the spending definition, or `null`."
},
"points": {
"type": "integer",
"description": "Number of points the member must spend."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Unique identifier of the card definition the points are spent from, prefixed with `lcdef_`."
}
},
"required": [
"id",
"points",
"card_definition_id"
]
},
"RewardCostTierRulesResponse": {
"type": "object",
"description": "Tier requirements for a reward cost. `any_of` is omitted when `type` is `NO_REQUIREMENTS`.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_REQUIREMENTS",
"ANY_OF"
],
"description": "Tier requirement type."
},
"any_of": {
"type": "array",
"minItems": 1,
"description": "Lists tier combinations that qualify. Present when `type` is `ANY_OF`.",
"items": {
"$ref": "#/components/schemas/RewardCostTierRulesAnyOfEntryResponse"
}
}
},
"required": [
"type"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "ANY_OF"
}
}
},
"then": {
"required": [
"any_of"
]
}
}
]
},
"RewardPurchaseLimitsCooldown": {
"type": "object",
"description": "Purchase cooldown limits for a reward.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_COOLDOWN",
"FIXED_COOLDOWN"
],
"description": "Cooldown type. `NO_COOLDOWN` - no cooldown. `FIXED_COOLDOWN` - wait a fixed period after each purchase."
},
"fixed_cooldown": {
"$ref": "#/components/schemas/RewardPurchaseLimitsCooldownFixedCooldown",
"description": "Fixed cooldown details. Present when `type` is `FIXED_COOLDOWN`. Omitted when `type` is `NO_COOLDOWN`."
}
},
"required": [
"type"
]
},
"RewardPurchaseLimitsFrequency": {
"type": "object",
"description": "Purchase frequency limits for a reward.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_LIMIT",
"LIMITED"
],
"description": "Frequency limit type. `NO_LIMIT` - unlimited purchases. `LIMITED` - limited by the `limits` array."
},
"limits": {
"type": "array",
"description": "Frequency limit definitions. Empty array when `type` is `NO_LIMIT`; one entry when `type` is `LIMITED`.",
"items": {
"$ref": "#/components/schemas/RewardPurchaseLimitsFrequencyLimit"
}
}
},
"required": [
"type",
"limits"
]
},
"RewardActivityData": {
"type": "object",
"description": "Activity payload. `reward` is always present and contains a full snapshot of the\nreward at the time of the activity. For `vl.reward.assigned` and\n`vl.reward.unassigned` activities, `program` (a snapshot of the program) and\n`program_reward` (a snapshot of the program-reward assignment) are also present.",
"properties": {
"reward": {
"$ref": "#/components/schemas/RewardResponse",
"description": "Snapshot of the reward at the time of the activity."
},
"program": {
"type": "object",
"description": "Snapshot of the program. Present only for assigned/unassigned activities."
},
"program_reward": {
"type": "object",
"description": "Snapshot of the program-reward assignment. Present only for assigned/unassigned activities."
}
},
"required": [
"reward"
]
},
"RewardActivitySource": {
"type": "object",
"description": "Origin of an activity.",
"properties": {
"channel": {
"type": "string",
"enum": [
"USER_PORTAL",
"API",
"CLIENT_API",
"INTERNAL"
],
"description": "Channel through which the change was made."
},
"user": {
"$ref": "#/components/schemas/RewardActivitySourceUser",
"description": "User who made the change. Omitted when not applicable."
},
"api_key": {
"$ref": "#/components/schemas/RewardActivitySourceApiKey",
"description": "API key used to make the change. Omitted when not applicable."
}
},
"required": [
"channel"
]
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomer": {
"type": "object",
"description": "Customer metadata overrides used during examination.",
"properties": {
"metadata": {
"description": "Customer metadata overrides. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Customer"
},
"LoyaltiesExamineEarningRulesExamineRequestBodyMember": {
"type": "object",
"description": "Member metadata overrides used during examination. Allowed only when `customer_identification.type` is `member_id`.",
"properties": {
"metadata": {
"description": "Member metadata overrides. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Member"
},
"LoyaltiesExamineEarningRulesExamineRequestBodyOrderItem": {
"type": "object",
"description": "A hypothetical order line item used for estimation.",
"properties": {
"id": {
"type": [
"string",
"null"
],
"description": "Order item ID assigned by Voucherify. Can be `null`."
},
"source_id": {
"type": [
"string",
"number",
"null"
],
"description": "Order item source ID, e.g. from an external system. May be provided as a string or a number. Can be `null`."
},
"product_id": {
"type": [
"string",
"number",
"null"
],
"description": "Product ID. May be provided as a string or a number. Can be `null`."
},
"sku_id": {
"type": [
"string",
"number",
"null"
],
"description": "SKU ID. May be provided as a string or a number. Can be `null`."
},
"related_object": {
"description": "Whether the item refers to a product or a SKU. Can be `null`.",
"oneOf": [
{
"type": "string",
"enum": [
"product",
"sku"
]
},
{
"type": "null"
}
]
},
"amount": {
"type": [
"string",
"number",
"null"
],
"description": "Item amount before discounts - a non-negative integer. May be provided as a string or a number. Can be `null`."
},
"discount_amount": {
"type": [
"string",
"number",
"null"
],
"description": "Item discount amount - a non-negative integer. May be provided as a string or a number. Can be `null`."
},
"quantity": {
"type": [
"string",
"number",
"null"
],
"description": "Item quantity - a positive integer. May be provided as a string or a number. Can be `null`."
},
"price": {
"type": [
"string",
"number",
"null"
],
"description": "Item unit price - a non-negative integer. May be provided as a string or a number. Can be `null`."
},
"product": {
"description": "Product details. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyOrderItemProduct"
},
{
"type": "null"
}
]
},
"sku": {
"description": "SKU details. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineRequestBodyOrderItemSku"
},
{
"type": "null"
}
]
},
"metadata": {
"description": "Order item metadata. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Order Item"
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomEventAll": {
"type": "object",
"description": "Metadata applied when examining all custom events.",
"properties": {
"metadata": {
"description": "Custom event metadata. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Custom Event All"
},
"LoyaltiesExamineEarningRulesExamineRequestBodyCustomEventSpecific": {
"type": "object",
"description": "A specific custom event to examine.",
"properties": {
"schema_id": {
"type": "string",
"pattern": "^ms_[a-zA-Z0-9]+",
"description": "Custom event schema ID (`ms_...`)."
},
"metadata": {
"description": "Custom event metadata. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityMetadata"
},
{
"type": "null"
}
]
}
},
"required": [
"schema_id"
],
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Custom Event Specific"
},
"ExamineCardReference": {
"type": "object",
"description": "Card reference in examine results.",
"properties": {
"id": {
"type": "string",
"description": "Unique card ID (`lcrd_...`)."
},
"card_definition_id": {
"type": "string",
"description": "Unique card definition ID (`lcdef_...`)."
},
"card_type": {
"type": "string",
"enum": [
"INDIVIDUAL"
],
"description": "Card type. Currently only `INDIVIDUAL` exists."
},
"code": {
"type": [
"string",
"null"
],
"description": "Card code. May be `null` right after member creation because card codes are generated asynchronously."
},
"object": {
"type": "string",
"const": "card",
"description": "Object type marker. Always `card`."
}
},
"required": [
"id",
"card_definition_id",
"card_type",
"code",
"object"
]
},
"LoyaltiesExamineEarningRulesExamineResponseBodyCardEarningRuleEstimation": {
"title": "Loyalties Examine Earning Rules Examine Response Body Card Earning Rule Estimation",
"description": "Point estimation from a single earning rule for a card.",
"allOf": [
{
"$ref": "#/components/schemas/ExamineEarningRuleEstimationBase"
},
{
"type": "object",
"properties": {
"points_estimation": {
"type": "number",
"description": "Estimated points this earning rule would award to the card."
}
}
}
]
},
"LoyaltiesExamineEarningRulesExamineResponseBodyBenefitReference": {
"type": "object",
"description": "Benefit reference in examine results.",
"properties": {
"id": {
"type": "string",
"description": "Benefit ID (`lben_...`)."
},
"name": {
"type": "string",
"description": "Benefit name."
},
"type": {
"type": "string",
"enum": [
"POINTS",
"POINTS_PROPORTIONAL",
"MATERIAL",
"DIGITAL"
],
"description": "Benefit type."
},
"object": {
"type": "string",
"const": "benefit",
"description": "Object type marker. Always `benefit`."
}
},
"title": "Loyalties Examine Earning Rules Examine Response Body Benefit Reference"
},
"LoyaltiesExamineEarningRulesExamineResponseBodyBenefitEarningRuleEstimation": {
"title": "Loyalties Examine Earning Rules Examine Response Body Benefit Earning Rule Estimation",
"description": "Earning rule granting a benefit.",
"allOf": [
{
"$ref": "#/components/schemas/ExamineEarningRuleEstimationBase"
}
]
},
"LoyaltiesExamineRewardsExamineResponseBodyCardRewardEstimation": {
"type": "object",
"description": "Reward availability estimation for a card.",
"properties": {
"reward": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBodyRewardReference",
"description": "Identifies the examined reward."
},
"status": {
"type": "string",
"enum": [
"AVAILABLE",
"UNAVAILABLE"
],
"description": "Whether the reward can currently be obtained with this card."
},
"cost": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBodyRewardCost",
"description": "Provides the matched points cost for this card."
},
"unavailability_reasons": {
"type": "array",
"description": "Reasons the reward is unavailable. Absent when the reward is available.",
"items": {
"$ref": "#/components/schemas/LoyaltiesExamineRewardsExamineResponseBodyRewardUnavailabilityReason"
}
},
"object": {
"type": "string",
"const": "reward_estimation",
"description": "Object type marker. Always `reward_estimation`."
}
},
"required": [
"reward",
"status",
"cost",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body Card Reward Estimation"
},
"CardBase": {
"type": "object",
"properties": {
"id": {
"type": "string",
"pattern": "^lcrd_[a-f0-9]+$",
"description": "Identifies the card."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Identifies the card definition."
},
"card_type": {
"type": "string",
"enum": [
"INDIVIDUAL"
],
"description": "Card type. Currently only `INDIVIDUAL` is supported."
},
"code": {
"type": [
"string",
"null"
],
"description": "Human-readable card code. Card code generation is asynchronous - this field is `null` right after member creation and is populated shortly after, once the background code generation completes."
},
"lifetime_bucket": {
"$ref": "#/components/schemas/CardLifetimeBucket",
"description": "Lifetime point counters of the card."
},
"balance": {
"$ref": "#/components/schemas/CardBalance",
"description": "Current available balance calculated from the lifetime bucket."
},
"object": {
"type": "string",
"const": "card",
"description": "Object type. Always `card`."
}
},
"required": [
"id",
"card_definition_id",
"card_type",
"code",
"lifetime_bucket",
"balance",
"object"
]
},
"CardNextExpiration": {
"type": "object",
"description": "The nearest upcoming points expiration on a card.",
"properties": {
"points": {
"type": "number",
"description": "Number of points that will expire.",
"default": 0
},
"date": {
"type": "string",
"format": "date",
"description": "Date when the points expire (`YYYY-MM-DD`)."
}
},
"required": [
"points",
"date"
]
},
"CardNextActivation": {
"type": "object",
"description": "The nearest upcoming pending points activation on a card. For the `EVENT_BASED` type, `date` is omitted and `cancel_date` is returned instead; for other types `date` is returned and `cancel_date` is omitted.",
"properties": {
"points": {
"type": "number",
"description": "Number of pending points to be activated.",
"default": 0
},
"type": {
"type": "string",
"enum": [
"IMMEDIATE",
"PERIOD_BASED",
"FIXED_DATES",
"EVENT_BASED"
],
"description": "Pending points activation type from the card definition."
},
"date": {
"type": "string",
"format": "date",
"description": "Activation date (`YYYY-MM-DD`). Present for all types except `EVENT_BASED`."
},
"cancel_date": {
"type": "string",
"format": "date",
"description": "Date when the pending points are canceled if the activating event does not occur (`YYYY-MM-DD`). Present only for the `EVENT_BASED` type."
}
},
"required": [
"points",
"type"
]
},
"MemberTierProgressCurrent": {
"type": "object",
"description": "The member's current tier.",
"properties": {
"tier": {
"description": "Current tier reference, or `null` when the member has no current tier.",
"oneOf": [
{
"$ref": "#/components/schemas/MemberTierProgressTier"
},
{
"type": "null"
}
]
},
"start_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the current tier started for the member (ISO 8601), or `null`."
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the member's tier expires (ISO 8601), or `null`."
},
"points": {
"description": "Member's points position within the tier's points range, or `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/MemberTierProgressPoints"
},
{
"type": "null"
}
]
}
},
"required": [
"tier",
"start_at",
"expires_at",
"points"
]
},
"MemberTierProgressTierStructure": {
"type": "object",
"description": "Simple tier structure reference.",
"properties": {
"id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Tier structure ID."
},
"object": {
"type": "string",
"const": "tier_structure",
"description": "Object type marker, always `tier_structure`."
}
},
"required": [
"id",
"object"
]
},
"MemberTierProgressDeferred": {
"type": "object",
"description": "A tier assignment deferred to a future date.",
"properties": {
"tier": {
"description": "Deferred tier reference, or `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/MemberTierProgressTier"
},
{
"type": "null"
}
]
},
"start_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the deferred tier starts (ISO 8601), or `null`."
},
"expires_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Timestamp when the deferred tier expires (ISO 8601), or `null`."
}
},
"required": [
"tier",
"start_at",
"expires_at"
]
},
"MemberTierProgressRisk": {
"type": "object",
"description": "A risk of losing or downgrading the current tier.",
"properties": {
"type": {
"type": "string",
"enum": [
"TIER_DOWNGRADE",
"TIER_LEFT"
],
"description": "Risk type - `TIER_DOWNGRADE` when the member would fall to a lower tier, `TIER_LEFT` when the member would leave the tier structure entirely."
},
"date": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Date when the risk materializes (ISO 8601), or `null`."
},
"tier": {
"description": "Tier the member would be downgraded to, or `null` for `TIER_LEFT`.",
"oneOf": [
{
"$ref": "#/components/schemas/MemberTierProgressTier"
},
{
"type": "null"
}
]
}
},
"required": [
"type",
"date",
"tier"
]
},
"MemberTierProgressOpportunity": {
"type": "object",
"description": "An opportunity to reach a higher tier.",
"properties": {
"valid_until": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Deadline for taking advantage of the opportunity (ISO 8601), or `null`."
},
"tier": {
"description": "Tier that can be reached, or `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/MemberTierProgressTier"
},
{
"type": "null"
}
]
},
"points": {
"type": "number",
"description": "Points needed to reach the tier."
}
},
"required": [
"valid_until",
"tier",
"points"
]
},
"ActivitySource": {
"type": "object",
"description": "Origin of an activity.",
"properties": {
"channel": {
"type": "string",
"enum": [
"USER_PORTAL",
"API",
"CLIENT_API",
"INTERNAL"
],
"description": "Channel through which the activity was triggered."
},
"user": {
"$ref": "#/components/schemas/ActivitySourceUser",
"description": "Dashboard user who triggered the activity. Omitted when not applicable."
},
"api_key": {
"$ref": "#/components/schemas/ActivitySourceApiKey",
"description": "API key used to trigger the activity. Omitted when not applicable."
}
},
"required": [
"channel"
],
"additionalProperties": false
},
"Card": {
"description": "A full loyalty card snapshot.",
"allOf": [
{
"$ref": "#/components/schemas/CardBase"
},
{
"type": "object",
"properties": {
"program_id": {
"type": "string",
"pattern": "^lprg_[a-f0-9]+$",
"description": "Identifies the loyalty program."
},
"customer_id": {
"type": [
"string",
"null"
],
"pattern": "^cust_[a-zA-Z0-9]+",
"description": "Identifies the customer linked to the card."
},
"member_id": {
"type": [
"string",
"null"
],
"pattern": "^lmbr_[a-f0-9]+$",
"description": "Identifies the member linked to the card."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "Records when the card was created (ISO 8601)."
},
"updated_at": {
"type": [
"string",
"null"
],
"format": "date-time",
"description": "Records the last update (ISO 8601). `null` if the card has never been updated."
}
},
"required": [
"program_id",
"created_at",
"updated_at"
]
}
]
},
"LoyaltyV2CardPointsBucketSimple": {
"title": "Loyalty Card Points Bucket",
"type": "object",
"description": "Simple representation of a points expiration bucket, embedded in card\ntransaction details.",
"properties": {
"id": {
"type": "string",
"pattern": "^lcpeb_[a-f0-9]+$",
"description": "Point expiration bucket ID."
},
"points": {
"type": "object",
"description": "Points affected by the transaction.",
"properties": {
"total": {
"type": "number",
"description": "Number of points affected."
}
},
"required": [
"total"
]
},
"expiration_date": {
"type": "string",
"format": "date",
"description": "Date when the points expire."
},
"expiration_type": {
"type": "string",
"enum": [
"NO_EXPIRATION",
"ROLLING_EXPIRATION",
"CALENDAR_EXPIRATION",
"SLIDING_EXPIRATION"
],
"description": "Expiration type of the points."
}
},
"required": [
"id",
"points",
"expiration_date",
"expiration_type"
]
},
"CardCodeGenerationFailureResult": {
"type": "object",
"description": "Outcome of a failed card code generation.",
"properties": {
"details": {
"type": "string",
"description": "Explains why code generation failed."
}
},
"required": [
"details"
],
"additionalProperties": false
},
"RewardPurchaseRefundPurchaseReference": {
"type": "object",
"description": "References to the original purchase transactions being refunded.",
"properties": {
"card_transaction": {
"description": "Reference to the original card transaction.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Card transaction identifier (format `lctx_...`)."
}
}
},
{
"type": "null"
}
]
},
"reward_transaction": {
"description": "Reference to the original reward transaction.",
"oneOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Reward transaction identifier (format `lrtx_...`)."
}
}
},
{
"type": "null"
}
]
}
}
},
"RewardPurchaseResultReward": {
"type": "object",
"description": "Reference to the fulfilled reward.",
"properties": {
"id": {
"type": "string",
"description": "Reward identifier (format `lrew_...`)."
},
"type": {
"type": "string",
"enum": [
"MATERIAL",
"DIGITAL"
],
"description": "Reward type."
}
}
},
"RewardPurchaseResultMaterial": {
"type": "object",
"description": "Material reward fulfillment.",
"properties": {
"type": {
"type": "string",
"enum": [
"PRODUCT",
"SKU"
],
"description": "Material reward type."
},
"product": {
"type": "object",
"description": "Product payload (present when `type` is `PRODUCT`).",
"additionalProperties": true
},
"sku": {
"type": "object",
"description": "SKU payload (present when `type` is `SKU`).",
"additionalProperties": true
}
}
},
"RewardPurchaseResultDigital": {
"type": "object",
"description": "Digital reward fulfillment.",
"properties": {
"type": {
"type": "string",
"enum": [
"DISCOUNT_COUPONS",
"GIFT_VOUCHERS",
"LOYALTY_CARD_POINTS"
],
"description": "Digital reward type."
},
"discount_coupons": {
"type": "array",
"description": "Fulfilled discount coupons (present when `type` is `DISCOUNT_COUPONS`).",
"items": {
"$ref": "#/components/schemas/RewardPurchaseDigitalCoupon"
}
},
"gift_vouchers": {
"type": "array",
"description": "Fulfilled gift vouchers (present when `type` is `GIFT_VOUCHERS`).",
"items": {
"$ref": "#/components/schemas/RewardPurchaseDigitalGiftVoucher"
}
},
"loyalty_card_points": {
"description": "Fulfilled loyalty card points (present when `type` is `LOYALTY_CARD_POINTS`).",
"oneOf": [
{
"$ref": "#/components/schemas/RewardPurchaseDigitalLoyaltyCardPoints"
},
{
"type": "null"
}
]
}
}
},
"OrderPaymentLimitDefinition": {
"type": "object",
"description": "Definition of a payment limit value.",
"properties": {
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum value of the limit."
}
},
"required": [
"max"
],
"additionalProperties": false
},
"BenefitTransactionRejection": {
"type": "object",
"description": "Rejection details for a benefit transaction.",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable rejection reason. Known values are `OUT_OF_STOCK`, `BENEFIT_NOT_FOUND`, `UNEXPECTED_ERROR`, `TRIGGER_LIMIT_COOLDOWN_NOT_PASSED`, and `TRIGGER_LIMIT_FREQUENCY_EXCEEDED`. Other error keys can be passed through, so treat this list as non-exhaustive."
},
"details": {
"description": "Additional rejection context. Stock, not-found, and unexpected-error rejections use a string. Trigger-limit rejections use an object.",
"oneOf": [
{
"type": "string",
"description": "Human-readable rejection message. Used for `OUT_OF_STOCK`, `BENEFIT_NOT_FOUND`, and `UNEXPECTED_ERROR`."
},
{
"type": "object",
"title": "Trigger-limit cooldown rejection details",
"description": "Trigger-limit cooldown rejection details. Returned when `reason` is `TRIGGER_LIMIT_COOLDOWN_NOT_PASSED`.",
"properties": {
"type": {
"type": "string",
"const": "COOLDOWN",
"description": "Trigger-limit check that failed. Always `COOLDOWN`."
},
"remaining_ms": {
"type": "number",
"description": "Milliseconds remaining before the earning rule cooldown ends."
}
},
"required": [
"type",
"remaining_ms"
],
"additionalProperties": false
},
{
"type": "object",
"title": "Trigger-limit frequency rejection details",
"description": "Trigger-limit frequency rejection details. Returned when `reason` is `TRIGGER_LIMIT_FREQUENCY_EXCEEDED`.",
"properties": {
"type": {
"type": "string",
"const": "FREQUENCY",
"description": "Trigger-limit check that failed. Always `FREQUENCY`."
},
"current_count": {
"type": "number",
"description": "Number of times the earning rule has already triggered in the limited period."
},
"limit": {
"type": "number",
"description": "Maximum number of times the earning rule may trigger in the limited period."
}
},
"required": [
"type",
"current_count",
"limit"
],
"additionalProperties": false
}
]
}
}
},
"BenefitTransactionDetailsMetadata": {
"type": "object",
"description": "Benefit transaction metadata written at fulfillment time.",
"properties": {
"event_id": {
"type": "string",
"description": "Unique identifier of the event that triggered the fulfillment. Custom events use the `evcus_` prefix; other source events use their own ID formats."
},
"earning_item_id": {
"description": "Identifier of the earning item that produced the benefit (format `lernei_...`). `null` when the earning item is unknown.",
"oneOf": [
{
"type": "string",
"pattern": "^lernei_[a-f0-9]+$"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"TierTransactionOrigin": {
"type": "object",
"description": "Origin of the tier transaction.",
"properties": {
"type": {
"type": "string",
"enum": [
"card_operations",
"daily_task_operations",
"member_card_created",
"member_card_deleted",
"segment_change"
],
"description": "Origin type. `card_operations` - point operations on the card. `daily_task_operations` - scheduled daily tier processing. `member_card_created` - a member card was created. `member_card_deleted` - a member card was deleted. `segment_change` - the customer entered or left a segment used in tier qualification."
},
"card_transaction_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Unique identifiers of the card transactions that triggered the transaction (format `lctx_...`). Returned for the `card_operations` origin."
},
"segment_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Unique identifiers of the customer segments that triggered the transaction. Returned for the `segment_change` origin."
}
},
"required": [
"type"
]
},
"TierTransactionRejection": {
"type": "object",
"description": "Rejection details for a tier transaction.",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable rejection reason. Known value: `SUPERSEDED_BY_LATER_TRANSACTION`."
},
"details": {
"type": "string",
"description": "Additional human-readable details about the rejection."
}
},
"required": [
"reason"
]
},
"CardDefinitionPointsExpirationRollingExpirationPeriodInput": {
"type": "object",
"description": "Rolling expiration period. The maximum `value` depends on `unit`:\n1-90 for `DAY`, 1-12 for `MONTH`, 1-5 for `YEAR` (enforced via if/then conditions).",
"properties": {
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Period unit."
},
"value": {
"type": "integer",
"minimum": 1,
"maximum": 90,
"description": "Period length. Maximum: 90 for `DAY`, 12 for `MONTH`, 5 for `YEAR`."
}
},
"required": [
"unit",
"value"
],
"additionalProperties": false
},
"CardDefinitionPointsExpirationRollingExpirationRoundingInput": {
"type": "object",
"description": "Rounding of the rolling expiration date. When `type` is `END_OF_PARTICULAR_MONTH`,\n`value` (month number 1-12) is required; for all other types `value` must be null/absent.",
"properties": {
"type": {
"type": "string",
"enum": [
"END_OF_MONTH",
"END_OF_QUARTER",
"END_OF_HALF_YEAR",
"END_OF_YEAR",
"END_OF_PARTICULAR_MONTH"
],
"description": "Rounding type."
},
"value": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 12,
"description": "Month number (1-12). Required when `type` is `END_OF_PARTICULAR_MONTH`, must be null otherwise."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionCalendarDateInput": {
"type": "object",
"description": "A calendar date (day + month). The maximum `day` depends on `month`\n(enforced via if/then conditions): 29 for February, 30 for April/June/September/November,\n31 for the remaining months.",
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31,
"description": "Day of the month. Maximum depends on the month: 29 for February, 30 for April, June, September, November, 31 otherwise."
},
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12,
"description": "Month number (1-12)."
}
},
"required": [
"day",
"month"
],
"additionalProperties": false
},
"CardDefinitionSlidingExpirationActivityBase": {
"type": "object",
"properties": {
"earning_activity": {
"type": "boolean",
"description": "Whether earning points resets the expiration window."
},
"spending_activity": {
"type": "boolean",
"description": "Whether spending points resets the expiration window."
},
"custom_activity": {
"type": "boolean",
"description": "Whether the configured custom events reset the expiration window."
}
}
},
"CardDefinitionPointsExpirationSlidingExpirationPeriodInput": {
"description": "Sliding expiration period. The maximum `value` depends on `unit`:\n1-90 for `DAY`, 1-12 for `MONTH`, 1-1 for `YEAR` (enforced via if/then conditions).",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionPeriodInput"
}
],
"unevaluatedProperties": false
},
"CardDefinitionPendingPointsPeriodBasedPeriodInput": {
"description": "Pending period. The maximum `value` depends on `unit`:\n1-90 for `DAY`, 1-12 for `MONTH`, 1-1 for `YEAR` (enforced via if/then conditions).",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionPeriodInput"
}
],
"unevaluatedProperties": false
},
"CardDefinitionPendingPointsEventBasedCancelPeriodInput": {
"description": "Period after which non-activated pending points are cancelled. The maximum `value`\ndepends on `unit`: 1-90 for `DAY`, 1-12 for `MONTH`, 1-1 for `YEAR`\n(enforced via if/then conditions).",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionPeriodInput"
}
],
"unevaluatedProperties": false
},
"CardDefinitionEarningLimitsGlobalLimitInput": {
"description": "A global earning limit, discriminated by `type`:\n`BALANCE_BASED` (maximum card balance) or `TIME_BASED` (maximum points earned per period).",
"oneOf": [
{
"type": "object",
"description": "Balance-based limit - the card balance cannot exceed `max` points.",
"properties": {
"type": {
"type": "string",
"const": "BALANCE_BASED",
"description": "Limit type."
},
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum card balance in points."
}
},
"required": [
"type",
"max"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Time-based limit - at most `points.max` points can be earned per period.",
"properties": {
"type": {
"type": "string",
"const": "TIME_BASED",
"description": "Limit type."
},
"period": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsGlobalTimeBasedPeriodInput"
},
"points": {
"$ref": "#/components/schemas/CardDefinitionEarningLimitsGlobalTimeBasedPointsInput"
}
},
"required": [
"type",
"period",
"points"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "type"
}
},
"CardDefinitionEarningLimitsTransactionsLimitInput": {
"description": "A per-transaction earning limit, discriminated by `type`:\n`POINTS` (maximum points earned per transaction) or `SPENDING`\n(minimum order amount required to earn points).",
"oneOf": [
{
"type": "object",
"description": "Points limit - at most `max` points can be earned in a single transaction.",
"properties": {
"type": {
"type": "string",
"const": "POINTS",
"description": "Limit type."
},
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum points earned per transaction."
}
},
"required": [
"type",
"max"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Spending threshold - points are only earned when the transaction amount is at least `min_amount`.",
"properties": {
"type": {
"type": "string",
"const": "SPENDING",
"description": "Limit type."
},
"min_amount": {
"type": "integer",
"minimum": 1,
"description": "Minimum transaction amount required to earn points."
}
},
"required": [
"type",
"min_amount"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "type"
}
},
"CardDefinitionSpendingLimitsGlobalLimitInput": {
"description": "A global spending limit, discriminated by `type`:\n`SPENDING_BASED` (total points spent) or `TIME_BASED` (points spent per period).",
"oneOf": [
{
"type": "object",
"description": "Spending-based limit - at most `max` points can be spent in total.",
"properties": {
"type": {
"type": "string",
"const": "SPENDING_BASED",
"description": "Limit type."
},
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum total points spent."
}
},
"required": [
"type",
"max"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Time-based limit - at most `points.max` points can be spent per period.",
"properties": {
"type": {
"type": "string",
"const": "TIME_BASED",
"description": "Limit type."
},
"period": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobalTimeBasedPeriodInput"
},
"points": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobalTimeBasedPointsInput"
}
},
"required": [
"type",
"period",
"points"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "type"
}
},
"CardDefinitionSpendingLimitsTransactionsLimitInput": {
"description": "A per-transaction spending limit. Currently only the `POINTS` type is supported.",
"oneOf": [
{
"type": "object",
"description": "Points limit - at most `max` points can be spent in a single transaction.",
"properties": {
"type": {
"type": "string",
"const": "POINTS",
"description": "Limit type."
},
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum points spent per transaction."
}
},
"required": [
"type",
"max"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "type"
}
},
"CardDefinitionRefundsSpentPointsMethodInput": {
"description": "A spent points refund method. Currently only the `RETURN_POINTS` type is supported.",
"oneOf": [
{
"type": "object",
"description": "Return spent points back to the card.",
"properties": {
"type": {
"type": "string",
"const": "RETURN_POINTS",
"description": "Refund method type."
},
"mode": {
"type": "string",
"enum": [
"REFUND_ALL",
"REFUND_ITEM",
"REFUND_AMOUNT"
],
"description": "Refund mode: on full-order refund (`REFUND_ALL`), per-item refund (`REFUND_ITEM`) or amount-based refund (`REFUND_AMOUNT`)."
}
},
"required": [
"type",
"mode"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "type"
}
},
"CardDefinitionRefundsEarnedPointsMethodInput": {
"description": "An earned points revoke method, discriminated by `type`:\n`REVOKE_FROM_PENDING` (only valid when `pending_points.type` is `PERIOD_BASED`,\n`FIXED_DATES` or `EVENT_BASED`) or `REVOKE_FROM_BALANCE`.",
"oneOf": [
{
"type": "object",
"description": "Revoke earned points from pending points.",
"properties": {
"type": {
"type": "string",
"const": "REVOKE_FROM_PENDING",
"description": "Revoke method type."
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"description": "Revoke earned points from the card balance.",
"properties": {
"type": {
"type": "string",
"const": "REVOKE_FROM_BALANCE",
"description": "Revoke method type."
},
"mode": {
"type": "string",
"enum": [
"REVOKE_TO_ZERO",
"REVOKE_BELOW_ZERO"
],
"description": "Revoke mode. `REVOKE_BELOW_ZERO` requires `balance_settings.allow_negative` to be `true`."
}
},
"required": [
"type",
"mode"
],
"additionalProperties": false
}
],
"discriminator": {
"propertyName": "type"
}
},
"LoyaltyV2ActivityCardDefinitionPeriod": {
"type": "object",
"description": "A period expressed as a value and unit.",
"properties": {
"value": {
"type": "integer",
"description": "Period length."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Period unit."
}
},
"required": [
"value",
"unit"
]
},
"LoyaltyV2ActivityCardDefinitionPointsExpirationRollingExpirationRounding": {
"type": "object",
"description": "Rounding of the rolling expiration date.",
"properties": {
"type": {
"type": "string",
"enum": [
"END_OF_MONTH",
"END_OF_QUARTER",
"END_OF_HALF_YEAR",
"END_OF_YEAR",
"END_OF_PARTICULAR_MONTH"
],
"description": "Rounding type."
},
"value": {
"type": "integer",
"minimum": 1,
"maximum": 12,
"description": "Month number (1-12). Only present when `type` is `END_OF_PARTICULAR_MONTH`."
}
},
"required": [
"type"
]
},
"LoyaltyV2ActivityCardDefinitionCalendarDate": {
"type": "object",
"description": "A calendar date (day + month).",
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31,
"description": "Day of the month."
},
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12,
"description": "Month number (1-12)."
}
},
"required": [
"day",
"month"
]
},
"CardDefinitionEarningLimitsGlobalLimit": {
"description": "A global earning limit: `BALANCE_BASED` or `TIME_BASED`.",
"oneOf": [
{
"type": "object",
"description": "Balance-based limit.",
"properties": {
"type": {
"type": "string",
"const": "BALANCE_BASED",
"description": "Limit type."
},
"max": {
"type": "integer",
"description": "Maximum card balance in points."
}
},
"required": [
"type",
"max"
]
},
{
"type": "object",
"description": "Time-based limit.",
"properties": {
"type": {
"type": "string",
"const": "TIME_BASED",
"description": "Limit type."
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriod"
},
"points": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPoints"
}
},
"required": [
"type"
]
}
],
"discriminator": {
"propertyName": "type"
}
},
"LoyaltyV2ActivityCardDefinitionEarningLimitsTransactionsLimit": {
"description": "A per-transaction earning limit: `POINTS` or `SPENDING`.",
"oneOf": [
{
"type": "object",
"description": "Points limit.",
"properties": {
"type": {
"type": "string",
"const": "POINTS",
"description": "Limit type."
},
"max": {
"type": "integer",
"description": "Maximum points earned per transaction."
}
},
"required": [
"type",
"max"
]
},
{
"type": "object",
"description": "Spending threshold.",
"properties": {
"type": {
"type": "string",
"const": "SPENDING",
"description": "Limit type."
},
"min_amount": {
"type": "integer",
"description": "Minimum transaction amount required to earn points."
}
},
"required": [
"type",
"min_amount"
]
}
],
"discriminator": {
"propertyName": "type"
}
},
"CardDefinitionSpendingLimitsGlobalLimit": {
"description": "A global spending limit: `SPENDING_BASED` or `TIME_BASED`.",
"oneOf": [
{
"type": "object",
"description": "Spending-based limit.",
"properties": {
"type": {
"type": "string",
"const": "SPENDING_BASED",
"description": "Limit type."
},
"max": {
"type": "integer",
"description": "Maximum total points spent."
}
},
"required": [
"type",
"max"
]
},
{
"type": "object",
"description": "Time-based limit.",
"properties": {
"type": {
"type": "string",
"const": "TIME_BASED",
"description": "Limit type."
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriod"
},
"points": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPoints"
}
},
"required": [
"type"
]
}
],
"discriminator": {
"propertyName": "type"
}
},
"LoyaltyV2ActivityCardDefinitionSpendingLimitsTransactionsLimit": {
"type": "object",
"description": "A per-transaction spending limit. Currently only the `POINTS` type exists.",
"properties": {
"type": {
"type": "string",
"const": "POINTS",
"description": "Limit type."
},
"max": {
"type": "integer",
"description": "Maximum points spent per transaction."
}
},
"required": [
"type",
"max"
]
},
"LoyaltyV2ActivityCardDefinitionRefundsSpentPointsMethod": {
"type": "object",
"description": "A spent points refund method.",
"properties": {
"type": {
"type": "string",
"const": "RETURN_POINTS",
"description": "Refund method type."
},
"mode": {
"type": "string",
"enum": [
"REFUND_ALL",
"REFUND_ITEM",
"REFUND_AMOUNT"
],
"description": "Refund mode."
}
},
"required": [
"type",
"mode"
]
},
"LoyaltyV2ActivityCardDefinitionRefundsEarnedPointsMethod": {
"description": "An earned points revoke method: `REVOKE_FROM_PENDING` or `REVOKE_FROM_BALANCE`.",
"oneOf": [
{
"type": "object",
"description": "Revoke earned points from pending points.",
"properties": {
"type": {
"type": "string",
"const": "REVOKE_FROM_PENDING",
"description": "Revoke method type."
}
},
"required": [
"type"
]
},
{
"type": "object",
"description": "Revoke earned points from the card balance.",
"properties": {
"type": {
"type": "string",
"const": "REVOKE_FROM_BALANCE",
"description": "Revoke method type."
},
"mode": {
"type": "string",
"enum": [
"REVOKE_TO_ZERO",
"REVOKE_BELOW_ZERO"
],
"description": "Revoke mode."
}
},
"required": [
"type",
"mode"
]
}
],
"discriminator": {
"propertyName": "type"
}
},
"LoyaltyV2ActivityEarningRuleEarningLimitsGlobalLimit": {
"type": "object",
"description": "A single global earning limit. Currently only the `TIME_BASED` variant exists (discriminated by `type`), which requires `period` and `points`.",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"TIME_BASED"
],
"description": "Earning limit variant."
}
},
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"const": "TIME_BASED"
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobalTimeBasedPeriod"
},
"points": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobalTimeBasedPoints"
}
},
"required": [
"period",
"points"
],
"additionalProperties": false
}
]
},
"EarningRuleDefinition": {
"type": "object",
"description": "A single validation rule definition.",
"properties": {
"name": {
"type": "string",
"enum": [
"customer.segment",
"customer.metadata",
"order.amount",
"order.initial_amount",
"order.total_amount",
"order.metadata",
"order.items.count",
"order.items.price_any",
"order.items.price_each",
"order.items.every",
"order.items.any",
"order.items.none",
"order.items.quantity",
"order.items.aggregated_quantity",
"order.items.price",
"order.items.aggregated_amount",
"order.items.cheapest",
"order.items.most_expensive",
"order.items.metadata",
"custom_event.metadata"
],
"description": "Rule definition name. Which names are allowed depends on the trigger event: `customer.order.paid` allows customer.* plus all order.* names; `customer.custom_event` allows customer.* plus custom_event.metadata; `customer.segment.entered` allows only customer.* names."
},
"property": {
"type": [
"string",
"null"
],
"description": "Metadata property name the rule applies to (for metadata-based rules). Can be `null`."
},
"schema_id": {
"type": [
"string",
"null"
],
"description": "Custom event schema ID for custom_event.metadata rules. Can be `null`."
},
"error": {
"description": "Error returned when this specific rule fails. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleError"
},
{
"type": "null"
}
]
},
"rules": {
"description": "Nested rule group (recursive). Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleRulesGroup"
},
{
"type": "null"
}
]
},
"conditions": {
"$ref": "#/components/schemas/EarningRuleConditions"
}
},
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRuleTierRulesAnyOfEntry": {
"type": "object",
"description": "Tier structure with a list of qualifying tiers.",
"properties": {
"tier_structure_id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Tier structure ID (`lts_...`)."
},
"tier_ids": {
"type": "array",
"minItems": 1,
"description": "Qualifying tier IDs (`lt_...`).",
"items": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
}
}
},
"required": [
"tier_structure_id",
"tier_ids"
],
"additionalProperties": false
},
"EarningRuleEffectPoints": {
"type": "object",
"description": "Fixed points effect - awards a fixed number of points to a card definition.",
"properties": {
"value": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Fixed number of points to award."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Card definition ID (`lcdef_...`) the points are awarded to."
},
"points_expiration": {
"description": "Optional expiration override for the awarded points. Can be `null`. The `type` of the point expiration must either be `NO_EXPIRATION` or match the point expieration defined on the card definition.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleEffectPointsExpiration"
},
{
"type": "null"
}
]
}
},
"required": [
"value",
"card_definition_id"
],
"additionalProperties": false
},
"EarningRuleEffectPointsProportional": {
"type": "object",
"description": "Proportional points effect - awards points using an \"every X gives Y points\" formula.\nDepending on `calculation_type`, one specific configuration object is required and the others must be null/absent:\n- `PRE_DISCOUNT_ORDER_AMOUNT`: requires `order.amount`\n- `POST_DISCOUNT_ORDER_AMOUNT`: requires `order.total_amount`\n- `ORDER_METADATA_VALUE`: requires `order.metadata`\n- `CUSTOMER_METADATA_VALUE`: requires `customer.metadata`\n- `CUSTOM_EVENT_METADATA_VALUE`: requires `custom_event.metadata`\n- `PRE_DISCOUNT_ORDER_ITEMS_AMOUNT`: requires `order_items.amount`\n- `POST_DISCOUNT_ORDER_ITEMS_AMOUNT`: requires `order_items.subtotal_amount`\n- `ORDER_ITEMS_QUANTITY`: requires `order_items.quantity`\nThe trigger further restricts allowed calculation types:\n`customer.order.paid` allows all order/order-items types plus `CUSTOMER_METADATA_VALUE`;\n`customer.custom_event` allows `CUSTOMER_METADATA_VALUE` and `CUSTOM_EVENT_METADATA_VALUE`;\n`customer.segment.entered` allows only `CUSTOMER_METADATA_VALUE`.",
"properties": {
"calculation_type": {
"type": "string",
"enum": [
"PRE_DISCOUNT_ORDER_AMOUNT",
"POST_DISCOUNT_ORDER_AMOUNT",
"PRE_DISCOUNT_ORDER_ITEMS_AMOUNT",
"POST_DISCOUNT_ORDER_ITEMS_AMOUNT",
"ORDER_ITEMS_QUANTITY",
"ORDER_METADATA_VALUE",
"CUSTOMER_METADATA_VALUE",
"CUSTOM_EVENT_METADATA_VALUE"
],
"description": "How the proportional points are calculated."
},
"card_definition_id": {
"type": "string",
"pattern": "^lcdef_[a-f0-9]+$",
"description": "Card definition ID (`lcdef_...`) the points are awarded to."
},
"points_expiration": {
"description": "Optional expiration override for the awarded points. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleEffectPointsExpiration"
},
{
"type": "null"
}
]
},
"order": {
"$ref": "#/components/schemas/EarningRulePointsProportionalOrder"
},
"customer": {
"$ref": "#/components/schemas/EarningRulePointsProportionalCustomer"
},
"custom_event": {
"$ref": "#/components/schemas/EarningRulePointsProportionalCustomEvent"
},
"order_items": {
"$ref": "#/components/schemas/EarningRulePointsProportionalOrderItems"
}
},
"required": [
"calculation_type",
"card_definition_id"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"calculation_type": {
"const": "PRE_DISCOUNT_ORDER_AMOUNT"
}
}
},
"then": {
"required": [
"order"
],
"properties": {
"order": {
"type": "object",
"required": [
"amount"
]
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "POST_DISCOUNT_ORDER_AMOUNT"
}
}
},
"then": {
"required": [
"order"
],
"properties": {
"order": {
"type": "object",
"required": [
"total_amount"
]
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "ORDER_METADATA_VALUE"
}
}
},
"then": {
"required": [
"order"
],
"properties": {
"order": {
"type": "object",
"required": [
"metadata"
]
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "CUSTOMER_METADATA_VALUE"
}
}
},
"then": {
"required": [
"customer"
],
"properties": {
"customer": {
"$ref": "#/components/schemas/EarningRulePointsProportionalCustomer"
},
"order": {
"type": "null"
},
"custom_event": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "CUSTOM_EVENT_METADATA_VALUE"
}
}
},
"then": {
"required": [
"custom_event"
],
"properties": {
"custom_event": {
"$ref": "#/components/schemas/EarningRulePointsProportionalCustomEvent"
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"order_items": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "PRE_DISCOUNT_ORDER_ITEMS_AMOUNT"
}
}
},
"then": {
"required": [
"order_items"
],
"properties": {
"order_items": {
"type": "object",
"required": [
"amount"
]
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "POST_DISCOUNT_ORDER_ITEMS_AMOUNT"
}
}
},
"then": {
"required": [
"order_items"
],
"properties": {
"order_items": {
"type": "object",
"required": [
"subtotal_amount"
]
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"calculation_type": {
"const": "ORDER_ITEMS_QUANTITY"
}
}
},
"then": {
"required": [
"order_items"
],
"properties": {
"order_items": {
"type": "object",
"required": [
"quantity"
]
},
"order": {
"type": "null"
},
"customer": {
"type": "null"
},
"custom_event": {
"type": "null"
}
}
}
}
]
},
"LoyaltyV2ActivityEarningRuleEffectBenefit": {
"type": "object",
"description": "Benefit effect - grants a predefined benefit.",
"properties": {
"id": {
"type": "string",
"pattern": "^lben_[a-f0-9]+$",
"description": "Benefit ID (`lben_...`)."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRuleTriggerLimitsCooldownFixedCooldownPeriod": {
"type": "object",
"description": "Cooldown period. The maximum `value` depends on `unit`: `HOUR` - 24, `DAY` - 90, `WEEK` - 52, `MONTH` - 12, `YEAR` - 1.",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"description": "Period length. Maximum depends on `unit`: 24 for HOUR, 90 for DAY, 52 for WEEK, 12 for MONTH, 1 for YEAR."
},
"unit": {
"type": "string",
"enum": [
"HOUR",
"DAY",
"WEEK",
"MONTH",
"YEAR"
],
"description": "Period unit."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"value",
"unit"
]
},
{
"if": {
"properties": {
"unit": {
"const": "HOUR"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 24
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "DAY"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 90
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "WEEK"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 52
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "MONTH"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 12
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "YEAR"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 1
}
}
}
}
]
},
"EarningRuleTriggerLimitsFrequencyLimitTimeBasedPeriod": {
"type": "object",
"description": "Time-based frequency limit period. Currently only `CURRENT_PERIOD` is supported; when selected, `current_period` is required.",
"properties": {
"type": {
"type": "string",
"enum": [
"CURRENT_PERIOD"
],
"description": "Period type."
},
"current_period": {
"description": "Current calendar period configuration. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerLimitsFrequencyLimitTimeBasedCurrentPeriod"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "CURRENT_PERIOD"
}
}
},
"then": {
"required": [
"current_period"
],
"properties": {
"current_period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleTriggerLimitsFrequencyLimitTimeBasedCurrentPeriod"
}
}
}
}
]
},
"LoyaltyV2ActivityEarningRuleTriggerLimitsFrequencyLimitTimeBasedTriggers": {
"type": "object",
"description": "Maximum number of triggers allowed within the period.",
"properties": {
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of triggers per period."
}
},
"required": [
"max"
],
"additionalProperties": false
},
"TierStructureExpirationFixedDurationPeriodUpsert": {
"type": "object",
"description": "Fixed duration expiration period.",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"description": "Length of the expiration period, expressed in `unit` units. Minimum 1."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Unit of the expiration period."
}
},
"required": [
"value",
"unit"
],
"additionalProperties": false
},
"TierStructureExpirationCalendarDateUpsert": {
"type": "object",
"description": "A recurring calendar date. The maximum `day` depends on `month`: 29 for February\n(month 2), 30 for April/June/September/November (months 4, 6, 9, 11), and 31 for\nthe remaining months.",
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31,
"description": "Day of the month (1-31). Maximum depends on `month`: February allows up to 29;\nApril, June, September and November allow up to 30; other months allow up to 31."
},
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12,
"description": "Month of the year (1-12)."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"day",
"month"
]
},
{
"if": {
"properties": {
"month": {
"const": 2
}
}
},
"then": {
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 29
}
}
}
},
{
"if": {
"properties": {
"month": {
"enum": [
4,
6,
9,
11
]
}
}
},
"then": {
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 30
}
}
}
},
{
"if": {
"properties": {
"month": {
"enum": [
1,
3,
5,
7,
8,
10,
12
]
}
}
},
"then": {
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31
}
}
}
}
]
},
"TierStructureSlidingExpirationActivityBase": {
"type": "object",
"properties": {
"earning_activity": {
"type": "boolean",
"description": "Whether point earning activity extends the tier membership."
},
"spending_activity": {
"type": "boolean",
"description": "Whether point spending activity extends the tier membership."
},
"custom_activity": {
"type": "boolean",
"description": "Whether custom activities extend the tier membership."
}
}
},
"TierStructureExpirationSlidingExpirationPeriodUpsert": {
"type": "object",
"description": "Sliding expiration period.",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"description": "Length of the sliding period, expressed in `unit` units. Minimum 1."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Unit of the sliding period."
}
},
"required": [
"value",
"unit"
],
"additionalProperties": false
},
"LoyaltyV2ActivityTierStructureExpirationPeriod": {
"type": "object",
"description": "Expiration period. The same shape is used for fixed duration and sliding\nexpiration periods.",
"properties": {
"value": {
"type": "integer",
"description": "Length of the period, expressed in `unit` units."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Unit of the period."
}
}
},
"LoyaltyV2ActivityTierStructureExpirationCalendarDate": {
"type": "object",
"description": "A recurring calendar date.",
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31,
"description": "Day of the month (1-31)."
},
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12,
"description": "Month of the year (1-12)."
}
}
},
"LoyaltyV2ActivityBenefitPointsProportionalEvery": {
"type": "object",
"description": "Ratio definition - `value` points for every `every` units.",
"properties": {
"every": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Unit step (e.g. order amount in cents) for which `value` points are granted."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Number of points granted per `every` units."
}
},
"required": [
"every",
"value"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitPointsProportionalMetadata": {
"type": "object",
"description": "Metadata-based ratio definition - `value` points for every `every` units of the metadata property.",
"properties": {
"every": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Unit step of the metadata property value for which `value` points are granted."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Number of points granted per `every` units."
},
"property": {
"type": "string",
"minLength": 1,
"description": "Name of the metadata property used for the calculation."
}
},
"required": [
"every",
"value",
"property"
],
"additionalProperties": false
},
"BenefitPointsProportionalOrderItemsCalculation": {
"type": "object",
"description": "Order-items ratio definition with the list of applicable products/SKUs/collections.",
"properties": {
"every": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Unit step (amount or quantity) for which `value` points are granted."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Number of points granted per `every` units."
},
"applicable_to": {
"type": "array",
"minItems": 1,
"description": "Products, SKUs, or product collections the calculation applies to.",
"items": {
"$ref": "#/components/schemas/BenefitPointsProportionalApplicableTo"
}
}
},
"required": [
"every",
"value",
"applicable_to"
],
"additionalProperties": false
},
"BenefitActivitySourceUser": {
"type": "object",
"description": "User who triggered the activity.",
"properties": {
"id": {
"type": "string",
"description": "User ID."
}
}
},
"BenefitActivitySourceApiKey": {
"type": "object",
"description": "API key used to trigger the activity.",
"properties": {
"name": {
"type": "string",
"description": "Name of the API key."
},
"app_id": {
"type": "string",
"description": "Application ID of the API key."
},
"client_app_id": {
"type": "string",
"description": "Client application ID (for client-side API keys)."
}
}
},
"RewardCostRuleDefinitionRequest": {
"type": "object",
"description": "A single rule definition inside a cost rules group.\n`conditions`, when provided, must have between\n1 and 10 properties (one per operator). `rules` allows nesting of rule groups.",
"properties": {
"name": {
"type": "string",
"enum": [
"customer.segment",
"customer.metadata",
"member.metadata"
],
"description": "Rule kind. `customer.segment` checks segment membership, `customer.metadata` checks a customer metadata property, `member.metadata` checks a member metadata property."
},
"property": {
"type": [
"string",
"null"
],
"description": "Metadata property name the rule applies to (for metadata rules)."
},
"error": {
"description": "Custom error returned when the rule is not satisfied.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardCostRuleErrorRequest"
},
{
"type": "null"
}
]
},
"rules": {
"description": "Nested rules group.",
"oneOf": [
{
"$ref": "#/components/schemas/RewardCostRulesRequest"
},
{
"type": "null"
}
]
},
"conditions": {
"$ref": "#/components/schemas/RewardCostRuleConditionsRequest",
"description": "Operator conditions for the rule. Must have between 1 and 10 properties."
}
},
"additionalProperties": false
},
"RewardPurchaseLimitsCooldownFixedCooldownInput": {
"type": "object",
"description": "Fixed cooldown configuration.",
"properties": {
"period": {
"$ref": "#/components/schemas/RewardPurchaseLimitsCooldownFixedCooldownPeriodInput",
"description": "Cooldown period."
}
},
"required": [
"period"
],
"additionalProperties": false
},
"RewardPurchaseLimitsFrequencyLimitInput": {
"type": "object",
"description": "A frequency limit. Currently only `TIME_BASED` is supported.",
"properties": {
"type": {
"type": "string",
"const": "TIME_BASED",
"description": "Limit type. Always `TIME_BASED`."
},
"period": {
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobalTimeBasedPeriodInput",
"description": "Time period that resets the purchase counter. Reuses the card-definition time-based period input shape."
},
"triggers": {
"$ref": "#/components/schemas/RewardPurchaseLimitsFrequencyLimitTriggersInput",
"description": "Purchase count limit within the period."
}
},
"required": [
"type",
"period",
"triggers"
],
"additionalProperties": false
},
"RewardCostRuleDefinitionResponse": {
"type": "object",
"description": "A single rule definition. `conditions`, `rules` and `error` are omitted when not set.",
"properties": {
"name": {
"type": "string",
"enum": [
"customer.segment",
"customer.metadata",
"member.metadata"
],
"description": "Rule kind."
},
"property": {
"type": [
"string",
"null"
],
"description": "Metadata property name the rule applies to (for metadata rules)."
},
"conditions": {
"type": "object",
"description": "Operator conditions for the rule (keys are operators such as `$is`, `$in`; values are arrays of condition values). Omitted when not set."
},
"rules": {
"$ref": "#/components/schemas/RewardCostRuleGroupResponse",
"description": "Nested rules group. Omitted when not set."
},
"error": {
"type": "object",
"description": "Custom rule error definition with a `message` property. Omitted when not set.",
"properties": {
"message": {
"type": "string",
"description": "Error message returned when the rule is not satisfied."
}
}
}
}
},
"RewardCostTierRulesAnyOfEntryResponse": {
"type": "object",
"description": "Tier structure with the tiers that qualify for this cost.",
"properties": {
"tier_structure_id": {
"type": "string",
"pattern": "^lts_[a-f0-9]+$",
"description": "Identifies the tier structure."
},
"tier_ids": {
"type": "array",
"minItems": 1,
"description": "Lists the qualifying tier IDs.",
"items": {
"type": "string",
"pattern": "^lt_[a-f0-9]+$"
}
}
},
"required": [
"tier_structure_id",
"tier_ids"
],
"additionalProperties": false
},
"RewardPurchaseLimitsCooldownFixedCooldown": {
"type": "object",
"description": "Fixed cooldown configuration.",
"properties": {
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardPurchaseLimitsCooldownFixedCooldownPeriod",
"description": "Cooldown period."
}
},
"required": [
"period"
]
},
"RewardPurchaseLimitsFrequencyLimit": {
"type": "object",
"description": "A frequency limit. Currently only `TIME_BASED` is supported.",
"properties": {
"type": {
"type": "string",
"const": "TIME_BASED",
"description": "Limit type. Always `TIME_BASED`."
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriod",
"description": "Time period that resets the purchase counter. Reuses the card-definition time-based period shape."
},
"triggers": {
"$ref": "#/components/schemas/LoyaltyV2ActivityRewardPurchaseLimitsFrequencyLimitTriggers",
"description": "Purchase count limit within the period."
}
},
"required": [
"type",
"period",
"triggers"
]
},
"RewardActivitySourceUser": {
"type": "object",
"description": "User reference in an activity source.",
"properties": {
"id": {
"type": "string",
"description": "User identifier."
}
},
"required": [
"id"
]
},
"RewardActivitySourceApiKey": {
"type": "object",
"description": "API key reference in an activity source.",
"properties": {
"name": {
"type": "string",
"description": "Name of the API key."
},
"app_id": {
"type": "string",
"description": "Application identifier of the API key."
},
"client_app_id": {
"type": "string",
"description": "Client application identifier of the API key."
}
}
},
"LoyaltiesExamineEarningRulesExamineRequestBodyOrderItemProduct": {
"type": "object",
"description": "Product details for an examined order item.",
"properties": {
"id": {
"type": [
"string",
"number",
"null"
],
"description": "Product ID. May be provided as a string or a number. Can be `null`."
},
"source_id": {
"type": [
"string",
"number",
"null"
],
"description": "Product source ID. May be provided as a string or a number. Can be `null`."
},
"price": {
"type": [
"string",
"number",
"null"
],
"description": "Product price - an integer amount. May be provided as a string or a number. Can be `null`."
}
},
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Order Item Product"
},
"LoyaltiesExamineEarningRulesExamineRequestBodyOrderItemSku": {
"type": "object",
"description": "SKU details for an examined order item.",
"properties": {
"id": {
"type": [
"string",
"number",
"null"
],
"description": "SKU ID. May be provided as a string or a number. Can be `null`."
},
"source_id": {
"type": [
"string",
"number",
"null"
],
"description": "SKU source ID. May be provided as a string or a number. Can be `null`."
},
"price": {
"type": [
"string",
"number",
"null"
],
"description": "SKU price - an integer amount. May be provided as a string or a number. Can be `null`."
}
},
"additionalProperties": false,
"title": "Loyalties Examine Earning Rules Examine Request Body Order Item Sku"
},
"ExamineEarningRuleEstimationBase": {
"type": "object",
"properties": {
"earning_rule": {
"$ref": "#/components/schemas/LoyaltiesExamineEarningRulesExamineResponseBodyEarningRuleReference"
},
"object": {
"type": "string",
"const": "earning_rule_estimation",
"description": "Object type marker. Always `earning_rule_estimation`."
}
}
},
"LoyaltiesExamineRewardsExamineResponseBodyRewardReference": {
"type": "object",
"description": "Reward reference.",
"properties": {
"id": {
"type": "string",
"description": "Unique reward ID (`lrew_...`)."
},
"object": {
"type": "string",
"const": "reward",
"description": "Object type marker. Always `reward`."
}
},
"required": [
"id",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body Reward Reference"
},
"LoyaltiesExamineRewardsExamineResponseBodyRewardCost": {
"type": "object",
"description": "Reward cost.",
"properties": {
"points": {
"type": "number",
"description": "Points cost of the reward for this card."
},
"object": {
"type": "string",
"const": "reward_cost",
"description": "Object type marker. Always `reward_cost`."
}
},
"required": [
"points",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body Reward Cost"
},
"LoyaltiesExamineRewardsExamineResponseBodyRewardUnavailabilityReason": {
"type": "object",
"description": "Reason a reward is unavailable.",
"properties": {
"reason": {
"type": "string",
"enum": [
"insufficient_balance",
"no_target_card"
],
"description": "Identifies why the reward is unavailable.\n\n- `insufficient_balance`: The source card balance is lower than the required points cost.\n\n- `no_target_card`: The member does not have the loyalty card that would receive the points from a \"points on a loyalty card\" reward."
},
"details": {
"description": "Provides values related to the unavailability reason.",
"oneOf": [
{
"type": "object",
"title": "Insufficient balance",
"description": "Provides balance details for `insufficient_balance`.",
"additionalProperties": false,
"properties": {
"required": {
"type": "number",
"description": "Points required to obtain the reward (reward price in points)."
},
"available": {
"type": "number",
"description": "Points available on the source card."
},
"missing": {
"type": "number",
"description": "Additional points required to obtain the reward."
}
},
"required": [
"required",
"available",
"missing"
]
},
{
"type": "object",
"description": "Identifies the missing target card for `no_target_card`.",
"title": "No target card",
"additionalProperties": false,
"properties": {
"card_definition_id": {
"type": "string",
"description": "Unique card definition ID (`lcdef_...`) of the missing target card."
}
},
"required": [
"card_definition_id"
]
}
]
},
"object": {
"type": "string",
"const": "reward_unavailability_reason",
"description": "Object type marker. Always `reward_unavailability_reason`."
}
},
"required": [
"reason",
"details",
"object"
],
"title": "Loyalties Examine Rewards Examine Response Body Reward Unavailability Reason"
},
"CardLifetimeBucket": {
"type": "object",
"description": "Lifetime points counters of a card.",
"properties": {
"points": {
"$ref": "#/components/schemas/CardLifetimeBucketPoints",
"description": "Lifetime counters of regular (active) points."
},
"pending_points": {
"$ref": "#/components/schemas/CardLifetimeBucketPendingPoints",
"description": "Lifetime counters of pending points."
}
},
"required": [
"points",
"pending_points"
]
},
"CardBalance": {
"type": "object",
"description": "Current available balance of a card.",
"properties": {
"points": {
"type": "number",
"description": "Currently available regular points.",
"default": 0
},
"pending_points": {
"type": "number",
"description": "Currently pending (not yet activated) points.",
"default": 0
}
},
"required": [
"points",
"pending_points"
]
},
"MemberTierProgressTier": {
"type": "object",
"description": "Tier reference with id and name.",
"properties": {
"id": {
"type": [
"string",
"null"
],
"pattern": "^lt_[a-f0-9]+$",
"description": "Unique Voucherify ID of the tier (`lt_...`), or `null`."
},
"name": {
"type": [
"string",
"null"
],
"description": "Tier name, or `null`."
}
},
"required": [
"id",
"name"
]
},
"MemberTierProgressPoints": {
"type": "object",
"description": "Points position within a tier.",
"properties": {
"current": {
"type": "number",
"description": "Member's current points counted towards the tier."
},
"min": {
"type": "number",
"description": "Minimum points of the tier's range."
},
"max": {
"type": "number",
"description": "Maximum points of the tier's range. Absent if this is the highest tier in the tier structure."
}
},
"required": [
"current",
"min"
]
},
"ActivitySourceUser": {
"type": "object",
"description": "Dashboard user who triggered an activity.",
"properties": {
"id": {
"type": "string",
"description": "Identifies the user."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"ActivitySourceApiKey": {
"type": "object",
"description": "API key used to trigger an activity.",
"properties": {
"name": {
"type": "string",
"description": "API key name."
},
"app_id": {
"type": "string",
"description": "Application ID of the API key."
},
"client_app_id": {
"type": "string",
"description": "Client application ID of the API key."
}
},
"additionalProperties": false
},
"RewardPurchaseDigitalCoupon": {
"type": "object",
"description": "Discount coupon fulfillment entry.",
"properties": {
"id": {
"type": "string",
"description": "Voucher identifier of the coupon."
},
"code": {
"type": "string",
"description": "Coupon code."
},
"result": {
"type": "string",
"enum": [
"SKIPPED",
"DELETED"
],
"description": "Refund handling result for this coupon (present in refund results):\n\n- `DELETED`: The coupon was deleted.\n\n- `SKIPPED`: The coupon was left intact."
}
}
},
"RewardPurchaseDigitalGiftVoucher": {
"type": "object",
"description": "Gift voucher fulfillment entry.",
"properties": {
"id": {
"type": "string",
"description": "Voucher identifier of the gift voucher."
},
"code": {
"type": "string",
"description": "Gift voucher code."
},
"amount": {
"type": "number",
"description": "Amount added to (or, for refunds, subtracted from) the gift voucher balance."
},
"balance": {
"type": "number",
"description": "Gift voucher balance after the operation."
},
"result": {
"type": "string",
"enum": [
"SKIPPED",
"CREDITS_SUBTRACTED"
],
"description": "Refund handling result for this gift voucher (present in refund results):\n\n- `CREDITS_SUBTRACTED`: The credited balance was subtracted.\n\n- `SKIPPED`: The voucher was left intact."
}
}
},
"RewardPurchaseDigitalLoyaltyCardPoints": {
"type": "object",
"description": "Loyalty card points fulfillment entry.",
"properties": {
"points": {
"type": "number",
"description": "Number of points credited to the target loyalty card."
},
"card_definition_id": {
"type": "string",
"description": "Target card definition identifier (format `lcdef_...`)."
},
"card_id": {
"type": "string",
"description": "Target loyalty card identifier (format `lcrd_...`)."
}
}
},
"CardDefinitionPeriodInput": {
"type": "object",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 90,
"description": "Period length. Maximum: 90 for `DAY`, 12 for `MONTH`, 1 for `YEAR`."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Period unit."
}
},
"required": [
"value",
"unit"
]
},
"CardDefinitionEarningLimitsGlobalTimeBasedPeriodInput": {
"type": "object",
"description": "Time-based earning limit period. When `type` is `CURRENT_PERIOD` (the only\nallowed value), `current_period` is required.",
"properties": {
"type": {
"type": "string",
"enum": [
"CURRENT_PERIOD"
],
"description": "Period type. Currently only `CURRENT_PERIOD` (current calendar period) is supported."
},
"current_period": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionEarningLimitsGlobalTimeBasedCurrentPeriodInput"
},
{
"type": "null"
}
],
"description": "Current-period configuration. Required when `type` is `CURRENT_PERIOD`."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionEarningLimitsGlobalTimeBasedPointsInput": {
"type": "object",
"description": "Points cap for the time-based earning limit.",
"properties": {
"max": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Maximum points that can be earned within the period (1 to 9007199254740991)."
}
},
"required": [
"max"
],
"additionalProperties": false
},
"CardDefinitionSpendingLimitsGlobalTimeBasedPeriodInput": {
"type": "object",
"description": "Time-based spending limit period. When `type` is `CURRENT_PERIOD` (the only\nallowed value), `current_period` is required.",
"properties": {
"type": {
"type": "string",
"enum": [
"CURRENT_PERIOD"
],
"description": "Period type. Currently only `CURRENT_PERIOD` (current calendar period) is supported."
},
"current_period": {
"oneOf": [
{
"$ref": "#/components/schemas/CardDefinitionSpendingLimitsGlobalTimeBasedCurrentPeriodInput"
},
{
"type": "null"
}
],
"description": "Current-period configuration. Required when `type` is `CURRENT_PERIOD`."
}
},
"required": [
"type"
],
"additionalProperties": false
},
"CardDefinitionSpendingLimitsGlobalTimeBasedPointsInput": {
"type": "object",
"description": "Points cap for the time-based spending limit.",
"properties": {
"max": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "Maximum points that can be spent within the period (1 to 9007199254740991)."
}
},
"required": [
"max"
],
"additionalProperties": false
},
"LoyaltyV2ActivityCardDefinitionLimitTimeBasedPeriod": {
"type": "object",
"description": "Time-based limit period.",
"properties": {
"type": {
"type": "string",
"enum": [
"CURRENT_PERIOD"
],
"description": "Period type."
},
"current_period": {
"type": "object",
"description": "Current-period configuration. Present when `type` is `CURRENT_PERIOD`.",
"properties": {
"unit": {
"type": "string",
"enum": [
"DAY",
"WEEK",
"MONTH",
"QUARTER",
"YEAR"
],
"description": "Calendar period unit."
}
},
"required": [
"unit"
]
}
},
"required": [
"type"
]
},
"LoyaltyV2ActivityCardDefinitionLimitTimeBasedPoints": {
"type": "object",
"description": "Points cap for a time-based limit.",
"properties": {
"max": {
"type": "integer",
"description": "Maximum points within the period."
}
},
"required": [
"max"
]
},
"LoyaltyV2ActivityEarningRuleEarningLimitsGlobalTimeBasedPeriod": {
"type": "object",
"description": "Time-based earning limit period. Currently only `CURRENT_PERIOD` is supported; when selected, `current_period` is required.",
"properties": {
"type": {
"type": "string",
"enum": [
"CURRENT_PERIOD"
],
"description": "Period type."
},
"current_period": {
"description": "Current calendar period configuration. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobalTimeBasedCurrentPeriod"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "CURRENT_PERIOD"
}
}
},
"then": {
"required": [
"current_period"
],
"properties": {
"current_period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEarningLimitsGlobalTimeBasedCurrentPeriod"
}
}
}
}
]
},
"LoyaltyV2ActivityEarningRuleEarningLimitsGlobalTimeBasedPoints": {
"type": "object",
"description": "Maximum points that can be earned in the period.",
"properties": {
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum points in the period."
}
},
"required": [
"max"
],
"additionalProperties": false
},
"EarningRuleConditions": {
"type": "object",
"description": "Conditions keyed by operator. Allowed operators: `$is`, `$is_not`, `$in`, `$not_in`, `$less_than`, `$less_than_or_equal`, `$more_than`, `$more_than_or_equal`, `$from` (each an array of values), and `$dow` (an array of day-of-week integers 0-6). At most 10 operator properties are allowed (`maxProperties: 10`).",
"properties": {
"$dow": {
"type": "array",
"minItems": 1,
"maxItems": 7,
"description": "Day-of-week condition (0 = Sunday ... 6 = Saturday).",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 6
}
}
},
"patternProperties": {
"^(\\$is|\\$is_not|\\$in|\\$not_in|\\$less_than|\\$less_than_or_equal|\\$more_than|\\$more_than_or_equal|\\$from)$": {
"type": "array",
"minItems": 1,
"description": "Condition values - strings, integers, booleans or object references.",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleConditionObject"
},
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
}
]
}
}
},
"maxProperties": 10,
"additionalProperties": false
},
"EarningRuleEffectPointsExpiration": {
"type": "object",
"description": "Points expiration override. Depending on `type`, exactly one of `rolling_expiration`, `calendar_expiration` or `sliding_expiration` is required; for `NO_EXPIRATION` all three must be null/absent.",
"properties": {
"type": {
"type": "string",
"enum": [
"NO_EXPIRATION",
"ROLLING_EXPIRATION",
"CALENDAR_EXPIRATION",
"SLIDING_EXPIRATION"
],
"description": "Points expiration type."
},
"rolling_expiration": {
"description": "Rolling expiration configuration. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleEffectPointsExpirationRollingExpiration"
},
{
"type": "null"
}
]
},
"calendar_expiration": {
"description": "Calendar expiration configuration. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleEffectPointsExpirationCalendarExpiration"
},
{
"type": "null"
}
]
},
"sliding_expiration": {
"description": "Sliding expiration configuration. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/EarningRuleEffectPointsExpirationSlidingExpiration"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "NO_EXPIRATION"
}
}
},
"then": {
"properties": {
"rolling_expiration": {
"type": "null"
},
"calendar_expiration": {
"type": "null"
},
"sliding_expiration": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "ROLLING_EXPIRATION"
}
}
},
"then": {
"required": [
"rolling_expiration"
],
"properties": {
"rolling_expiration": {
"$ref": "#/components/schemas/EarningRuleEffectPointsExpirationRollingExpiration"
},
"calendar_expiration": {
"type": "null"
},
"sliding_expiration": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "CALENDAR_EXPIRATION"
}
}
},
"then": {
"required": [
"calendar_expiration"
],
"properties": {
"rolling_expiration": {
"type": "null"
},
"calendar_expiration": {
"$ref": "#/components/schemas/EarningRuleEffectPointsExpirationCalendarExpiration"
},
"sliding_expiration": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "SLIDING_EXPIRATION"
}
}
},
"then": {
"required": [
"sliding_expiration"
],
"properties": {
"rolling_expiration": {
"type": "null"
},
"calendar_expiration": {
"type": "null"
},
"sliding_expiration": {
"$ref": "#/components/schemas/EarningRuleEffectPointsExpirationSlidingExpiration"
}
}
}
}
]
},
"EarningRulePointsProportionalOrder": {
"type": "object",
"description": "Order-based proportional calculation configuration. `amount` is used by `PRE_DISCOUNT_ORDER_AMOUNT`, `total_amount` by `POST_DISCOUNT_ORDER_AMOUNT` and `metadata` by `ORDER_METADATA_VALUE`.",
"properties": {
"amount": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalEvery"
},
"total_amount": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalEvery"
},
"metadata": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalMetadata"
}
},
"additionalProperties": false
},
"EarningRulePointsProportionalCustomer": {
"description": "Customer-based proportional calculation configuration (`CUSTOMER_METADATA_VALUE`).",
"allOf": [
{
"$ref": "#/components/schemas/EarningRulePointsProportionalBase"
}
],
"unevaluatedProperties": false
},
"EarningRulePointsProportionalCustomEvent": {
"description": "Custom event based proportional calculation configuration (`CUSTOM_EVENT_METADATA_VALUE`).",
"allOf": [
{
"$ref": "#/components/schemas/EarningRulePointsProportionalBase"
}
],
"unevaluatedProperties": false
},
"EarningRulePointsProportionalOrderItems": {
"type": "object",
"description": "Order items based proportional calculation configuration. `amount` is used by `PRE_DISCOUNT_ORDER_ITEMS_AMOUNT`, `subtotal_amount` by `POST_DISCOUNT_ORDER_ITEMS_AMOUNT` and `quantity` by `ORDER_ITEMS_QUANTITY`.",
"properties": {
"amount": {
"$ref": "#/components/schemas/EarningRulePointsProportionalOrderItemsCalculation"
},
"subtotal_amount": {
"$ref": "#/components/schemas/EarningRulePointsProportionalOrderItemsCalculation"
},
"quantity": {
"$ref": "#/components/schemas/EarningRulePointsProportionalOrderItemsCalculation"
}
},
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRuleTriggerLimitsFrequencyLimitTimeBasedCurrentPeriod": {
"type": "object",
"description": "Current calendar period unit for the frequency limit.",
"properties": {
"unit": {
"type": "string",
"enum": [
"DAY",
"WEEK",
"MONTH",
"QUARTER",
"YEAR"
],
"description": "Calendar period unit."
}
},
"required": [
"unit"
],
"additionalProperties": false
},
"BenefitPointsProportionalApplicableTo": {
"type": "object",
"description": "A single applicability rule. Exactly one of `product`, `sku`, or `products_collection` is required, matching the `type`. In requests, the other two may be omitted or set to `null`. In responses, they are omitted.",
"properties": {
"type": {
"type": "string",
"enum": [
"product",
"sku",
"products_collection"
],
"description": "Type of the referenced object."
},
"product": {
"description": "Product reference. Required when `type` is `product`. For other types, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalApplicableToProduct"
},
{
"type": "null"
}
]
},
"sku": {
"description": "SKU reference. Required when `type` is `sku`. For other types, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalApplicableToSku"
},
{
"type": "null"
}
]
},
"products_collection": {
"description": "Products collection reference. Required when `type` is `products_collection`. For other types, requests may omit it or set it to `null`; responses omit it.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalApplicableToProductsCollection"
},
{
"type": "null"
}
]
}
},
"required": [
"type"
],
"additionalProperties": false,
"allOf": [
{
"if": {
"properties": {
"type": {
"const": "product"
}
}
},
"then": {
"required": [
"product"
],
"properties": {
"product": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalApplicableToProduct"
},
"sku": {
"type": "null"
},
"products_collection": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "sku"
}
}
},
"then": {
"required": [
"sku"
],
"properties": {
"sku": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalApplicableToSku"
},
"product": {
"type": "null"
},
"products_collection": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "products_collection"
}
}
},
"then": {
"required": [
"products_collection"
],
"properties": {
"products_collection": {
"$ref": "#/components/schemas/LoyaltyV2ActivityBenefitPointsProportionalApplicableToProductsCollection"
},
"product": {
"type": "null"
},
"sku": {
"type": "null"
}
}
}
}
]
},
"RewardCostRuleErrorRequest": {
"type": "object",
"description": "Custom rule error definition.",
"properties": {
"message": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Error message returned when the rule is not satisfied."
}
},
"required": [
"message"
],
"additionalProperties": false
},
"RewardCostRuleConditionsRequest": {
"type": "object",
"description": "Operator conditions for a rule.\nKeys must be one of the supported operators; each value is a non-empty array of\ncondition values (objects referencing other resources, strings, integers or\nbooleans). Between 1 and 10 operator properties are allowed.",
"patternProperties": {
"^(\\$is|\\$is_not|\\$in|\\$not_in|\\$less_than|\\$less_than_or_equal|\\$more_than|\\$more_than_or_equal|\\$dow|\\$from)$": {
"type": "array",
"minItems": 1,
"description": "Condition values compared using the operator given by the property name.",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/RewardCostRuleConditionObjectRequest"
},
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
}
]
}
}
},
"minProperties": 1,
"maxProperties": 10,
"additionalProperties": false
},
"RewardPurchaseLimitsCooldownFixedCooldownPeriodInput": {
"type": "object",
"description": "Fixed cooldown period after a reward purchase.",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"description": "Length of the cooldown period. Max depends on `unit`: HOUR 24, DAY 90, WEEK 52, MONTH 12, YEAR 1."
},
"unit": {
"type": "string",
"enum": [
"HOUR",
"DAY",
"WEEK",
"MONTH",
"YEAR"
],
"description": "Unit of the cooldown period."
}
},
"required": [
"value",
"unit"
],
"additionalProperties": false
},
"RewardPurchaseLimitsFrequencyLimitTriggersInput": {
"type": "object",
"description": "Maximum number of purchases allowed in the period.",
"properties": {
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of purchases in the configured period."
}
},
"required": [
"max"
],
"additionalProperties": false
},
"LoyaltyV2ActivityRewardPurchaseLimitsCooldownFixedCooldownPeriod": {
"type": "object",
"description": "Fixed cooldown period after a reward purchase.",
"properties": {
"value": {
"type": "integer",
"description": "Length of the cooldown period.",
"minimum": 1
},
"unit": {
"type": "string",
"enum": [
"HOUR",
"DAY",
"WEEK",
"MONTH",
"YEAR"
],
"description": "Unit of the cooldown period."
}
},
"required": [
"value",
"unit"
]
},
"LoyaltyV2ActivityRewardPurchaseLimitsFrequencyLimitTriggers": {
"type": "object",
"description": "Maximum number of purchases allowed in the period.",
"properties": {
"max": {
"type": "integer",
"minimum": 1,
"description": "Maximum number of purchases in the configured period."
}
},
"required": [
"max"
]
},
"LoyaltiesExamineEarningRulesExamineResponseBodyEarningRuleReference": {
"type": "object",
"description": "Earning rule reference in examine results.",
"properties": {
"id": {
"type": "string",
"description": "Earning rule ID (`lern_...`)."
},
"object": {
"type": "string",
"const": "earning_rule",
"description": "Object type marker. Always `earning_rule`."
}
},
"title": "Loyalties Examine Earning Rules Examine Response Body Earning Rule Reference"
},
"CardLifetimeBucketPoints": {
"type": "object",
"description": "Lifetime counters of regular points. All counters default to 0. The available balance is calculated as: `total` - `subtracted` - `expired` - `spent` - `refunded` + `returned` - `locked` + `unlocked` - `purchased_reversed`.",
"properties": {
"total": {
"type": "number",
"description": "Total accumulated points, including points added manually, earned by fulfilling earning rules and activated from pending points (excluding returned points).",
"default": 0
},
"earned": {
"type": "number",
"description": "Total points earned by fulfilling earning rules (does not include activated pending points or points added manually).",
"default": 0
},
"added": {
"type": "number",
"description": "Total manually added points.",
"default": 0
},
"purchased": {
"type": "number",
"description": "Total points purchased via a `LOYALTY_CARD_POINTS` reward (credited to the target card).",
"default": 0
},
"purchased_reversed": {
"type": "number",
"description": "Total purchased points reversed via reward refund.",
"default": 0
},
"subtracted": {
"type": "number",
"description": "Total manually subtracted points.",
"default": 0
},
"expired": {
"type": "number",
"description": "Total expired points.",
"default": 0
},
"spent": {
"type": "number",
"description": "Total points spent on rewards.",
"default": 0
},
"refunded": {
"type": "number",
"description": "Total refunded points (points that were earned by products which were later returned).",
"default": 0
},
"returned": {
"type": "number",
"description": "Total returned points (by returning a purchased reward).",
"default": 0
},
"locked": {
"type": "number",
"description": "Total locked points (by locking a purchased reward).",
"default": 0
},
"unlocked": {
"type": "number",
"description": "Total unlocked points (by unlocking a purchased reward).",
"default": 0
}
},
"required": [
"total",
"earned",
"added",
"purchased",
"purchased_reversed",
"subtracted",
"expired",
"spent",
"refunded",
"returned",
"locked",
"unlocked"
]
},
"CardLifetimeBucketPendingPoints": {
"type": "object",
"description": "Lifetime counters of pending points. The available pending balance is max(`total` - `activated` - `canceled`, 0).",
"properties": {
"total": {
"type": "number",
"description": "Total pending points ever added.",
"default": 0
},
"activated": {
"type": "number",
"description": "Total pending points activated into regular points.",
"default": 0
},
"canceled": {
"type": "number",
"description": "Total pending points canceled.",
"default": 0
}
},
"required": [
"total",
"activated",
"canceled"
]
},
"CardDefinitionEarningLimitsGlobalTimeBasedCurrentPeriodInput": {
"description": "Calendar period unit used to reset the time-based earning limit.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionTimeBasedCurrentPeriodInput"
}
],
"unevaluatedProperties": false
},
"CardDefinitionSpendingLimitsGlobalTimeBasedCurrentPeriodInput": {
"description": "Calendar period unit used to reset the time-based spending limit.",
"allOf": [
{
"$ref": "#/components/schemas/CardDefinitionTimeBasedCurrentPeriodInput"
}
],
"unevaluatedProperties": false
},
"LoyaltyV2ActivityEarningRuleEarningLimitsGlobalTimeBasedCurrentPeriod": {
"type": "object",
"description": "Current calendar period unit for the earning limit.",
"properties": {
"unit": {
"type": "string",
"enum": [
"DAY",
"WEEK",
"MONTH",
"QUARTER",
"YEAR"
],
"description": "Calendar period unit."
}
},
"required": [
"unit"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRuleConditionObject": {
"type": "object",
"description": "Object reference used as a condition value (e.g. product, SKU or segment reference).",
"properties": {
"id": {
"type": "string",
"description": "Referenced object ID."
},
"object": {
"type": "string",
"description": "Referenced object type name."
},
"source_id": {
"type": [
"string",
"null"
],
"description": "Source ID of the referenced object. Can be `null`."
},
"type": {
"type": [
"string",
"null"
],
"description": "Additional object subtype. Can be `null`."
}
},
"additionalProperties": false
},
"EarningRuleEffectPointsExpirationRollingExpiration": {
"type": "object",
"description": "Rolling expiration - points expire a fixed period after earning.",
"properties": {
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEffectPointsExpirationRollingExpirationPeriod"
},
"rounding": {
"description": "Optional rounding of the calculated expiration date. Can be `null`.",
"oneOf": [
{
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEffectPointsExpirationRollingExpirationRounding"
},
{
"type": "null"
}
]
}
},
"required": [
"period"
],
"additionalProperties": false
},
"EarningRuleEffectPointsExpirationCalendarExpiration": {
"type": "object",
"description": "Calendar expiration - points expire on fixed calendar dates (1 to 20 dates).",
"properties": {
"expiration_dates": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"description": "Fixed expiration dates (day + month).",
"items": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEffectPointsExpirationCalendarExpirationDate"
}
}
},
"required": [
"expiration_dates"
],
"additionalProperties": false
},
"EarningRuleEffectPointsExpirationSlidingExpiration": {
"type": "object",
"description": "Sliding expiration. Points expire after a period of member inactivity.",
"properties": {
"earning_activity": {
"type": "boolean",
"description": "Whether earning activity resets the expiration window."
},
"period": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRuleEffectPointsExpirationSlidingExpirationPeriod"
}
},
"required": [
"earning_activity",
"period"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRulePointsProportionalEvery": {
"type": "object",
"description": "\"Every X gives Y points\" formula based on an amount.",
"properties": {
"every": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "The divisor – every this amount (e.g. in cents) awards `value` points."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Points awarded per `every` unit."
}
},
"required": [
"every",
"value"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRulePointsProportionalMetadata": {
"type": "object",
"description": "\"Every X gives Y points\" formula based on a numeric metadata property.",
"properties": {
"every": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "The divisor – every this metadata value awards `value` points."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Points awarded per `every` unit."
},
"property": {
"type": "string",
"minLength": 1,
"description": "Metadata property name holding the numeric value."
}
},
"required": [
"every",
"value",
"property"
],
"additionalProperties": false
},
"EarningRulePointsProportionalBase": {
"type": "object",
"properties": {
"metadata": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalMetadata"
}
},
"required": [
"metadata"
]
},
"EarningRulePointsProportionalOrderItemsCalculation": {
"type": "object",
"description": "Order items based calculation - \"every X gives Y points\" applied to items matching the `applicable_to` criteria.",
"properties": {
"every": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991,
"description": "The divisor - every this amount/quantity awards `value` points."
},
"value": {
"type": "number",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Points awarded per `every` unit."
},
"applicable_to": {
"type": "array",
"minItems": 1,
"description": "Product/SKU/collection criteria selecting matching order items.",
"items": {
"$ref": "#/components/schemas/EarningRulePointsProportionalApplicableTo"
}
}
},
"required": [
"every",
"value",
"applicable_to"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitPointsProportionalApplicableToProduct": {
"type": "object",
"title": "Benefit Point Proportional Applicable To Product",
"description": "Product reference.",
"properties": {
"id": {
"type": "string",
"pattern": "^prod_[a-f0-9]+",
"description": "Product ID, prefixed with `prod_`."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitPointsProportionalApplicableToSku": {
"type": "object",
"title": "Benefit Point Proportional Applicable To SKU",
"description": "SKU reference.",
"properties": {
"id": {
"type": "string",
"pattern": "^sku_[a-f0-9]+",
"description": "SKU ID, prefixed with `sku_`."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityBenefitPointsProportionalApplicableToProductsCollection": {
"type": "object",
"title": "Benefit Point Proportional Products Collection",
"description": "Products collection reference.",
"properties": {
"id": {
"type": "string",
"pattern": "^pc_[a-zA-Z0-9]+",
"description": "Products collection ID, prefixed with `pc_`."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"RewardCostRuleConditionObjectRequest": {
"type": "object",
"description": "Condition value referencing another resource, e.g. a customer segment.",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the referenced resource."
},
"object": {
"type": "string",
"description": "Type of the referenced resource, e.g. `segment`."
},
"source_id": {
"type": [
"string",
"null"
],
"description": "Source identifier of the referenced resource."
},
"type": {
"type": [
"string",
"null"
],
"description": "Subtype of the referenced resource."
}
},
"additionalProperties": false
},
"CardDefinitionTimeBasedCurrentPeriodInput": {
"type": "object",
"properties": {
"unit": {
"type": "string",
"enum": [
"DAY",
"WEEK",
"MONTH",
"QUARTER",
"YEAR"
],
"description": "Calendar period unit."
}
},
"required": [
"unit"
]
},
"LoyaltyV2ActivityEarningRuleEffectPointsExpirationRollingExpirationPeriod": {
"type": "object",
"description": "Rolling expiration period. The maximum `value` depends on `unit`: `DAY` - 90, `MONTH` - 12, `YEAR` - 5.",
"properties": {
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Period unit."
},
"value": {
"type": "integer",
"minimum": 1,
"description": "Period length. Maximum depends on `unit`: 90 for DAY, 12 for MONTH, 5 for YEAR."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"unit",
"value"
]
},
{
"if": {
"properties": {
"unit": {
"const": "DAY"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 90
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "MONTH"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 12
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "YEAR"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 5
}
}
}
}
]
},
"LoyaltyV2ActivityEarningRuleEffectPointsExpirationRollingExpirationRounding": {
"type": "object",
"description": "`value` is the month (1-12). Required when `type` is `END_OF_PARTICULAR_MONTH`. Absent for other rounding types.",
"properties": {
"type": {
"type": "string",
"enum": [
"END_OF_MONTH",
"END_OF_QUARTER",
"END_OF_HALF_YEAR",
"END_OF_YEAR",
"END_OF_PARTICULAR_MONTH"
],
"description": "Rounding type."
},
"value": {
"description": "Month number (1-12). Present only when `type` is `END_OF_PARTICULAR_MONTH`.",
"oneOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 12
},
{
"type": "null"
}
]
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "END_OF_PARTICULAR_MONTH"
}
}
},
"then": {
"required": [
"value",
"type"
],
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 12
}
}
}
},
{
"if": {
"properties": {
"type": {
"not": {
"const": "END_OF_PARTICULAR_MONTH"
}
}
}
},
"then": {
"required": [
"type"
],
"properties": {
"value": {
"type": "null"
}
}
}
}
]
},
"LoyaltyV2ActivityEarningRuleEffectPointsExpirationCalendarExpirationDate": {
"type": "object",
"description": "A calendar expiration date. The maximum `day` depends on `month`: 29 for February (month 2), 30 for April/June/September/November (4, 6, 9, 11), 31 for the remaining months.",
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31,
"description": "Day of month (1-31; validated against the month length)."
},
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12,
"description": "Month number (1-12)."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"day",
"month"
]
},
{
"if": {
"properties": {
"month": {
"const": 2
}
}
},
"then": {
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 29
}
}
}
},
{
"if": {
"properties": {
"month": {
"enum": [
4,
6,
9,
11
]
}
}
},
"then": {
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 30
}
}
}
},
{
"if": {
"properties": {
"month": {
"enum": [
1,
3,
5,
7,
8,
10,
12
]
}
}
},
"then": {
"properties": {
"day": {
"type": "integer",
"minimum": 1,
"maximum": 31
}
}
}
}
]
},
"LoyaltyV2ActivityEarningRuleEffectPointsExpirationSlidingExpirationPeriod": {
"type": "object",
"description": "Sliding expiration inactivity period. The maximum `value` depends on `unit`: `DAY` - 90, `MONTH` - 12, `YEAR` - 1.",
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"description": "Period length. Maximum depends on `unit`: 90 for DAY, 12 for MONTH, 1 for YEAR."
},
"unit": {
"type": "string",
"enum": [
"DAY",
"MONTH",
"YEAR"
],
"description": "Period unit."
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"value",
"unit"
]
},
{
"if": {
"properties": {
"unit": {
"const": "DAY"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 90
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "MONTH"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 12
}
}
}
},
{
"if": {
"properties": {
"unit": {
"const": "YEAR"
}
}
},
"then": {
"properties": {
"value": {
"type": "integer",
"minimum": 1,
"maximum": 1
}
}
}
}
]
},
"EarningRulePointsProportionalApplicableTo": {
"type": "object",
"description": "Criterion selecting order items the calculation applies to. Depending on `type`, exactly one of `product`, `sku` or `products_collection` is required and the others must be null/absent.",
"properties": {
"type": {
"type": "string",
"enum": [
"product",
"sku",
"products_collection"
],
"description": "Type of the referenced object."
},
"product": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProduct"
},
"sku": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToSku"
},
"products_collection": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProductsCollection"
}
},
"additionalProperties": false,
"allOf": [
{
"required": [
"type"
]
},
{
"if": {
"properties": {
"type": {
"const": "product"
}
}
},
"then": {
"required": [
"product"
],
"properties": {
"product": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProduct"
},
"sku": {
"type": "null"
},
"products_collection": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "sku"
}
}
},
"then": {
"required": [
"sku"
],
"properties": {
"sku": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToSku"
},
"product": {
"type": "null"
},
"products_collection": {
"type": "null"
}
}
}
},
{
"if": {
"properties": {
"type": {
"const": "products_collection"
}
}
},
"then": {
"required": [
"products_collection"
],
"properties": {
"products_collection": {
"$ref": "#/components/schemas/LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProductsCollection"
},
"product": {
"type": "null"
},
"sku": {
"type": "null"
}
}
}
}
]
},
"LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProduct": {
"type": "object",
"description": "Product reference.",
"properties": {
"id": {
"type": "string",
"pattern": "^prod_[a-f0-9]+",
"description": "Product ID (`prod_...`)."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRulePointsProportionalApplicableToSku": {
"type": "object",
"description": "SKU reference.",
"properties": {
"id": {
"type": "string",
"pattern": "^sku_[a-f0-9]+",
"description": "SKU ID (`sku_...`)."
}
},
"required": [
"id"
],
"additionalProperties": false
},
"LoyaltyV2ActivityEarningRulePointsProportionalApplicableToProductsCollection": {
"type": "object",
"description": "Products collection reference.",
"properties": {
"id": {
"type": "string",
"pattern": "^pc_[a-zA-Z0-9]+",
"description": "Products collection ID (`pc_...`)."
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"securitySchemes": {
"X-App-Id": {
"type": "apiKey",
"name": "X-App-Id",
"in": "header"
},
"X-App-Token": {
"type": "apiKey",
"name": "X-App-Token",
"in": "header"
},
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
}
}