{
  "openapi": "3.1.0",
  "info": {
    "title": "Voucherify API - Loyalties",
    "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": {
    "/v1/loyalties": {
      "get": {
        "operationId": "list-loyalty-programs",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Campaigns",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nReturns a list of your loyalty campaigns.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterExpandListCampaigns"
            },
            "in": "query",
            "name": "expand",
            "description": "Includes an expanded `categories` object in the response. If the [Areas and Stores](/orchestrate/areas-and-stores) Enterprise feature is enabled, add `access_settings_assignments` to return assigned areas and stores."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListCampaigns"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with loyalty program objects. The loyalty campaigns are returned sorted by creation date, with the most recent campaigns appearing first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesListCampaignsResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "campaigns",
                      "campaigns": [
                        {
                          "id": "camp_eTIsUtuzkRXQT6rsUQqrS5Gw",
                          "name": "Loyalty Campaign 1",
                          "campaign_type": "LOYALTY_PROGRAM",
                          "type": "AUTO_UPDATE",
                          "voucher": {
                            "type": "LOYALTY_CARD",
                            "loyalty_card": {
                              "points": 0
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########"
                            },
                            "is_referral_code": false
                          },
                          "auto_join": false,
                          "join_once": false,
                          "use_voucher_metadata_schema": true,
                          "description": "This is a campaign description.",
                          "vouchers_count": 6,
                          "active": true,
                          "metadata": {
                            "Season": "Fall"
                          },
                          "created_at": "2022-11-21T13:57:03.712Z",
                          "updated_at": "2022-11-23T09:59:49.581Z",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": "cat_0b6152ce12414820dc",
                          "categories": [],
                          "object": "campaign"
                        },
                        {
                          "id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "name": "Loyalty Campaign - Tiers",
                          "campaign_type": "LOYALTY_PROGRAM",
                          "type": "AUTO_UPDATE",
                          "voucher": {
                            "type": "LOYALTY_CARD",
                            "loyalty_card": {
                              "points": 0
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########",
                              "prefix": "LT1-",
                              "initial_count": 1
                            },
                            "is_referral_code": false,
                            "start_date": "2022-11-01T00:00:00.000Z"
                          },
                          "auto_join": false,
                          "join_once": false,
                          "use_voucher_metadata_schema": true,
                          "start_date": "2022-11-01T00:00:00.000Z",
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4,
                            5,
                            6
                          ],
                          "vouchers_count": 3,
                          "active": true,
                          "metadata": {},
                          "created_at": "2022-11-09T06:26:52.985Z",
                          "updated_at": "2022-11-10T08:54:46.136Z",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": "cat_0b8b5a427a0283c854",
                          "categories": [],
                          "loyalty_tiers_expiration": {
                            "qualification_type": "BALANCE",
                            "start_date": {
                              "type": "IMMEDIATE"
                            },
                            "expiration_date": {
                              "type": "CUSTOM",
                              "extend": "P3M",
                              "rounding": {
                                "type": "MONTH",
                                "strategy": "END"
                              }
                            }
                          },
                          "object": "campaign"
                        },
                        {
                          "id": "camp_NwO6D0Z0mpZ1CDc380DnPgrW",
                          "name": "Loyalty Campaign Example",
                          "campaign_type": "LOYALTY_PROGRAM",
                          "type": "STATIC",
                          "voucher": {
                            "type": "LOYALTY_CARD",
                            "loyalty_card": {
                              "points": 0
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########",
                              "initial_count": 1
                            },
                            "is_referral_code": false,
                            "start_date": "2021-12-15T00:00:00.000Z",
                            "expiration_date": "2021-12-31T00:00:00.000Z",
                            "validity_timeframe": {
                              "interval": "P1D",
                              "duration": "PT1H"
                            }
                          },
                          "auto_join": true,
                          "join_once": true,
                          "use_voucher_metadata_schema": true,
                          "start_date": "2021-12-15T00:00:00.000Z",
                          "expiration_date": "2021-12-31T00:00:00.000Z",
                          "validity_timeframe": {
                            "interval": "P1D",
                            "duration": "PT1H"
                          },
                          "validity_day_of_week": [
                            3,
                            4,
                            5,
                            6
                          ],
                          "activity_duration_after_publishing": "P24D",
                          "vouchers_count": 0,
                          "active": false,
                          "metadata": {},
                          "created_at": "2021-12-15T08:02:52.298Z",
                          "updated_at": "2021-12-15T08:11:43.808Z",
                          "creation_status": "DRAFT",
                          "vouchers_generation_status": "DRAFT",
                          "protected": false,
                          "category_id": null,
                          "categories": [],
                          "object": "campaign"
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-loyalty-program",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Create Loyalty Campaign",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nCreates a batch of [loyalty cards](/api-reference/loyalties/get-member) aggregated in a single loyalty campaign. It also allows you to define a custom codes pattern.  \n\n\n<Note>\n\n<Badge color=\"blue\">Global uniqueness</Badge>\n\nAll codes are unique across the whole project. Voucherify won't allow to generate the same codes in any of your campaigns.\n\n</Note>\n\n\n<Warning>\n\n<Badge color=\"yellow\">Asynchronous action!</Badge>\n\nThis is an asynchronous action, you can't read or modify a newly created campaign until the code generation is completed. See `creation_status` field in the [loyalty campaign object](/api-reference/loyalties/loyalty-campaign-object) description.\n\n</Warning>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the loyalty campaign details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesCreateCampaignRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Loyalty Program 4",
                    "description": "This is a campaign description.",
                    "auto_join": true,
                    "join_once": true,
                    "use_voucher_metadata_schema": true,
                    "start_date": "2016-10-26T00:00:00Z",
                    "expiration_date": "2024-10-26T00:00:00Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P1D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "activity_duration_after_publishing": "P24D",
                    "category_id": "cat_0b6152ce12414820dc",
                    "vouchers_count": 2,
                    "voucher": {
                      "type": "LOYALTY_CARD",
                      "loyalty_card": {
                        "points": 0,
                        "expiration_rules": {
                          "period_type": "MONTH",
                          "period_value": 3,
                          "rounding_type": "END_OF_QUARTER"
                        }
                      },
                      "redemption": {
                        "quantity": 2
                      },
                      "code_config": {
                        "pattern": "L-CARD-#######"
                      }
                    },
                    "metadata": {
                      "test": true
                    },
                    "type": "STATIC",
                    "loyalty_tiers_expiration": {
                      "qualification_type": "BALANCE",
                      "start_date": {
                        "type": "IMMEDIATE"
                      },
                      "expiration_date": {
                        "type": "CUSTOM",
                        "extend": "P3M",
                        "rounding": {
                          "type": "MONTH",
                          "strategy": "END"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a campaign object with its settings but without the loyalty card codes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesCreateCampaignResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_wGlqXtnHddb39DvHuuhvvbxi",
                      "name": "Loyalty Program 4",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "STATIC",
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 0,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 3,
                            "rounding_type": "END_OF_QUARTER"
                          }
                        },
                        "redemption": {
                          "quantity": 2
                        },
                        "code_config": {
                          "length": 7,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "L-CARD-#######"
                        },
                        "is_referral_code": false,
                        "start_date": "2016-10-26T00:00:00.000Z",
                        "expiration_date": "2024-10-26T00:00:00.000Z",
                        "validity_timeframe": {
                          "interval": "P1D",
                          "duration": "PT1H"
                        }
                      },
                      "auto_join": true,
                      "join_once": true,
                      "use_voucher_metadata_schema": true,
                      "description": "This is a campaign description.",
                      "start_date": "2016-10-26T00:00:00.000Z",
                      "expiration_date": "2024-10-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P1D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "activity_duration_after_publishing": "P24D",
                      "vouchers_count": 0,
                      "active": true,
                      "metadata": {
                        "test": true
                      },
                      "created_at": "2022-11-29T13:10:30.848Z",
                      "category": "New Customers",
                      "creation_status": "IN_PROGRESS",
                      "vouchers_generation_status": "IN_PROGRESS",
                      "protected": false,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "category_id": "cat_0b6152ce12414820dc",
                      "categories": [
                        {
                          "id": "cat_0b6152ce12414820dc",
                          "name": "New Customers",
                          "hierarchy": 0,
                          "created_at": "2022-07-14T20:17:07.657Z",
                          "object": "category"
                        }
                      ],
                      "loyalty_tiers_expiration": {
                        "qualification_type": "BALANCE",
                        "start_date": {
                          "type": "IMMEDIATE"
                        },
                        "expiration_date": {
                          "type": "CUSTOM",
                          "extend": "P3M",
                          "rounding": {
                            "type": "MONTH",
                            "strategy": "END"
                          }
                        }
                      },
                      "object": "campaign"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a loyalty campaign with the same name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated campaign exists with name Loyalty Program 2",
                      "request_id": "v-0c12951ec58e67577e",
                      "resource_id": "Loyalty Program 2",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        }
      ],
      "get": {
        "operationId": "get-loyalty-program",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Loyalty Campaign",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve a specific loyalty campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a loyalty campaign object for a given loyalty campaign ID. ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesGetCampaignResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                      "name": "Loyalty Campaign - Tiers - 1",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 0
                        },
                        "redemption": {
                          "quantity": null
                        },
                        "code_config": {
                          "length": 8,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "########",
                          "prefix": "LT1-",
                          "initial_count": 1
                        },
                        "is_referral_code": false,
                        "start_date": "2022-11-01T00:00:00.000Z"
                      },
                      "auto_join": false,
                      "join_once": false,
                      "use_voucher_metadata_schema": true,
                      "start_date": "2022-11-01T00:00:00.000Z",
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6
                      ],
                      "vouchers_count": 3,
                      "active": true,
                      "metadata": {},
                      "created_at": "2022-11-09T06:26:52.985Z",
                      "updated_at": "2022-11-10T08:54:46.136Z",
                      "category": "Eighth",
                      "creation_status": "DONE",
                      "vouchers_generation_status": "DONE",
                      "protected": false,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "category_id": "cat_0b8b5a427a0283c854",
                      "categories": [
                        {
                          "id": "cat_0b8b5a427a0283c854",
                          "name": "Eighth",
                          "hierarchy": 8,
                          "created_at": "2022-08-16T11:45:54.171Z",
                          "object": "category"
                        }
                      ],
                      "loyalty_tiers_expiration": {
                        "qualification_type": "BALANCE",
                        "start_date": {
                          "type": "IMMEDIATE"
                        },
                        "expiration_date": {
                          "type": "CUSTOM",
                          "extend": "P3M",
                          "rounding": {
                            "type": "MONTH",
                            "strategy": "END"
                          }
                        }
                      },
                      "object": "campaign"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if the restricted user is missing the access to an area or a store to which the campaign with this ID has been assigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "key": "forbidden",
                      "message": "Forbidden",
                      "details": "Resource campaign with id camp_7u3ZPLSByANMXjBkAs4kT2nS is not accessible in given context",
                      "request_id": "v-0f005192bfce923bb7",
                      "resource_id": "camp_7u3ZPLSByANMXjBkAs4kT2nS",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-loyalty-program",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Update Loyalty Campaign",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nUpdates a loyalty program. \n\nFields other than those specified in the allowed request body payload won't be modified (even if provided they are silently skipped). Any parameters not provided will be left unchanged. \n\nThis method will update the [loyalty cards](/api-reference/loyalties/get-member) which have not been published or redeemed yet.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the new values for the parameters that you would like to update for the given loyalty campaign.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesUpdateCampaignRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "description": "This is a campaign description. Updated",
                    "auto_join": false,
                    "join_once": false,
                    "start_date": "2013-10-26T00:00:00Z",
                    "expiration_date": "2025-10-26T00:00:00Z",
                    "validity_timeframe": {
                      "duration": "PT2H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ],
                    "activity_duration_after_publishing": "P25D",
                    "category_id": "cat_0b6152ce12414820dd",
                    "loyalty_card": {
                      "points": 1,
                      "expiration_rules": {
                        "period_type": "MONTH",
                        "period_value": 4,
                        "rounding_type": "END_OF_YEAR"
                      }
                    },
                    "metadata": {
                      "test": false
                    },
                    "type": "AUTO_UPDATE",
                    "loyalty_tiers_expiration": {
                      "qualification_type": "BALANCE",
                      "start_date": {
                        "type": "IMMEDIATE"
                      },
                      "expiration_date": {
                        "type": "CUSTOM",
                        "extend": "P4M",
                        "rounding": {
                          "type": "CUSTOM",
                          "unit": "MONTH",
                          "value": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the loyalty campaign object if the update succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesUpdateCampaignResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_wGlqXtnHddb39DvHuuhvvbxi",
                      "name": "Loyalty Program 4",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 1,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 4,
                            "rounding_type": "END_OF_YEAR"
                          }
                        },
                        "redemption": {
                          "quantity": 2
                        },
                        "code_config": {
                          "length": 7,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "L-CARD-#######"
                        },
                        "is_referral_code": false,
                        "start_date": "2013-10-26T00:00:00.000Z",
                        "expiration_date": "2025-10-26T00:00:00.000Z",
                        "validity_timeframe": {
                          "interval": "P2D",
                          "duration": "PT2H"
                        }
                      },
                      "auto_join": false,
                      "join_once": false,
                      "use_voucher_metadata_schema": true,
                      "description": "This is a campaign description. Updated",
                      "start_date": "2013-10-26T00:00:00.000Z",
                      "expiration_date": "2025-10-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT2H"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5,
                        6
                      ],
                      "activity_duration_after_publishing": "P25D",
                      "vouchers_count": 2,
                      "active": true,
                      "metadata": {
                        "test": false
                      },
                      "created_at": "2022-11-29T13:10:30.848Z",
                      "updated_at": "2022-11-29T14:08:30.655Z",
                      "category": "Lorem_Ipsum",
                      "creation_status": "MODIFYING",
                      "vouchers_generation_status": "MODIFYING",
                      "protected": false,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "category_id": "cat_0b6152ce12414820dd",
                      "categories": [
                        {
                          "id": "cat_0b6152ce12414820dd",
                          "name": "Lorem_Ipsum",
                          "hierarchy": 0,
                          "created_at": "2022-07-14T20:17:07.657Z",
                          "object": "category"
                        }
                      ],
                      "loyalty_tiers_expiration": {
                        "qualification_type": "BALANCE",
                        "start_date": {
                          "type": "IMMEDIATE"
                        },
                        "expiration_date": {
                          "type": "CUSTOM",
                          "extend": "P4M",
                          "rounding": {
                            "type": "CUSTOM",
                            "strategy": "END",
                            "unit": "MONTH",
                            "value": 1
                          }
                        }
                      },
                      "object": "campaign"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the restricted user does not have the permission to modify the campaign, because the campaign is `readonly` for them.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 400,
                      "key": "resource_protected",
                      "message": "Resource is protected",
                      "details": "Resource campaign with id camp_oazbyS2Y3SxKLCh9yQ3pqFr6 is protected and cannot be modified",
                      "request_id": "v-0f7548b67cc7ed8dff",
                      "resource_id": "camp_oazbyS2Y3SxKLCh9yQ3pqFr6",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if the restricted user is missing the access to an area or a store to which the campaign with this ID has been assigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "key": "forbidden",
                      "message": "Forbidden",
                      "details": "Resource campaign with id camp_7u3ZPLSByANMXjBkAs4kT2nS is not accessible in given context",
                      "request_id": "v-0f005192bfce923bb7",
                      "resource_id": "camp_7u3ZPLSByANMXjBkAs4kT2nS",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-loyalty-program",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Delete Loyalty Campaign",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nDeletes a loyalty campaign and all related loyalty cards. This action cannot be undone. Also, it immediately removes any redemptions on loyalty cards.\n\nIf the `force` parameter is set to `false` or not set at all, the loyalty campaign and all related loyalty cards will be moved to [the bin](/api-reference/bin/list-bin-entries).",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "force",
            "description": "If this flag is set to `true`, the campaign and related vouchers will be removed permanently. If it is set to `false` or not set at all, the loyalty campaign and all related loyalty cards will be moved to the bin. Going forward, the user will be able to create the next campaign with the same name."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the loyalty campaign will be deleted from the repository asynchronously. To check the deletion status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](/api-reference/async-actions/get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesDeleteResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the loyalty campaign with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Loyalty Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id Summer Loyalty Perks",
                      "request_id": "v-0ae2b0092f50c130c7",
                      "resource_id": "Summer Loyalty Perks",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID of the loyalty program."
        }
      ],
      "get": {
        "operationId": "list-members",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Members",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nReturns a list of your loyalty cards. The loyalty cards are sorted by creation date, with the most recent loyalty cards appearing first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/customer"
          },
          {
            "$ref": "#/components/parameters/created_at"
          },
          {
            "$ref": "#/components/parameters/updated_at"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderVouchers"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterCode"
            }
          },
          {
            "$ref": "#/components/parameters/ids"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of loyalty cards within a campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesListMembersResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "vouchers",
                      "vouchers": [
                        {
                          "id": "v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655",
                          "code": "0PmQ7JQI",
                          "campaign": "Loyalty Campaign",
                          "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "category": null,
                          "category_id": null,
                          "categories": [],
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 0,
                            "balance": 0
                          },
                          "start_date": null,
                          "expiration_date": null,
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX19RtPewWeUYb2hiCR6xEhVE3SLdMfCXj3BA/s6uqSwFl2oAKAt9K5dolsdcZcj5Jgaa/YCnKkm63TRuX6OgGJoEggbKMg+wLfCMwBSi4J2v8KXuyqM25wP4r9WAL58Z+z3B1jkALIbjtw==",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX1+hrRfaPMHRRX5aGVz2RpurRBjC2brcHcptPs4Od93qZM51vUXZe4DDzfRbnVrP+BfBtF+pyyQpxCeqbQuB/OuSnP/nzec6n0n/gTb9+XcIYLvvxcbnDbYoVdRFQEbcCxKKo4QzDlqIjQ==",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-04-15T05:48:45.509Z",
                          "updated_at": "2022-07-01T00:01:57.860Z",
                          "holder_id": "cust_nk0N1uNQ1YnupAoJGOgvsODC",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0,
                            "redeemed_points": 0,
                            "object": "list",
                            "url": "/v1/vouchers/0PmQ7JQI/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/0PmQ7JQI/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        {
                          "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                          "code": "MmFAzfDe",
                          "campaign": "Loyalty Campaign",
                          "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "category": null,
                          "category_id": "cat_0b6152ce12414820de",
                          "categories": [],
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 13435,
                            "balance": 13135,
                            "next_expiration_date": "2022-11-30",
                            "next_expiration_points": 12
                          },
                          "start_date": null,
                          "expiration_date": null,
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX184kVdWUO/msrLg1G0MRf/Cs6QwSN3f6kyWCOTGdijyq8OfUbUpcGx6fjdeIpTf2UilFGNG8aCWVk/dXm/QEJ/sulXKDlUMWf+MN7TRG5LB+wuzqTy7csDBfRoJn0fURpwU4A6VZZSwBQ==",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX1/RGZN9VwvkdI6B26PPZQZWjh33USr5NPMXbHuJVkxsH6TUyW/cXen1Lc7gaqik09BGiry0R4QIAP52jnxQuABOsW0HdYfglsLPY7IajGX5rJzZKDKuzioq2vRIPyuE6z03frAod7ptvQ==",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-02-18T14:03:59.954Z",
                          "updated_at": "2022-11-21T13:49:54.949Z",
                          "holder_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 1,
                            "redeemed_points": 300,
                            "object": "list",
                            "url": "/v1/vouchers/MmFAzfDe/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/MmFAzfDe/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "add-member",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Add Member",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nThis method assigns a loyalty card to a customer. It selects a [loyalty card](/api-reference/vouchers/get-voucher) suitable for publication, adds a publish entry, and returns the published voucher.  \n\nA voucher is suitable for publication when it's active and hasn't been published yet.  \n\n\n<Note>\n\n<Badge color=\"blue\">Auto-update campaign</Badge>\n\nIn case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use **auto-update** campaign.\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide details to whom the loyalty card should be assigned.    \n\nYou can choose to either specify the exact loyalty card code that you want to publish from existin (non-assigned) codes, or choose not to specify a voucher code. If you choose not to specify a code in the request paylaod, then the system will choose the next available voucher code available to be assigned to a customer.  \n\nYou can also include metadata in the request payload. This metadata will be assigned to the publication object, but will not be returned in the response to this endpoint. To see of publications (assignments of particular codes to customers) and publication metadata, use the [List Publications](/api-reference/publications/list-publications) endpoint.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersCreateRequestBody"
              },
              "examples": {
                "Using source ID": {
                  "value": {
                    "customer": "source_customer_1",
                    "metadata": {
                      "year": 2022
                    },
                    "channel": "postman",
                    "voucher": "KpzbHUY5"
                  }
                },
                "Using unique Voucherify assigned ID": {
                  "value": {
                    "customer": "cust_8KQmHxAERpgebYcFhSpZRr37",
                    "metadata": {
                      "year": 2022
                    },
                    "channel": "postman",
                    "voucher": "KpzbHUY5"
                  }
                },
                "Using source ID in object": {
                  "value": {
                    "customer": {
                      "source_id": "source_customer_1"
                    },
                    "metadata": {
                      "year": 2022
                    },
                    "channel": "postman",
                    "voucher": "KpzbHUY5"
                  }
                },
                "Using unique Voucherify assigned ID in object": {
                  "value": {
                    "customer": {
                      "id": "cust_8KQmHxAERpgebYcFhSpZRr37"
                    },
                    "metadata": {
                      "year": 2022
                    },
                    "channel": "postman",
                    "voucher": "KpzbHUY5"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the voucher object that was published to the customer provided in the request payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersCreateResponseBody"
                },
                "examples": {
                  "Loyalty Card": {
                    "value": {
                      "id": "v_0TxKw1bm0oZuS5lwA8526vze1OBMV1OH",
                      "code": "KpzbHUY5",
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_eTIsUtuzkRXQT6rsUQqrS5Gw",
                      "category": "New Customers",
                      "category_id": "cat_0b6152ce12414820dc",
                      "categories": [
                        {
                          "id": "cat_0b6152ce12414820dc",
                          "name": "New Customers",
                          "hierarchy": 0,
                          "created_at": "2022-07-14T20:17:07.657Z",
                          "object": "category"
                        }
                      ],
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 0,
                        "balance": 0
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {
                        "Season": "Fall"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+hdZfzUaz448vIsyf7WpvXiDyqFbyw0+P5wMu12w3B5DyYwA7LCSK+Nr7TA7PKGuHOTGxfBieqrhvJo81HiaIJimDOhk+ecEOisMRmHf6XsNckVlyBHmkpBiXWNm8UDwZnXOAG75Usdw==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19VRXApVvZ9/ArwBd0wNg7s2KZBXrFvPXZdDQyzGj0HbbEIx5TAoXNR9zaE5kzIj9BElzgK82aOMMVnc1sqvr93xw+YeYMnqGqHRZfM78pYC8560Zc3U6IELtxzaJJ0x2uDUe6Dc9XYeg==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-11-21T15:48:57.860Z",
                      "updated_at": "2022-11-21T15:49:36.671Z",
                      "holder_id": "cust_8KQmHxAERpgebYcFhSpZRr37",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/KpzbHUY5/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/KpzbHUY5/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "No Voucher Suitable for Publication": {
                    "value": {
                      "code": 400,
                      "key": "no_voucher_suitable_for_publication",
                      "message": "Couldn't find any voucher suitable for publication",
                      "details": "Couldn't create new vouchers for publication",
                      "request_id": "v-0c086598620e6704dd"
                    }
                  },
                  "Voucher already published": {
                    "value": {
                      "code": 400,
                      "key": "voucher_already_published",
                      "message": "Voucher already published",
                      "details": "Voucher 'v_ZFjKHQD0d56eMkWkrotJaVbiMuXClRuM' has already been published",
                      "request_id": "v-0c086aaa7dc24ccfe0"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code that was specified in the request payload is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id Loyalty_Card",
                      "request_id": "v-0c086a26de424ccf2f",
                      "resource_id": "Loyalty_Card",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique code that identifies the loyalty card."
        }
      ],
      "get": {
        "operationId": "get-member-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Member with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieves the loyalty card with the given member ID (i.e. voucher code).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns loyalty card details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersGetResponseBody"
                },
                "examples": {
                  "Loyalty Card": {
                    "value": {
                      "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                      "code": "MmFAzfDe",
                      "campaign": "Loyalty Program",
                      "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                      "category": null,
                      "category_id": "cat_0b6152ce12414820de",
                      "categories": [],
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 13435,
                        "balance": 13135,
                        "next_expiration_date": "2022-11-30",
                        "next_expiration_points": 12
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX184kVdWUO/msrLg1G0MRf/Cs6QwSN3f6kyWCOTGdijyq8OfUbUpcGx6fjdeIpTf2UilFGNG8aCWVk/dXm/QEJ/sulXKDlUMWf+MN7TRG5LB+wuzqTy7csDBfRoJn0fURpwU4A6VZZSwBQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/RGZN9VwvkdI6B26PPZQZWjh33USr5NPMXbHuJVkxsH6TUyW/cXen1Lc7gaqik09BGiry0R4QIAP52jnxQuABOsW0HdYfglsLPY7IajGX5rJzZKDKuzioq2vRIPyuE6z03frAod7ptvQ==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T14:03:59.954Z",
                      "updated_at": "2022-11-21T13:49:54.949Z",
                      "holder_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 1,
                        "redeemed_points": 300,
                        "object": "list",
                        "url": "/v1/vouchers/MmFAzfDe/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/MmFAzfDe/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card code assigned to a particular customer."
        }
      ],
      "get": {
        "operationId": "get-member",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Member",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve loyalty card with the given member ID (i.e. voucher code).    \n\n\n<Note>\n\n<Badge color=\"blue\">Alternative endpoint</Badge>\n\nThis endpoint is an alternative to this [endpoint](/api-reference/loyalties/get-member-with-campaign-id). The URL was re-designed to allow you to retrieve loyalty card details without having to provide the `campaignId` as a path parameter.\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns loyalty card details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersGetResponseBody"
                },
                "examples": {
                  "Loyalty Card": {
                    "value": {
                      "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                      "code": "MmFAzfDe",
                      "campaign": "Loyalty Program",
                      "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                      "category": null,
                      "category_id": "cat_0b6152ce12414820de",
                      "categories": [],
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 13435,
                        "balance": 13135,
                        "next_expiration_date": "2022-11-30",
                        "next_expiration_points": 12
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX184kVdWUO/msrLg1G0MRf/Cs6QwSN3f6kyWCOTGdijyq8OfUbUpcGx6fjdeIpTf2UilFGNG8aCWVk/dXm/QEJ/sulXKDlUMWf+MN7TRG5LB+wuzqTy7csDBfRoJn0fURpwU4A6VZZSwBQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/RGZN9VwvkdI6B26PPZQZWjh33USr5NPMXbHuJVkxsH6TUyW/cXen1Lc7gaqik09BGiry0R4QIAP52jnxQuABOsW0HdYfglsLPY7IajGX5rJzZKDKuzioq2vRIPyuE6z03frAod7ptvQ==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T14:03:59.954Z",
                      "updated_at": "2022-11-21T13:49:54.949Z",
                      "holder_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 1,
                        "redeemed_points": 300,
                        "object": "list",
                        "url": "/v1/vouchers/MmFAzfDe/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/MmFAzfDe/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/pending-points": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID."
        }
      ],
      "get": {
        "operationId": "list-campaign-pending-points",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Campaign Pending Points",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nLists all pending points that are currently assigned to all loyalty cards in a campaign. Once the points are added to the card, the entry is no longer returned.\n\n<Tip>\n\n<Badge color=\"green\">Configuring pending points</Badge>\n\nPending points are configured as part of an earning rule with [POST Create earning rule](/api-reference/loyalties/create-earning-rule) or [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).\n\n</Tip>",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimit"
            },
            "in": "query",
            "name": "limit",
            "description": "Limit the number of the pending point entries that the API returns in the response."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListPendingPoints"
            },
            "in": "query",
            "name": "order",
            "description": "Orders the pending point entries according the pending point entry ID. The dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the results starting after a result with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns all pending point entries for all loyalty cards in the campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesPendingPointsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "lopp_0ffdbd86f0120789f2",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc73eff092dea295",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc73eff212dea29f",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc73efe71d5053fa",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T16:51:03.745Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "USER_PORTAL",
                                "user": {
                                  "id": "user_xyzaBcDEfgHOIJKLmn1opqr2Stu3VWX4"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc73eff092dea295",
                              "source_id": "dashboard-source-20250115-001"
                            }
                          },
                          "created_at": "2025-01-15T16:51:04.708Z"
                        },
                        {
                          "id": "lopp_0ffd968aa8d207eb38",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc4cf3aa55d28bae",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc4cf3ad15d28bb8",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc4cf39e2d7d9ade",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T14:00:43.940Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "API",
                                "api_key": {
                                  "name": "Primary",
                                  "app_id": "3XxxX483-0YYd-XX8z-aXXX-YYY7a3d3698"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc4cf3aa55d28bae",
                              "source_id": "your_own_source_id_20250115-006"
                            }
                          },
                          "created_at": "2025-01-15T14:00:44.934Z"
                        },
                        {
                          "id": "lopp_0ffd9661bd5207eb0a",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc4ccac0d5d28b7a",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc4ccac5d5d28b84",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc4ccaafdd50214b",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T14:00:02.038Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "API",
                                "api_key": {
                                  "name": "Primary",
                                  "app_id": "34fdc483-066d-478b-a707-be2c7a3d3698"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc4ccac0d5d28b7a",
                              "source_id": "your_own_source_id_20250115-005"
                            }
                          },
                          "created_at": "2025-01-15T14:00:02.586Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "lopp_0ffd9661bd5207eb0a"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_AQZ1GLRlbGaC2dETd31VbJQ",
                      "request_id": "v-0fa4dbf5ebeb92bccd",
                      "resource_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/pending-points": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card code assigned to a particular customer."
        }
      ],
      "get": {
        "operationId": "list-member-pending-points-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Pending Points with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nLists all pending points that are currently assigned to the loyalty card. Once the points are added to the card, the entry is no longer returned.\n\n<Tip>\n\n<Badge color=\"green\">Configuring pending points</Badge>\n\nPending points are configured as part of an earning rule with [POST Create earning rule](/api-reference/loyalties/create-earning-rule) or [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).\n\n</Tip>",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimit"
            },
            "in": "query",
            "name": "limit",
            "description": "Limit the number of the pending point entries that the API returns in the response."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListPendingPoints"
            },
            "in": "query",
            "name": "order",
            "description": "Orders the pending point entries according the pending point entry ID. The dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the results starting after a result with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns all pending point entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersPendingPointsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "lopp_0ffdbd86f0120789f2",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc73eff092dea295",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc73eff212dea29f",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc73efe71d5053fa",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T16:51:03.745Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "USER_PORTAL",
                                "user": {
                                  "id": "user_xyzaBcDEfgHOIJKLmn1opqr2Stu3VWX4"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc73eff092dea295",
                              "source_id": "dashboard-source-20250115-001"
                            }
                          },
                          "created_at": "2025-01-15T16:51:04.708Z"
                        },
                        {
                          "id": "lopp_0ffd968aa8d207eb38",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc4cf3aa55d28bae",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc4cf3ad15d28bb8",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc4cf39e2d7d9ade",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T14:00:43.940Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "API",
                                "api_key": {
                                  "name": "Primary",
                                  "app_id": "3XxxX483-0YYd-XX8z-aXXX-YYY7a3d3698"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc4cf3aa55d28bae",
                              "source_id": "your_own_source_id_20250115-006"
                            }
                          },
                          "created_at": "2025-01-15T14:00:44.934Z"
                        },
                        {
                          "id": "lopp_0ffd9661bd5207eb0a",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc4ccac0d5d28b7a",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc4ccac5d5d28b84",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc4ccaafdd50214b",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T14:00:02.038Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "API",
                                "api_key": {
                                  "name": "Primary",
                                  "app_id": "34fdc483-066d-478b-a707-be2c7a3d3698"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc4ccac0d5d28b7a",
                              "source_id": "your_own_source_id_20250115-005"
                            }
                          },
                          "created_at": "2025-01-15T14:00:02.586Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "lopp_0ffd9661bd5207eb0a"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign or member could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Member Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id NoSuchMemberId",
                      "request_id": "v-0ffd717a332d7dc9e8",
                      "resource_id": "NoSuchMemberId",
                      "resource_type": "voucher"
                    }
                  },
                  "Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_AQZ1GLRlbGaC2dETd31VbJQ",
                      "request_id": "v-0fa4dbf5ebeb92bccd",
                      "resource_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/pending-points": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card code assigned to a particular customer."
        }
      ],
      "get": {
        "operationId": "list-member-pending-points",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Pending Points",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\n\n<Note>\n\n<Badge color=\"blue\">Alternative endpoint</Badge>\n\nThis endpoint is an alternative to this [endpoint](/api-reference/loyalties/list-member-pending-points-with-campaign-id). The URL was re-designed to list member pending points without having to provide the `campaignId` as a path parameter.\n\n</Note>\n\nLists all pending points that are currently assigned to the loyalty card. Once the points are added to the card, the entry is no longer returned.\n\n<Tip>\n\n<Badge color=\"green\">Configuring pending points</Badge>\n\nPending points are configured as part of an earning rule with [POST Create earning rule](/api-reference/loyalties/create-earning-rule) or [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).\n\n</Tip>",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimit"
            },
            "in": "query",
            "name": "limit",
            "description": "Limit the number of the pending point entries that the API returns in the response."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListPendingPoints"
            },
            "in": "query",
            "name": "order",
            "description": "Orders the pending point entries according the pending point entry ID. The dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the results starting after a result with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns all pending point entries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersPendingPointsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "lopp_0ffdbd86f0120789f2",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc73eff092dea295",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc73eff212dea29f",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc73efe71d5053fa",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T16:51:03.745Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "USER_PORTAL",
                                "user": {
                                  "id": "user_xyzaBcDEfgHOIJKLmn1opqr2Stu3VWX4"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc73eff092dea295",
                              "source_id": "dashboard-source-20250115-001"
                            }
                          },
                          "created_at": "2025-01-15T16:51:04.708Z"
                        },
                        {
                          "id": "lopp_0ffd968aa8d207eb38",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc4cf3aa55d28bae",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc4cf3ad15d28bb8",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc4cf39e2d7d9ade",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T14:00:43.940Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "API",
                                "api_key": {
                                  "name": "Primary",
                                  "app_id": "3XxxX483-0YYd-XX8z-aXXX-YYY7a3d3698"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc4cf3aa55d28bae",
                              "source_id": "your_own_source_id_20250115-006"
                            }
                          },
                          "created_at": "2025-01-15T14:00:44.934Z"
                        },
                        {
                          "id": "lopp_0ffd9661bd5207eb0a",
                          "voucher_id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc",
                          "campaign_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ9",
                          "customer_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                          "order_id": "ord_0ffc4ccac0d5d28b7a",
                          "points": 1,
                          "activates_at": "2025-01-16",
                          "details": {
                            "holder_loyalty_tier": {
                              "id": "ltr_0e30613ad01f044515",
                              "name": "Silver Tier"
                            },
                            "event": {
                              "id": "evcus_0ffc4ccac5d5d28b84",
                              "type": "customer.order.paid",
                              "group_id": "v-0ffc4ccaafdd50214b",
                              "entity_id": "cust_IdgAFZxYwwHctOk9ppZMu319",
                              "created_at": "2025-01-15T14:00:02.038Z",
                              "category": "EFFECT",
                              "event_source": {
                                "channel": "API",
                                "api_key": {
                                  "name": "Primary",
                                  "app_id": "34fdc483-066d-478b-a707-be2c7a3d3698"
                                }
                              }
                            },
                            "earning_rule": {
                              "id": "ern_FQxftbKUq9E93k00Z3qkC0sX",
                              "source": {
                                "banner": "Order-paid"
                              }
                            },
                            "order": {
                              "id": "ord_0ffc4ccac0d5d28b7a",
                              "source_id": "your_own_source_id_20250115-005"
                            }
                          },
                          "created_at": "2025-01-15T14:00:02.586Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "lopp_0ffd9661bd5207eb0a"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the member could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Member Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id NoSuchMemberId",
                      "request_id": "v-0ffd717a332d7dc9e8",
                      "resource_id": "NoSuchMemberId",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/pending-points/{pendingPointsId}/activate": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card code assigned to a particular customer."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "pendingPointsId",
          "in": "path",
          "required": true,
          "description": "Unique pending point identifier, assigned by Voucherify."
        }
      ],
      "post": {
        "operationId": "activate-member-pending-points",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Activate Member Pending Points",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nActivate manually the pending points and add them to the loyalty card. The pending points are determined by the pending point ID.\n\nOnce activated, the pending point entry with that ID is not listed by the endpoints: List member ([with campaign ID](/api-reference/loyalties/list-member-pending-points-with-campaign-id), [without campaign ID](/api-reference/loyalties/list-member-pending-points)), [List campaign pending points](/api-reference/loyalties/list-campaign-pending-points).\n\nThis **POST** method does not require a request body.\n\n<Tip>\n\n<Badge color=\"green\">Configuring pending points</Badge>\n\nPending points are configured as part of an earning rule with [POST Create earning rule](/api-reference/loyalties/create-earning-rule) or [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).\n\n</Tip>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns details about the activated pending points, the current point balance, and loyalty card in general.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersPendingPointsActivateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "points": 1,
                      "total": 11,
                      "balance": 10,
                      "type": "loyalty_card",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
                      },
                      "operation_type": "MANUAL"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the pending points have been already activated or canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Pending Points Already Activated": {
                    "value": {
                      "code": 400,
                      "key": "invalid_pending_points_state",
                      "message": "Invalid pending points state",
                      "details": "Only pending points in 'PENDING' status can be activated. Current status: 'ACTIVATED'.",
                      "request_id": "v-0ffdde51472d7dcb43"
                    }
                  },
                  "Pending Points Already Canceled": {
                    "value": {
                      "code": 400,
                      "key": "invalid_pending_points_state",
                      "message": "Invalid pending points state",
                      "details": "Only pending points in 'PENDING' status can be activated. Current status: 'CANCELED'.",
                      "request_id": "v-0ffdeecfb61d507caa"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the member or pending point ID could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Member Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id NoSuchMemberId",
                      "request_id": "v-0ffd717a332d7dc9e8",
                      "resource_id": "NoSuchMemberId",
                      "resource_type": "voucher"
                    }
                  },
                  "Pending Points Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find pending_points with id lopp_0ffc655c85207fe9b",
                      "request_id": "v-0ffdee011e1d507ba8",
                      "resource_id": "lopp_0ffc655c85207fe9b",
                      "resource_type": "pending_points"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/pending-points/{pendingPointsId}/balance": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card code assigned to a particular customer."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "pendingPointsId",
          "in": "path",
          "required": true,
          "description": "Unique pending point identifier, assigned by Voucherify."
        }
      ],
      "post": {
        "operationId": "adjust-member-pending-points",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Adjust Member Pending Points",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nAdjusts the pending points with a given ID. You can add or subtract the number of points.\n\n<Tip>\n\n<Badge color=\"green\">Configuring pending points</Badge>\n\nPending points are configured as part of an earning rule with [POST Create earning rule](/api-reference/loyalties/create-earning-rule) or [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).\n\n</Tip>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Define the number of pending points to be added or subtracted.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersPendingPointsBalanceRequestBody"
              },
              "examples": {
                "Add pending points": {
                  "value": {
                    "points": 10
                  }
                },
                "Subtract pending points": {
                  "value": {
                    "points": -10
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the details about the balance adjustment of the pending points with a given ID for a loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersPendingPointsBalanceResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "points": 5,
                      "total": 16,
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
                      },
                      "operation_type": "MANUAL"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the pending points have been already activated (manually or automatically), canceled, or the value would be 0 or negative.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid state of pending points": {
                    "value": {
                      "code": 400,
                      "key": "invalid_pending_points_state",
                      "message": "Invalid pending points state",
                      "details": "Only pending points in 'PENDING' status can be updated. Current status: 'ACTIVATED'.",
                      "request_id": "v-1038ed567c12003d7c"
                    }
                  },
                  "Results in 0 pending points": {
                    "value": {
                      "code": 400,
                      "key": "invalid_amount",
                      "message": "Invalid Amount",
                      "details": "Amount has to be a valid positive number",
                      "request_id": "v-0ffe8a8ca1e4bd52f9"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the member or pending point ID could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Pending point ID not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find pending_points with id lopp_1234a56b789cd012e",
                      "request_id": "v-1038ed92ce61bc45c4",
                      "resource_id": "lopp_1234a56b789cd012e",
                      "resource_type": "pending_points"
                    }
                  },
                  "Loyalty card not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id NoSuchLoyaltyCard",
                      "request_id": "v-1038edd6e1e1bc4628",
                      "resource_id": "NoSuchLoyaltyCard",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/pending-points/{pendingPointsId}/cancel": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card code assigned to a particular customer."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "pendingPointsId",
          "in": "path",
          "required": true,
          "description": "Unique pending point identifier, assigned by Voucherify."
        }
      ],
      "post": {
        "operationId": "cancel-member-pending-points",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Cancel Member Pending Points",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nCancel manually the pending points for the loyalty card. The pending points are determined by the pending point ID.\n\nOnce canceled, the pending point entry with that ID is not listed by the endpoints: List member ([with campaign ID](/api-reference/loyalties/list-member-pending-points-with-campaign-id), [without campaign ID](/api-reference/loyalties/list-member-pending-points)), [List campaign pending points](/api-reference/loyalties/list-campaign-pending-points).\n\nThis **POST** method does not require a request body and it returns an empty, 204, response.\n\n<Tip>\n\n<Badge color=\"green\">Configuring pending points</Badge>\n\nPending points are configured as part of an earning rule with [POST Create earning rule](/api-reference/loyalties/create-earning-rule) or [PUT Update earning rule](/api-reference/loyalties/update-earning-rule).\n\n</Tip>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the pending points are canceled successfully."
          },
          "400": {
            "description": "Returns an error if the pending points have been already activated or canceled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Pending Points Already Activated": {
                    "value": {
                      "code": 400,
                      "key": "invalid_pending_points_state",
                      "message": "Invalid pending points state",
                      "details": "Only pending points in 'PENDING' status can be canceled. Current status: 'ACTIVATED'.",
                      "request_id": "v-0ffdf782ee2d7de9ac"
                    }
                  },
                  "Pending Points Already Canceled": {
                    "value": {
                      "code": 400,
                      "key": "invalid_pending_points_state",
                      "message": "Invalid pending points state",
                      "details": "Only pending points in 'PENDING' status can be canceled. Current status: 'CANCELED'.",
                      "request_id": "v-0ffdf76cdeed7de98f"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the member or pending point ID could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Member Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id NoSuchMemberId",
                      "request_id": "v-0ffd717a332d7dc9e8",
                      "resource_id": "NoSuchMemberId",
                      "resource_type": "voucher"
                    }
                  },
                  "Pending Points Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find pending_points with id lopp_0ffc655c85207fe9b",
                      "request_id": "v-0ffdee011e1d507ba8",
                      "resource_id": "lopp_0ffc655c85207fe9b",
                      "resource_type": "pending_points"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/activity": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A code that identifies the loyalty card."
        }
      ],
      "get": {
        "operationId": "list-member-activity-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Activity with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieves the list of activities for the given member ID related to a voucher and customer who is the holder of the voucher.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderCreatedAt"
            },
            "in": "query",
            "name": "order",
            "description": "Apply this filter to order the events according the date and time when it was created. The dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the events starting after an event with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of event objects related to the loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMemberActivityListResponseBody"
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the member or campaign ID could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Member Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id NoSuchMemberId",
                      "request_id": "v-0fa4db65ae10686179",
                      "resource_id": "NoSuchMemberId",
                      "resource_type": "voucher"
                    }
                  },
                  "Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_AQZ1GLRlbGaC2dETd31VbJQ",
                      "request_id": "v-0fa4dbf5ebeb92bccd",
                      "resource_id": "camp_AQZ1GLRlbGaC2dETd31VbJQ",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/activity": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card assigned to a particular customer."
        }
      ],
      "get": {
        "operationId": "list-member-activity",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Activity",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\n\n<Note>\n\n<Badge color=\"blue\">Alternative endpoint</Badge>\n\nThis endpoint is an alternative to this [endpoint](/api-reference/loyalties/list-member-activity-with-campaign-id). The URL was re-designed to allow you to get member activities without having to provide the `campaignId` as a path parameter.\n\n</Note>\n\nRetrieves the list of activities for the given member ID related to a voucher and customer who is the holder of the voucher.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderCreatedAt"
            },
            "in": "query",
            "name": "order",
            "description": "Apply this filter to order the events according the date and time when it was created. The dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the events starting after an event with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of event objects related to the loyalty card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMemberActivityListResponseBody"
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the member ID could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Member Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id NoSuchMemberId",
                      "request_id": "v-0fa4db65ae10686179",
                      "resource_id": "NoSuchMemberId",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/balance": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A code that identifies the loyalty card."
        }
      ],
      "post": {
        "operationId": "update-loyalty-card-balance-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Adjust Loyalty Card Balance with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nThis method adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest. \n\n <Warning>\n\n<Badge color=\"yellow\">Async Action</Badge>\n\nThis is an async action. If you want to perform several add or remove loyalty card balance actions in a short time and their order matters, set up sufficient time-out between the calls.\n\n</Warning>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the point adjustment along with the expiration mechanism.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersBalanceUpdateRequestBody"
              },
              "examples": {
                "Add points": {
                  "value": {
                    "points": 100,
                    "expiration_type": "CUSTOM_DATE",
                    "expiration_date": "2023-05-30"
                  }
                },
                "Deduct points": {
                  "value": {
                    "points": -100
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a balance object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersBalanceUpdateResponseBody"
                },
                "examples": {
                  "Add balance": {
                    "value": {
                      "points": -100,
                      "total": 13436,
                      "balance": 13136,
                      "type": "loyalty_card",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF"
                      }
                    }
                  },
                  "Deduct balance": {
                    "value": {
                      "points": -100,
                      "total": 13436,
                      "balance": 13136,
                      "type": "loyalty_card",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the expiration date was defined incorrectly in the request payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid expiration date": {
                    "value": {
                      "code": 400,
                      "key": "invalid_expiration_date",
                      "message": "Invalid Expiration Date",
                      "details": "Expiration date cannot be set in the past",
                      "request_id": "v-0c118b1611424ca899"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/balance": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card assigned to a particular customer."
        }
      ],
      "post": {
        "operationId": "update-loyalty-card-balance",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Adjust Loyalty Card Balance",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nThis method gives adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest. \n\n\n\n <Warning>\n\n<Badge color=\"yellow\">Async Action</Badge>\n\nThis is an async action. If you want to perform several add or remove loyalty card balance actions in a short time and their order matters, set up sufficient time-out between the calls.\n\n</Warning>\n\n\n<Note>\n\n<Badge color=\"blue\">Alternative endpoint</Badge>\n\nThis endpoint is an alternative to this [endpoint](/api-reference/loyalties/adjust-loyalty-card-balance-with-campaign-id). The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the `campaignId` as a path parameter.\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the point adjustment along with the expiration mechanism.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersBalanceUpdateRequestBody"
              },
              "examples": {
                "Subtract points": {
                  "value": {
                    "points": -100
                  }
                },
                "Add Points": {
                  "value": {
                    "points": 100,
                    "expiration_type": "CUSTOM_DATE",
                    "expiration_date": "2023-05-30"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a balance object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersBalanceUpdateResponseBody"
                },
                "examples": {
                  "Subtract Points": {
                    "value": {
                      "points": 100,
                      "total": 13436,
                      "balance": 13136,
                      "type": "loyalty_card",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the expiration date was specified incorrectly in the request payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .expiration_date cannot be recognized as a ISO-8601 compliant date",
                      "request_id": "v-0c118c6f7c0e6751ab"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/transfers": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination)."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination)."
        }
      ],
      "post": {
        "operationId": "transfer-points",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Transfer Loyalty Points",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nTransfer points between different loyalty cards which have holders.\n\nProvide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters. In the request body, provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.\n\nTransfer works only for loyalty cards that have holders, meaning the cards were published to customers.\n\nThe transferred points expire according to the target program expiration rules.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersTransfersCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "code": "0PmQ7JQI",
                      "points": 1
                    },
                    {
                      "code": "kCeufB8i",
                      "points": 1
                    }
                  ]
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a loyalty card object for the loaded loyalty card, ie. the one that that points were transferred to from the other cards(s).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersTransfersCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                      "code": "MmFAzfDe",
                      "campaign": "Proportional Earning Rules",
                      "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                      "category": null,
                      "category_id": "cat_0b6152ce12414820de",
                      "categories": [],
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 13441,
                        "balance": 13141,
                        "next_expiration_date": "2022-11-30",
                        "next_expiration_points": 0
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX184kVdWUO/msrLg1G0MRf/Cs6QwSN3f6kyWCOTGdijyq8OfUbUpcGx6fjdeIpTf2UilFGNG8aCWVk/dXm/QEJ/sulXKDlUMWf+MN7TRG5LB+wuzqTy7csDBfRoJn0fURpwU4A6VZZSwBQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/RGZN9VwvkdI6B26PPZQZWjh33USr5NPMXbHuJVkxsH6TUyW/cXen1Lc7gaqik09BGiry0R4QIAP52jnxQuABOsW0HdYfglsLPY7IajGX5rJzZKDKuzioq2vRIPyuE6z03frAod7ptvQ==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T14:03:59.954Z",
                      "updated_at": "2022-11-28T17:58:25.607Z",
                      "holder_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 1,
                        "redeemed_points": 300,
                        "object": "list",
                        "url": "/v1/vouchers/MmFAzfDe/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/MmFAzfDe/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/transactions": {
      "parameters": [
        {
          "in": "path",
          "name": "campaignId",
          "description": "You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.",
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "required": true
        }
      ],
      "get": {
        "operationId": "list-loyalty-campaign-transactions",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Campaign Transactions",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieves all transactions for the campaign with the given campaign ID or campaign name.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListTransactions"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParametersFiltersListCampaignTransactions"
            },
            "description": "Filters for listing responses. The `id` filter denotes the unique transaction identifier.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with a `data` property that contains an array of transactions. The maximum number of transactions returned is determined by the `limit` query parameter. Each entry in the array is a separate transaction object. If more results are available, the `has_more` flag has value `true` and the value of the `more_starting_after` property can be used to retrieve another page of results.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesTransactionsListResponseBody"
                },
                "examples": {
                  "Loyalty campaign transactions": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "vtx_0f9159e2a055e41e16",
                          "source_id": null,
                          "voucher_id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
                          "campaign_id": "camp_5Hn0NM3Uf77tC3IV3kX5un36",
                          "source": null,
                          "reason": null,
                          "type": "POINTS_REDEMPTION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 283,
                              "object": "balance",
                              "points": -50,
                              "balance": 23,
                              "operation_type": "AUTOMATIC",
                              "related_object": {
                                "id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
                                "type": "voucher"
                              }
                            },
                            "redemption": {
                              "id": "r_0f9159e29815e41e08"
                            },
                            "reward": {
                              "id": "rew_GCq9usMjLffVacs0mlyMmDZo",
                              "name": "Material"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2024-10-24T12:19:45.597Z"
                        },
                        {
                          "id": "vtx_0f9159e1a48b219c95",
                          "source_id": null,
                          "voucher_id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
                          "campaign_id": "camp_5Hn0NM3Uf77tC3IV3kX5un36",
                          "source": "voucherify-web-ui",
                          "reason": "Apology addition",
                          "type": "POINTS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 283,
                              "object": "balance",
                              "points": 50,
                              "balance": 73,
                              "operation_type": "MANUAL",
                              "related_object": {
                                "id": "v_GNSRFoVlW2ny8uTOHhXRGvkwocR9jQ44",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2024-10-24T12:19:44.902Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "vtx_0f9159e1a48b219c95"
                    }
                  },
                  "Other campaign types - empty data": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [],
                      "total": 0
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/transactions/export": {
      "parameters": [
        {
          "in": "path",
          "name": "campaignId",
          "description": "You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.",
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "required": true
        }
      ],
      "post": {
        "operationId": "export-loyalty-campaign-transactions",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "summary": "Export Loyalty Campaign Transactions",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nExport transactions is an asynchronous process that generates a CSV file with the data about or point movements on all loyalty cards in a given campaign.\n\nTo export transactions:\n1. In the export request, use parameters to select which fields will be exported, in what order, and which data will be filtered.\n2. Use the returned `id` to track the export status with the [GET Export](/api-reference/exports/get-export) method.\n3. In the GET Export method, when the returned `status` field has the `DONE` value, the export file has been generated.\n4. Use the URL in the `result` property to download the file. You must be logged to your Voucherify account on a given cluster in the browser to be able to download the file.\n\nAn export request will almost always result in a single file being generated by the system. However, when the data volume is large, the system may split the results into multiple files.\n\nAn example export file can look as follows:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| `id` | Unique transaction ID. | `vtx_0cb7811f1c07765800` |\n| `type` | Transaction type. | - `POINTS_ACCRUAL`<br />- `POINTS_REDEMPTION`<br />- `POINTS_REFUND`<br />- `POINTS_ADDITION`<br />- `POINTS_REMOVAL`<br />- `POINTS_EXPIRATION`<br />- `POINTS_TRANSFER_IN`<br />- `POINTS_TRANSFER_OUT` |\n| `source_id` | Unique transaction source ID. Optional and only in manual operations: `POINTS_ADDITION`, `POINTS_REMOVAL`, `POINTS_TRANSFER_OUT`. | 8638 |\n| `reason` | Contains the reason for the transaction if one was included originally. Optional and only in the following manual operations: `POINTS_ADDITION`, `POINTS_REMOVAL`, `POINTS_TRANSFER_OUT`, `POINTS_TRANSFER_IN`. | `Apology for sending a broken item` |\n| `balance` | The gift card or loyalty card balance after the transaction. |  |\n| `amount` | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. |  |\n| `created_at` | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | `2024-10-09T09:16:32.521Z`  |\n| `voucher_id` | Unique voucher ID. | `v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp` |\n| `source`|  Channel through which the transaction was initiated. | `API` |\n| `details` | More detailed information stored in the form of JSON. | Provides more details related to the transaction in the form of an object. |\n| `related_transaction_id` | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | `vtx_0c9afe802593b34b80` |\n\n<Tip>\n\n<Badge color=\"green\">Export Campaign Transactions</Badge>\n\nThis method works in the same way the [POST Export Campaign Transactions](/api-reference/campaigns/export-campaign-transactions) does, but it is limited to loyalty campaigns only. The POST Export Campaign Transactions method can also export gift card campaign transactions.\n\n</Tip>",
        "requestBody": {
          "description": "Specify the parameters for the transaction export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesTransactionsExportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "order": "-created_at",
                    "parameters": {
                      "fields": [
                        "id",
                        "type",
                        "source_id",
                        "created_at"
                      ],
                      "filters": {
                        "created_at": {
                          "conditions": {
                            "$after": [
                              "2024-10-01T00:00:00.000Z"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "An object representing an export.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsTransactionsExportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "exp_KBunyG5vwkuF3jSWD03kmnLx",
                      "object": "export",
                      "created_at": "2024-10-25T14:35:12.019Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "fields": [
                          "id",
                          "type",
                          "source_id",
                          "created_at"
                        ],
                        "filters": {
                          "junction": "AND",
                          "created_at": {
                            "conditions": {
                              "$after": [
                                "2024-10-01T00:00:00.000Z"
                              ]
                            }
                          },
                          "campaign_id": {
                            "conditions": {
                              "$in": [
                                "camp_5pgKwSKsAeQtFkRz6mfKpxxD"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  },
                  "No request body": {
                    "value": {
                      "id": "exp_FE04bvkl4J5GQCb99Q5o7Gxa",
                      "object": "export",
                      "created_at": "2024-10-25T15:15:11.698Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "filters": {
                          "campaign_id": {
                            "conditions": {
                              "$in": [
                                "camp_5pgKwSKsAeQtFkRz6mfKpxxD"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if an ID of a campaign with a wrong type is sent.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "key": "forbidden",
                      "message": "Forbidden",
                      "details": "Transactions are allowed only for loyalty or gift campaigns",
                      "request_id": "v-0f92ce8ff74946d25f"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_5pgKwSKsAeQtFkRzmfKpxxD",
                      "request_id": "v-0f92ccbb058946d005",
                      "resource_id": "camp_5pgKwSKsAeQtFkRzmfKpxxD",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/transactions": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A unique code identifying the loyalty card that you are looking to retrieve transaction data for."
        }
      ],
      "get": {
        "operationId": "list-loyalty-card-transactions-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Card Transactions with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve transaction data related to point movements for a specific loyalty card.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListTransactions"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListMemberTransactions"
            },
            "description": "Filters for listing member transactions. `id` is the unique identifier of the transaction.",
            "style": "deepObject",
            "explode": true
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of loyalty card transaction objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersTransactionsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "vtx_0c9dd3c2e392f78613",
                          "source_id": "20230317_transfer_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "API",
                          "reason": "Transferring points to card",
                          "type": "POINTS_TRANSFER_OUT",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1396,
                              "object": "balance",
                              "points": -1,
                              "balance": 1396,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "destination_voucher": {
                              "id": "v_Wak6xlf5WdR4rIcvJxC2olOopk0boK6t",
                              "code": "LOYALTY-CARD-A8XVurg",
                              "type": "LOYALTY_CARD",
                              "campaign": "Loyalty Campaign - Test Initial Points",
                              "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                              "loyalty_card": {
                                "points": 1102,
                                "balance": 1102,
                                "next_expiration_date": "2023-12-31",
                                "next_expiration_points": 102
                              },
                              "is_referral_code": false
                            }
                          },
                          "related_transaction_id": "vtx_0c9dd3c2e392f78614",
                          "created_at": "2023-03-17T16:20:33.807Z"
                        },
                        {
                          "id": "vtx_0c9dd2527696ba081b",
                          "source_id": "20230317_add_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": "Adding points to card",
                          "type": "POINTS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1397,
                              "object": "balance",
                              "points": 100,
                              "balance": 1397,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T16:14:16.524Z"
                        },
                        {
                          "id": "vtx_0c9dd1ce1d403f4204",
                          "source_id": "20230317_subtract_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": "Subtracting points from card",
                          "type": "POINTS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1297,
                              "object": "balance",
                              "points": -1,
                              "balance": 1297,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T16:12:00.981Z"
                        },
                        {
                          "id": "vtx_0c9c21df658d03ce3f",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "Automation",
                          "reason": null,
                          "type": "POINTS_ACCRUAL",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1298,
                              "object": "balance",
                              "points": 200,
                              "balance": 1298,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_QZEKPzYATFjGoos4DonMg0fd",
                              "source_id": "s"
                            },
                            "event": {
                              "id": "evcus_0c9c21def34e3c05bf",
                              "type": "customer.order.paid"
                            },
                            "earning_rule": {
                              "id": "ern_2WsCIBEx6Lzf5IAV5IOR7a23",
                              "source": {
                                "banner": "Order paid"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-16T08:44:52.333Z"
                        },
                        {
                          "id": "vtx_0c9b09673f8a862a51",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": null,
                          "type": "POINTS_REFUND",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1098,
                              "object": "balance",
                              "points": 1000,
                              "balance": 1098,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_DH2gGDlDWB1hRImf1VVB4EIH",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c9b08fe4b80897849"
                            },
                            "rollback": {
                              "id": "rr_0c9b0967244a862a33"
                            },
                            "reward": {
                              "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                              "name": "100 = $20"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:19:29.149Z"
                        },
                        {
                          "id": "vtx_0c9b08fe530089785c",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": null,
                          "type": "POINTS_REDEMPTION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1098,
                              "object": "balance",
                              "points": -1000,
                              "balance": 98,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_DH2gGDlDWB1hRImf1VVB4EIH",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c9b08fe4b80897849"
                            },
                            "reward": {
                              "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                              "name": "100 = $20"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:17:41.708Z"
                        },
                        {
                          "id": "vtx_0c9b074afed3b30e4b",
                          "source_id": "20230309_add_points_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "voucherify-web-ui",
                          "reason": "Customer purchased points at kiosk.",
                          "type": "POINTS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1098,
                              "object": "balance",
                              "points": 100,
                              "balance": 1098,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:10:15.917Z"
                        },
                        {
                          "id": "vtx_0c9b073072408969d1",
                          "source_id": "20230309_subtract_points_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "voucherify-web-ui",
                          "reason": "Customer used points to obtain tickets.",
                          "type": "POINTS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 998,
                              "object": "balance",
                              "points": -1,
                              "balance": 998,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:09:48.735Z"
                        },
                        {
                          "id": "vtx_0c9afe802593b34b80",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "API",
                          "reason": null,
                          "type": "POINTS_TRANSFER_OUT",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 999,
                              "object": "balance",
                              "points": -1,
                              "balance": 999,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "destination_voucher": {
                              "id": "v_Wak6xlf5WdR4rIcvJxC2olOopk0boK6t",
                              "code": "LOYALTY-CARD-A8XVurg",
                              "type": "LOYALTY_CARD",
                              "campaign": "Loyalty Campaign - Test Initial Points",
                              "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                              "loyalty_card": {
                                "points": 1001,
                                "balance": 1001,
                                "next_expiration_date": "2023-12-31",
                                "next_expiration_points": 1
                              },
                              "is_referral_code": false
                            }
                          },
                          "related_transaction_id": "vtx_0c9afe802593b34b81",
                          "created_at": "2023-03-15T11:31:51.062Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "vtx_0c9afe802593b34b80"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/transactions": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A unique code identifying the loyalty card that you are looking to retrieve transaction data for."
        }
      ],
      "get": {
        "operationId": "list-loyalty-card-transactions",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Card Transactions",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve transaction data related to point movements for a specific loyalty card.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListTransactions"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListMemberTransactions"
            },
            "description": "Filters for listing member transactions. `id` is the unique identifier of the transaction.",
            "style": "deepObject",
            "explode": true
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the transactions starting after a transaction with the given ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of loyalty card transaction objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersTransactionsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "vtx_0c9dd3c2e392f78613",
                          "source_id": "20230317_transfer_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "API",
                          "reason": "Transferring points to card",
                          "type": "POINTS_TRANSFER_OUT",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1396,
                              "object": "balance",
                              "points": -1,
                              "balance": 1396,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "destination_voucher": {
                              "id": "v_Wak6xlf5WdR4rIcvJxC2olOopk0boK6t",
                              "code": "LOYALTY-CARD-A8XVurg",
                              "type": "LOYALTY_CARD",
                              "campaign": "Loyalty Campaign - Test Initial Points",
                              "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                              "loyalty_card": {
                                "points": 1102,
                                "balance": 1102,
                                "next_expiration_date": "2023-12-31",
                                "next_expiration_points": 102
                              },
                              "is_referral_code": false
                            }
                          },
                          "related_transaction_id": "vtx_0c9dd3c2e392f78614",
                          "created_at": "2023-03-17T16:20:33.807Z"
                        },
                        {
                          "id": "vtx_0c9dd2527696ba081b",
                          "source_id": "20230317_add_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": "Adding points to card",
                          "type": "POINTS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1397,
                              "object": "balance",
                              "points": 100,
                              "balance": 1397,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T16:14:16.524Z"
                        },
                        {
                          "id": "vtx_0c9dd1ce1d403f4204",
                          "source_id": "20230317_subtract_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": "Subtracting points from card",
                          "type": "POINTS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1297,
                              "object": "balance",
                              "points": -1,
                              "balance": 1297,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T16:12:00.981Z"
                        },
                        {
                          "id": "vtx_0c9c21df658d03ce3f",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "Automation",
                          "reason": null,
                          "type": "POINTS_ACCRUAL",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1298,
                              "object": "balance",
                              "points": 200,
                              "balance": 1298,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_QZEKPzYATFjGoos4DonMg0fd",
                              "source_id": "s"
                            },
                            "event": {
                              "id": "evcus_0c9c21def34e3c05bf",
                              "type": "customer.order.paid"
                            },
                            "earning_rule": {
                              "id": "ern_2WsCIBEx6Lzf5IAV5IOR7a23",
                              "source": {
                                "banner": "Order paid"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-16T08:44:52.333Z"
                        },
                        {
                          "id": "vtx_0c9b09673f8a862a51",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": null,
                          "type": "POINTS_REFUND",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1098,
                              "object": "balance",
                              "points": 1000,
                              "balance": 1098,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_DH2gGDlDWB1hRImf1VVB4EIH",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c9b08fe4b80897849"
                            },
                            "rollback": {
                              "id": "rr_0c9b0967244a862a33"
                            },
                            "reward": {
                              "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                              "name": "100 = $20"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:19:29.149Z"
                        },
                        {
                          "id": "vtx_0c9b08fe530089785c",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": null,
                          "reason": null,
                          "type": "POINTS_REDEMPTION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1098,
                              "object": "balance",
                              "points": -1000,
                              "balance": 98,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_DH2gGDlDWB1hRImf1VVB4EIH",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c9b08fe4b80897849"
                            },
                            "reward": {
                              "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                              "name": "100 = $20"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:17:41.708Z"
                        },
                        {
                          "id": "vtx_0c9b074afed3b30e4b",
                          "source_id": "20230309_add_points_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "voucherify-web-ui",
                          "reason": "Customer purchased points at kiosk.",
                          "type": "POINTS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 1098,
                              "object": "balance",
                              "points": 100,
                              "balance": 1098,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:10:15.917Z"
                        },
                        {
                          "id": "vtx_0c9b073072408969d1",
                          "source_id": "20230309_subtract_points_1",
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "voucherify-web-ui",
                          "reason": "Customer used points to obtain tickets.",
                          "type": "POINTS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 998,
                              "object": "balance",
                              "points": -1,
                              "balance": 998,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-15T12:09:48.735Z"
                        },
                        {
                          "id": "vtx_0c9afe802593b34b80",
                          "source_id": null,
                          "voucher_id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                          "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                          "source": "API",
                          "reason": null,
                          "type": "POINTS_TRANSFER_OUT",
                          "details": {
                            "balance": {
                              "type": "loyalty_card",
                              "total": 999,
                              "object": "balance",
                              "points": -1,
                              "balance": 999,
                              "related_object": {
                                "id": "v_lWRrcwNm0vqxBaU5nsSMzRRHusCsS4Vl",
                                "type": "voucher"
                              }
                            },
                            "destination_voucher": {
                              "id": "v_Wak6xlf5WdR4rIcvJxC2olOopk0boK6t",
                              "code": "LOYALTY-CARD-A8XVurg",
                              "type": "LOYALTY_CARD",
                              "campaign": "Loyalty Campaign - Test Initial Points",
                              "campaign_id": "camp_LyAZf94hbZaUbSdKIeAJpjRp",
                              "loyalty_card": {
                                "points": 1001,
                                "balance": 1001,
                                "next_expiration_date": "2023-12-31",
                                "next_expiration_points": 1
                              },
                              "is_referral_code": false
                            }
                          },
                          "related_transaction_id": "vtx_0c9afe802593b34b81",
                          "created_at": "2023-03-15T11:31:51.062Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "vtx_0c9afe802593b34b80"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/transactions/export": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A unique code identifying the loyalty card that you are looking to export transaction data for."
        }
      ],
      "post": {
        "operationId": "export-loyalty-card-transactions",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Export Loyalty Card Transactions",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nExport transactions that are associated with point movements on a loyalty card.\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID assigned by Voucherify. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `POINTS_EXPIRATION` <br /> - `POINTS_ADDITION` <br /> - `POINTS_REMOVAL` <br /> - `POINTS_TRANSFER_OUT` <br /> - `POINTS_ACCRUAL` <br /> - `POINTS_REFUND` <br /> - `POINTS_REDEMPTION` |\n| source_id | Custom source ID of the transaction if one was included originally. | source_id_custom |\n| reason | Contains the reason for the transaction if one was included originally. |  |\n| balance | The loyalty card balance after the transaction. |  |\n| amount | The amount of loyalty points being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. |  |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z  |\n| voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp |\n| campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV |\n| source|  Channel through which the transaction was initiated. | - `API` <br /> - `voucherify-web-ui` <br /> - `Automation` |\n| details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. |\n| related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 |",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters and filters for the transaction export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersTransactionsExportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "parameters": {
                      "order": "-created_at",
                      "fields": [
                        "id",
                        "type",
                        "source_id",
                        "reason",
                        "balance",
                        "amount",
                        "created_at",
                        "voucher_id",
                        "campaign_id",
                        "details",
                        "related_transaction_id"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns an export object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersTransactionsExportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "exp_8Fwd6Z8NS67ZH314KRtm5xXE",
                      "object": "export",
                      "created_at": "2023-03-21T13:50:43.286Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "order": "-created_at",
                        "fields": [
                          "id",
                          "type",
                          "source_id",
                          "reason",
                          "balance",
                          "amount",
                          "created_at",
                          "voucher_id",
                          "campaign_id",
                          "details",
                          "related_transaction_id"
                        ],
                        "filters": {
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "LOYALTY-CARD-2IAoDNF"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  },
                  "No request body": {
                    "value": {
                      "id": "exp_ExEE5A6OIK4tssuNswr5O6SU",
                      "object": "export",
                      "created_at": "2023-03-21T13:34:57.034Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "filters": {
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "HRwc0oHz"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id IrKORhS",
                      "request_id": "v-0a96cd820301c0483a",
                      "resource_id": "IrKORhS",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/transactions/export": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A unique code identifying the loyalty card that you are looking to export transaction data for."
        }
      ],
      "post": {
        "operationId": "export-loyalty-card-transactions-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Export Loyalty Card Transactions with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nExport transactions that are associated with point movements on a loyalty card.\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID assigned by Voucherify. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `POINTS_EXPIRATION` <br /> - `POINTS_ADDITION` <br /> - `POINTS_REMOVAL` <br /> - `POINTS_TRANSFER_OUT` <br /> - `POINTS_ACCRUAL` <br /> - `POINTS_REFUND` <br /> - `POINTS_REDEMPTION` |\n| source_id | Custom source ID of the transaction if one was included originally. | source_id_custom |\n| reason | Contains the reason for the transaction if one was included originally. |  |\n| balance | The loyalty card balance after the transaction. |  |\n| amount | The amount of loyalty points being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. |  |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z  |\n| voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp |\n| campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV |\n| source|  Channel through which the transaction was initiated. | - `API` <br /> - `voucherify-web-ui` <br /> - `Automation` |\n| details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. |\n| related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 |",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters and filters for the transaction export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersTransactionsExportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "parameters": {
                      "order": "-created_at",
                      "fields": [
                        "id",
                        "type",
                        "source_id",
                        "reason",
                        "balance",
                        "amount",
                        "created_at",
                        "voucher_id",
                        "campaign_id",
                        "details",
                        "related_transaction_id"
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns an export object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersTransactionsExportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "exp_8Fwd6Z8NS67ZH314KRtm5xXE",
                      "object": "export",
                      "created_at": "2023-03-21T13:50:43.286Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "order": "-created_at",
                        "fields": [
                          "id",
                          "type",
                          "source_id",
                          "reason",
                          "balance",
                          "amount",
                          "created_at",
                          "voucher_id",
                          "campaign_id",
                          "details",
                          "related_transaction_id"
                        ],
                        "filters": {
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "LOYALTY-CARD-2IAoDNF"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  },
                  "No request body": {
                    "value": {
                      "id": "exp_ExEE5A6OIK4tssuNswr5O6SU",
                      "object": "export",
                      "created_at": "2023-03-21T13:34:57.034Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "voucher_transactions",
                      "parameters": {
                        "filters": {
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "HRwc0oHz"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the voucher code does not exist or has been deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id IrKORhS",
                      "request_id": "v-0a96cd820301c0483a",
                      "resource_id": "IrKORhS",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/points-expiration": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Loyalty card code."
        }
      ],
      "get": {
        "operationId": "list-points-expiration",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Card Point Expiration",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the [Exports API](/api-reference/exports/create-export) to retrieve a list of both `ACTIVE` and `EXPIRED` point buckets.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of loyalty points expiration buckets along with an expiration date if the points are due to expire. No expiration date parameter is returned if the loyalty points bucket does not expire.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersPointsExpirationListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "lopb_ERSwDxeWTlvWwFrn3AtJxt3s",
                          "voucher_id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                          "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "bucket": {
                            "total_points": 2
                          },
                          "status": "ACTIVE",
                          "expires_at": "2022-11-25",
                          "created_at": "2022-11-25T09:10:20.994Z",
                          "object": "loyalty_points_bucket"
                        },
                        {
                          "id": "lopb_zdeIBq3EsnPnRSDa7Tyyb6X2",
                          "voucher_id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                          "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "bucket": {
                            "total_points": 12
                          },
                          "status": "ACTIVE",
                          "expires_at": "2022-11-30",
                          "created_at": "2022-11-21T13:49:54.949Z",
                          "object": "loyalty_points_bucket"
                        },
                        {
                          "id": "lopb_Mg80vhZtqHFItWlJFYZ2rJAS",
                          "voucher_id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                          "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "bucket": {
                            "total_points": 0
                          },
                          "status": "ACTIVE",
                          "expires_at": "2023-05-30",
                          "created_at": "2022-06-09T11:07:07.344Z",
                          "updated_at": "2022-08-30T08:34:45.989Z",
                          "object": "loyalty_points_bucket"
                        },
                        {
                          "id": "lopb_dQE1TwyTkHAJDlVCPlqSC0nu",
                          "voucher_id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                          "campaign_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "bucket": {
                            "total_points": 13124
                          },
                          "status": "ACTIVE",
                          "created_at": "2022-02-28T12:13:57.749Z",
                          "updated_at": "2022-11-25T09:09:51.136Z",
                          "object": "loyalty_points_bucket"
                        }
                      ],
                      "total": 4
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/points-expiration/export": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID or name."
        }
      ],
      "post": {
        "operationId": "create-points-expiration-export",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Export Loyalty Campaign Point Expiration",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nSchedule the generation of a point expiration CSV file for a particular campaign. It can list point buckets, which can have an `ACTIVE` or `EXPIRED` status.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the data filters, types of data to return and order in which the results should be returned.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesPointsExpirationExportCreateRequestBody"
              },
              "examples": {
                "Specific Vouchers": {
                  "value": {
                    "parameters": {
                      "fields": [
                        "id",
                        "campaign_id",
                        "voucher_id",
                        "status",
                        "expires_at",
                        "points"
                      ],
                      "order": "-expires_at",
                      "filters": {
                        "junction": "and",
                        "voucher_id": {
                          "conditions": {
                            "$in": [
                              "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                              "v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655"
                            ]
                          }
                        }
                      }
                    }
                  }
                },
                "Specific campaign": {
                  "value": {
                    "parameters": {
                      "fields": [
                        "id",
                        "campaign_id",
                        "voucher_id",
                        "status",
                        "expires_at",
                        "points"
                      ],
                      "order": "-expires_at",
                      "filters": {
                        "junction": "and",
                        "campaign_id": {
                          "conditions": {
                            "$is": "camp_7s3uXI44aKfIk5IhmeOPr6ic"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns an object with the export ID of the scheduled generation of CSV file with exported points expirations. You can use either the [Download Export](/api-reference/exports/download-export) endpoint to download the CSV file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesPointsExpirationExportCreateResponseBody"
                },
                "examples": {
                  "Specific Vouchers": {
                    "value": {
                      "id": "exp_zC3eXAFss17XTMzMkkov4KGq",
                      "object": "export",
                      "created_at": "2022-11-28T13:00:23.621Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "points_expiration",
                      "parameters": {
                        "order": "-expires_at",
                        "fields": [
                          "id",
                          "campaign_id",
                          "voucher_id",
                          "status",
                          "expires_at",
                          "points"
                        ],
                        "filters": {
                          "junction": "and",
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF",
                                "v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655"
                              ]
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  },
                  "Specific Campaign": {
                    "value": {
                      "id": "exp_kfwVDMsavDHl2vOY6vH9q7P7",
                      "object": "export",
                      "created_at": "2022-11-28T16:46:34.148Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "points_expiration",
                      "parameters": {
                        "order": "-expires_at",
                        "fields": [
                          "id",
                          "campaign_id",
                          "voucher_id",
                          "status",
                          "expires_at",
                          "points"
                        ],
                        "filters": {
                          "junction": "and",
                          "campaign_id": {
                            "conditions": {
                              "$is": "camp_7s3uXI44aKfIk5IhmeOPr6ic"
                            }
                          }
                        }
                      },
                      "result": null,
                      "user_id": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/earning-rules": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        }
      ],
      "get": {
        "operationId": "list-earning-rules",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Earning Rules",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nReturns a list of all earning rules within a given campaign.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListEarningRules"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of earning rules.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesEarningRulesListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ern_HnRXyJHoj3E79r3KUWhgMgtD",
                          "created_at": "2022-11-10T12:25:12.927Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 100,
                            "type": "FIXED"
                          },
                          "segment": {
                            "id": "seg_n3vVcU5t0m3rs4rEPr3C1oU5"
                          },
                          "event": "customer.segment.entered",
                          "source": {
                            "banner": "New Customers",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_0gv3v7jQG5U6TtVC8bMEdIap",
                          "metadata": {}
                        },
                        {
                          "id": "ern_raVUcdXruvXGuzm682ESrAzt",
                          "created_at": "2022-11-24T09:03:14.534Z",
                          "updated_at": "2022-11-25T07:31:42.778Z",
                          "validation_rule_id": "val_7SxpdhPeBngA",
                          "loyalty": {
                            "points": 20,
                            "type": "FIXED"
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order has been paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "start_date": "2022-11-23T00:00:00.000Z",
                          "expiration_date": "2022-11-30T00:00:00.000Z",
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ],
                          "object": "earning_rule",
                          "automation_id": "auto_MbEIyLbn7pHyba5Qw5eeb35L",
                          "metadata": {
                            "Type": "Order has been paid - Fixed"
                          }
                        },
                        {
                          "id": "ern_BmDiQs7T3UHfJQqtI2RfJHFR",
                          "created_at": "2022-11-24T14:48:36.567Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_AMOUNT",
                            "order": {
                              "amount": {
                                "every": 1000,
                                "points": 1
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_IKanVw37J6oFuRrdnryXw8Lz",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 1"
                          }
                        },
                        {
                          "id": "ern_jwtacKdEEHoc85QbouRw3CR8",
                          "created_at": "2022-11-24T15:17:11.539Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_TOTAL_AMOUNT",
                            "order": {
                              "total_amount": {
                                "every": 1100,
                                "points": 1
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order has been paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_Y6IWqhz0cHGkKcteU9PS5nmK",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 2"
                          }
                        },
                        {
                          "id": "ern_fxVdmtJ4u4rlyoH2hIq7m1PQ",
                          "created_at": "2022-11-24T15:20:04.392Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_METADATA",
                            "order": {
                              "metadata": {
                                "every": 10,
                                "points": 2,
                                "property": "number_of_store_visits"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_HyowcdKQ0lsQ1rSxV5tyYr2z",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 3 - Metadata"
                          }
                        },
                        {
                          "id": "ern_Aop1wTrmPv4yBntDcvXNTCWR",
                          "created_at": "2022-11-24T15:23:44.514Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_ITEMS_AMOUNT",
                            "order_items": {
                              "amount": {
                                "every": 1000,
                                "points": 3,
                                "object": "products_collection",
                                "id": "pc_75U0dHlr7u75BJodrW1AE3t6"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_EXRyQ0z0rgtF54PKDGGAF1qg",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 4"
                          }
                        },
                        {
                          "id": "ern_4qSQVjfGEH7OmXKMzotS0juY",
                          "created_at": "2022-11-24T15:44:45.301Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_ITEMS_SUBTOTAL_AMOUNT",
                            "order_items": {
                              "subtotal_amount": {
                                "every": 1000,
                                "points": 4,
                                "object": "sku",
                                "id": "sku_0b7d7dfb090be5c619"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_ID3xLPXCdnOaveJYWiulcNFW",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 5 - Items"
                          }
                        },
                        {
                          "id": "ern_aJyt4wIrXhmfMxvrLoZjBYrP",
                          "created_at": "2022-11-24T15:56:58.710Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_ITEMS_AMOUNT",
                            "order_items": {
                              "amount": {
                                "every": 10000,
                                "points": 1,
                                "object": "product",
                                "id": "prod_0bae32322150fd0546"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_EbBqD1SNW70vgDp5icGbWl3e",
                          "metadata": {}
                        },
                        {
                          "id": "ern_v4Blmh9hA3gpnjo93cMAgvHr",
                          "created_at": "2022-11-24T16:19:20.571Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 1,
                                "points": 5,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "segment": {
                            "id": "seg_OlE7DmfzMI5pHyD5VAv512r1"
                          },
                          "event": "customer.segment.entered",
                          "source": {
                            "banner": "Entered Segment",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_wMMDJ86iHKkznz9x0506e30E",
                          "metadata": {}
                        },
                        {
                          "id": "ern_L8dFanPxJzhw0f5voTwPurGP",
                          "created_at": "2022-11-24T16:27:13.917Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 3,
                            "type": "FIXED"
                          },
                          "custom_event": {
                            "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                          },
                          "event": "page_view",
                          "source": {
                            "banner": "Custom Event",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_9N69OJzGKGhp2mo7SNsnsF5b",
                          "metadata": {
                            "Type": "Fixed"
                          }
                        },
                        {
                          "id": "ern_ngdugZ2hzg35hGASFF8nDjUO",
                          "created_at": "2022-11-24T16:41:48.830Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOM_EVENT_METADATA",
                            "custom_event": {
                              "metadata": {
                                "every": 2,
                                "points": 2,
                                "property": "volume_number"
                              }
                            }
                          },
                          "custom_event": {
                            "schema_id": "ms_qpRZ3EmRQyszNH6Z52Gkq8au"
                          },
                          "event": "user_subscribed",
                          "source": {
                            "banner": "Custom Event",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_v1eTxL7X63B5IkYgRWHK4leh",
                          "metadata": {
                            "Type": "Event"
                          }
                        },
                        {
                          "id": "ern_afo3Ea760hAKv07JYpycnhiE",
                          "created_at": "2022-11-24T16:50:12.945Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 3,
                                "points": 3,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "custom_event": {
                            "schema_id": "ms_f0r4hcu5T0m3v3nT5ch3ma"
                          },
                          "event": "cart_abandoned",
                          "source": {
                            "banner": "Custom Event",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_7ovoKiXx49fe3nnhEbDlp9FP",
                          "metadata": {}
                        },
                        {
                          "id": "ern_chdlG14W8Sdcq3d6jJQQgRMT",
                          "created_at": "2022-11-24T16:51:31.595Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 1,
                            "type": "FIXED"
                          },
                          "event": "customer.loyalty.tier.joined",
                          "loyalty_tier": {
                            "id": "__ANY__"
                          },
                          "source": {
                            "banner": "Tier joined - Any",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_W9yMQTz5fgQTgmuu6pTVraBW",
                          "metadata": {
                            "Type": "Tier joined  - any - fixed"
                          }
                        },
                        {
                          "id": "ern_gVo6CHBduFPoh1hctASfXHLT",
                          "created_at": "2022-11-24T17:01:42.809Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 4,
                                "points": 4,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "event": "customer.loyalty.tier.joined",
                          "loyalty_tier": {
                            "id": "ltr_pudTGWasuIqxdiDM0go31OV1"
                          },
                          "source": {
                            "banner": "Tier joined",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_wdlEo17wmoqYHGfilbayEUj7",
                          "metadata": {
                            "Type": "Tier joined - customer metadata - proportional"
                          }
                        },
                        {
                          "id": "ern_66OdCyLADv5IGFoQe18vGUwa",
                          "created_at": "2022-11-24T17:03:59.414Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 2,
                                "points": 2,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "event": "customer.loyalty.tier.left",
                          "loyalty_tier": {
                            "id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2"
                          },
                          "source": {
                            "banner": "Tier left",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_czm5el1Uz1jeGaO97AYoDNAq",
                          "metadata": {
                            "Type": "Tier left"
                          }
                        },
                        {
                          "id": "ern_YR3fDfCjAmz9a5D68nk0i4dm",
                          "created_at": "2022-11-25T07:29:38.961Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 3,
                                "points": 4,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "event": "customer.loyalty.tier.upgraded",
                          "loyalty_tier": {
                            "id": "ltr_30KHciA0UG8B71Fo51GZqwgN"
                          },
                          "source": {
                            "banner": "Tier upgraded",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_M1OdRH8spk6Fs7yTuPLN2LAv",
                          "metadata": {
                            "Type": "Upgraded"
                          }
                        },
                        {
                          "id": "ern_A2RArBE30Tkt56utVLrRv7rZ",
                          "created_at": "2022-11-25T07:31:05.866Z",
                          "updated_at": "2022-11-25T07:31:43.029Z",
                          "validation_rule_id": "val_kfmWpfXMI9P1",
                          "loyalty": {
                            "points": 1,
                            "type": "FIXED"
                          },
                          "event": "customer.loyalty.tier.downgraded",
                          "loyalty_tier": {
                            "id": "__ANY__"
                          },
                          "source": {
                            "banner": "Tier Downgraded",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_TMVZtCNMBgZm0KcPJ7otiHZW",
                          "metadata": {
                            "Type": "Tier"
                          }
                        },
                        {
                          "id": "ern_AdlWO2yt6b6llWsibIdiRXVE",
                          "created_at": "2022-11-25T07:31:42.767Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 5,
                            "type": "FIXED"
                          },
                          "event": "customer.loyalty.tier.prolonged",
                          "loyalty_tier": {
                            "id": "__ANY__"
                          },
                          "source": {
                            "banner": "Prolonged",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_4jH1yq9WJS0oJ8suagCrltyb",
                          "metadata": {}
                        }
                      ],
                      "total": 18
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-earning-rule",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Create Earning Rule",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nCreate earning rules for a loyalty campaign.\n\n<Warning>\n\n<Badge color=\"yellow\">Maximum number of earning rules</Badge>\n\nYou can create up to 100 earning rules per project. The limit can be customized for clients with a single-tenant setup.\n\n</Warning>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Customize the request body based on the type of earning rules you would like to create. The request body is an array of objects. The required minimum properties to include in the payload for each object are `event` and `loyalty`. Additionally, if you choose to add a `validity_timeframe`, you must include a `start_date`. Furthermore, an earning rule `event` type:  \n\n- `customer.segment.entered` requires a `segment` object\n- a custom event requires a `custom_event` object\n- a `customer.loyalty.tier.joined`, `customer.loyalty.tier.left`, `customer.loyalty.tier.upgraded`, `customer.loyalty.tier.downgraded`, `customer.loyalty.tier.prolonged` requires a `loyalty_tier` object",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesEarningRulesCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "event": "order.paid",
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "type": "FIXED",
                        "points": "5"
                      },
                      "source": {
                        "banner": "Order paid 5 points."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid - fixed amount of points"
                      }
                    },
                    {
                      "event": "order.paid",
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "ORDER_AMOUNT",
                        "order": {
                          "amount": {
                            "every": 1,
                            "points": 1
                          }
                        }
                      },
                      "source": {
                        "banner": "Order paid - 1 point for 1 dollar spent excluding discounts."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid- points proportional to order amount"
                      }
                    },
                    {
                      "event": "order.paid",
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "ORDER_TOTAL_AMOUNT",
                        "order": {
                          "total_amount": {
                            "every": 1,
                            "points": 1
                          }
                        }
                      },
                      "source": {
                        "banner": "Order paid - 1 point for 1 dollar spent including discounts."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid- points proportional to order total amount"
                      }
                    },
                    {
                      "event": "order.paid",
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "ORDER_METADATA",
                        "order": {
                          "metadata": {
                            "every": 2,
                            "points": 1,
                            "property": "number_of_store_visits"
                          }
                        }
                      },
                      "source": {
                        "banner": "Order paid - 2 points for each store visit."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid- points proportional to numerical order metadata property "
                      }
                    },
                    {
                      "event": "order.paid",
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "ORDER_ITEMS_AMOUNT",
                        "order_items": {
                          "amount": {
                            "every": 2,
                            "points": 1,
                            "object": "product",
                            "id": "prod_0bae32322150fd0546"
                          }
                        }
                      },
                      "source": {
                        "banner": "Order paid - 2 points for 1 dollar spent on items excluding discounts."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid- points proportional to order items amount"
                      }
                    },
                    {
                      "event": "order.paid",
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "ORDER_ITEMS_SUBTOTAL_AMOUNT",
                        "order_items": {
                          "subtotal_amount": {
                            "every": 2,
                            "points": 1,
                            "object": "products_collection",
                            "id": "pc_75U0dHlr7u75BJodrW1AE3t6"
                          }
                        }
                      },
                      "source": {
                        "banner": "Order paid - 2 points for every dollar spent on the product collection."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid- points proportional to order items subtotal amount"
                      }
                    },
                    {
                      "event": "order.paid",
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "ORDER_ITEMS_QUANTITY",
                        "order_items": {
                          "quantity": {
                            "every": 1,
                            "points": 1,
                            "object": "sku",
                            "id": "sku_0b7d7dfb090be5c619"
                          }
                        }
                      },
                      "source": {
                        "banner": "Order paid - 1 point for every brand phone in your cart."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid - points proportional to quantity of items in a cart of a product varient."
                      }
                    },
                    {
                      "event": "order.paid",
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOMER_METADATA",
                        "customer": {
                          "metadata": {
                            "every": 1,
                            "points": 1,
                            "property": "customer_life_time_value"
                          }
                        }
                      },
                      "source": {
                        "banner": "Order paid 1 point for 1 month of being a customer with us."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Order paid - points proportional to customer metadata property"
                      }
                    },
                    {
                      "event": "customer.segment.entered",
                      "segment": {
                        "id": "seg_OlE7DmfzMI5pHyD5VAv512r1"
                      },
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOMER_METADATA",
                        "customer": {
                          "metadata": {
                            "every": 1,
                            "points": 1,
                            "property": "customer_life_time_value"
                          }
                        }
                      },
                      "source": {
                        "banner": "Customer entered birthday segment - 1 point for each month of being a customer with us."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Entered segment - points proportional to customer metadata property"
                      }
                    },
                    {
                      "event": "customer.segment.entered",
                      "segment": {
                        "id": "seg_OlE7DmfzMI5pHyD5VAv512r1"
                      },
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "type": "FIXED",
                        "points": "5"
                      },
                      "source": {
                        "banner": "Customer entered birthday segment - 5 points"
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Entered segment - fixed points"
                      }
                    },
                    {
                      "event": "page_view",
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "points": 3,
                        "type": "FIXED"
                      },
                      "custom_event": {
                        "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                      },
                      "source": {
                        "banner": "See page - 3 points"
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Custom Event - fixed points for viewing a page"
                      }
                    },
                    {
                      "event": "page_view",
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOM_EVENT_METADATA",
                        "custom_event": {
                          "metadata": {
                            "every": 1,
                            "points": 2,
                            "property": "volume_number"
                          }
                        }
                      },
                      "custom_event": {
                        "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                      },
                      "source": {
                        "banner": "See page X - get 2 points multiplied by the page number"
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Custom Event - proportional points for viewing a page based on custom event metadata"
                      }
                    },
                    {
                      "event": "page_view",
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOMER_METADATA",
                        "customer": {
                          "metadata": {
                            "every": 1,
                            "points": 2,
                            "property": "customer_life_time_value"
                          }
                        }
                      },
                      "custom_event": {
                        "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                      },
                      "source": {
                        "banner": "Get 2 points for every month you're a customer for viewing a page"
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Custom Event - proportional points for viewing a page based on customer metadata"
                      }
                    },
                    {
                      "event": "customer.loyalty.tier.prolonged",
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOMER_METADATA",
                        "customer": {
                          "metadata": {
                            "every": 1,
                            "points": 2,
                            "property": "customer_life_time_value"
                          }
                        }
                      },
                      "loyalty_tier": {
                        "id": "ltr_pudTGWasuIqxdiDM0go31OV1"
                      },
                      "source": {
                        "banner": "Get 2 points for every month you're a customer when your loyalty tier is prolonged."
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "metadata": {
                        "Type": "Custom Event - proportional points for extending a loyalty tier based on customer metadata."
                      }
                    }
                  ]
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns an array of earning rule objects.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LoyaltiesEarningRulesCreateResponseBody"
                  }
                },
                "examples": {
                  "Example": {
                    "value": [
                      {
                        "id": "ern_63g6NQgtepfXn2z0QbT2ksLf",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "points": 5,
                          "type": "FIXED"
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid 5 points.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_knM56LS3oygL0Ue0oeSNt4WA",
                        "metadata": {
                          "Type": "Order paid - fixed amount of points"
                        }
                      },
                      {
                        "id": "ern_Ov5RWerVFubVSjIHOMco34dv",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "ORDER_AMOUNT",
                          "order": {
                            "amount": {
                              "every": 1,
                              "points": 1
                            }
                          }
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid - 1 point for 1 dollar spent excluding discounts.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_2R4x6pMFVEIPz1Lhz5ZVo33Y",
                        "metadata": {
                          "Type": "Order paid- points proportional to order amount"
                        }
                      },
                      {
                        "id": "ern_5rWPz4arGlTv4FVc1vETeFfe",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "ORDER_TOTAL_AMOUNT",
                          "order": {
                            "total_amount": {
                              "every": 1,
                              "points": 1
                            }
                          }
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid - 1 point for 1 dollar spent including discounts.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_fXasfs6Eh7P2haZkI33PEumI",
                        "metadata": {
                          "Type": "Order paid- points proportional to order total amount"
                        }
                      },
                      {
                        "id": "ern_Xs3o43dHr1O3RM5ojoeu1l6b",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "ORDER_METADATA",
                          "order": {
                            "metadata": {
                              "every": 2,
                              "points": 1,
                              "property": "number_of_store_visits"
                            }
                          }
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid - 2 points for each store visit.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_jucMzF25jisrqiG3k6JyyviT",
                        "metadata": {
                          "Type": "Order paid- points proportional to numerical order metadata property "
                        }
                      },
                      {
                        "id": "ern_9CjMBP2V8zgpsHLga4YOQo0A",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "ORDER_ITEMS_AMOUNT",
                          "order_items": {
                            "amount": {
                              "every": 2,
                              "points": 1,
                              "object": "product",
                              "id": "prod_0bae32322150fd0546"
                            }
                          }
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid - 2 points for 1 dollar spent on items excluding discounts.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_y60lx7XsW1YdOOOFuDaYjvG4",
                        "metadata": {
                          "Type": "Order paid- points proportional to order items amount"
                        }
                      },
                      {
                        "id": "ern_uI7hRj8PNodK8xWRsn3gpDdG",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "ORDER_ITEMS_SUBTOTAL_AMOUNT",
                          "order_items": {
                            "subtotal_amount": {
                              "every": 2,
                              "points": 1,
                              "object": "products_collection",
                              "id": "pc_75U0dHlr7u75BJodrW1AE3t6"
                            }
                          }
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid - 2 points for every dollar spent on the product collection.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_Lk1WROGexXA72FabUWhR1p7X",
                        "metadata": {
                          "Type": "Order paid- points proportional to order items subtotal amount"
                        }
                      },
                      {
                        "id": "ern_dL13AmZEO0ToImOY44YUP1ru",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "ORDER_ITEMS_QUANTITY",
                          "order_items": {
                            "quantity": {
                              "every": 1,
                              "points": 1,
                              "object": "sku",
                              "id": "sku_0b7d7dfb090be5c619"
                            }
                          }
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid - 1 point for every brand phone in your cart.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_4F9iJG0hmKTiqSsmkfbB8vUF",
                        "metadata": {
                          "Type": "Order paid - points proportional to quantity of items in a cart of a product varient."
                        }
                      },
                      {
                        "id": "ern_ublD9yGhxPrd9ayPAMTc4aOZ",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "CUSTOMER_METADATA",
                          "customer": {
                            "metadata": {
                              "every": 1,
                              "points": 1,
                              "property": "customer_life_time_value"
                            }
                          }
                        },
                        "event": "order.paid",
                        "source": {
                          "banner": "Order paid 1 point for 1 month of being a customer with us.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_raft7C1hVw427OnEobmzhXjD",
                        "metadata": {
                          "Type": "Order paid - points proportional to customer metadata property"
                        }
                      },
                      {
                        "id": "ern_6tBwufmR7UNJInhZq8zNRrj5",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "CUSTOMER_METADATA",
                          "customer": {
                            "metadata": {
                              "every": 1,
                              "points": 1,
                              "property": "customer_life_time_value"
                            }
                          }
                        },
                        "segment": {
                          "id": "seg_OlE7DmfzMI5pHyD5VAv512r1"
                        },
                        "event": "customer.segment.entered",
                        "source": {
                          "banner": "Customer entered birthday segment - 1 point for each month of being a customer with us.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_mQ8SCABGLnrGMBbh8QS6DUpX",
                        "metadata": {
                          "Type": "Entered segment - points proportional to customer metadata property"
                        }
                      },
                      {
                        "id": "ern_yBR0JtdcDyJXgZf30C8KQLPw",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "points": 5,
                          "type": "FIXED"
                        },
                        "segment": {
                          "id": "seg_OlE7DmfzMI5pHyD5VAv512r1"
                        },
                        "event": "customer.segment.entered",
                        "source": {
                          "banner": "Customer entered birthday segment - 5 points",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_Co7zjgYPIKZ45vcK0jn7qrY8",
                        "metadata": {
                          "Type": "Entered segment - fixed points"
                        }
                      },
                      {
                        "id": "ern_Ic2AUznt4cJInIl1wt6n0Fbv",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "points": 3,
                          "type": "FIXED"
                        },
                        "custom_event": {
                          "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                        },
                        "event": "page_view",
                        "source": {
                          "banner": "See page - 3 points",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_KWvcBS3bdmJnWD4BTw29eRNT",
                        "metadata": {
                          "Type": "Custom Event - fixed points for viewing a page"
                        }
                      },
                      {
                        "id": "ern_4SRj1TY1j8Q617R2Y4qiN1sy",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "CUSTOM_EVENT_METADATA",
                          "custom_event": {
                            "metadata": {
                              "every": 1,
                              "points": 2,
                              "property": "volume_number"
                            }
                          }
                        },
                        "custom_event": {
                          "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                        },
                        "event": "page_view",
                        "source": {
                          "banner": "See page X - get 2 points multiplied by the page number",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_WWESERcKoTRSbCDal7Hr7H0A",
                        "metadata": {
                          "Type": "Custom Event - proportional points for viewing a page based on custom event metadata"
                        }
                      },
                      {
                        "id": "ern_WXBa4b5a6N5XZt9A9Nf9dagA",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "CUSTOMER_METADATA",
                          "customer": {
                            "metadata": {
                              "every": 1,
                              "points": 2,
                              "property": "customer_life_time_value"
                            }
                          }
                        },
                        "custom_event": {
                          "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                        },
                        "event": "page_view",
                        "source": {
                          "banner": "Get 2 points for every month you're a customer for viewing a page",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_zv3mCOeZOaHCsFMG0yIKu0ax",
                        "metadata": {
                          "Type": "Custom Event - proportional points for viewing a page based on customer metadata"
                        }
                      },
                      {
                        "id": "ern_DvdegDzcaMUXzf2fayzCqMEV",
                        "created_at": "2022-11-29T11:10:46.523Z",
                        "updated_at": null,
                        "validation_rule_id": "val_7SxpdhPeBngA",
                        "loyalty": {
                          "type": "PROPORTIONAL",
                          "calculation_type": "CUSTOMER_METADATA",
                          "customer": {
                            "metadata": {
                              "every": 1,
                              "points": 2,
                              "property": "customer_life_time_value"
                            }
                          }
                        },
                        "event": "customer.loyalty.tier.prolonged",
                        "loyalty_tier": {
                          "id": "ltr_pudTGWasuIqxdiDM0go31OV1"
                        },
                        "source": {
                          "banner": "Get 2 points for every month you're a customer when your loyalty tier is prolonged.",
                          "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "object_type": "campaign"
                        },
                        "active": true,
                        "start_date": "2022-11-02T13:00:00.000Z",
                        "expiration_date": "2023-03-03T14:30:00.000Z",
                        "validity_timeframe": {
                          "duration": "PT1H",
                          "interval": "P1D"
                        },
                        "validity_day_of_week": [
                          0,
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "object": "earning_rule",
                        "automation_id": "auto_fpfYyNcpVskgwcrs21kQ91Wx",
                        "metadata": {
                          "Type": "Custom Event - proportional points for extending a loyalty tier based on customer metadata."
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if a parameters is defined incorrectly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_missing_param"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Loyalty order rules must contain one of the following properties - 'total_amount'",
                      "request_id": "v-0c127fa5d4424c8411"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a parameter's value is not found in the respository.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find loyalty_tier with id ltr_pudTGWasuIqxdiDM0go31OV1",
                      "request_id": "v-0c12808f33ce673c42",
                      "resource_id": "ltr_pudTGWasuIqxdiDM0go31OV1",
                      "resource_type": "loyalty_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterEarningRuleId"
          },
          "name": "earningRuleId",
          "in": "path",
          "required": true,
          "description": "A unique earning rule ID."
        }
      ],
      "get": {
        "operationId": "get-earning-rule",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Earning Rule",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieves an earning rule assigned to a campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an earning rule object with the earning rule details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesEarningRulesGetResponseBody"
                },
                "examples": {
                  "Custom Event": {
                    "value": {
                      "id": "ern_abvbD0d7Wv4hgr3fTElLb38G",
                      "created_at": "2022-02-07T08:19:41.810Z",
                      "updated_at": null,
                      "validation_rule_id": null,
                      "loyalty": {
                        "points": 2,
                        "type": "FIXED"
                      },
                      "custom_event": {
                        "schema_id": "ms_7JRYC8jXbezBV8AvGYGA0b5R"
                      },
                      "event": "saw_on_facebook",
                      "source": {
                        "banner": "Saw on Facebook Timeframe",
                        "object_id": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "start_date": "2022-02-07T08:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "object": "earning_rule",
                      "automation_id": "auto_WTxNMXGJMS5ZdU9oZip3AzuA"
                    }
                  },
                  "Order Paid": {
                    "value": {
                      "id": "ern_taClaOIiaGNdmdby8xS0lCcy",
                      "created_at": "2022-02-04T13:27:50.665Z",
                      "updated_at": "2022-02-07T08:19:44.198Z",
                      "validation_rule_id": null,
                      "loyalty": {
                        "points": 1000,
                        "type": "FIXED"
                      },
                      "event": "order.paid",
                      "source": {
                        "banner": "Order paid 1000 points",
                        "object_id": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "start_date": "2022-02-02T13:00:00.000Z",
                      "expiration_date": "2022-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        4
                      ],
                      "object": "earning_rule",
                      "automation_id": "auto_RjBuwpeFQZ7TyQ5LP2LFVZYG"
                    }
                  },
                  "Segment Entered": {
                    "value": {
                      "id": "ern_3HlFKLMNIfBme9lcHwnMwXON",
                      "created_at": "2022-02-04T13:02:52.937Z",
                      "updated_at": "2022-02-07T08:19:43.291Z",
                      "validation_rule_id": null,
                      "loyalty": {
                        "points": 1000,
                        "type": "FIXED"
                      },
                      "segment": {
                        "id": "seg_WJv55MbzQwnr56ttJ2xUrSgt"
                      },
                      "event": "customer.segment.entered",
                      "source": {
                        "banner": "Entered segment 100 points.",
                        "object_id": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "start_date": "2022-02-02T13:00:00.000Z",
                      "expiration_date": "2022-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "object": "earning_rule",
                      "automation_id": "auto_39wqQSScJJbvpzAF611jnrh9"
                    }
                  },
                  "Loyalty Tier Joined": {
                    "value": {
                      "id": "ern_gVo6CHBduFPoh1hctASfXHLT",
                      "created_at": "2022-11-24T17:01:42.809Z",
                      "updated_at": null,
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOMER_METADATA",
                        "customer": {
                          "metadata": {
                            "every": 4,
                            "points": 4,
                            "property": "customer_life_time_value"
                          }
                        }
                      },
                      "event": "customer.loyalty.tier.joined",
                      "loyalty_tier": {
                        "id": "ltr_pudTGWasuIqxdiDM0go31OV1"
                      },
                      "source": {
                        "banner": "Tier joined",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "object": "earning_rule",
                      "automation_id": "auto_wdlEo17wmoqYHGfilbayEUj7",
                      "metadata": {
                        "Type": "Tier joined - customer metadata - proportional"
                      }
                    }
                  },
                  "Loyalty Tier Left": {
                    "value": {
                      "id": "ern_66OdCyLADv5IGFoQe18vGUwa",
                      "created_at": "2022-11-24T17:03:59.414Z",
                      "updated_at": null,
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOMER_METADATA",
                        "customer": {
                          "metadata": {
                            "every": 2,
                            "points": 2,
                            "property": "customer_life_time_value"
                          }
                        }
                      },
                      "event": "customer.loyalty.tier.left",
                      "loyalty_tier": {
                        "id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2"
                      },
                      "source": {
                        "banner": "Tier left",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "object": "earning_rule",
                      "automation_id": "auto_czm5el1Uz1jeGaO97AYoDNAq",
                      "metadata": {
                        "Type": "Tier left"
                      }
                    }
                  },
                  "Loyalty Tier Upgraded": {
                    "value": {
                      "id": "ern_YR3fDfCjAmz9a5D68nk0i4dm",
                      "created_at": "2022-11-25T07:29:38.961Z",
                      "updated_at": null,
                      "validation_rule_id": null,
                      "loyalty": {
                        "type": "PROPORTIONAL",
                        "calculation_type": "CUSTOMER_METADATA",
                        "customer": {
                          "metadata": {
                            "every": 3,
                            "points": 4,
                            "property": "customer_life_time_value"
                          }
                        }
                      },
                      "event": "customer.loyalty.tier.upgraded",
                      "loyalty_tier": {
                        "id": "ltr_30KHciA0UG8B71Fo51GZqwgN"
                      },
                      "source": {
                        "banner": "Tier upgraded",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "object": "earning_rule",
                      "automation_id": "auto_M1OdRH8spk6Fs7yTuPLN2LAv",
                      "metadata": {
                        "Type": "Upgraded"
                      }
                    }
                  },
                  "Loyalty Tier Downgraded": {
                    "value": {
                      "id": "ern_A2RArBE30Tkt56utVLrRv7rZ",
                      "created_at": "2022-11-25T07:31:05.866Z",
                      "updated_at": "2022-11-25T07:31:43.029Z",
                      "validation_rule_id": "val_kfmWpfXMI9P1",
                      "loyalty": {
                        "points": 1,
                        "type": "FIXED"
                      },
                      "event": "customer.loyalty.tier.downgraded",
                      "loyalty_tier": {
                        "id": "__ANY__"
                      },
                      "source": {
                        "banner": "Tier Downgraded",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "object": "earning_rule",
                      "automation_id": "auto_TMVZtCNMBgZm0KcPJ7otiHZW",
                      "metadata": {
                        "Type": "Tier"
                      }
                    }
                  },
                  "Loyalty Tier Prolonged": {
                    "value": {
                      "id": "ern_AdlWO2yt6b6llWsibIdiRXVE",
                      "created_at": "2022-11-25T07:31:42.767Z",
                      "updated_at": null,
                      "validation_rule_id": null,
                      "loyalty": {
                        "points": 5,
                        "type": "FIXED"
                      },
                      "event": "customer.loyalty.tier.prolonged",
                      "loyalty_tier": {
                        "id": "__ANY__"
                      },
                      "source": {
                        "banner": "Prolonged",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "object": "earning_rule",
                      "automation_id": "auto_4jH1yq9WJS0oJ8suagCrltyb",
                      "metadata": {}
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-earning-rule",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Update Earning Rule",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nUpdate an earning rule definition.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters that you would like to update for the given earning rule.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesEarningRulesUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "validation_rule_id": "val_7SxpdhPeBngA",
                    "loyalty": {
                      "type": "FIXED",
                      "points": "5"
                    },
                    "source": {
                      "banner": "Order paid 5 points."
                    },
                    "active": true,
                    "start_date": "2022-11-02T13:00:00.000Z",
                    "expiration_date": "2023-03-03T14:30:00.000Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P1D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "metadata": {
                      "Type": "Order paid - fixed amount of points"
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns the updated earning rule object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesEarningRulesUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ern_63g6NQgtepfXn2z0QbT2ksLf",
                      "created_at": "2022-11-29T11:10:46.523Z",
                      "updated_at": "2022-11-29T11:30:57.652Z",
                      "validation_rule_id": "val_7SxpdhPeBngA",
                      "loyalty": {
                        "points": 5,
                        "type": "FIXED"
                      },
                      "event": "order.paid",
                      "source": {
                        "banner": "Order paid 5 points.",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "start_date": "2022-11-02T13:00:00.000Z",
                      "expiration_date": "2023-03-03T14:30:00.000Z",
                      "validity_timeframe": {
                        "duration": "PT1H",
                        "interval": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "object": "earning_rule",
                      "automation_id": "auto_knM56LS3oygL0Ue0oeSNt4WA",
                      "metadata": {
                        "Type": "Order paid - fixed amount of points"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-earning-rule",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Delete Earning Rule",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nThis method deletes an earning rule for a specific loyalty campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the loyalty campaign or earning rule with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Earning Rule Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find earning_rule with id ern_10S9ijStRZsf65xd12aydn4f",
                      "request_id": "v-0ae2bdc5f11027e81a",
                      "resource_id": "ern_10S9ijStRZsf65xd12aydn4f",
                      "resource_type": "earning_rule"
                    }
                  },
                  "Loyalty Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id Summer Loyalty Campaign",
                      "request_id": "v-0ae2be04d146b71e50",
                      "resource_id": "Summer Loyalty Campaign",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID or name."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterEarningRuleId"
          },
          "name": "earningRuleId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of an earning rule, assigned by Voucherify."
        }
      ],
      "post": {
        "operationId": "enable-earning-rule",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Enable Earning Rule",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nEnable an earning rule.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an earning rule object with the `active` parameter set to `true`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesEarningRulesEnableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ern_raVUcdXruvXGuzm682ESrAzt",
                      "created_at": "2022-11-24T09:03:14.534Z",
                      "updated_at": "2022-11-25T14:07:39.460Z",
                      "loyalty": {
                        "points": 20,
                        "type": "FIXED"
                      },
                      "event": "order.paid",
                      "source": {
                        "banner": "Order has been paid",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": true,
                      "start_date": "2022-11-23T00:00:00.000Z",
                      "expiration_date": "2022-11-30T00:00:00.000Z",
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "object": "earning_rule",
                      "automation_id": "auto_MbEIyLbn7pHyba5Qw5eeb35L",
                      "metadata": {
                        "Type": "Order has been paid - Fixed"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the resource cannot be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find earning_rule with id ern_raVUcdXruvXGuzm682ESrAz",
                      "request_id": "v-0c0d849dde0e6737d9",
                      "resource_id": "ern_raVUcdXruvXGuzm682ESrAz",
                      "resource_type": "earning_rule"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID or name."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterEarningRuleId"
          },
          "name": "earningRuleId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of an earning rule, assigned by Voucherify."
        }
      ],
      "post": {
        "operationId": "disable-earning-rule",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Disable Earning Rule",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nDisable an earning rule.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an earning rule object with the `active` parameter set to `false`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesEarningRulesDisableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ern_A2RArBE30Tkt56utVLrRv7rZ",
                      "created_at": "2022-11-25T07:31:05.866Z",
                      "updated_at": "2022-11-25T14:12:57.167Z",
                      "loyalty": {
                        "points": 1,
                        "type": "FIXED"
                      },
                      "event": "customer.loyalty.tier.downgraded",
                      "loyalty_tier": {
                        "id": "__ANY__"
                      },
                      "source": {
                        "banner": "Tier Downgraded",
                        "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "object_type": "campaign"
                      },
                      "active": false,
                      "object": "earning_rule",
                      "automation_id": "auto_TMVZtCNMBgZm0KcPJ7otiHZW",
                      "metadata": {
                        "Type": "Tier"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the resource cannot be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find earning_rule with id ern_A2RArBE30Tkt56utVLrRv7r",
                      "request_id": "v-0c0d842ed5ce67373f",
                      "resource_id": "ern_A2RArBE30Tkt56utVLrRv7r",
                      "resource_type": "earning_rule"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/rewards": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card assigned to a particular customer."
        }
      ],
      "get": {
        "operationId": "list-member-rewards",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Rewards",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieves the list of rewards that the given customer (identified by `member_id`, which is a loyalty card assigned to a particular customer) **can get in exchange for loyalty points**.  \n\nYou can use the `affordable_only` parameter to limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card).  \n\nPlease note that rewards that are disabled (i.e. set to `Not Available` in the Dashboard) for a given loyalty tier reward mapping will not be returned in this endpoint.",
        "parameters": [
          {
            "in": "query",
            "name": "affordable_only",
            "description": "Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to `true` to return rewards which the customer can actually afford.",
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            }
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of rewards for the given `member_id`. Returns a filtered list if the query parameter `affordable_only` is set to `true`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersRewardsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "reward": {
                            "id": "rew_C7wS9eHFDN4CIbXI5PpLSkGY",
                            "name": "Material Reward",
                            "type": "MATERIAL",
                            "parameters": {
                              "product": {
                                "id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619"
                              }
                            },
                            "stock": 4,
                            "redeemed": 1,
                            "attributes": {
                              "description": "Get a Comic Book in Archie's series."
                            },
                            "created_at": "2022-08-17T07:46:18.619169+00:00",
                            "updated_at": "2022-08-17T08:13:48.30747+00:00",
                            "metadata": {},
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_pJYQBXSitK2OVPK3XMXZK76X",
                            "reward_id": "rew_C7wS9eHFDN4CIbXI5PpLSkGY",
                            "related_object_id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                            "related_object_type": "campaign",
                            "parameters": {
                              "loyalty": {
                                "points": 39
                              }
                            },
                            "created_at": "2022-08-24T11:40:22.418972+00:00",
                            "updated_at": "2022-08-24T13:23:50.409121+00:00",
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_reward"
                        },
                        {
                          "reward": {
                            "id": "rew_31M6Za6zkMRfhxYJz4aDo11h",
                            "name": "Pay with Points",
                            "type": "COIN",
                            "parameters": {
                              "coin": {
                                "exchange_ratio": 1,
                                "points_ratio": 1
                              }
                            },
                            "stock": null,
                            "redeemed": null,
                            "attributes": {},
                            "created_at": "2022-06-23T11:06:06.222736+00:00",
                            "updated_at": null,
                            "metadata": null,
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_wrVYAfXWolq52gnl15dumPCq",
                            "reward_id": "rew_31M6Za6zkMRfhxYJz4aDo11h",
                            "related_object_id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                            "related_object_type": "campaign",
                            "created_at": "2022-08-11T14:13:34.581194+00:00",
                            "updated_at": null,
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_reward"
                        },
                        {
                          "reward": {
                            "id": "rew_Jhq0ecLGSx8eF4pFdlhFr9P6",
                            "name": "20% discount",
                            "type": "CAMPAIGN",
                            "parameters": {
                              "campaign": {
                                "id": "camp_4B1jDE63pCeSij3HU7gx3gPT",
                                "type": "DISCOUNT_COUPONS"
                              }
                            },
                            "stock": null,
                            "redeemed": null,
                            "attributes": {},
                            "created_at": "2022-08-11T09:52:39.032699+00:00",
                            "updated_at": null,
                            "metadata": {},
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_nFREw86qh1LiqGPRygahNh8Z",
                            "reward_id": "rew_Jhq0ecLGSx8eF4pFdlhFr9P6",
                            "related_object_id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                            "related_object_type": "campaign",
                            "parameters": {
                              "loyalty": {
                                "points": 100
                              }
                            },
                            "created_at": "2022-08-11T14:13:34.581194+00:00",
                            "updated_at": null,
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_reward"
                        },
                        {
                          "reward": {
                            "id": "rew_Dev2yQLodRV33UKPKHTUQWk1",
                            "name": "Get a product",
                            "type": "MATERIAL",
                            "parameters": {
                              "product": {
                                "id": "prod_0b2ac1dab28985cb1e",
                                "sku_id": null
                              }
                            },
                            "stock": 1,
                            "redeemed": 1,
                            "attributes": {
                              "description": "Product"
                            },
                            "created_at": "2022-06-13T10:43:15.929621+00:00",
                            "updated_at": "2022-08-11T15:59:30.820937+00:00",
                            "metadata": null,
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_SV4gMgPXTXDrsoTyqhY1B2ut",
                            "reward_id": "rew_Dev2yQLodRV33UKPKHTUQWk1",
                            "related_object_id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                            "related_object_type": "campaign",
                            "parameters": {
                              "loyalty": {
                                "points": 4000
                              }
                            },
                            "created_at": "2022-08-11T14:13:34.581194+00:00",
                            "updated_at": null,
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_reward"
                        },
                        {
                          "reward": {
                            "id": "rew_oQEYtUNYcVe2IdBEUBdLfkCD",
                            "name": "Get a comic book",
                            "type": "MATERIAL",
                            "parameters": {
                              "product": {
                                "id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": null
                              }
                            },
                            "stock": 1,
                            "redeemed": 2,
                            "attributes": {
                              "image_url": "{{internalVoucherifyURL}}",
                              "description": "Archie's Series"
                            },
                            "created_at": "2022-08-11T14:35:44.694611+00:00",
                            "updated_at": "2022-08-17T07:52:56.965366+00:00",
                            "metadata": {
                              "Type": "GR-2"
                            },
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_7HHH6TjN7Q9WDr5ZePeZUg5p",
                            "reward_id": "rew_oQEYtUNYcVe2IdBEUBdLfkCD",
                            "related_object_id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                            "related_object_type": "campaign",
                            "parameters": {
                              "loyalty": {
                                "points": 10
                              }
                            },
                            "created_at": "2022-08-11T15:44:12.789086+00:00",
                            "updated_at": null,
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_reward"
                        }
                      ],
                      "total": 5
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardAssignmentId"
          },
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "Unique reward assignment ID."
        }
      ],
      "get": {
        "operationId": "get-reward-details",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Reward Details",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nGet reward details in the context of a loyalty campaign and reward assignment ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns reward details in the context of a loyalty *campaign* and reward assignment ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesRewardAssignmentsRewardGetResponseBody"
                },
                "examples": {
                  "Material": {
                    "value": {
                      "id": "rew_Dev2yQLodRV33UKPKHTUQWk1",
                      "name": "Get a product",
                      "type": "MATERIAL",
                      "parameters": {
                        "product": {
                          "id": "prod_0b2ac1dab28985cb1e",
                          "sku_id": null
                        }
                      },
                      "stock": "1",
                      "redeemed": "1",
                      "attributes": {
                        "description": "Product"
                      },
                      "created_at": "2022-06-13T10:43:15.929Z",
                      "updated_at": "2022-08-11T15:59:30.820Z",
                      "metadata": null,
                      "object": "reward"
                    }
                  },
                  "Pay with Points": {
                    "value": {
                      "id": "rew_31M6Za6zkMRfhxYJz4aDo11h",
                      "name": "Pay with Points",
                      "type": "COIN",
                      "parameters": {
                        "coin": {
                          "exchange_ratio": 1,
                          "points_ratio": 1
                        }
                      },
                      "stock": null,
                      "redeemed": null,
                      "attributes": {},
                      "created_at": "2022-06-23T11:06:06.222Z",
                      "updated_at": null,
                      "metadata": null,
                      "object": "reward"
                    }
                  },
                  "Discount Coupon": {
                    "value": {
                      "id": "rew_Jhq0ecLGSx8eF4pFdlhFr9P6",
                      "name": "20% discount",
                      "type": "CAMPAIGN",
                      "parameters": {
                        "campaign": {
                          "id": "camp_4B1jDE63pCeSij3HU7gx3gPT",
                          "type": "DISCOUNT_COUPONS"
                        }
                      },
                      "stock": null,
                      "redeemed": null,
                      "attributes": {},
                      "created_at": "2022-08-11T09:52:39.032Z",
                      "updated_at": null,
                      "metadata": {},
                      "object": "reward"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/reward-assignments": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        }
      ],
      "get": {
        "operationId": "list-reward-assignments-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Reward Assignments with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nReturns reward assignments from a given loyalty campaign.\n\n<Note>\n\n<Badge color=\"blue\">Alternative endpoint</Badge>\n\nThis endpoint is an alternative to this [endpoint](/api-reference/loyalties/list-campaign-rewards). The URL was re-designed to be more contextual to the type of data returned in the response.\n\n</Note>",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterRewardAssignmentId"
            },
            "in": "query",
            "name": "assignmentId",
            "description": "A unique reward assignment ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with reward assignment objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesRewardAssignmentsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "rewa_2EPffrq151ArmjR7j3CumxGE",
                          "reward_id": "rew_6uCtsIjgcuzi4NW43mKZQWd5",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 18
                            }
                          },
                          "created_at": "2022-06-22T11:02:19.564Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_75e6oBjYfIKUDbM4Dsgg6xAU",
                          "reward_id": "rew_gI4GYbXMeHAJUAIiZCad5LaS",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 25
                            }
                          },
                          "created_at": "2022-06-22T11:00:49.034Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_dJ5nFBpmL8DVhmY1j4zYYOqF",
                          "reward_id": "rew_VSi5rNvb67bn2tqkNwVBBP7u",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 100
                            }
                          },
                          "created_at": "2022-06-22T10:57:24.051Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_874iVl5bHrZFr2FSsG9ilKzF",
                          "reward_id": "rew_QQ73sIywuMoEj6L8K6ft2Mn7",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "created_at": "2022-06-22T10:47:55.934Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_GgSlEk4bnR09lMMts6CgR6aV",
                          "reward_id": "rew_URQeO2fgbjxHnulgYVguuidX",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 9
                            }
                          },
                          "created_at": "2022-06-22T10:21:53.109Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_i6VcsXr3ovJ2JCpZk9k1JOj1",
                          "reward_id": "rew_YNr7tRr9TPAiFEJBZBAsuKCq",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "created_at": "2022-06-22T10:18:27.684Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_YjTw2InYSVx1nA88brDASS9e",
                          "reward_id": "rew_BUfchmIo7pOR8GrZMw0vVL08",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 30
                            }
                          },
                          "created_at": "2022-06-22T09:58:12.133Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_1gJ6VyYQI0IcnEvhArbr9XFH",
                          "reward_id": "rew_injbwG52POgfpSogTlQl4hA6",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 10
                            }
                          },
                          "created_at": "2022-06-13T11:56:49.185Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_gb6U5byuRh12EvdiL46P4Cxy",
                          "reward_id": "rew_NQB7WbdQLBrFQW1DZmBNcLvH",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 100
                            }
                          },
                          "created_at": "2022-06-13T11:50:23.429Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_hfyF9IGez9i3z5a3Uwlkcg7S",
                          "reward_id": "rew_87ItIc9P5Bky10eS7vEm7Dc7",
                          "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 20
                            }
                          },
                          "created_at": "2022-06-13T11:20:43.961Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        }
                      ],
                      "total": 12
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/rewards": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        }
      ],
      "get": {
        "operationId": "list-reward-assignments-2",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Campaign Rewards",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nReturns active rewards from a given loyalty campaign.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterRewardAssignmentId"
            },
            "in": "query",
            "name": "assignment_id",
            "description": "A unique reward assignment ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with reward assignment objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesRewardsListAssignmentsResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "rewa_6VSWcXjfm5PuZlfeuZxl5JZT",
                          "reward_id": "rew_pjJKIZgjIopIPZyibEAt7oPk",
                          "related_object_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "related_object_type": "campaign",
                          "created_at": "2022-08-30T08:24:32.171Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_7gFZsNg8oiry63FtzML0N52R",
                          "reward_id": "rew_BUfchmIo7pOR8GrZMw0vVL08",
                          "related_object_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 3000000
                            }
                          },
                          "created_at": "2022-05-13T11:14:58.146Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_eAGhQSY4FS4T3q4zMkiarHoN",
                          "reward_id": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
                          "related_object_id": "camp_7s3uXI44aKfIk5IhmeOPr6ic",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 100
                            }
                          },
                          "created_at": "2022-02-28T11:56:55.241Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-reward-assignment-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Create Loyalty Campaign Reward Assignment",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nAdd rewards to a loyalty campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Define the cost of the rewards in loyalty points.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesRewardsCreateAssignmentRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "reward": "rew_wg2pvCr5LDhCq4uVQZ9LhuZm",
                      "parameters": {
                        "loyalty": {
                          "points": 2
                        }
                      }
                    },
                    {
                      "reward": "rew_z35ffKoH0tCcck8EL56p6SIs",
                      "parameters": {
                        "loyalty": {
                          "points": 2
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns a list of reward assignment objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesRewardsCreateAssignmentResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": [
                      {
                        "id": "rewa_Iw9VopmlLm0topBG17ZH1gp5",
                        "reward_id": "rew_wg2pvCr5LDhCq4uVQZ9LhuZm",
                        "related_object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "related_object_type": "campaign",
                        "parameters": {
                          "loyalty": {
                            "points": 2
                          }
                        },
                        "created_at": "2022-11-28T18:54:19.747Z",
                        "updated_at": null,
                        "object": "reward_assignment"
                      },
                      {
                        "id": "rewa_tAFZ7cHiTwZyOg1QaWHt6yYv",
                        "reward_id": "rew_z35ffKoH0tCcck8EL56p6SIs",
                        "related_object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                        "related_object_type": "campaign",
                        "parameters": {
                          "loyalty": {
                            "points": 2
                          }
                        },
                        "created_at": "2022-11-28T18:54:19.747Z",
                        "updated_at": null,
                        "object": "reward_assignment"
                      }
                    ]
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if there's a reward assignment created for the given reward.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated reward_assignment exists with id rewa_50O40FgyojhUiZAs3vDQbKiC",
                      "request_id": "v-0c11a10ed2ce676da9",
                      "resource_id": "rewa_50O40FgyojhUiZAs3vDQbKiC",
                      "resource_type": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/reward-assignments/{assignmentId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardAssignmentId"
          },
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "Unique reward assignment ID."
        }
      ],
      "get": {
        "operationId": "get-reward-assignment-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Campaign Reward Assignments",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve specific reward assignment.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns specific reward assignment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesRewardAssignmentsGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "rewa_1gJ6VyYQI0IcnEvhArbr9XFH",
                      "reward_id": "rew_injbwG52POgfpSogTlQl4hA6",
                      "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                      "related_object_type": "campaign",
                      "parameters": {
                        "loyalty": {
                          "points": 10
                        }
                      },
                      "created_at": "2022-06-13T11:56:49.185Z",
                      "updated_at": null,
                      "object": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/rewards/{assignmentId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the `name` of the campaign as the path parameter value, e.g., `Loyalty%20Campaign`. "
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardAssignmentId"
          },
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "A unique reward assignment ID."
        }
      ],
      "get": {
        "operationId": "get-reward-assignment-2",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Campaign Reward Assignment",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve specific reward assignment.\n\n<Note>\n\n<Badge color=\"blue\">Alternative endpoint</Badge>\n\nThis endpoint is an alternative to this [endpoint](/api-reference/loyalties/get-campaign-reward-assignments).\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns specific reward assignment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesRewardsGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "rewa_1gJ6VyYQI0IcnEvhArbr9XFH",
                      "reward_id": "rew_injbwG52POgfpSogTlQl4hA6",
                      "related_object_id": "camp_Vr97XXNOnFEUIMFymKK99FAA",
                      "related_object_type": "campaign",
                      "parameters": {
                        "loyalty": {
                          "points": 10
                        }
                      },
                      "created_at": "2022-06-13T11:56:49.185Z",
                      "updated_at": null,
                      "object": "reward_assignment"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the reward assignment cannot be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find reward_assignment with id rewa_1gJ6VyYQI0IcnEvhArbr9XFH",
                      "request_id": "v-0c0be6ee648e67609b",
                      "resource_id": "rewa_1gJ6VyYQI0IcnEvhArbr9XFH",
                      "resource_type": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-reward-assignment-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Update Campaign Reward Assignment",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nUpdates rewards parameters, i.e. the points cost for the specific reward.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a reward assignment with an updated points value.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesRewardsUpdateAssignmentResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "rewa_Iw9VopmlLm0topBG17ZH1gp5",
                      "reward_id": "rew_wg2pvCr5LDhCq4uVQZ9LhuZm",
                      "related_object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                      "related_object_type": "campaign",
                      "parameters": {
                        "loyalty": {
                          "points": 3
                        }
                      },
                      "created_at": "2022-11-28T18:54:19.747Z",
                      "updated_at": "2022-11-28T19:27:40.604Z",
                      "object": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "description": "Update the points cost for the reward assignment.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesRewardsUpdateAssignmentRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "parameters": {
                      "loyalty": {
                        "points": 3
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "operationId": "delete-reward-assignment-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Delete Campaign Reward Assignment",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nThis method deletes a reward assignment for a particular loyalty campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the loyalty campaign or reward assignment with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Reward Assignment Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find reward_assignment with id rewa_0b4hqJpVFssxXXrq56Ddtyo",
                      "request_id": "v-0ae2b69e0cd0c1364f",
                      "resource_id": "rewa_0b4hqJpVFssxXXrq56Ddtyo",
                      "resource_type": "reward_assignment"
                    }
                  },
                  "Loyalty Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id Loyalty Summer Campaign",
                      "request_id": "v-0ae2b71e57d027e263",
                      "resource_id": "Loyalty Summer Campaign",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/members/{memberId}/redemption": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "A code that identifies the loyalty card."
        }
      ],
      "post": {
        "operationId": "redeem-reward-1",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Redeem Reward with campaign ID",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nExchange points from a loyalty card for a specified reward. This API method returns an assigned award in the response. It means that if a requesting customer gets a coupon code with a discount for the next order, that discount code will be visible in response as part of the reward object definition.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a redemption object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersRedemptionRedeemResponseBody"
                },
                "examples": {
                  "Redeem Reward that adds points to a loyalty card": {
                    "value": {
                      "id": "r_0c6b3abbfe8e60a9dd",
                      "object": "redemption",
                      "date": "2023-02-06T09:07:55.514Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 1,
                      "result": "SUCCESS",
                      "order": null,
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 8000,
                          "balance": 6887
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T09:07:55.515Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 9,
                          "redeemed_points": 1113,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_BpytIepuSekuXXwb9qkLJfCU",
                        "voucher": {
                          "id": "v_pQZDYaH8LzoOvgh3234DqZQjGJgbPov6",
                          "code": "LOYALTY-CARD-zOR2sV9Q",
                          "campaign": "Loyalty Program",
                          "campaign_id": "camp_Hpt5hPTA8kSKRWGxBGw8Y0So",
                          "category": null,
                          "category_id": null,
                          "categories": [],
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 1020,
                            "balance": 890
                          },
                          "start_date": null,
                          "expiration_date": null,
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX1/THRRj1QegAan0r5U+wRoHuFEA6FR7TrvZm8N+8cK7niF/8uAqFdVYTU1JD0/CdoSXlYqiGgz3PAFOGWFSJt8vkM50fcMtMNLsaudU+YrPDeT2HCB7o0Ts7h1FnbD85+0F7lwrbKmkGW6kub0mjCaRdJYS/axIAq4=",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX1+yREd0zRAfZY9uwtMZsl4eDd8+LeiKGVI5OzOQRpjhtV91IuEe7/SXEW8m4F2Llg2//yieX2zsP3UtWasWxw8ZkHMRSIdxfxzSdSj8ap0dI5xwKW4OE1Q6Sgsb+kZVfCKUHbwXCcd8y5a6xTpVIg97y74Ng1Vg2PY=",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-07-11T08:19:28.780Z",
                          "updated_at": "2023-01-25T15:44:33.500Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 26,
                            "redeemed_points": 130,
                            "object": "list",
                            "url": "/v1/vouchers/LOYALTY-CARD-zOR2sV9Q/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/LOYALTY-CARD-zOR2sV9Q/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        "id": "rew_7ZM476Q77dH5KvHk4KzoRNvF",
                        "object": "reward",
                        "name": "Present on Loyalty Card",
                        "created_at": "2023-01-25T15:43:40.716Z",
                        "updated_at": null,
                        "parameters": {
                          "campaign": {
                            "id": "camp_Hpt5hPTA8kSKRWGxBGw8Y0So",
                            "balance": 20,
                            "type": "LOYALTY_PROGRAM"
                          }
                        },
                        "type": "CAMPAIGN"
                      },
                      "loyalty_card": {
                        "points": 1
                      }
                    }
                  },
                  "Redeem Reward that adds credits to a gift card": {
                    "value": {
                      "id": "r_0c6b3bedf3478a0167",
                      "object": "redemption",
                      "date": "2023-02-06T09:13:08.813Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 1,
                      "result": "SUCCESS",
                      "order": null,
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 8000,
                          "balance": 6886
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T09:13:08.814Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 10,
                          "redeemed_points": 1114,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_U554pL2BhDIDZOvZ8y9YQ9hA",
                        "voucher": {
                          "id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                          "code": "GIFT-CARD-xwc6X7Tk",
                          "campaign": "Gift Cards",
                          "campaign_id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                          "category": null,
                          "category_id": "cat_0bb81a481615a37b5e",
                          "categories": [],
                          "type": "GIFT_VOUCHER",
                          "discount": null,
                          "gift": {
                            "amount": 59080,
                            "balance": 48780
                          },
                          "loyalty_card": null,
                          "start_date": null,
                          "expiration_date": null,
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX19SdT2kQZokSFsMRa5NmGvsHunHReeb4gF9b5LtLA4rCTM/aTyHCYfr7kRWb2vv08WIgY/Tv53SJGW+k2keqfsTq/Ohb5shkCN3FTFsaI8gulTp616sEGn/JJoIInIoNkO9Vd1+AfrKiAjmirCmekE6cz2SVCyNAXs=",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX18vWc/qplwajJz4RIIy2wDUcAXVo1KEmyXx2IJy44xxHg608po3RizU9OYOzKelOAEjXFf7E4BS5Q01s4dds8Du70LGAp3idYMKAaXIjMTcFjMNczNO6ULK7r4eDx2Np8jvO/199U+zicnFNWqg/jF5ZCQW+6jO1q8=",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-07-08T09:44:33.179Z",
                          "updated_at": "2023-01-25T14:42:25.214Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 7,
                            "redeemed_amount": 10300,
                            "object": "list",
                            "url": "/v1/vouchers/GIFT-CARD-xwc6X7Tk/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/GIFT-CARD-xwc6X7Tk/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        "id": "rew_6bvM4vnaVdbPVQxYpuN37rhH",
                        "object": "reward",
                        "name": "Present Credits on Gift Card",
                        "created_at": "2023-01-25T14:41:31.858Z",
                        "updated_at": null,
                        "parameters": {
                          "campaign": {
                            "id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                            "balance": 4000,
                            "type": "GIFT_VOUCHERS"
                          }
                        },
                        "type": "CAMPAIGN"
                      },
                      "loyalty_card": {
                        "points": 1
                      }
                    }
                  },
                  "Redeem Reward that gives a discount coupon": {
                    "value": {
                      "id": "r_0c6b3ca77e0e60b534",
                      "object": "redemption",
                      "date": "2023-02-06T09:16:18.808Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 2,
                      "result": "SUCCESS",
                      "order": null,
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 8000,
                          "balance": 6884
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T09:16:18.809Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 11,
                          "redeemed_points": 1116,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_0ZwLAHgeU9IrI2V1ofYRmW7g",
                        "voucher": {
                          "id": "v_a3Ba1neDwPa3rBE0HkDd0C7CbiehBulo",
                          "code": "HAPPY-ORDERctb",
                          "campaign": "$20 off the entire order",
                          "campaign_id": "camp_5h0wc453_4",
                          "category": null,
                          "category_id": "cat_0b688929a2476386a6",
                          "categories": [],
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 2000,
                            "effect": "APPLY_TO_ORDER"
                          },
                          "gift": null,
                          "loyalty_card": null,
                          "start_date": "2022-09-20T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "7d646e7d-9b5a-40b6-a44e-6bae848e108e",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "dfb3e48d-ce4f-4187-a114-483feb4ca88d",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2023-02-06T09:16:18.845Z",
                          "updated_at": null,
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0,
                            "object": "list",
                            "url": "/v1/vouchers/HAPPY-ORDERctb/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/HAPPY-ORDERctb/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        "id": "rew_MF4hKh1IKYgJkPjbcFbH94Ho",
                        "object": "reward",
                        "name": "Digital Present",
                        "created_at": "2023-01-25T12:16:44.557Z",
                        "updated_at": null,
                        "parameters": {
                          "campaign": {
                            "id": "camp_5h0wc453_4",
                            "type": "DISCOUNT_COUPONS"
                          }
                        },
                        "type": "CAMPAIGN"
                      },
                      "loyalty_card": {
                        "points": 2
                      }
                    }
                  },
                  "Redeem a Material reward of a SKU type": {
                    "value": {
                      "id": "r_0c6b3d1357878a0813",
                      "object": "redemption",
                      "date": "2023-02-06T09:18:09.246Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 6,
                      "result": "SUCCESS",
                      "order": null,
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 8000,
                          "balance": 6878
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T09:18:09.247Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 12,
                          "redeemed_points": 1122,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_gfpRNkOT0pwzF7P5tXWXOs4H",
                        "product": {
                          "id": "prod_5h0wc453_2",
                          "source_id": "jonah-nystrom-bourbon",
                          "name": "Johan & Nyström - Bourbon",
                          "price": null,
                          "attributes": [
                            "categories",
                            "description",
                            "weight"
                          ],
                          "metadata": {
                            "company": "Johan & Nyström",
                            "showcase": true
                          },
                          "image_url": null,
                          "created_at": "2021-12-01T08:00:49.418Z",
                          "updated_at": null,
                          "object": "product"
                        },
                        "sku": {
                          "id": "sku_0a3efc9044dd121803",
                          "source_id": "jonah-nystrom-bourbon-250g",
                          "product_id": "prod_5h0wc453_2",
                          "sku": "250g",
                          "price": 1750,
                          "currency": null,
                          "attributes": {
                            "categories": "Coffee, Whole Bean",
                            "description": "Background for this blend comes from the longing for a real dark roasting of high-quality coffee beans. Although the beans are dark roasted, they keep their clear and intense aroma. This coffee has a smoky flavour with a slight hint of sweetness and loads of fruit notes. Thanks to the experience in the dark roasting of coffee, the beans still retain most of their aromas. Its aftertaste is clear and remains for a long time. This coffee is perfect for a Dripper, French Press, Moka coffee maker and the traditional espresso brewing method.",
                            "weight": 250
                          },
                          "image_url": null,
                          "metadata": {},
                          "created_at": "2021-12-01T08:00:49.427Z",
                          "updated_at": null,
                          "object": "sku"
                        },
                        "id": "rew_SfQCsap5R8UBTVbdMTRx10x8",
                        "object": "reward",
                        "name": "Present - SKU",
                        "created_at": "2023-01-25T12:10:16.060Z",
                        "updated_at": "2023-01-25T12:10:59.662Z",
                        "parameters": {
                          "product": {
                            "id": "prod_5h0wc453_2",
                            "sku_id": "sku_0a3efc9044dd121803"
                          }
                        },
                        "type": "MATERIAL"
                      },
                      "loyalty_card": {
                        "points": 6
                      }
                    }
                  },
                  "Redeem a Material Reward of a Product Type": {
                    "value": {
                      "id": "r_0c6b3d8c35546f8673",
                      "object": "redemption",
                      "date": "2023-02-06T09:20:13.013Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 4,
                      "result": "SUCCESS",
                      "order": null,
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@voucherify.io",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 8000,
                          "balance": 6874
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T09:20:13.014Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 13,
                          "redeemed_points": 1126,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@voucherify.io",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_LRx3Y1iHFWTt217NVrknkpi5",
                        "product": {
                          "id": "prod_0b2c2ddf35150b83bb",
                          "source_id": "97",
                          "name": "[Sample] Tiered Wire Basket",
                          "price": 11995,
                          "attributes": [],
                          "metadata": {
                            "source": "bigcommerce",
                            "bigcommerce_product_categories": [
                              21,
                              23
                            ]
                          },
                          "image_url": null,
                          "created_at": "2022-06-03T13:36:16.084Z",
                          "updated_at": "2022-06-07T09:10:44.644Z",
                          "object": "product"
                        },
                        "id": "rew_EPx1hCTpqzF0HW1z9NKckZH4",
                        "object": "reward",
                        "name": "Present",
                        "created_at": "2022-06-13T06:59:01.694Z",
                        "updated_at": "2023-02-03T15:04:14.102Z",
                        "parameters": {
                          "product": {
                            "id": "prod_0b2c2ddf35150b83bb",
                            "sku_id": null
                          }
                        },
                        "type": "MATERIAL"
                      },
                      "loyalty_card": {
                        "points": 4
                      }
                    }
                  },
                  "Redeem Pay with Points Reward": {
                    "value": {
                      "id": "r_0c6b4142ecc78a21d0",
                      "object": "redemption",
                      "date": "2023-02-06T09:36:26.547Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 2300,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_QBnrJlVWA2EEiZoKOptFROnp",
                        "source_id": null,
                        "created_at": "2023-02-06T09:36:26.503Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 45000,
                        "discount_amount": 45000,
                        "total_discount_amount": 45000,
                        "total_amount": 0,
                        "applied_discount_amount": 45000,
                        "total_applied_discount_amount": 45000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0c5d6689b39320059b",
                            "quantity": 1,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b2c36568000039138",
                            "quantity": 2,
                            "amount": 45000,
                            "price": 22500,
                            "subtotal_amount": 45000,
                            "product": {
                              "id": "prod_0b2c36568000039138",
                              "source_id": "86",
                              "name": "[Sample] Able Brewing System",
                              "price": 22500
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c6b4142ecc78a21d0": {
                            "date": "2023-02-06T09:36:26.547Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 8000,
                          "balance": 4574
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T09:36:26.548Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 14,
                          "redeemed_points": 3426,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
                        "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                        "object": "reward",
                        "name": "100 = $20",
                        "created_at": "2022-11-10T06:28:39.582Z",
                        "updated_at": null,
                        "parameters": {
                          "coin": {
                            "exchange_ratio": 20,
                            "points_ratio": 100
                          }
                        },
                        "type": "COIN"
                      },
                      "loyalty_card": {
                        "points": 2300
                      }
                    }
                  },
                  "Redeem Pay with Points Reward with a specific amount of points": {
                    "value": {
                      "id": "r_0c6b423368146fa4bb",
                      "object": "redemption",
                      "date": "2023-02-06T09:40:32.800Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 100,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_1L67XS8EYDDp5A4B3k62G2tr",
                        "source_id": null,
                        "created_at": "2023-02-06T09:40:32.784Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 45000,
                        "discount_amount": 2000,
                        "total_discount_amount": 2000,
                        "total_amount": 43000,
                        "applied_discount_amount": 2000,
                        "total_applied_discount_amount": 2000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0c5d6689b39320059b",
                            "quantity": 1,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b2c36568000039138",
                            "quantity": 2,
                            "amount": 45000,
                            "price": 22500,
                            "subtotal_amount": 45000,
                            "product": {
                              "id": "prod_0b2c36568000039138",
                              "source_id": "86",
                              "name": "[Sample] Able Brewing System",
                              "price": 22500
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c6b423368146fa4bb": {
                            "date": "2023-02-06T09:40:32.800Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 8500,
                          "balance": 4974
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T09:40:32.801Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 15,
                          "redeemed_points": 3526,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
                        "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                        "object": "reward",
                        "name": "100 = $20",
                        "created_at": "2022-11-10T06:28:39.582Z",
                        "updated_at": null,
                        "parameters": {
                          "coin": {
                            "exchange_ratio": 20,
                            "points_ratio": 100
                          }
                        },
                        "type": "COIN"
                      },
                      "loyalty_card": {
                        "points": 100
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id :campaignId",
                      "request_id": "v-0c6b39288084e3435a",
                      "resource_id": ":campaignId",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "description": "Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersRedemptionRedeemRequestBody"
              },
              "examples": {
                "Pay with Points": {
                  "value": {
                    "reward": {
                      "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                      "points": 100
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0c5d6689b39320059b",
                          "quantity": "1"
                        },
                        {
                          "product_id": "prod_0b2c36568000039138",
                          "quantity": "2"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/loyalties/members/{memberId}/redemption": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card assigned to a particular customer."
        }
      ],
      "post": {
        "operationId": "redeem-reward",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Redeem Reward",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\n\n<Note>\n\n<Badge color=\"blue\">Alternative endpoint</Badge>\n\nThis endpoint is an alternative to this [endpoint](/api-reference/loyalties/redeem-reward-with-campaign-id). The URL was re-designed to allow you to redeem a reward without having to provide the `campaignId` as a path parameter.\n\n</Note>",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a redemption object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersRedemptionRedeemResponseBody"
                },
                "examples": {
                  "Redeem Pay with Points Reward with a specific number of Points": {
                    "value": {
                      "id": "r_0c6b4bf721439bf02b",
                      "object": "redemption",
                      "date": "2023-02-06T10:23:12.517Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 100,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_71Ayjxq2gFV80v3OP3qrxh37",
                        "source_id": null,
                        "created_at": "2023-02-06T10:23:12.485Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 45000,
                        "discount_amount": 2000,
                        "total_discount_amount": 2000,
                        "total_amount": 43000,
                        "applied_discount_amount": 2000,
                        "total_applied_discount_amount": 2000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0c5d6689b39320059b",
                            "quantity": 1,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b2c36568000039138",
                            "quantity": 2,
                            "amount": 45000,
                            "price": 22500,
                            "subtotal_amount": 45000,
                            "product": {
                              "id": "prod_0b2c36568000039138",
                              "source_id": "86",
                              "name": "[Sample] Able Brewing System",
                              "price": 22500
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c6b4bf721439bf02b": {
                            "date": "2023-02-06T10:23:12.517Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "age": 26,
                          "favorite_brands": [
                            "Nike",
                            "Adidas",
                            "Reebok"
                          ],
                          "accepts_marketing": false,
                          "acquisition_channel": "Facebook"
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                      "voucher": {
                        "id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                        "code": "AnsvocvP",
                        "campaign": "Loyalty Campaign - Test Points",
                        "campaign_id": "camp_22noMlhTADb7Fq2UL3vWu3d1",
                        "category": null,
                        "category_id": "cat_0bb81a481615a37b5e",
                        "categories": [],
                        "type": "LOYALTY_CARD",
                        "discount": null,
                        "gift": null,
                        "loyalty_card": {
                          "points": 9000,
                          "balance": 5374
                        },
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": null,
                        "metadata": {},
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1/Au841M0T7UjYYRxYTzCRbNdZW6jW5YRNcV9PgblvN2MD5hdRuZfBRHEAm+d2pvzc2FOVHFkuh9BQoaIq4KVyvy0FvkWtKkMLe4zO+qL4ocNUIbaRMSLeY6Xiz4hjxKNq918oLyGrp9w==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1+xG42zWo9nivfp6tg5jNuFCYOIFtw7iwas8kcA/8H4gu04dxO/hrbD41gFvxDhCuTSnIKwIPg9dEXzOvh8qy9VWN0UwDc6PL7lfNQuY+8Os7dqVsyNhoRned9pBo1uO6V4pjNu1gRTrw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-11-10T06:28:59.970Z",
                        "updated_at": "2023-02-06T10:23:12.517Z",
                        "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "holder": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 16,
                          "redeemed_points": 3626,
                          "object": "list",
                          "url": "/v1/vouchers/AnsvocvP/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/AnsvocvP/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "age": 26,
                            "favorite_brands": [
                              "Nike",
                              "Adidas",
                              "Reebok"
                            ],
                            "accepts_marketing": false,
                            "acquisition_channel": "Facebook"
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
                        "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                        "object": "reward",
                        "name": "100 = $20",
                        "created_at": "2022-11-10T06:28:39.582Z",
                        "updated_at": null,
                        "parameters": {
                          "coin": {
                            "exchange_ratio": 20,
                            "points_ratio": 100
                          }
                        },
                        "type": "COIN"
                      },
                      "loyalty_card": {
                        "points": 100
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error indicating that a reward is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/e_400_missing_reward"
                    },
                    {
                      "$ref": "#/components/schemas/e_400_missing_order"
                    },
                    {
                      "$ref": "#/components/schemas/e_400_loyalty_card_points_exceeded"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating a resource was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Member Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id :memberId",
                      "request_id": "v-0c6b4b525d8e40cf3e",
                      "resource_id": ":memberId",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "description": "Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesMembersRedemptionRedeemRequestBody"
              },
              "examples": {
                "Pay with Points": {
                  "value": {
                    "reward": {
                      "id": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
                      "points": 100
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0c5d6689b39320059b",
                          "quantity": "1"
                        },
                        {
                          "product_id": "prod_0b2c36568000039138",
                          "quantity": "2"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/loyalties/{campaignId}/tiers": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty campaign ID or name."
        }
      ],
      "get": {
        "operationId": "list-loyalty-tiers",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Tiers",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve a list of loyalty tiers which were added to the loyalty program.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListLoyaltyTiers"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of loyalty tier objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesTiersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ltr_30KHciA0UG8B71Fo51GZqwgN",
                          "name": "Bottom",
                          "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "metadata": {},
                          "created_at": "2022-11-10T12:20:52.755Z",
                          "updated_at": "2022-11-25T11:27:58.616Z",
                          "earning_rules": {
                            "ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
                              "type": "MULTIPLY",
                              "multiplier": 1
                            },
                            "ern_raVUcdXruvXGuzm682ESrAzt": {
                              "type": "CUSTOM",
                              "points": 5
                            }
                          },
                          "rewards": {
                            "rewa_t88DnSdNnE0IzQX6gqH3jHGQ": {
                              "type": "MULTIPLY",
                              "multiplier": 4
                            }
                          },
                          "config": {
                            "points": {
                              "from": 1,
                              "to": 249
                            }
                          },
                          "points": {
                            "from": 1,
                            "to": 249
                          },
                          "object": "loyalty_tier"
                        },
                        {
                          "id": "ltr_pudTGWasuIqxdiDM0go31OV1",
                          "name": "Middle",
                          "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "metadata": {},
                          "created_at": "2022-11-10T12:20:52.755Z",
                          "updated_at": "2022-11-25T11:27:58.579Z",
                          "earning_rules": {
                            "ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
                              "type": "MULTIPLY",
                              "multiplier": 2
                            }
                          },
                          "rewards": {},
                          "config": {
                            "points": {
                              "from": 250,
                              "to": 499
                            }
                          },
                          "points": {
                            "from": 250,
                            "to": 499
                          },
                          "object": "loyalty_tier"
                        },
                        {
                          "id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2",
                          "name": "Tier 1 - Top",
                          "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "metadata": {
                            "has_funds": true
                          },
                          "created_at": "2022-11-09T06:26:54.797Z",
                          "updated_at": "2022-11-25T11:27:58.578Z",
                          "earning_rules": {
                            "ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
                              "type": "MULTIPLY",
                              "multiplier": 3
                            },
                            "ern_AdlWO2yt6b6llWsibIdiRXVE": {
                              "type": "MULTIPLY",
                              "multiplier": 5
                            },
                            "ern_HnRXyJHoj3E79r3KUWhgMgtD": {
                              "type": "MULTIPLY",
                              "multiplier": 3
                            },
                            "ern_raVUcdXruvXGuzm682ESrAzt": {
                              "type": "CUSTOM",
                              "points": 200
                            }
                          },
                          "rewards": {
                            "rewa_Or6gWZ5ASuGkBLjOf0IyiD4k": {
                              "type": "CUSTOM",
                              "points": 300
                            }
                          },
                          "config": {
                            "points": {
                              "from": 500,
                              "to": 1000
                            }
                          },
                          "points": {
                            "from": 500,
                            "to": 1000
                          },
                          "object": "loyalty_tier"
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-in-bulk-loyalty-tiers",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Create loyalty tiers",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nCreates loyalty tiers for desired campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns created loyalty tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesTiersCreateInBulkResponseBody"
                }
              }
            }
          }
        },
        "requestBody": {
          "description": "Provide tier definitions you want to add to existing loyalty campaign.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesTiersCreateInBulkRequestBody"
              }
            }
          },
          "required": true
        }
      }
    },
    "/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty campaign ID or name."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterLoyaltyTierId"
          },
          "name": "loyaltyTierId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty tier ID."
        }
      ],
      "get": {
        "operationId": "get-loyalty-tier",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Loyalty Tier",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve a loyalty tier from a loyalty campaign by the loyalty tier ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a loyalty tier object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesTiersGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2",
                      "name": "Tier 1 - Top",
                      "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                      "metadata": {
                        "has_funds": true
                      },
                      "created_at": "2022-11-09T06:26:54.797Z",
                      "updated_at": "2022-11-25T11:27:58.578Z",
                      "earning_rules": {
                        "ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
                          "type": "MULTIPLY",
                          "multiplier": 3
                        },
                        "ern_AdlWO2yt6b6llWsibIdiRXVE": {
                          "type": "MULTIPLY",
                          "multiplier": 5
                        },
                        "ern_HnRXyJHoj3E79r3KUWhgMgtD": {
                          "type": "MULTIPLY",
                          "multiplier": 3
                        },
                        "ern_raVUcdXruvXGuzm682ESrAzt": {
                          "type": "CUSTOM",
                          "points": 200
                        }
                      },
                      "rewards": {
                        "rewa_Or6gWZ5ASuGkBLjOf0IyiD4k": {
                          "type": "CUSTOM",
                          "points": 300
                        }
                      },
                      "config": {
                        "points": {
                          "from": 500,
                          "to": 1000
                        }
                      },
                      "points": {
                        "from": 500,
                        "to": 1000
                      },
                      "object": "loyalty_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/members/{memberId}/tiers": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty card assigned to a particular customer."
        }
      ],
      "get": {
        "operationId": "list-member-loyalty-tier",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member's Loyalty Tiers",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve member tiers using the loyalty card ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a data array containing the member's loyalty tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesMembersTiersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2",
                          "name": "Tier 1 - Top",
                          "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                          "metadata": {
                            "has_funds": true
                          },
                          "created_at": "2022-11-09T06:26:54.797Z",
                          "updated_at": "2022-11-25T11:27:58.578Z",
                          "earning_rules": {
                            "ern_95aq3JaE5A8xzHjoJPYNRqXZ": {
                              "type": "MULTIPLY",
                              "multiplier": 3
                            },
                            "ern_AdlWO2yt6b6llWsibIdiRXVE": {
                              "type": "MULTIPLY",
                              "multiplier": 5
                            },
                            "ern_HnRXyJHoj3E79r3KUWhgMgtD": {
                              "type": "MULTIPLY",
                              "multiplier": 3
                            },
                            "ern_raVUcdXruvXGuzm682ESrAzt": {
                              "type": "CUSTOM",
                              "points": 200
                            }
                          },
                          "rewards": {
                            "rewa_Or6gWZ5ASuGkBLjOf0IyiD4k": {
                              "type": "CUSTOM",
                              "points": 300
                            }
                          },
                          "config": {
                            "points": {
                              "from": 500,
                              "to": 1000
                            }
                          },
                          "points": {
                            "from": 500,
                            "to": 1000
                          },
                          "expiration": {
                            "customer_id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                            "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "tier_id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2",
                            "start_date": "2022-11-10",
                            "expiration_date": "2023-02-28",
                            "created_at": "2022-11-09T11:26:26.719Z",
                            "updated_at": "2022-11-10T08:54:47.200Z"
                          },
                          "object": "loyalty_tier"
                        }
                      ],
                      "total": 1
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID or name."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterLoyaltyTierId"
          },
          "name": "loyaltyTierId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty tier ID."
        }
      ],
      "get": {
        "operationId": "list-loyalty-tier-earning-rules",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Tier Earning Rules",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nRetrieve available earning rules for a given tier and the calculation method for earning points.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of earning rules for a given tier. The object for each earning rule also contains information about how the points are calculated; this includes mapping. If a specific multiplier was used to calculate points for a given tier, then the `loyalty.points` parameter will account for this calculation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesTiersEarningRulesListResponseBody"
                },
                "examples": {
                  "example-1": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ern_95aq3JaE5A8xzHjoJPYNRqXZ",
                          "created_at": "2022-11-09T06:26:54.332Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 1,
                                "points": 300,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "event": "customer.loyalty.tier.joined",
                          "loyalty_tier": {
                            "id": "__ANY__"
                          },
                          "source": {
                            "banner": "Tier Joined",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_bfi69WIbztany4iX6prkKbGN",
                          "metadata": {
                            "Type": "Joined Any"
                          }
                        },
                        {
                          "id": "ern_HnRXyJHoj3E79r3KUWhgMgtD",
                          "created_at": "2022-11-10T12:25:12.927Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 300,
                            "type": "FIXED"
                          },
                          "segment": {
                            "id": "seg_n3vVcU5t0m3rs4rEPr3C1oU5"
                          },
                          "event": "customer.segment.entered",
                          "source": {
                            "banner": "New Customers",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_0gv3v7jQG5U6TtVC8bMEdIap",
                          "metadata": {}
                        },
                        {
                          "id": "ern_raVUcdXruvXGuzm682ESrAzt",
                          "created_at": "2022-11-24T09:03:14.534Z",
                          "updated_at": "2022-11-25T09:48:26.284Z",
                          "validation_rule_id": "val_7SxpdhPeBngA",
                          "loyalty": {
                            "points": 20,
                            "type": "FIXED"
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order has been paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "start_date": "2022-11-23T00:00:00.000Z",
                          "expiration_date": "2022-11-30T00:00:00.000Z",
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ],
                          "object": "earning_rule",
                          "automation_id": "auto_MbEIyLbn7pHyba5Qw5eeb35L",
                          "metadata": {
                            "Type": "Order has been paid - Fixed"
                          }
                        },
                        {
                          "id": "ern_BmDiQs7T3UHfJQqtI2RfJHFR",
                          "created_at": "2022-11-24T14:48:36.567Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_AMOUNT",
                            "order": {
                              "amount": {
                                "every": 1000,
                                "points": 1
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_IKanVw37J6oFuRrdnryXw8Lz",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 1"
                          }
                        },
                        {
                          "id": "ern_jwtacKdEEHoc85QbouRw3CR8",
                          "created_at": "2022-11-24T15:17:11.539Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_TOTAL_AMOUNT",
                            "order": {
                              "total_amount": {
                                "every": 1100,
                                "points": 1
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order has been paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_Y6IWqhz0cHGkKcteU9PS5nmK",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 2"
                          }
                        },
                        {
                          "id": "ern_fxVdmtJ4u4rlyoH2hIq7m1PQ",
                          "created_at": "2022-11-24T15:20:04.392Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_METADATA",
                            "order": {
                              "metadata": {
                                "every": 10,
                                "points": 2,
                                "property": "number_of_store_visits"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_HyowcdKQ0lsQ1rSxV5tyYr2z",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 3 - Metadata"
                          }
                        },
                        {
                          "id": "ern_Aop1wTrmPv4yBntDcvXNTCWR",
                          "created_at": "2022-11-24T15:23:44.514Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_ITEMS_AMOUNT",
                            "order_items": {
                              "amount": {
                                "every": 1000,
                                "points": 3,
                                "object": "products_collection",
                                "id": "pc_75U0dHlr7u75BJodrW1AE3t6"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_EXRyQ0z0rgtF54PKDGGAF1qg",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 4"
                          }
                        },
                        {
                          "id": "ern_4qSQVjfGEH7OmXKMzotS0juY",
                          "created_at": "2022-11-24T15:44:45.301Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_ITEMS_SUBTOTAL_AMOUNT",
                            "order_items": {
                              "subtotal_amount": {
                                "every": 1000,
                                "points": 4,
                                "object": "sku",
                                "id": "sku_0b7d7dfb090be5c619"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_ID3xLPXCdnOaveJYWiulcNFW",
                          "metadata": {
                            "Type": "Order has been paid - Proportional - 5 - Items"
                          }
                        },
                        {
                          "id": "ern_aJyt4wIrXhmfMxvrLoZjBYrP",
                          "created_at": "2022-11-24T15:56:58.710Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "ORDER_ITEMS_AMOUNT",
                            "order_items": {
                              "amount": {
                                "every": 10000,
                                "points": 1,
                                "object": "product",
                                "id": "prod_0bae32322150fd0546"
                              }
                            }
                          },
                          "event": "order.paid",
                          "source": {
                            "banner": "Order paid",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_EbBqD1SNW70vgDp5icGbWl3e",
                          "metadata": {}
                        },
                        {
                          "id": "ern_v4Blmh9hA3gpnjo93cMAgvHr",
                          "created_at": "2022-11-24T16:19:20.571Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 1,
                                "points": 5,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "segment": {
                            "id": "seg_OlE7DmfzMI5pHyD5VAv512r1"
                          },
                          "event": "customer.segment.entered",
                          "source": {
                            "banner": "Entered Segment",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_wMMDJ86iHKkznz9x0506e30E",
                          "metadata": {}
                        },
                        {
                          "id": "ern_L8dFanPxJzhw0f5voTwPurGP",
                          "created_at": "2022-11-24T16:27:13.917Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 3,
                            "type": "FIXED"
                          },
                          "custom_event": {
                            "schema_id": "ms_gn4Qe4xsFPf7orCArCiNVY13"
                          },
                          "event": "page_view",
                          "source": {
                            "banner": "Custom Event",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_9N69OJzGKGhp2mo7SNsnsF5b",
                          "metadata": {
                            "Type": "Fixed"
                          }
                        },
                        {
                          "id": "ern_ngdugZ2hzg35hGASFF8nDjUO",
                          "created_at": "2022-11-24T16:41:48.830Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOM_EVENT_METADATA",
                            "custom_event": {
                              "metadata": {
                                "every": 2,
                                "points": 2,
                                "property": "volume_number"
                              }
                            }
                          },
                          "custom_event": {
                            "schema_id": "ms_qpRZ3EmRQyszNH6Z52Gkq8au"
                          },
                          "event": "user_subscribed",
                          "source": {
                            "banner": "Custom Event",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_v1eTxL7X63B5IkYgRWHK4leh",
                          "metadata": {
                            "Type": "Event"
                          }
                        },
                        {
                          "id": "ern_afo3Ea760hAKv07JYpycnhiE",
                          "created_at": "2022-11-24T16:50:12.945Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 3,
                                "points": 3,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "custom_event": {
                            "schema_id": "ms_f0r4hcu5T0m3v3nT5ch3ma"
                          },
                          "event": "cart_abandoned",
                          "source": {
                            "banner": "Custom Event",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_7ovoKiXx49fe3nnhEbDlp9FP",
                          "metadata": {}
                        },
                        {
                          "id": "ern_chdlG14W8Sdcq3d6jJQQgRMT",
                          "created_at": "2022-11-24T16:51:31.595Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 1,
                            "type": "FIXED"
                          },
                          "event": "customer.loyalty.tier.joined",
                          "loyalty_tier": {
                            "id": "__ANY__"
                          },
                          "source": {
                            "banner": "Tier joined - Any",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_W9yMQTz5fgQTgmuu6pTVraBW",
                          "metadata": {
                            "Type": "Tier joined  - any - fixed"
                          }
                        },
                        {
                          "id": "ern_gVo6CHBduFPoh1hctASfXHLT",
                          "created_at": "2022-11-24T17:01:42.809Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 4,
                                "points": 4,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "event": "customer.loyalty.tier.joined",
                          "loyalty_tier": {
                            "id": "ltr_pudTGWasuIqxdiDM0go31OV1"
                          },
                          "source": {
                            "banner": "Tier joined",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_wdlEo17wmoqYHGfilbayEUj7",
                          "metadata": {
                            "Type": "Tier joined - customer metadata - proportional"
                          }
                        },
                        {
                          "id": "ern_66OdCyLADv5IGFoQe18vGUwa",
                          "created_at": "2022-11-24T17:03:59.414Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 2,
                                "points": 2,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "event": "customer.loyalty.tier.left",
                          "loyalty_tier": {
                            "id": "ltr_7rVIPlPzdSFwpnbCcUXgwzH2"
                          },
                          "source": {
                            "banner": "Tier left",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_czm5el1Uz1jeGaO97AYoDNAq",
                          "metadata": {
                            "Type": "Tier left"
                          }
                        },
                        {
                          "id": "ern_YR3fDfCjAmz9a5D68nk0i4dm",
                          "created_at": "2022-11-25T07:29:38.961Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "type": "PROPORTIONAL",
                            "calculation_type": "CUSTOMER_METADATA",
                            "customer": {
                              "metadata": {
                                "every": 3,
                                "points": 4,
                                "property": "customer_life_time_value"
                              }
                            }
                          },
                          "event": "customer.loyalty.tier.upgraded",
                          "loyalty_tier": {
                            "id": "ltr_30KHciA0UG8B71Fo51GZqwgN"
                          },
                          "source": {
                            "banner": "Tier upgraded",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_M1OdRH8spk6Fs7yTuPLN2LAv",
                          "metadata": {
                            "Type": "Upgraded"
                          }
                        },
                        {
                          "id": "ern_A2RArBE30Tkt56utVLrRv7rZ",
                          "created_at": "2022-11-25T07:31:05.866Z",
                          "updated_at": "2022-11-25T09:48:26.506Z",
                          "validation_rule_id": "val_kfmWpfXMI9P1",
                          "loyalty": {
                            "points": 1,
                            "type": "FIXED"
                          },
                          "event": "customer.loyalty.tier.downgraded",
                          "loyalty_tier": {
                            "id": "__ANY__"
                          },
                          "source": {
                            "banner": "Tier Downgraded",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_TMVZtCNMBgZm0KcPJ7otiHZW",
                          "metadata": {
                            "Type": "Tier"
                          }
                        },
                        {
                          "id": "ern_AdlWO2yt6b6llWsibIdiRXVE",
                          "created_at": "2022-11-25T07:31:42.767Z",
                          "updated_at": null,
                          "validation_rule_id": null,
                          "loyalty": {
                            "points": 25,
                            "type": "FIXED"
                          },
                          "event": "customer.loyalty.tier.prolonged",
                          "loyalty_tier": {
                            "id": "__ANY__"
                          },
                          "source": {
                            "banner": "Prolonged",
                            "object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "object_type": "campaign"
                          },
                          "active": true,
                          "object": "earning_rule",
                          "automation_id": "auto_4jH1yq9WJS0oJ8suagCrltyb",
                          "metadata": {}
                        }
                      ],
                      "total": 19
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID or name."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterLoyaltyTierId"
          },
          "name": "loyaltyTierId",
          "in": "path",
          "required": true,
          "description": "Unique loyalty tier ID."
        }
      ],
      "get": {
        "operationId": "list-loyalty-tier-rewards",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Tier Rewards",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nGet available rewards for a given tier.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of loyalty tier reward objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesTiersRewardsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "reward": {
                            "id": "rew_QuWYsBNB2G3fikffjnl0G3gH",
                            "name": "API - Testing",
                            "type": "CAMPAIGN",
                            "parameters": {
                              "campaign": {
                                "id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                                "balance": 500,
                                "type": "LOYALTY_PROGRAM"
                              }
                            },
                            "stock": null,
                            "redeemed": null,
                            "created_at": "2022-08-25T09:32:04.579424+00:00",
                            "updated_at": "2022-08-25T09:33:46.680639+00:00",
                            "metadata": {
                              "Type": "Second campaign"
                            },
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_3Z2sP0bmqcL0ggU28GvFeHU3",
                            "reward_id": "rew_QuWYsBNB2G3fikffjnl0G3gH",
                            "related_object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "related_object_type": "campaign",
                            "parameters": {
                              "loyalty": {
                                "points": 40
                              }
                            },
                            "created_at": "2022-11-23T22:11:58.759092+00:00",
                            "updated_at": null,
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_tier_reward"
                        },
                        {
                          "reward": {
                            "id": "rew_XoDgmQ2HZX7qPM6aIEuslObo",
                            "name": "Material",
                            "type": "MATERIAL",
                            "parameters": {
                              "product": {
                                "id": "prod_0b15f6b9f650c16990",
                                "sku_id": "sku_0b1621b319d248b79f"
                              }
                            },
                            "stock": 2,
                            "redeemed": 1,
                            "attributes": {
                              "image_url": "{{internalVoucherifyURL}}",
                              "description": "Archie's Series"
                            },
                            "created_at": "2022-08-29T06:02:36.753873+00:00",
                            "updated_at": "2022-11-08T08:01:26.883166+00:00",
                            "metadata": {
                              "Type": "Material"
                            },
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_Or6gWZ5ASuGkBLjOf0IyiD4k",
                            "reward_id": "rew_XoDgmQ2HZX7qPM6aIEuslObo",
                            "related_object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "related_object_type": "campaign",
                            "parameters": {
                              "loyalty": {
                                "points": 30
                              }
                            },
                            "created_at": "2022-11-23T22:11:58.759092+00:00",
                            "updated_at": null,
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_tier_reward"
                        },
                        {
                          "reward": {
                            "id": "rew_MVXA2kV7lZ1zC057WUaTrvNz",
                            "name": "100 Points = $20",
                            "type": "COIN",
                            "parameters": {
                              "coin": {
                                "exchange_ratio": 20,
                                "points_ratio": 100
                              }
                            },
                            "stock": null,
                            "redeemed": null,
                            "attributes": {},
                            "created_at": "2022-09-09T06:41:54.496035+00:00",
                            "updated_at": null,
                            "metadata": {},
                            "object": "reward"
                          },
                          "assignment": {
                            "id": "rewa_nMXB59qGTNYawMT8eP8M4oUp",
                            "reward_id": "rew_MVXA2kV7lZ1zC057WUaTrvNz",
                            "related_object_id": "camp_fkZ28pe7DUAEmmabofkxHI8N",
                            "related_object_type": "campaign",
                            "created_at": "2022-11-09T11:01:21.065681+00:00",
                            "updated_at": null,
                            "object": "reward_assignment"
                          },
                          "object": "loyalty_tier_reward"
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties/{campaignId}/qualifications": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID of the loyalty program."
        }
      ],
      "post": {
        "operationId": "estimate-points",
        "deprecated": true,
        "tags": [
          "Loyalties"
        ],
        "summary": "Estimate loyalty points",
        "description": "<Warning>\n\n<Badge color=\"yellow\">Legacy loyalty API</Badge>\n\nThis endpoint belongs to the legacy loyalty API (`/v1/loyalties`).\n\nVoucherify will not develop new features for this API. However, critical issues may still receive fixes.\n\nFor new integrations, use [Loyalty v2](/build/loyalty-overview).\n\nIf you have questions, contact [Voucherify support](https://www.voucherify.io/contact-support \"Contact Voucherify support\").\n\n</Warning>\n\nEstimates the number of points a customer will receive for a given order in the loyalty campaign under its earning rules. This endpoint also returns point estimation for created transactions (orders with status `PAID`)\n\nThis endpoint returns only an estimation, not a precise point value.\n\nAlso, this estimation works only for the Order paid earning rules. If a campaign includes tiers, mappings, and multiple earning rules, the calculation becomes more complex. During final calculation, a customer may change tiers and earn more or fewer points depending on other factors.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          },
          {
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide customer `source_id` and order `source_id`.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoyaltiesQualificationsCheckEligibilityRequestBody"
              },
              "examples": {
                "Point estimation request": {
                  "value": {
                    "customer": {
                      "source_id": "customerSourceID",
                      "metadata": {
                        "reason": "loyaltyQualifications"
                      }
                    },
                    "order": {
                      "source_id": "ord_113628fa0685537f99",
                      "metadata": {
                        "source": "qualifyPoints"
                      }
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Returns campaign details and estimated number of points.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoyaltiesQualificationsCheckEligibilityResponseBody"
                },
                "examples": {
                  "Point estimation response": {
                    "value": {
                      "campaign": {
                        "id": "camp_6hAtKbSF3iMj8wN8HjlvPuQG",
                        "name": "Loyalty-campaign",
                        "object": "campaign"
                      },
                      "points_estimation": 51
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if a required property is missing or the campaign or loyalty card is inactive. Also, returns an error if point estimation is made for a customer who doesn't participate in the loyalty campaign and the auto-join setting is turned off.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Auto-join turned off": {
                    "value": {
                      "code": 400,
                      "key": "campaign_not_allow_auto_join",
                      "message": "Loyalty campaign 'camp_MuI0R45sm7Zc071zTKr4l7U2' does not allow auto-join for non-members",
                      "details": "Given campaign does not allow auto-join",
                      "request_id": "v-11a681dec0d56f0616"
                    }
                  },
                  "Customer object missing": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .customer must be object",
                      "request_id": "v-11a682e603156f14ea"
                    }
                  },
                  "Order object missing": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .order must be object",
                      "request_id": "v-11a683295e48bae514"
                    }
                  },
                  "Inactive campaign": {
                    "value": {
                      "code": 400,
                      "key": "campaign_not_active",
                      "message": "Loyalty campaign 'camp_MuI0R45sm7Zc071zTKr4l7U2' is not active",
                      "details": "Given campaign is not active",
                      "request_id": "v-11a683767b556f1ec4"
                    }
                  },
                  "Inactive loyalty card": {
                    "value": {
                      "code": 400,
                      "key": "loyalty_card_not_active",
                      "message": "Customer's loyalty card 'Loyalty-ZC4Vg' is not active",
                      "details": "Given customer's loyalty card is not active",
                      "request_id": "v-11a683f3eec8baf2cd"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign ID that was specified in the path parameter is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_MuIR45sm7Zc071zTKr4l7U2",
                      "request_id": "v-11a681ab00d56f0327",
                      "resource_id": "camp_MuIR45sm7Zc071zTKr4l7U2",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterLimit"
        },
        "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items."
      },
      "page": {
        "name": "page",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterPage"
        },
        "description": "Which page of results to return. The lowest value is `1`."
      },
      "customer": {
        "name": "customer",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterCustomerId"
        },
        "description": "A tracking identifier of a customer who is the holder of the vouchers. It can be an `id` generated by Voucherify or the `source_id`. Remember to use the proper URL escape codes if the `source_id` contains special characters."
      },
      "created_at": {
        "name": "created_at",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterCreatedBeforeAfter"
        },
        "description": "A filter on the list based on the object `created_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[created_at][before]=2017-09-08T13:52:18.227Z`",
        "style": "deepObject",
        "explode": true
      },
      "updated_at": {
        "name": "updated_at",
        "in": "query",
        "schema": {
          "$ref": "#/components/schemas/ParameterUpdatedBeforeAfter"
        },
        "description": "A filter on the list based on the object `updated_at` field. The value is a dictionary with the following options: `before`, `after`. A date value must be presented in ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). An example: `[updated_at][before]=2017-09-08T13:52:18.227Z`",
        "style": "deepObject",
        "explode": true
      },
      "ids": {
        "name": "ids",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterIds"
        }
      }
    },
    "schemas": {
      "ParameterExpandListCampaigns": {
        "type": "string",
        "enum": [
          "category",
          "access_settings_assignments"
        ]
      },
      "ParameterOrderListCampaigns": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "LoyaltiesListCampaignsResponseBody": {
        "type": "object",
        "title": "Loyalties List Campaigns Response Body",
        "description": "Response body schema for **Get** `/loyalties`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about loyalty campaigns in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "campaigns",
            "enum": [
              "campaigns"
            ],
            "description": "Identifies the name of the attribute that contains the array of loyalty campaign objects."
          },
          "campaigns": {
            "type": "array",
            "description": "Contains an array of loyalty campaign objects.",
            "items": {
              "$ref": "#/components/schemas/LoyaltyCampaign"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of loyalty campaign objects."
          }
        }
      },
      "LoyaltiesCreateCampaignRequestBody": {
        "type": "object",
        "title": "Loyalties Create Campaign Request Body",
        "description": "Request body schema for **POST** `/loyalties`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateLoyaltyCampaign"
          }
        ]
      },
      "LoyaltiesCreateCampaignResponseBody": {
        "type": "object",
        "title": "Loyalties Create Campaign Response Body",
        "description": "Response body schema for **POST** `/loyalties`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyCampaign"
          }
        ]
      },
      "LoyaltiesGetCampaignResponseBody": {
        "type": "object",
        "title": "Loyalties Get Campaign Response Body",
        "description": "Response body schema for **GET** `/loyalties/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyCampaign"
          }
        ]
      },
      "Error": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a885062c80375740f",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          },
          "resource_id": {
            "type": "string",
            "description": "Unique resource ID that can be used in another endpoint to get more details.",
            "example": "rf_0c5d710a87c8a31f86"
          },
          "resource_type": {
            "type": "string",
            "description": "The resource type.",
            "example": "voucher"
          },
          "error": {
            "type": "object",
            "description": "Includes the resolved custom validation-rule error message when one is configured.",
            "properties": {
              "message": {
                "type": "string",
                "description": "Resolved custom validation-rule error message for `options.language`, falling back to the Error Message Library default language. Present only when a custom message can be resolved."
              }
            }
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "ParameterCampaignId": {
        "type": "string",
        "example": "camp_rRsfatlwN7unSeUIJDCYedal"
      },
      "LoyaltiesUpdateCampaignRequestBody": {
        "type": "object",
        "title": "Loyalties Update Campaign Request Body",
        "description": "Request body schema for **PUT** `/loyalties/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateLoyaltyCampaign"
          }
        ]
      },
      "LoyaltiesUpdateCampaignResponseBody": {
        "type": "object",
        "title": "Loyalties Update Campaign Response Body",
        "description": "Response body schema for **PUT** `/loyalties/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyCampaign"
          }
        ]
      },
      "ParameterBoolean": {
        "type": "boolean"
      },
      "LoyaltiesDeleteResponseBody": {
        "type": "object",
        "title": "LoyaltiesDeleteResponseBody",
        "description": "Response body schema for **DELETE** `/loyalties/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "ParameterOrderVouchers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "code",
          "-code"
        ]
      },
      "ParameterCode": {
        "type": "string",
        "example": "2CpRCE2c"
      },
      "LoyaltiesListMembersResponseBody": {
        "title": "Loyalties List Members Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/members`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about members in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "vouchers",
            "enum": [
              "vouchers"
            ],
            "description": "Identifies the name of the attribute that contains the array of voucher objects."
          },
          "vouchers": {
            "type": "array",
            "description": "Contains array of voucher objects representing loyalty cards, in other words, loyalty program members.",
            "items": {
              "$ref": "#/components/schemas/LoyaltyMember"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of voucher objects."
          }
        }
      },
      "LoyaltiesMembersCreateRequestBody": {
        "title": "Loyalties Members Create Request Body",
        "type": "object",
        "description": "Request body schema for assigning a loyalty card to a customer using **POST** `/loyalties/{campaignId}/members`.",
        "allOf": [
          {
            "title": "Voucher code",
            "type": "object",
            "properties": {
              "voucher": {
                "description": "Code of voucher being published.",
                "type": "string"
              }
            }
          },
          {
            "$ref": "#/components/schemas/CreatePublicationBase"
          }
        ]
      },
      "LoyaltiesMembersCreateResponseBody": {
        "title": "Loyalties Members Create Response Body",
        "type": "object",
        "description": "Respone body schema for assigning a loyalty card to a customer using **POST** `/loyalties/{campaignId}/members`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyMember"
          }
        ]
      },
      "LoyaltiesMembersGetResponseBody": {
        "title": "Loyalties Members Get Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}` and **GET** `/loyalties/members/{memberId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyMember"
          }
        ]
      },
      "ParameterMemberId": {
        "type": "string",
        "example": "MmFAzfDe"
      },
      "ParameterLimit": {
        "type": "integer",
        "maximum": 100,
        "minimum": 1
      },
      "ParameterOrderListPendingPoints": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterString": {
        "type": "string"
      },
      "LoyaltiesPendingPointsListResponseBody": {
        "title": "Loyalties Campaign Pending Points List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `/loyalties/{campaignId}/pending-points`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ListPendingPoints"
          }
        ]
      },
      "LoyaltiesMembersPendingPointsListResponseBody": {
        "title": "Loyalties Members Pending Points List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `/loyalties/{campaignId}/members/{memberId}/pending-points` and **GET** `/loyalties/members/{memberId}/pending-points`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ListPendingPoints"
          }
        ]
      },
      "LoyaltiesMembersPendingPointsActivateResponseBody": {
        "title": "Loyalties Members Pending Points Activate Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `/loyalties/members/{memberId}/pending-points/{pendingPointsId}/activate`.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The number of pending points added to the loyalty card."
          },
          "total": {
            "type": "integer",
            "description": "Total number of points incurred over the lifespan of the loyalty card, minus the expired points."
          },
          "balance": {
            "type": "integer",
            "description": "The current number of loyalty points after the pending points have been added."
          },
          "type": {
            "type": "string",
            "description": "The type of the voucher being modified. For pending points, it is always `loyalty_card`.",
            "default": "loyalty_card",
            "enum": [
              "loyalty_card"
            ]
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `balance`.",
            "default": "balance",
            "enum": [
              "balance"
            ]
          },
          "related_object": {
            "type": "object",
            "description": "Defines the resource that is being modified.",
            "required": [
              "type",
              "id"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "The object being modified, i.e. `voucher`.",
                "default": "voucher",
                "enum": [
                  "voucher"
                ]
              },
              "id": {
                "type": "string",
                "description": "Identifies the voucher that is being modified. This is the unique identifer that was assigned by Voucherify.",
                "example": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
              }
            }
          },
          "operation_type": {
            "type": "string",
            "description": "The type of the operation being performed.",
            "default": "MANUAL",
            "enum": [
              "MANUAL"
            ]
          }
        },
        "required": [
          "points",
          "total",
          "balance",
          "type",
          "object",
          "related_object",
          "operation_type"
        ]
      },
      "LoyaltiesMembersPendingPointsBalanceRequestBody": {
        "title": "Loyalties Members Pending Points Balance Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/loyalties/members/{memberId}/pending-points/{pendingPointsId}/balance`.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "Add or subtract pending points with a given ID. A negative value subtracts the points."
          }
        }
      },
      "LoyaltiesMembersPendingPointsBalanceResponseBody": {
        "title": "Loyalties Members Pending Points Balance Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `/loyalties/members/{memberId}/pending-points/{pendingPointsId}/balance`.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The number of pending points added to or subtracted from the loyalty card."
          },
          "total": {
            "type": "integer",
            "description": "Total number of pending points currently on a loyalty card."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `balance`.",
            "default": "balance",
            "enum": [
              "balance"
            ]
          },
          "related_object": {
            "type": "object",
            "description": "Defines the resource that is being modified.",
            "required": [
              "type",
              "id"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "The object being modified, i.e. `voucher`.",
                "default": "voucher",
                "enum": [
                  "voucher"
                ]
              },
              "id": {
                "type": "string",
                "description": "Identifies the voucher that is being modified. This is the unique identifer that was assigned by Voucherify.",
                "example": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
              }
            }
          },
          "operation_type": {
            "type": "string",
            "description": "The type of the operation being performed.",
            "default": "MANUAL",
            "enum": [
              "MANUAL"
            ]
          }
        },
        "required": [
          "points",
          "total",
          "object",
          "related_object",
          "operation_type"
        ]
      },
      "ParameterOrderCreatedAt": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at"
        ]
      },
      "LoyaltiesMemberActivityListResponseBody": {
        "type": "object",
        "title": "Member Activity List Response Body",
        "description": "Response body schema for retrieving member activity.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about member activities in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of member activity objects."
          },
          "data": {
            "type": "array",
            "description": "Array of member activity objects.",
            "items": {
              "$ref": "#/components/schemas/MemberActivity"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request with a `starting_after_id` query or a different limit to get more records returned in the results."
          },
          "more_starting_after": {
            "type": "string",
            "description": "Returns an ID that can be used to return another page of results. Use the event ID in the `starting_after_id` query parameter to display another page of the results starting after the event with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "has_more"
        ]
      },
      "LoyaltiesMembersBalanceUpdateRequestBody": {
        "description": "Request Body schema for **POST** `v1/loyalties/members/{memberId}/balance` and **POST** `v1/loyalties/{campaignId}/members/{memberId}/balance`.",
        "title": "Loyalties Members Balance Update Request Body",
        "type": "object",
        "properties": {
          "points": {
            "type": "integer",
            "description": "Incremental balance to be added to/subtracted from the loyalty card.\n\n- To add points: 100\n- To subtract points, add a minus: -100"
          },
          "expiration_type": {
            "description": "Set the type of expiration for added points.\n\n`PROGRAM_RULES`: Inherit rules from campaign.\n`NON_EXPIRING`: Points never expire.\n`CUSTOM_DATE`: Points expire on a particular date. Requires expiration_date parameter.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PointsExpirationTypes"
              }
            ]
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Set expiration date for added points, i.e. `YYYY-MM-DD`. This parameter is required only when expiration_type is set to `CUSTOM_DATE`."
          },
          "reason": {
            "type": "string",
            "description": "Reason for the transfer."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service."
          }
        },
        "required": [
          "points"
        ]
      },
      "LoyaltiesMembersBalanceUpdateResponseBody": {
        "title": "Loyalties Members Balance Update Response Body",
        "type": "object",
        "description": "Response schema for **POST** `v1/loyalties/members/{memberId}/balance` and for **POST** `v1/loyalties/{campaignId}/members/{memberId}/balance`.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The incremental points removed or added to the current balance on the loyalty card."
          },
          "total": {
            "type": "integer",
            "description": "The total of points accrued over the lifetime of the loyalty card."
          },
          "balance": {
            "type": "integer",
            "minimum": 0,
            "description": "The balance after adding/removing points."
          },
          "type": {
            "type": "string",
            "enum": [
              "loyalty_card",
              "gift_voucher"
            ],
            "description": "The type of voucher being modified."
          },
          "object": {
            "type": "string",
            "pattern": "balance",
            "default": "balance",
            "enum": [
              "balance"
            ],
            "description": "The type of the object represented by JSON. Default is balance."
          },
          "related_object": {
            "type": "object",
            "required": [
              "type",
              "id"
            ],
            "description": "Defines the object that is being modified with the values that are returned in the balance object.",
            "properties": {
              "type": {
                "type": "string",
                "default": "voucher",
                "enum": [
                  "voucher"
                ],
                "description": "The object being modified."
              },
              "id": {
                "type": "string",
                "description": "Identifies the loyalty card that is being modified, this is the ID that was assigned by the Voucherify API."
              }
            }
          },
          "operation_type": {
            "type": "string",
            "description": "The type of operation being performed.",
            "enum": [
              "MANUAL",
              "AUTOMATIC"
            ]
          }
        },
        "required": [
          "points",
          "total",
          "balance",
          "type",
          "object",
          "related_object"
        ]
      },
      "LoyaltiesMembersTransfersCreateRequestBody": {
        "title": "Loyalties Members Transfers Create Request Body",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/members/{memberId}/transfers`.",
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/LoyaltiesTransferPoints"
        }
      },
      "LoyaltiesMembersTransfersCreateResponseBody": {
        "title": "Loyalties Members Transfers Create Response Body",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/members/{memberId}/transfers`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assigned by the Voucherify API, identifies the voucher."
          },
          "code": {
            "type": "string",
            "description": "A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters."
          },
          "campaign": {
            "type": "string",
            "description": "A unique campaign name, identifies the voucher's parent campaign."
          },
          "campaign_id": {
            "type": "string",
            "description": "Assigned by the Voucherify API, identifies the voucher's parent campaign."
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint."
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique category ID assigned by Voucherify."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher."
          },
          "loyalty_card": {
            "type": "object",
            "description": "Object representing loyalty card parameters. Child attributes are present only if type is LOYALTY_CARD.",
            "required": [
              "points",
              "balance"
            ],
            "properties": {
              "points": {
                "type": "integer",
                "description": "Total number of points added to the loyalty card over its lifespan."
              },
              "balance": {
                "type": "integer",
                "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
              },
              "next_expiration_date": {
                "type": "string",
                "description": "The next closest date when the next set of points are due to expire."
              },
              "next_expiration_points": {
                "type": "integer",
                "description": "The amount of points that are set to expire next."
              },
              "pending_points": {
                "type": "integer",
                "description": "Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually."
              },
              "expired_points": {
                "type": "integer",
                "description": "Shows the total number of expired points over the lifetime of the loyalty card."
              },
              "subtracted_points": {
                "type": "integer",
                "description": "Shows the total number of subtracted points over the lifetime of the loyalty card."
              }
            }
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date.",
            "format": "date-time"
          },
          "expiration_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date.",
            "format": "date-time"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "publish": {
            "type": "object",
            "description": "This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event. A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or publish voucher API method.",
            "properties": {
              "object": {
                "type": "string",
                "default": "list",
                "enum": [
                  "list"
                ],
                "description": "The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute."
              },
              "count": {
                "type": "integer",
                "description": "Publication events counter."
              },
              "entries": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "url": {
                "type": "string",
                "description": "The endpoint where this list of publications can be accessed using a **GET** method. /v1/vouchers/{voucher_code}/publications"
              }
            },
            "required": [
              "object"
            ]
          },
          "redemption": {
            "type": "object",
            "description": "Stores a summary of redemptions that have been applied to the voucher.",
            "properties": {
              "quantity": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many times a voucher can be redeemed. A null value means unlimited."
              },
              "redeemed_points": {
                "type": "integer",
                "description": "Total loyalty points redeemed."
              },
              "redeemed_quantity": {
                "type": "integer",
                "description": "How many times a voucher has already been redeemed."
              },
              "object": {
                "type": "string",
                "default": "list",
                "enum": [
                  "list"
                ],
                "description": "The type of the object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute."
              },
              "url": {
                "type": "string",
                "description": "The endpoint where this list of redemptions can be accessed using a **GET** method. /v1/vouchers/{voucher_code}/redemptions"
              }
            },
            "required": [
              "quantity"
            ]
          },
          "active": {
            "type": "string",
            "description": "A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date.\n\n- `true` indicates an active voucher\n- `false` indicates an inactive voucher"
          },
          "additional_info": {
            "type": [
              "string",
              "null"
            ],
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format."
          },
          "assets": {
            "type": "object",
            "description": "Stores links to images of QR and barcode that correspond to an encrypted voucher code.",
            "properties": {
              "qr": {
                "type": "object",
                "description": "Stores Quick Response (QR) representation of encrypted code.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==",
                    "description": "Encrypted voucher code ID."
                  },
                  "url": {
                    "type": "string",
                    "example": "https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D",
                    "description": "URL to QR code  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
                  }
                }
              },
              "barcode": {
                "type": "object",
                "description": "Stores barcode representation of encrypted code.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==",
                    "description": "Encrypted voucher code ID."
                  },
                  "url": {
                    "type": "string",
                    "example": "https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D",
                    "description": "URL to barcode  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
                  }
                }
              }
            }
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "holder_id": {
            "type": "string",
            "description": "Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify."
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the voucher was last updated in ISO 8601 format.",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "code",
          "category",
          "category_id",
          "type",
          "loyalty_card",
          "start_date",
          "expiration_date",
          "validity_timeframe",
          "validity_day_of_week",
          "active",
          "additional_info",
          "metadata",
          "is_referral_code",
          "created_at"
        ]
      },
      "ParameterOrderListTransactions": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParametersFiltersListCampaignTransactions": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "id": {
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "voucher_id": {
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          }
        }
      },
      "LoyaltiesTransactionsListResponseBody": {
        "type": "object",
        "title": "Loyalties Transactions List Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/transactions`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of transaction objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoyaltyCardTransaction"
            },
            "description": "A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object."
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request (with a different paging or a different start date filter) to get more records returned in the results."
          },
          "more_starting_after": {
            "type": "string",
            "description": "Returns an ID that can be used to return another page of results. Use the transaction ID in the `starting_after_id` query parameter to display another page of the results starting after the transaction with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "has_more"
        ]
      },
      "LoyaltiesTransactionsExportCreateRequestBody": {
        "title": "Loyalties Transactions Export Create Request Body",
        "description": "Request body schema for **POST** `v1/loyalties/{campaignId}/transactions/export`.",
        "type": "object",
        "properties": {
          "parameters": {
            "description": "List of available parameters containing fields and filters that can be exported for transactions in a loyalty card campaign, along with the sorting order of the returned data.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignsTransactionsExportParameters"
              },
              {
                "type": "object",
                "properties": {
                  "filters": {
                    "$ref": "#/components/schemas/ExportCampaignTransactionsFilters"
                  }
                }
              }
            ]
          }
        }
      },
      "CampaignsTransactionsExportCreateResponseBody": {
        "type": "object",
        "title": "Campaigns Transactions Export Create Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}/transactions/export`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsTransactionsExport"
          }
        ]
      },
      "ParameterFiltersListMemberTransactions": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "created_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "id": {
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          }
        }
      },
      "LoyaltiesMembersTransactionsListResponseBody": {
        "title": "Loyalties Members Transactions List Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/members/{memberId}/transactions` and `/loyalties/members/{memberId}/transactions`.",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "pattern": "list",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON."
          },
          "data_ref": {
            "type": "string",
            "pattern": "data",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of transaction objects."
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object.",
            "items": {
              "$ref": "#/components/schemas/LoyaltyCardTransaction"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results."
          },
          "more_starting_after": {
            "type": "string",
            "description": "Returns an ID that can be used to return another page of results. Use the transaction ID in the `starting_after_id` query parameter to display another page of the results starting after the transaction with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "has_more"
        ]
      },
      "LoyaltiesMembersTransactionsExportCreateRequestBody": {
        "title": "Loyalties Members Transactions Export Create Request Body",
        "description": "Request body schema for **POST** `v1/loyalties/members/{memberId}/transactions/export` and for **POST** `v1/loyalties/{campaignId}/members/{memberId}/transactions/export`.",
        "type": "object",
        "properties": {
          "parameters": {
            "type": "object",
            "properties": {
              "order": {
                "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportVoucherTransactionsOrder"
                  }
                ]
              },
              "fields": {
                "type": "array",
                "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file.",
                "items": {
                  "$ref": "#/components/schemas/ExportVoucherTransactionsFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportVoucherTransactionsFilters"
                  }
                ]
              }
            },
            "description": "List of available fields and filters that can be exported with an order along with the sorting order of the returned data."
          }
        }
      },
      "LoyaltiesMembersTransactionsExportCreateResponseBody": {
        "title": "Loyalties Members Transactions Export Create Response Body",
        "description": "Response body schema for **POST** `v1/loyalties/members/{memberId}/transactions/export` and for **POST** `v1/loyalties/{campaignId}/members/{memberId}/transactions/export`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportVoucherTransactionsScheduled"
          }
        ]
      },
      "LoyaltiesMembersPointsExpirationListResponseBody": {
        "title": "Loyalties Members Points Expiration List Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/members/{memberId}/points-expiration`.",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "pattern": "list",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about loyalty points expiration buckets in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "pattern": "data",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of loyalty points expiration bucket objects."
          },
          "data": {
            "type": "array",
            "description": "Contains array of loyalty points expiration buckets.",
            "items": {
              "$ref": "#/components/schemas/LoyaltyPointsBucket"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of point expiration buckets."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "LoyaltiesPointsExpirationExportCreateRequestBody": {
        "title": "Loyalties Points Expiration Export Create Request Body",
        "type": "object",
        "description": "Request schema model for validating a voucher using **POST** `/v1/loyalties/{campaignId}/points-expiration/export`",
        "properties": {
          "parameters": {
            "$ref": "#/components/schemas/LoyaltiesPointsExpirationExportCreateRequestBodyParameters"
          }
        }
      },
      "LoyaltiesPointsExpirationExportCreateResponseBody": {
        "title": "Loyalties Points Expiration Export Create Response Body",
        "type": "object",
        "description": "Object representing an export of points expirations. ",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique export ID.",
            "example": "exp_FFfp9o7daWuJqJCKp5xqqli4"
          },
          "object": {
            "type": "string",
            "default": "export",
            "enum": [
              "export"
            ],
            "description": "The type of object being represented. This object stores information about the export."
          },
          "created_at": {
            "type": "string",
            "example": "2022-04-28T11:23:20.922Z",
            "description": "Timestamp representing the date and time when the export was scheduled in ISO 8601 format.",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "Status of the export. Informs you whether the export has already been completed.",
            "enum": [
              "SCHEDULED"
            ]
          },
          "channel": {
            "type": "string",
            "description": "The channel through which the export was triggered.",
            "enum": [
              "API",
              "WEBSITE"
            ]
          },
          "exported_object": {
            "type": "string",
            "description": "The type of exported object.",
            "default": "points_expiration",
            "enum": [
              "points_expiration"
            ]
          },
          "parameters": {
            "$ref": "#/components/schemas/LoyaltiesPointsExpirationExportCreateResponseBodyParameters"
          },
          "result": {
            "type": "object",
            "description": "Always null."
          },
          "user_id": {
            "type": "string",
            "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0Fr",
            "description": "`user_id` identifies the specific user who initiated the export through the Voucherify Dashboard. `user_id` is returned when the channel value is `WEBSITE`."
          }
        }
      },
      "ParameterOrderListEarningRules": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "LoyaltiesEarningRulesListResponseBody": {
        "description": "Response body schema for listing earning rules using **GET** `v1/loyalties/{campaignId}/earning-rules` endpoint.",
        "type": "object",
        "title": "List Earning Rules Response Body",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about earning rules in a dictionary.",
            "default": "list",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of earning rule objects."
          },
          "data": {
            "type": "array",
            "description": "Contains array of earning rule objects.",
            "items": {
              "$ref": "#/components/schemas/EarningRule"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of earning rule objects."
          }
        }
      },
      "LoyaltiesEarningRulesCreateRequestBody": {
        "description": "This data model represents the Request body schema for the `/loyalties/{campaignId}/earning-rules` endpoint.",
        "title": "Create Earning Rule Request Body",
        "type": "array",
        "items": {
          "oneOf": [
            {
              "$ref": "#/components/schemas/LoyaltiesEarningRulesCreateOrderPaidRequestBody"
            },
            {
              "$ref": "#/components/schemas/LoyaltiesEarningRulesCreateEnteredSegmentRequestBody"
            },
            {
              "$ref": "#/components/schemas/LoyaltiesEarningRulesCreateCustomEventRequestBody"
            },
            {
              "$ref": "#/components/schemas/LoyaltiesEarningRulesCreateTierChangeRequestBody"
            }
          ]
        }
      },
      "LoyaltiesEarningRulesCreateResponseBody": {
        "type": "object",
        "title": "Loyalties Earning Rules Get Response Body",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/earning-rules`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRule"
          }
        ]
      },
      "e_400_missing_param": {
        "description": "Error: Bad Request &rarr; Missing Parameters",
        "type": "object",
        "title": "Missing Parameters",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "missing_param",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Missing required parameter",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "example": "Parameter 'custom_event.schema_id' is required",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a96c19b1a41c03999",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "LoyaltiesEarningRulesGetResponseBody": {
        "type": "object",
        "title": "Loyalties Earning Rules Get Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/earning-rules/{earningRuleId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRule"
          }
        ]
      },
      "ParameterEarningRuleId": {
        "type": "string",
        "example": "ern_CFuv1O0IDl8Jgph0ojhMu8bH"
      },
      "LoyaltiesEarningRulesUpdateRequestBody": {
        "type": "object",
        "title": "Loyalties Earning Rules Update Request Body",
        "properties": {
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportional"
              }
            ]
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "example": "Order Paid - You will get 100 points",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the `start_date` and `expiration_date` of the campaign or the earning rule's own `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* earning rule\n- `false` indicates an *inactive* earning rule"
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is *inactive before* this date. If you don't define the start date for an earning rule, it will inherit the campaign start date by default. "
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format.  Earning rule is *inactive after* this date.If you don't define the expiration date for an earning rule, it will inherit the campaign expiration date by default."
          },
          "pending_points": {
            "type": [
              "object",
              "null"
            ],
            "description": "Defines the configuration for pending points. Pending points can be used only with the `order.paid` event. Pass `null` to remove pending points from the earning rule.",
            "properties": {
              "period_type": {
                "type": "string",
                "description": "Defines the type of the period during which the points are in the pending state. Currently, only `DAY` value is accepted.",
                "enum": [
                  "DAY"
                ]
              },
              "period_value": {
                "type": "integer",
                "description": "Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90.",
                "minimum": 1,
                "maximum": 90
              }
            }
          },
          "expiration_rules": {
            "$ref": "#/components/schemas/EarningRuleExpirationRules"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "LoyaltiesEarningRulesUpdateResponseBody": {
        "type": "object",
        "title": "Loyalties Earning Rules Get Response Body",
        "description": "Response body schema for **PUT** `v1/loyalties/{campaignId}/earning-rules/{earningRuleId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRule"
          }
        ]
      },
      "LoyaltiesEarningRulesEnableResponseBody": {
        "title": "Loyalties Earning Rules Enable Response Body",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable`",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRuleBase"
          },
          {
            "type": "object",
            "properties": {
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format."
              },
              "active": {
                "type": "boolean",
                "default": true,
                "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date."
              }
            },
            "required": [
              "updated_at",
              "active"
            ]
          }
        ]
      },
      "LoyaltiesEarningRulesDisableResponseBody": {
        "title": "Loyalties Earning Rules Disable Response Body",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable`",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRuleBase"
          },
          {
            "type": "object",
            "properties": {
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format."
              },
              "active": {
                "type": "boolean",
                "default": false,
                "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date."
              }
            },
            "required": [
              "updated_at",
              "active"
            ]
          }
        ]
      },
      "LoyaltiesMembersRewardsListResponseBody": {
        "title": "Loyalties Members Rewards List Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/members/{memberId}/rewards`",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "list",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of loyalty reward objects.",
            "default": "data",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Contains array of loyalty reward objects.",
            "items": {
              "title": "Loyalties Members Rewards List Response Body Data Item",
              "type": "object",
              "properties": {
                "reward": {
                  "description": "This is an object representing a reward.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Reward"
                    }
                  ]
                },
                "assignment": {
                  "description": "This is an object representing a reward assignment.",
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RewardAssignment"
                    }
                  ]
                },
                "object": {
                  "type": "string",
                  "description": "The type of the object represented by JSON.",
                  "default": "loyalty_reward",
                  "enum": [
                    "loyalty_reward"
                  ]
                }
              }
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of loyalty reward objects.",
            "minimum": 0
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "LoyaltiesRewardAssignmentsRewardGetResponseBody": {
        "type": "object",
        "title": "Loyalties Reward Assignments Reward Get Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward`",
        "allOf": [
          {
            "$ref": "#/components/schemas/Reward"
          }
        ]
      },
      "ParameterRewardAssignmentId": {
        "type": "string",
        "example": "rewa_m9hEAu10KsPcLhGXiHG85aY0"
      },
      "LoyaltiesRewardAssignmentsListResponseBody": {
        "title": "Loyalties Reward Assignments List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/reward-assignments`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltiesRewardsListAssignmentsResponseBody"
          }
        ]
      },
      "LoyaltiesRewardsListAssignmentsResponseBody": {
        "title": "Loyalties Rewards List Assignments Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/rewards`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about loyalty reward assignments in a dictionary.",
            "default": "list",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of reward assignment objects.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "Contains array of reward assignment objects.",
            "items": {
              "$ref": "#/components/schemas/RewardAssignment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of reward assignment objects."
          }
        }
      },
      "LoyaltiesRewardsCreateAssignmentRequestBody": {
        "title": "Loyalties Rewards Create Assignment Request Body",
        "type": "array",
        "description": "Request body schema for **POST** `v1/loyalties/{campaignId}/rewards`.",
        "items": {
          "$ref": "#/components/schemas/LoyaltiesRewardsCreateAssignmentItemRequestBody"
        }
      },
      "LoyaltiesRewardsCreateAssignmentResponseBody": {
        "type": "object",
        "title": "Loyalties Rewards Create Assignment Response Body",
        "description": "Response body schema for **POST** `v1/v1/loyalties/{campaignId}/rewards`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignment"
          }
        ]
      },
      "LoyaltiesRewardAssignmentsGetResponseBody": {
        "type": "object",
        "title": "Loyalties Reward Assignments Get Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/reward-assignments/{assignmentId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignment"
          }
        ]
      },
      "LoyaltiesRewardsGetResponseBody": {
        "type": "object",
        "title": "Loyalties Reward Assignments Get Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/rewards/{assignmentId}`",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignment"
          }
        ]
      },
      "LoyaltiesRewardsUpdateAssignmentResponseBody": {
        "type": "object",
        "title": "Loyalties Rewards Update Assignment Response Body",
        "description": "Response body schema for **PUT** `v1/v1/loyalties/{campaignId}/rewards/{assignmentId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignment"
          }
        ]
      },
      "LoyaltiesRewardsUpdateAssignmentRequestBody": {
        "title": "Loyalties Rewards Update Assignment Request Body",
        "description": "Response body schema for **PUT** `v1/v1/loyalties/{campaignId}/rewards/{assignmentId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardsAssignmentsUpdateRequestBody"
          }
        ]
      },
      "LoyaltiesMembersRedemptionRedeemResponseBody": {
        "title": "Loyalties Members Redemption Redeem Response Body",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/members/{memberId}/redemption` and for **POST** `v1/loyalties/members/{memberId}/redemption`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/MembersRedemption"
          },
          {
            "title": "RedemptionRewardRequired",
            "type": "object",
            "required": [
              "reward"
            ]
          }
        ]
      },
      "LoyaltiesMembersRedemptionRedeemRequestBody": {
        "description": "Request body schema for **POST** `v1/loyalties/{campaignId}/members/{memberId}/redemption` and for **POST** `v1/loyalties/members/{memberId}/redemption`.",
        "type": "object",
        "title": "Loyalties Members Redemption Redeem Request Body",
        "properties": {
          "reward": {
            "type": "object",
            "description": "Contains information about the reward that the customer wants to redeem and the number of points the customer is choosing to use for the reward if the reward is a pay with points reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward.",
                "example": "rew_eSi4eYJk7o3tOycvweicR2z7"
              },
              "points": {
                "type": "integer",
                "description": "The number of loyalty points that the user wants to spend in order to fulfill the order. The number of points cannot be higher than the current balance on the loyalty card."
              }
            }
          },
          "order": {
            "description": "Order object that is **required** when redeeming a pay with points reward.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Order"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](/api-reference/validation-rules/create-validation-rules) endpoint or with the [Validation Rule Builder](/personalize/create-validation-rules) in the the Dashboard."
          }
        }
      },
      "e_400_missing_reward": {
        "title": "Missing Reward",
        "type": "object",
        "description": "Error: Bad Request &rarr; Missing Reward",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "missing_reward",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Missing reward",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "example": "A reward is required when redeeming a LOYALTY_CARD",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a885062c80375740f",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          },
          "resource_id": {
            "type": "string",
            "example": "rf_0b3a1814550e5aaa34",
            "description": "Unique resource ID that can be used in another endpoint to get more details."
          },
          "resource_type": {
            "type": "string",
            "example": "redemption",
            "description": "The resource type."
          },
          "error": {
            "type": "object",
            "description": "Contains error message translation.",
            "properties": {
              "message": {
                "type": "string",
                "example": "Missing reward = please add one.",
                "description": "Error message translation defined in Dashboard &rarr; Project Settings &rarr; Error Messages"
              }
            }
          }
        }
      },
      "e_400_missing_order": {
        "title": "Missing Order",
        "type": "object",
        "description": "Error: Bad Request &rarr; Missing Order",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "missing_order",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Missing order",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "example": "An order is required when redeeming a LOYALTY_CARD",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a885062c80375740f",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          },
          "resource_id": {
            "type": "string",
            "example": "rf_0b3a1814550e5aaa34",
            "description": "Unique resource ID that can be used in another endpoint to get more details."
          },
          "resource_type": {
            "type": "string",
            "example": "redemption",
            "description": "The resource type."
          },
          "error": {
            "type": "object",
            "description": "Contains error message translation.",
            "properties": {
              "message": {
                "type": "string",
                "example": "Missing order = please add one.",
                "description": "Error message translation defined in Dashboard &rarr; Project Settings &rarr; Error Messages"
              }
            }
          }
        }
      },
      "e_400_loyalty_card_points_exceeded": {
        "title": "Loyalty Card Points Exceeded",
        "type": "object",
        "description": "Error: Bad Request &rarr; Loyalty Card Points Exceeded",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "loyalty_card_points_exceeded",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "loyalty card points exceeded",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "example": "SoAm6kbC",
            "description": "A human-readable message providing more details about the error."
          },
          "request_id": {
            "type": "string",
            "example": "v-0a885062c80375740f",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          },
          "resource_id": {
            "type": "string",
            "example": "rf_0b3a1814550e5aaa34",
            "description": "Unique resource ID that can be used in another endpoint to get more details."
          },
          "resource_type": {
            "type": "string",
            "example": "redemption",
            "description": "The resource type."
          },
          "error": {
            "type": "object",
            "description": "Contains error message translation.",
            "properties": {
              "message": {
                "type": "string",
                "example": "There are not enough loyalty points on the card.",
                "description": "Error message translation defined in Dashboard &rarr; Project Settings &rarr; Error Messages"
              }
            }
          }
        }
      },
      "ParameterOrderListLoyaltyTiers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "LoyaltiesTiersListResponseBody": {
        "title": "Loyalties Tiers List Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/tiers`.",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of loyalty tier objects."
          },
          "data": {
            "type": "array",
            "description": "This is an object representing a loyalty tier. Loyalty tiers are used to create a loyalty program with different levels of membership and varied earning rules and rewards based on customer's tiers.",
            "items": {
              "$ref": "#/components/schemas/LoyaltyTier"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of loyalty tier objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "LoyaltiesTiersCreateInBulkResponseBody": {
        "title": "Loyalties Tiers Create Response Body",
        "type": "array",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/tiers`.",
        "items": {
          "$ref": "#/components/schemas/LoyaltyTier"
        }
      },
      "LoyaltiesTiersCreateInBulkRequestBody": {
        "title": "Loyalties Tiers Create Request Body",
        "description": "Request body schema for **POST** `v1/loyalties/{campaignId}/tiers`",
        "type": "array",
        "items": {
          "title": "Loyalties Tiers Create In Bulk Request Body Item",
          "allOf": [
            {
              "$ref": "#/components/schemas/LoyaltyTierBase"
            },
            {
              "type": "object",
              "properties": {
                "metadata": {
                  "description": "The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format.",
                  "type": "object"
                }
              }
            }
          ]
        }
      },
      "LoyaltiesTiersGetResponseBody": {
        "type": "object",
        "title": "Loyalties Tiers Get Response Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyTier"
          }
        ],
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/tiers/{loyaltyTierId}`."
      },
      "ParameterLoyaltyTierId": {
        "type": "string",
        "example": "promo_2EnAik6Jt7dKTOMkRTIgEjZH"
      },
      "LoyaltiesMembersTiersListResponseBody": {
        "title": "Loyalties Members Tiers List Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/members/{memberId}/tiers`.",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about loyalty tiers in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of loyalty tier objects."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoyaltyTier"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of loyalty tier objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "LoyaltiesTiersEarningRulesListResponseBody": {
        "title": "Loyalties Tiers Earning Rules List Response Body",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules`.",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about earning rules in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of earning rule objects."
          },
          "data": {
            "type": "array",
            "description": "Contains array of earning rule objects.",
            "items": {
              "$ref": "#/components/schemas/EarningRule"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of earning rule objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "LoyaltiesTiersRewardsListResponseBody": {
        "title": "Loyalties Tiers Rewards List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about loyalty tier rewards in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of loyalty tier reward objects."
          },
          "data": {
            "type": "array",
            "description": "Contains array of loyalty tier reward objects.",
            "items": {
              "$ref": "#/components/schemas/LoyaltiesLoyaltyTierReward"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of loyalty tier reward objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "LoyaltiesQualificationsCheckEligibilityRequestBody": {
        "title": "Loyalties Campaigns Qualifications Request Body",
        "type": "object",
        "description": "Request body schema for estimating loyalty points for an order with **POST** `/loyalties/{campaignId}/qualifications`.",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "order": {
            "type": "object",
            "description": "Details regarding the order being processed. You can provide either `source_id` of an existing order or an inline order/cart object (for example `amount`, `items`, or `metadata`). When both are provided, inline order data takes precedence.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique ID assigned by Voucherify of an existing order."
              },
              "source_id": {
                "type": "string",
                "description": "The unique ID of an existing order to be linked to the loyalty point estimation (qualification). This property can also be sent as `id`. If inline order fields are provided as well, the inline order data takes precedence."
              },
              "status": {
                "type": "string",
                "description": "The order status.",
                "enum": [
                  "CREATED",
                  "PAID",
                  "CANCELED",
                  "FULFILLED"
                ]
              },
              "amount": {
                "type": "integer",
                "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
              },
              "initial_amount": {
                "type": "integer",
                "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
              },
              "discount_amount": {
                "type": "integer",
                "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              },
              "items": {
                "type": "array",
                "description": "Array of items applied to the order. It can include up to 500 items.",
                "items": {
                  "type": "object",
                  "title": "Order Item Calculated",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique identifier of the order line item."
                    },
                    "sku_id": {
                      "type": "string",
                      "description": "Unique identifier of the SKU. It is assigned by Voucherify."
                    },
                    "product_id": {
                      "type": "string",
                      "description": "Unique identifier of the product. It is assigned by Voucherify."
                    },
                    "related_object": {
                      "type": "string",
                      "enum": [
                        "product",
                        "sku"
                      ],
                      "description": "Used along with the source_id property, can be set to either sku or product."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
                    },
                    "quantity": {
                      "type": "integer",
                      "description": "The quantity of the particular item in the cart."
                    },
                    "discount_quantity": {
                      "type": "integer",
                      "description": "Number of dicounted items."
                    },
                    "initial_quantity": {
                      "type": "integer",
                      "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity."
                    },
                    "amount": {
                      "type": "integer",
                      "description": "The total amount of the order item (price * quantity)."
                    },
                    "discount_amount": {
                      "type": "integer",
                      "description": "Sum of all order-item-level discounts applied to the order."
                    },
                    "applied_discount_amount": {
                      "type": "integer",
                      "description": "This field shows the order-level discount applied."
                    },
                    "applied_discount_quantity": {
                      "type": "integer",
                      "description": "Number of the discounted items applied in the transaction."
                    },
                    "applied_quantity": {
                      "type": "integer",
                      "description": "Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
                    },
                    "applied_quantity_amount": {
                      "type": "integer",
                      "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
                    },
                    "initial_amount": {
                      "type": "integer",
                      "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    },
                    "subtotal_amount": {
                      "type": "integer",
                      "description": "Final order item amount after the applied item-level discount.  If there are no item-level discounts applied, this item is equal to the `amount`.   \n`subtotal_amount`=`amount`-`applied_discount_amount`"
                    },
                    "product": {
                      "type": "object",
                      "description": "An object containing details of the related product.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "A unique identifier that represents the product and is assigned by Voucherify."
                        },
                        "source_id": {
                          "type": "string",
                          "description": "The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
                        },
                        "override": {
                          "type": "boolean",
                          "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
                        },
                        "name": {
                          "type": "string",
                          "description": "Product name."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections."
                        },
                        "price": {
                          "type": "number",
                          "description": "Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
                        }
                      }
                    },
                    "sku": {
                      "type": "object",
                      "description": "An object containing details of the related SKU.",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                        },
                        "source_id": {
                          "type": "string",
                          "description": "The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
                        },
                        "override": {
                          "type": "boolean",
                          "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
                        },
                        "sku": {
                          "type": "string",
                          "description": "The SKU name."
                        },
                        "price": {
                          "type": "number",
                          "description": "SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections."
                        }
                      }
                    },
                    "object": {
                      "type": "string",
                      "default": "order_item",
                      "enum": [
                        "order_item"
                      ],
                      "description": "The type of the object represented by JSON."
                    },
                    "metadata": {
                      "type": "object",
                      "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas."
                    }
                  },
                  "required": [
                    "object"
                  ]
                }
              },
              "customer_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
              },
              "referrer_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Unique referrer ID.",
                "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
              },
              "customer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CustomerId"
                  }
                ]
              },
              "referrer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ReferrerId"
                  }
                ]
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas."
              }
            }
          }
        },
        "required": [
          "customer",
          "order"
        ]
      },
      "LoyaltiesQualificationsCheckEligibilityResponseBody": {
        "title": "Loyalties Campaigns Qualifications Response Body",
        "type": "object",
        "description": "Response body schema for estimating loyalty points for an order with **POST** `/loyalties/{campaignId}/qualifications`.",
        "properties": {
          "campaign": {
            "type": "object",
            "description": "Details about the campaign associated with the estimation.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique identifier for the campaign, assigned by Voucherify."
              },
              "name": {
                "type": "string",
                "description": "The human-readable name of the campaign."
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "enum": [
                  "campaign"
                ]
              }
            },
            "required": [
              "id",
              "name",
              "object"
            ]
          },
          "points_estimation": {
            "type": "integer",
            "description": "The calculated estimation of points based on the order data and loyalty campaign's earning rules."
          }
        },
        "required": [
          "campaign",
          "points_estimation"
        ]
      },
      "ParameterPage": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "LoyaltyCampaign": {
        "title": "Loyalty Campaign",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_f7fBbQxUuTN7dI7tGOo5XMDA"
          },
          "name": {
            "type": "string",
            "description": "Campaign name."
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the campaign such as a campaign description and details."
          },
          "campaign_type": {
            "type": "string",
            "default": "LOYALTY_PROGRAM",
            "enum": [
              "LOYALTY_PROGRAM"
            ],
            "description": "Type of campaign."
          },
          "type": {
            "type": "string",
            "description": "Defines whether the campaign can be updated with new vouchers after campaign creation.    \n\n- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria    \n-  `STATIC`: vouchers need to be manually published",
            "enum": [
              "AUTO_UPDATE",
              "STATIC"
            ]
          },
          "voucher": {
            "$ref": "#/components/schemas/LoyaltyCampaignVoucher"
          },
          "auto_join": {
            "type": "boolean",
            "description": "Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled."
          },
          "join_once": {
            "type": "boolean",
            "description": "Always set to `true` for loyalty campaigns, meaning customers can join the campaign only once. It can't be changed to `false`."
          },
          "use_voucher_metadata_schema": {
            "type": "boolean",
            "description": "Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "activity_duration_after_publishing": {
            "type": "string",
            "description": "Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days."
          },
          "vouchers_count": {
            "type": "integer",
            "description": "Total number of unique vouchers in campaign."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2021-12-01T08:00:50.038Z",
            "description": "Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-09-20T09:18:19.623Z",
            "description": "Timestamp representing the date and time when the campaign was last updated in ISO 8601 format."
          },
          "category": {
            "type": "string",
            "description": "Unique category name."
          },
          "creation_status": {
            "type": "string",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT",
              "MODIFYING"
            ],
            "description": "Indicates the status of the campaign creation."
          },
          "vouchers_generation_status": {
            "type": "string",
            "description": "Indicates the status of the campaign's voucher generation.",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT",
              "MODIFYING"
            ]
          },
          "readonly": {
            "type": "boolean",
            "description": "Indicates whether the campaign can be only read by a restricted user in the Areas and Stores enterprise feature. It is returned only to restricted users; this field is not returned for users with other roles."
          },
          "protected": {
            "type": "boolean",
            "description": "Indicates whether the resource can be deleted."
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique category ID that this campaign belongs to.",
            "example": "cat_0b688929a2476386a7"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          },
          "loyalty_tiers_expiration": {
            "$ref": "#/components/schemas/LoyaltyTiersExpirationAll"
          },
          "validation_rules_assignments": {
            "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
          },
          "access_settings_assignments": {
            "$ref": "#/components/schemas/AccessSettingsCampaignAssignmentsList"
          }
        },
        "required": [
          "id",
          "name",
          "campaign_type",
          "type",
          "auto_join",
          "join_once",
          "use_voucher_metadata_schema",
          "created_at",
          "creation_status",
          "vouchers_generation_status",
          "protected",
          "category_id",
          "categories",
          "object"
        ]
      },
      "CampaignsCreateLoyaltyCampaign": {
        "title": "Create Loyalty Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateBase"
          },
          {
            "type": "object",
            "title": "Schema that contains unique properties for Loyalty Campaign",
            "description": "Body schema for creating a campaign of loyalty type using **POST** `v1/campaigns`.",
            "properties": {
              "campaign_type": {
                "type": "string",
                "default": "LOYALTY_PROGRAM",
                "enum": [
                  "LOYALTY_PROGRAM"
                ],
                "description": "Type of campaign."
              },
              "voucher": {
                "$ref": "#/components/schemas/CampaignLoyaltyVoucher"
              }
            }
          }
        ]
      },
      "CampaignsUpdateLoyaltyCampaign": {
        "type": "object",
        "title": "Update Loyalty Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateCouponCampaignBase"
          },
          {
            "type": "object",
            "title": "Properties For Loyalty Campaign",
            "description": "Body schema for update a campaign of loyalty type using **PUT** `v1/campaigns`.",
            "properties": {
              "loyalty_tiers_expiration": {
                "$ref": "#/components/schemas/LoyaltyTiersExpirationAll"
              },
              "options": {
                "type": "object",
                "properties": {
                  "recalculate_tiers": {
                    "type": "boolean",
                    "description": "Determine if tiers should be recalculated or no."
                  }
                }
              }
            }
          }
        ]
      },
      "AsyncActions": {
        "type": "object",
        "title": "Asynchronous Actions",
        "description": "Response to requests that are processed asynchronously.",
        "properties": {
          "async_action_id": {
            "type": "string",
            "example": "aa_0a875d56c805df6601",
            "description": "The ID of the scheduled asynchronous action."
          }
        },
        "required": [
          "async_action_id"
        ]
      },
      "ParameterCustomerId": {
        "type": "string",
        "example": "cust_nk0N1uNQ1YnupAoJGOgvsODC"
      },
      "ParameterCreatedBeforeAfter": {
        "type": "object",
        "properties": {
          "before": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time before the voucher was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "after": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time after the voucher was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "ParameterUpdatedBeforeAfter": {
        "type": "object",
        "properties": {
          "before": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time before the voucher was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "after": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time after the voucher was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        }
      },
      "ParameterIds": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "LoyaltyMember": {
        "title": "Loyalty Member",
        "description": "This is an object representing a loyalty member.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV",
            "description": "Assigned by the Voucherify API, identifies the voucher."
          },
          "code": {
            "type": "string",
            "example": "WVPblOYX",
            "description": "A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters."
          },
          "campaign": {
            "type": "string",
            "example": "Loyalty campaign",
            "description": "A unique campaign name, identifies the voucher's parent campaign."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
            "description": "Assigned by the Voucherify API, identifies the voucher's parent campaign."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify.",
            "example": "cat_0bb343dee3cdb5ec0c"
          },
          "type": {
            "type": "string",
            "default": "LOYALTY_CARD",
            "enum": [
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "type": "null"
          },
          "gift": {
            "type": "null"
          },
          "loyalty_card": {
            "type": "object",
            "description": "Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.",
            "properties": {
              "points": {
                "type": "integer",
                "example": 7000,
                "description": "Total number of points added to the loyalty card over its lifespan."
              },
              "balance": {
                "type": "integer",
                "example": 6970,
                "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
              },
              "next_expiration_date": {
                "type": "string",
                "format": "date",
                "example": "2023-05-30",
                "description": "The next closest date when the next set of points are due to expire."
              },
              "next_expiration_points": {
                "type": "integer",
                "description": "The amount of points that are set to expire next."
              },
              "pending_points": {
                "type": "integer",
                "description": "Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually."
              },
              "expired_points": {
                "type": "integer",
                "description": "Shows the total number of expired points over the lifetime of the loyalty card."
              },
              "subtracted_points": {
                "type": "integer",
                "description": "Shows the total number of subtracted points over the lifetime of the loyalty card."
              }
            }
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. "
          },
          "expiration_date": {
            "type": "string",
            "example": "2021-12-31T00:00:00.000Z",
            "format": "date-time",
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* voucher\n- `false` indicates an *inactive* voucher"
          },
          "additional_info": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format."
          },
          "assets": {
            "$ref": "#/components/schemas/VoucherAssets"
          },
          "is_referral_code": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "This is always false for loyalty members."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2021-12-22T10:14:45.316Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the voucher was last updated in ISO 8601 format."
          },
          "holder_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique identifier of the customer who owns the voucher."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          },
          "publish": {
            "type": "object",
            "description": "This object stores a summary of publish events: an events counter and an endpoint which can be called to return details of each event.  A publication is required for loyalty cards and referral codes. This object gets updated whenever a voucher has been published. Publication means assigning a code to a particular customer. Typically, a publication is made by distributing your codes to your customers, e.g. through Export to MailChimp or \n\n| Required | Optional |\n| -------- | :------: |\n| `type`:`LOYALTY_CARD` |  `type`:`DISCOUNT_VOUCHER`   | \n| `is_referral_code`:`true`      |    `type`:`GIFT_VOUCHER`   |\n",
            "properties": {
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute."
              },
              "count": {
                "type": "integer",
                "example": 0,
                "description": "Publication event counter."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/publications?page=1&limit=10",
                "description": "The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`"
              }
            }
          },
          "redemption": {
            "type": "object",
            "description": "Stores a summary of redemptions that have been applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              },
              "redeemed_points": {
                "type": "integer",
                "example": 100000,
                "description": "Total loyalty points redeemed."
              },
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10",
                "description": "The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`"
              }
            }
          }
        }
      },
      "CreatePublicationBase": {
        "title": "Create Publication Base",
        "type": "object",
        "description": "Create publication",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "The merchant's publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service.\nIf `source_id` is provided only 1 voucher can be published per request."
          },
          "customer": {
            "description": "Contains information about the customer to whom the publication was directed. Use `customer.id`, `customer.source_id`, or both to identify the customer; at least one of them is required.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format."
          },
          "channel": {
            "type": "string",
            "description": "Specify the distribution channel."
          }
        },
        "required": [
          "customer"
        ]
      },
      "ListPendingPoints": {
        "title": "Loyalties Members Pending Points List Response Body",
        "type": "object",
        "description": "Lists pending point entries.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of pending point objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoyaltyPendingPoints"
            },
            "description": "A dictionary that contains an array of pending point entries. Each entry in the array is a separate pending point object."
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results."
          },
          "more_starting_after": {
            "type": "string",
            "description": "Returns an ID that can be used to return another page of results. Use the pending point entry ID in the `starting_after_id` query parameter to display another page of the results starting after the entry with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "has_more"
        ]
      },
      "MemberActivity": {
        "title": "Member Activity",
        "type": "object",
        "description": "This is an object representing member activity.  \n\nThis is a general object which presents moments from members' activity. There are all types of different events that members perform during their journey once they participate in a loyalty program. Events describe moments when the members redeem loyalty cards and earn points or rewards. The list of all types of activities is listed below.\n\nThe details describing the activity are collected in an array property named `data`. In this object, software integrators can find all further information explaining the event context.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique event ID, assigned by Voucherify.",
            "example": "evcus_0c150c51730c6b60b1"
          },
          "type": {
            "type": "string",
            "description": "Event type.",
            "enum": [
              "customer.loyalty.tier.upgraded",
              "customer.loyalty.tier.downgraded",
              "customer.loyalty.tier.prolonged",
              "customer.loyalty.tier.expiration.changed",
              "customer.loyalty.tier.joined",
              "customer.loyalty.tier.left",
              "customer.publication.succeeded",
              "customer.publication.failed",
              "customer.redemption.failed",
              "customer.redemption.succceeded",
              "customer.redemption.rollback.failed",
              "customer.redemption.rollback.succceeded",
              "customer.rewarded",
              "customer.rewarded.loyalty_points",
              "customer.reward_redemptions.created",
              "customer.reward_redemptions.pending",
              "customer.reward_redemptions.completed",
              "customer.reward_redemptions.rolledback",
              "customer.voucher.deleted",
              "customer.voucher.loyalty_card.pending_points.activated",
              "customer.voucher.loyalty_card.pending_points.added",
              "customer.voucher.loyalty_card.pending_points.canceled",
              "customer.voucher.loyalty_card.pending_points.updated",
              "customer.voucher.loyalty_card.points_added",
              "customer.voucher.loyalty_card.points_transferred",
              "customer.voucher.loyalty_card.points_expired"
            ]
          },
          "data": {
            "type": "object",
            "description": "Contains details about the event. The objects that are returned in the data attribute differ based on the context of the event type.",
            "properties": {
              "data": {
                "$ref": "#/components/schemas/MemberActivityData"
              },
              "event_source": {
                "$ref": "#/components/schemas/EventSource"
              }
            }
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the member activity occurred in ISO 8601 format.",
            "example": "2022-08-30T09:14:07.660Z",
            "format": "date-time"
          },
          "group_id": {
            "type": "string",
            "description": "Unique identifier of the request that caused the event.",
            "example": "w-0e30613abc1f044513"
          }
        }
      },
      "PointsExpirationTypes": {
        "title": "Points Expiration Types",
        "type": "string",
        "enum": [
          "PROGRAM_RULES",
          "CUSTOM_DATE",
          "NON_EXPIRING"
        ]
      },
      "LoyaltiesTransferPoints": {
        "title": "Loyalties Transfer Points",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Unique loyalty card code from which the user wants to transfer loyalty points (source)."
          },
          "points": {
            "type": "integer",
            "description": "The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source)."
          },
          "reason": {
            "type": "string",
            "description": "Reason for the transfer."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service."
          }
        },
        "required": [
          "code",
          "points",
          "source_id"
        ]
      },
      "Category": {
        "title": "Category",
        "description": "This is an object representing a category.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Category name."
          },
          "hierarchy": {
            "type": "integer",
            "description": "Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value.",
            "minimum": 0
          },
          "object": {
            "type": "string",
            "default": "category",
            "enum": [
              "category"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the category."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the category was created. The value is shown in the ISO 8601 format.",
            "example": "2022-07-14T10:45:13.156Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2022-08-16T10:52:08.094Z",
            "description": "Timestamp representing the date and time when the category was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "hierarchy",
          "created_at",
          "object"
        ]
      },
      "ValidityTimeframe": {
        "title": "Validity Timeframe",
        "type": "object",
        "description": "Set recurrent time periods when the earning rule is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.",
        "properties": {
          "duration": {
            "type": "string",
            "description": "Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a `duration` of `PT1H` will be valid for a duration of one hour.",
            "example": "PT1H"
          },
          "interval": {
            "type": "string",
            "description": "Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an `interval` of `P2D` will be valid every other day.",
            "example": "P2D"
          }
        }
      },
      "ValidityDayOfWeek": {
        "title": "Validity Day Of Week",
        "type": "array",
        "description": "Integer array corresponding to the particular days of the week in which the voucher is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
        "items": {
          "type": "integer",
          "enum": [
            0,
            1,
            2,
            3,
            4,
            5,
            6
          ]
        }
      },
      "ValidityHours": {
        "title": "Validity Hours",
        "type": "object",
        "description": "Determines the hours of validity, e.g. to create a happy hours scenario.",
        "properties": {
          "daily": {
            "type": "array",
            "description": "Defines the recurring period(s) when the resource is active. The periods should not overlap.",
            "items": {
              "type": "object",
              "description": "Defines the recurring period(s) when the resource will be active.",
              "properties": {
                "start_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the starting hour of validity in the HH:mm format. The resource is *inactive before* this time.",
                  "example": "12:00"
                },
                "days_of_week": {
                  "type": "array",
                  "description": "Integer array corresponding to the particular days of the week in which the resource is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3`  Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday",
                  "items": {
                    "type": "integer",
                    "enum": [
                      0,
                      1,
                      2,
                      3,
                      4,
                      5,
                      6
                    ]
                  }
                },
                "expiration_time": {
                  "type": "string",
                  "format": "time",
                  "description": "Defines the ending hour of validity in the HH:mm format. The resource is *inactive after* this time.",
                  "example": "14:00"
                }
              }
            }
          }
        }
      },
      "Junction": {
        "title": "Junction",
        "description": "Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while  an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE.",
        "enum": [
          "and",
          "or"
        ],
        "type": "string"
      },
      "FilterConditionsString": {
        "title": "Filter by conditions",
        "type": "object",
        "description": "Data filters used to narrow down the data records to be returned in the result.",
        "properties": {
          "$in": {
            "type": "array",
            "description": "Array of resource values that should be included in the results (multiple values).",
            "items": {
              "type": "string"
            }
          },
          "$not_in": {
            "type": "array",
            "description": "Array of resource values that should be included in the results (multiple values).",
            "items": {
              "type": "string"
            }
          },
          "$is": {
            "type": "string",
            "description": "Value is exactly this value (single value)."
          },
          "$is_not": {
            "type": "string",
            "description": "Results omit this value (single value)."
          },
          "$has_value": {
            "type": "string",
            "description": "Value is NOT null. The value for this parameter is an empty string."
          },
          "$is_unknown": {
            "type": "string",
            "description": "Value is null. The value for this parameter is an empty string."
          },
          "$starts_with": {
            "type": "string",
            "description": "Value starts with the specified string."
          },
          "$ends_with": {
            "type": "string",
            "description": "Value ends with the specified string."
          },
          "$contains": {
            "type": "string",
            "description": "Value includes the specified string."
          },
          "$not_contain": {
            "type": "string",
            "description": "Value does NOT include the specified string."
          }
        }
      },
      "LoyaltyCardTransaction": {
        "title": "Loyalty Card Transaction",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherTransactionBase"
          },
          {
            "type": "object",
            "properties": {
              "details": {
                "type": "object",
                "description": "Contains the detailed information about the transaction.",
                "properties": {
                  "balance": {
                    "$ref": "#/components/schemas/VoucherBalance"
                  },
                  "order": {
                    "type": "object",
                    "description": "Contains information about the original order.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique order ID."
                      },
                      "source_id": {
                        "type": "string",
                        "description": "The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service."
                      }
                    },
                    "required": [
                      "id",
                      "source_id"
                    ]
                  },
                  "event": {
                    "type": "object",
                    "description": "Contains information about the event that triggers the point accrual.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique event ID."
                      },
                      "type": {
                        "type": "string",
                        "description": "Type of event."
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  },
                  "earning_rule": {
                    "type": "object",
                    "description": "Contains information about the earning rule.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of an earning rule, assigned by Voucherify."
                      },
                      "source": {
                        "type": "object",
                        "required": [
                          "banner"
                        ],
                        "description": "Contains the custom earning rule name.",
                        "properties": {
                          "banner": {
                            "type": "string",
                            "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                          }
                        }
                      }
                    },
                    "required": [
                      "id",
                      "source"
                    ]
                  },
                  "segment": {
                    "type": "object",
                    "description": "Contains information about the segment.",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "loyalty_tier": {
                    "type": "object",
                    "description": "Contains information about the loyalty tier that is mapped for the earning rule and used in the transaction.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                      },
                      "name": {
                        "type": "string",
                        "description": "User-defined name of the loyalty tier."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "redemption": {
                    "type": "object",
                    "description": "Contains information about the original redemption.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique redemption ID."
                      }
                    },
                    "required": [
                      "id"
                    ]
                  },
                  "rollback": {
                    "type": "object",
                    "description": "Contains information about the redemption rollback.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique redemption rollback ID."
                      }
                    },
                    "required": [
                      "id"
                    ]
                  },
                  "custom_event": {
                    "type": "object",
                    "description": "Contains information about the custom event that triggers the point accrual.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique event ID."
                      },
                      "type": {
                        "type": "string",
                        "description": "Type of custom event."
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  },
                  "event_schema": {
                    "type": "object",
                    "description": "Contains information about the custom event metadata schema.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique metadata schema ID."
                      },
                      "name": {
                        "type": "string",
                        "description": "Type of custom event."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "holder_loyalty_tier": {
                    "type": "object",
                    "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                      },
                      "name": {
                        "type": "string",
                        "description": "User-defined name of the loyalty tier."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "pending_points": {
                    "$ref": "#/components/schemas/LoyaltyPendingPoints"
                  },
                  "reward": {
                    "type": "object",
                    "description": "Contains information about the pay with points reward.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique reward ID."
                      },
                      "name": {
                        "type": "string",
                        "description": "Reward name."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "source_voucher": {
                    "description": "Contains information on how the balance on the donor loyalty card was affected by the transaction.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/SimpleVoucher"
                      }
                    ]
                  },
                  "destination_voucher": {
                    "description": "Contains information on how the balance on the receiving loyalty card was affected by the transaction.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/SimpleVoucher"
                      }
                    ]
                  }
                }
              },
              "type": {
                "$ref": "#/components/schemas/LoyaltyCardTransactionsType"
              }
            }
          }
        ]
      },
      "CampaignsTransactionsExportParameters": {
        "title": "Export Campaign Transactions",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is ordered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "-created_at",
              "created_at"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Data fields that will be exported for the transactions that are associated with balance movements on cards in a campaign.",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "type",
                "source_id",
                "reason",
                "balance",
                "amount",
                "created_at",
                "voucher_id",
                "source",
                "details",
                "related_transaction_id"
              ]
            }
          }
        }
      },
      "ExportCampaignTransactionsFilters": {
        "title": "Export Campaign Transactions Filters",
        "description": "Data filters and their conditions to narrow down the returned data.",
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "created_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "voucher_id": {
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          }
        }
      },
      "CampaignsTransactionsExport": {
        "title": "Campaigns Transactions Export",
        "type": "object",
        "description": "This is an object representing an export.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique export ID.",
            "example": "exp_FFfp9o7daWuJqJCKp5xqqli4"
          },
          "object": {
            "type": "string",
            "default": "export",
            "description": "The type of object being represented. This object stores information about the `export`.",
            "enum": [
              "export"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2022-04-28T11:23:20.922Z",
            "description": "Timestamp representing the date and time when the export was scheduled in ISO 8601 format.",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "description": "Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated.",
            "default": "SCHEDULED",
            "enum": [
              "SCHEDULED"
            ]
          },
          "channel": {
            "type": "string",
            "description": "The channel through which the export was triggered.",
            "default": "API",
            "enum": [
              "API"
            ]
          },
          "exported_object": {
            "type": "string",
            "description": "The type of exported object.",
            "default": "voucher_transactions",
            "enum": [
              "voucher_transactions"
            ]
          },
          "parameters": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignsTransactionsExportParameters"
              },
              {
                "type": "object",
                "properties": {
                  "filters": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/ExportCampaignTransactionsFilters"
                      },
                      {
                        "$ref": "#/components/schemas/TransactionsExportFilterConditionsWithCampaign"
                      }
                    ]
                  }
                }
              }
            ]
          },
          "result": {
            "type": [
              "object",
              "null"
            ],
            "description": "Contains the URL of the CSV file.",
            "required": [
              "url"
            ],
            "properties": {
              "url": {
                "type": "string",
                "description": "URL of the CSV file location. It contains the `token` used for authorization in the [Download export](/api-reference/exports/download-export) method."
              }
            }
          },
          "user_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`.",
            "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "status",
          "channel",
          "exported_object",
          "parameters",
          "result",
          "user_id"
        ]
      },
      "FilterConditionsDateTime": {
        "title": "Filter by conditions",
        "type": "object",
        "description": "Data filters used to narrow down the data records to be returned in the result.",
        "properties": {
          "$after": {
            "type": "string",
            "description": "Value is after this date. The value for this parameter is shown in the ISO 8601 format.",
            "format": "date-time",
            "example": "2024-01-01T00:00:00.000Z"
          },
          "$before": {
            "type": "string",
            "description": "Value is before this date. The value for this parameter is shown in the ISO 8601 format.",
            "format": "date-time",
            "example": "2024-01-01T00:00:00.000Z"
          },
          "$has_value": {
            "type": "string",
            "description": "Value is NOT null. The value for this parameter is an empty string."
          },
          "$is_unknown": {
            "type": "string",
            "description": "Value is null. The value for this parameter is an empty string."
          },
          "$more_than": {
            "type": "integer",
            "description": "Value is more days ago before the current date and time, e.g. more than `10` days ago."
          },
          "$less_than": {
            "type": "integer",
            "description": "Value is less days before the current date and time, e.g. less than `10` days ago."
          }
        }
      },
      "ExportVoucherTransactionsOrder": {
        "title": "Export Voucher Transactions Order",
        "type": "string",
        "enum": [
          "-created_at",
          "created_at"
        ]
      },
      "ExportVoucherTransactionsFields": {
        "title": "Export Voucher Transactions Fields",
        "type": "string",
        "enum": [
          "id",
          "campaign_id",
          "voucher_id",
          "type",
          "source_id",
          "reason",
          "source",
          "balance",
          "amount",
          "related_transaction_id",
          "created_at",
          "details"
        ]
      },
      "ExportVoucherTransactionsFilters": {
        "title": "Export Voucher Transactions Filters",
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "created_at": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "voucher_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "campaign_id": {
            "$ref": "#/components/schemas/FieldConditions"
          }
        }
      },
      "ExportVoucherTransactionsScheduled": {
        "title": "Export Vouchers Transactions Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherTransactionsBase"
          }
        ]
      },
      "LoyaltyPointsBucket": {
        "type": "object",
        "title": "Loyalty Point Bucket",
        "description": "Contains the details about expiring loyalty points.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the loyalty points bucket."
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique identifier of the parent loyalty card."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the parent campaign."
          },
          "bucket": {
            "type": "object",
            "required": [
              "total_points"
            ],
            "description": "Defines the number of points stored in this loyalty point bucket.",
            "properties": {
              "total_points": {
                "type": "integer",
                "description": "Total number of points in the loyalty point bucket."
              }
            }
          },
          "status": {
            "type": "string",
            "description": "Loyalty point bucket status."
          },
          "expires_at": {
            "type": "string",
            "format": "date",
            "description": "Date when the number of points defined in the bucket object are due to expire."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the loyalty point bucket object was created in ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the loyalty point bucket object was updated in ISO 8601 format."
          },
          "object": {
            "type": "string",
            "enum": [
              "loyalty_points_bucket"
            ],
            "description": "The type of the object represented by JSON. This object stores information about the loyalty point bucket."
          }
        },
        "required": [
          "id",
          "voucher_id",
          "campaign_id",
          "bucket",
          "created_at",
          "status",
          "expires_at",
          "object"
        ]
      },
      "LoyaltiesPointsExpirationExportCreateRequestBodyParameters": {
        "type": "object",
        "description": "List of fields and filters that will be used to create the export.",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "expires_at",
              "-expires_at"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Array of strings containing the data that was exported. These fields define the headers in the CSV file. \n\n The array can be a combination of any of the following available fields:  \n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Loyalty points bucket ID. | lopb_Wl1o3EjJIHSNjvO5BDLy4z1n |\n| campaign_id | Campaign ID of the parent loyalty campaign. | camp_7s3uXI44aKfIk5IhmeOPr6ic |\n| voucher_id | Voucher ID of the parent loyalty card. | v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655 |\n| status | Status of the loyalty point bucket. | `ACTIVE` or `EXPIRED` |\n| expires_at | Timestamp in ISO 8601 format representing the date when the points expire. | 2022-06-30 |\n| points | Number of points. | 1000 |",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "campaign_id",
                "voucher_id",
                "points",
                "status",
                "expires_at"
              ]
            }
          },
          "filters": {
            "$ref": "#/components/schemas/LoyaltiesPointsExpirationExportCreateRequestBodyParametersFilters"
          }
        }
      },
      "LoyaltiesPointsExpirationExportCreateResponseBodyParameters": {
        "type": "object",
        "description": "List of fields and filters that were passed in the request body to create the export.",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "expires_at",
              "-expires_at"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Array of strings containing the data that was exported. These fields define the headers in the CSV file. \n\n The array can be a combination of any of the following available fields:  \n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Loyalty points bucket ID. | lopb_Wl1o3EjJIHSNjvO5BDLy4z1n |\n| campaign_id | Campaign ID of the parent loyalty campaign. | camp_7s3uXI44aKfIk5IhmeOPr6ic |\n| voucher_id | Voucher ID of the parent loyalty card. | v_YLn0WVWXSXbUfDvxgrgUbtfJ3SQIY655 |\n| status | Status of the loyalty points bucket. | `ACTIVE` or `INACTIVE` |\n| expires_at | Timestamp in ISO 8601 format representing the date when the points expire. | 2022-06-30 |\n| points | Number of points. | 1000 |",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "campaign_id",
                "voucher_id",
                "points",
                "status",
                "expires_at"
              ]
            }
          },
          "filters": {
            "$ref": "#/components/schemas/LoyaltiesPointsExpirationExportCreateResponseBodyParametersFilters"
          }
        }
      },
      "EarningRule": {
        "title": "Earning Rule",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRuleBase"
          },
          {
            "type": "object",
            "properties": {
              "validation_rule_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance."
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format."
              },
              "active": {
                "type": "boolean",
                "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date.\n\n- `true` indicates an active earning rule\n- `false` indicates an inactive earning rule"
              }
            },
            "required": [
              "validation_rule_id",
              "updated_at",
              "active"
            ]
          }
        ]
      },
      "LoyaltiesEarningRulesCreateOrderPaidRequestBody": {
        "description": "This is an object representing an earning rule for a paid order.",
        "type": "object",
        "title": "Earning Rule Object for Order Paid",
        "properties": {
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalOrder"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
              }
            ]
          },
          "event": {
            "type": "string",
            "default": "order.paid",
            "enum": [
              "order.paid"
            ],
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `order.paid` an event defined by the Voucherify API corresponding to an order status `PAID`. "
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "example": "Order Paid - You will get 100 points",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the `start_date` and `expiration_date` of the campaign or the earning rule's own `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* earning rule\n- `false` indicates an *inactive* earning rule"
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is *inactive before* this date. If you don't define the start date for an earning rule, it will inherit the campaign start date by default. "
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format.  Earning rule is *inactive after* this date.If you don't define the expiration date for an earning rule, it will inherit the campaign expiration date by default."
          },
          "pending_points": {
            "type": [
              "object",
              "null"
            ],
            "description": "Defines the configuration for pending points. Pending points can be used only with the `order.paid` event.",
            "properties": {
              "period_type": {
                "type": "string",
                "description": "Defines the type of the period during which the points are in the pending state. Currently, only `DAY` value is accepted.",
                "enum": [
                  "DAY"
                ]
              },
              "period_value": {
                "type": "integer",
                "description": "Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90.",
                "minimum": 1,
                "maximum": 90
              }
            }
          },
          "expiration_rules": {
            "$ref": "#/components/schemas/EarningRuleExpirationRules"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "LoyaltiesEarningRulesCreateEnteredSegmentRequestBody": {
        "description": "This is an object representing an earning rule for entering a customer segment.",
        "type": "object",
        "title": "Earning Rule Object for Entered Segment",
        "properties": {
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
              }
            ]
          },
          "segment": {
            "type": "object",
            "description": "Contains the ID of a customer segment. **Required** for the `customer.segment.entered` option in `event`.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Contains a unique identifier of a customer segment. Assigned by the Voucherify API."
              }
            }
          },
          "event": {
            "type": "string",
            "default": "customer.segment.entered",
            "enum": [
              "customer.segment.entered"
            ],
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `customer.segment.entered` an event defined by the Voucherify API corresponding to a customer entering a pre-defined customer segment."
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "example": "Order Paid - You will get 100 points",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the `start_date` and `expiration_date` of the campaign or the earning rule's own `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* earning rule\n- `false` indicates an *inactive* earning rule"
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is *inactive before* this date. If you don't define the start date for an earning rule, it will inherit the campaign start date by default. "
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format.  Earning rule is *inactive after* this date.If you don't define the expiration date for an earning rule, it will inherit the campaign expiration date by default."
          },
          "expiration_rules": {
            "$ref": "#/components/schemas/EarningRuleExpirationRules"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "LoyaltiesEarningRulesCreateCustomEventRequestBody": {
        "description": "This is an object representing an earning rule triggered by a custom event.",
        "type": "object",
        "title": "Earning Rule Object for Custom Event",
        "properties": {
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
              }
            ]
          },
          "custom_event": {
            "type": "object",
            "description": "Contains the schema id of a custom event. **Required** for the custom event option in `event`.",
            "properties": {
              "schema_id": {
                "type": "string",
                "description": "Contains a unique identifier of a custom event schema. Assigned by the Voucherify API.",
                "example": "ms_gn4Qe4xsFPf7orCArCiNVY13"
              }
            }
          },
          "event": {
            "type": "string",
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `custom_event_name` the name of a custom event defined in the Dashboard &rarr; **Project Settings** &rarr; **EVENT SCHEMA** &rarr; **Add event definition**. Read more on defining [custom events](/prepare/custom-events). "
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "example": "Order Paid - You will get 100 points",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the `start_date` and `expiration_date` of the campaign or the earning rule's own `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* earning rule\n- `false` indicates an *inactive* earning rule"
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is *inactive before* this date. If you don't define the start date for an earning rule, it will inherit the campaign start date by default. "
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format.  Earning rule is *inactive after* this date.If you don't define the expiration date for an earning rule, it will inherit the campaign expiration date by default."
          },
          "expiration_rules": {
            "$ref": "#/components/schemas/EarningRuleExpirationRules"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "LoyaltiesEarningRulesCreateTierChangeRequestBody": {
        "description": "This is an object representing an earning rule for tiers.",
        "type": "object",
        "title": "Earning Rule Object for Tiers",
        "properties": {
          "validation_rule_id": {
            "type": "string",
            "example": "val_248vs7tUjlIE",
            "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance."
          },
          "loyalty": {
            "description": "An object that defines the number of points that will be added to a loyalty card and how the points will be added.\n\n- `FIXED` adds a fixed number of `points`.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              }
            ]
          },
          "event": {
            "type": "string",
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.  \n\n- `customer.loyalty.tier.joined` an event defined by the Voucherify API corresponding to a customer joining a tier    \n- `customer.loyalty.tier.left` an event defined by the Voucherify API corresponding to a customer leaving a tier    \n- `customer.loyalty.tier.upgraded` an event defined by the Voucherify API corresponding to a customer's tier being upgraded    \n- `customer.loyalty.tier.downgraded` an event defined by the Voucherify API corresponding to a customer's tier being upgraded    \n- `customer.loyalty.tier.prolonged` an event defined by the Voucherify API corresponding to a customer's tier being prolonged",
            "enum": [
              "customer.loyalty.tier.joined",
              "customer.loyalty.tier.left",
              "customer.loyalty.tier.upgraded",
              "customer.loyalty.tier.downgraded",
              "customer.loyalty.tier.prolonged"
            ]
          },
          "loyalty_tier": {
            "type": "object",
            "description": "Defines the tier associated with the earning rule definition.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique loyalty tier ID associated with the earning rule.    \n\n- `__ANY__`: any loyalty tier within the campaign",
                "example": "ltr_pudTGWasuIqxdiDM0go31OV1"
              }
            }
          },
          "source": {
            "type": "object",
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "example": "Order Paid - You will get 100 points",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the `start_date` and `expiration_date` of the campaign or the earning rule's own `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* earning rule\n- `false` indicates an *inactive* earning rule"
          },
          "start_date": {
            "type": "string",
            "example": "2022-02-02T13:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. Earning rule is *inactive before* this date. If you don't define the start date for an earning rule, it will inherit the campaign start date by default. "
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-03-03T14:30:00.000Z",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format.  Earning rule is *inactive after* this date.If you don't define the expiration date for an earning rule, it will inherit the campaign expiration date by default."
          },
          "expiration_rules": {
            "$ref": "#/components/schemas/EarningRuleExpirationRules"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          }
        }
      },
      "EarningRuleFixed": {
        "title": "Define fixed amount of points",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "enum": [
              "FIXED"
            ],
            "description": "The number of points to be added to the loyalty card."
          },
          "points": {
            "type": "integer",
            "description": "Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points."
          },
          "points_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the rewarded points."
          }
        },
        "required": [
          "type",
          "points"
        ]
      },
      "EarningRuleProportional": {
        "title": "Calculate points proportionally",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrder"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
          }
        ]
      },
      "EarningRuleExpirationRules": {
        "title": "Earning Rule Expiration Rules",
        "type": "object",
        "description": "Defines the loyalty point expiration rule. This expiration rule applies only to this earning rule and supersedes `expiration_rules` defined in the `voucher.loyalty_card` object.",
        "properties": {
          "period_type": {
            "type": "string",
            "description": "Type of period. Can be set for `MONTH` or `FIXED_DAY_OF_YEAR`. `MONTH` requires the `period_value` field. `FIXED_DAY_OF_YEAR` requires the `fixed_month` and `fixed_day` fields.",
            "enum": [
              "FIXED_DAY_OF_YEAR",
              "MONTH"
            ]
          },
          "period_value": {
            "type": "integer",
            "description": "Value of the period. Required for the `period_type: MONTH`."
          },
          "rounding_type": {
            "type": "string",
            "description": "Type of rounding of the expiration period. Optional for the `period_type: MONTH`.",
            "enum": [
              "END_OF_MONTH",
              "END_OF_QUARTER",
              "END_OF_HALF_YEAR",
              "END_OF_YEAR",
              "PARTICULAR_MONTH"
            ]
          },
          "rounding_value": {
            "type": "integer",
            "description": "Value of rounding of the expiration period. Required for the `rounding_type`."
          },
          "fixed_month": {
            "type": "integer",
            "description": "Determines the month when the points expire; `1` is January, `2` is February, and so on. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
            "minimum": 1,
            "maximum": 12
          },
          "fixed_day": {
            "type": "integer",
            "description": "Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
            "minimum": 1,
            "maximum": 31
          }
        },
        "required": [
          "period_type"
        ]
      },
      "EarningRuleBase": {
        "title": "EarningRuleBase",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assigned by the Voucherify API, identifies the earning rule object."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format."
          },
          "loyalty": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/EarningRuleFixed"
              },
              {
                "$ref": "#/components/schemas/EarningRuleProportional"
              }
            ]
          },
          "event": {
            "description": "Defines the event which triggers the earning rule to add points to a loyalty card.",
            "allOf": [
              {
                "$ref": "#/components/schemas/EarningRuleEvent"
              }
            ]
          },
          "custom_event": {
            "description": "Contains details about the custom event.",
            "type": "object",
            "properties": {
              "schema_id": {
                "description": "Unique identifier of the custom event schema",
                "type": "string"
              }
            },
            "required": [
              "schema_id"
            ]
          },
          "segment": {
            "type": "object",
            "description": "Contains the ID of a customer segment. Required for the `customer.segment.entered` option in the event.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Contains a unique identifier of a customer segment. Assigned by the Voucherify API."
              }
            },
            "required": [
              "id"
            ]
          },
          "loyalty_tier": {
            "type": "object",
            "description": "Defines the tier associated with the earning rule definition.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique loyalty tier ID associated with the earning rule.    \n\n- `__ANY__`: any loyalty tier within the campaign",
                "example": "ltr_pudTGWasuIqxdiDM0go31OV1"
              }
            }
          },
          "pending_points": {
            "type": "object",
            "description": "Defines the configuration for pending points. Pending points can be used only with the `order.paid` event.",
            "properties": {
              "period_type": {
                "type": "string",
                "description": "Defines the type of the period during which the points are in the pending state. Currently, only `DAY` value is accepted.",
                "enum": [
                  "DAY"
                ]
              },
              "period_value": {
                "type": "integer",
                "description": "Defines for how long the points are in the pending state. The minimum value is 1, maximum is 90.",
                "minimum": 1,
                "maximum": 90
              }
            }
          },
          "source": {
            "type": "object",
            "required": [
              "object_id",
              "object_type"
            ],
            "description": "Contains the custom earning rule name and parent campaign.",
            "properties": {
              "banner": {
                "type": "string",
                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
              },
              "object_id": {
                "type": "string",
                "description": "A unique campaign identifier assigned by the Voucherify API."
              },
              "object_type": {
                "type": "string",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`.",
                "default": "campaign",
                "enum": [
                  "campaign"
                ]
              }
            }
          },
          "object": {
            "type": "string",
            "default": "earning_rule",
            "enum": [
              "earning_rule"
            ],
            "description": "The type of the object represented by JSON. Default is earning_rule."
          },
          "automation_id": {
            "type": "string",
            "description": "For internal use by Voucherify."
          },
          "start_date": {
            "type": "string",
            "description": "Start date defines when the earning rule starts to be active. Activation timestamp is presented in the ISO 8601 format. The earning rule is inactive before this date. If you do not define the start date for an earning rule, it will inherit the campaign start date by default."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration date defines when the earning rule expires. Expiration timestamp is presented in the ISO 8601 format. The earning rule is inactive after this date. If you do not define the expiration date for an earning rule, it will inherit the campaign expiration date by default."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format."
          },
          "expiration_rules": {
            "$ref": "#/components/schemas/EarningRuleExpirationRules"
          }
        },
        "required": [
          "id",
          "created_at",
          "loyalty",
          "source",
          "object",
          "automation_id",
          "metadata"
        ]
      },
      "Reward": {
        "type": "object",
        "title": "Reward",
        "properties": {
          "id": {
            "type": "string",
            "example": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
            "description": "Unique reward ID, assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "stock": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Configurable for **material rewards**. The number of units of the product that you want to share as a reward. Use this parameter to code a stock-taking logic."
          },
          "redeemed": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Defines the number of already invoked (successful) reward redemptions.\t"
          },
          "attributes": {
            "type": "object",
            "description": "These properties are configurable for **material rewards**.",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "The HTTPS URL pointing to the .png or .jpg file."
              },
              "description": {
                "type": "string",
                "description": "An arbitrary string that you can attach to a material reward."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          },
          "parameters": {
            "description": "Defines how the reward is generated.",
            "allOf": [
              {
                "$ref": "#/components/schemas/RewardType"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.",
            "example": "2022-08-11T14:49:22.586Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.",
            "example": "2022-08-11T16:01:34.885Z",
            "format": "date-time"
          },
          "object": {
            "description": "The type of the object represented by the JSON. This object stores information about the reward.",
            "default": "reward",
            "enum": [
              "reward"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "stock",
          "redeemed",
          "metadata",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "RewardAssignment": {
        "title": "Reward Assignment",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignmentBase"
          },
          {
            "$ref": "#/components/schemas/RewardAssignmentParameters"
          }
        ],
        "type": "object"
      },
      "LoyaltiesRewardsCreateAssignmentItemRequestBody": {
        "title": "Loyalties Rewards Create Assignment Item Request Body",
        "oneOf": [
          {
            "$ref": "#/components/schemas/LoyaltiesRewardsCreateAssignmentItemDigitalOrMaterialRequestBody"
          },
          {
            "$ref": "#/components/schemas/LoyaltiesRewardsCreateAssignmentItemCoinRequestBody"
          }
        ]
      },
      "RewardsAssignmentsUpdateRequestBody": {
        "title": "Rewards Assignments Update Request Body",
        "type": "object",
        "description": "Request body schema for **PUT** `v1/rewards/{rewardId}/assignments/{assignmentId}`.",
        "properties": {
          "parameters": {
            "type": "object",
            "description": "An object that defines the price of the reward in loyalty points.",
            "properties": {
              "loyalty": {
                "type": "object",
                "description": "Stores the points parameter.",
                "properties": {
                  "points": {
                    "type": "integer",
                    "description": "Defines how many points are required to obtain the reward."
                  },
                  "auto_redeem": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`."
                  }
                }
              }
            }
          }
        }
      },
      "MembersRedemption": {
        "title": "Redemption",
        "type": "object",
        "description": "This is an object representing a redemption.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedemptionBase"
          },
          {
            "type": "object",
            "properties": {
              "voucher": {
                "description": "Defines the details of the voucher being redeemed.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/LoyaltiesRewardRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/VoucherHolder"
                  }
                ]
              }
            }
          }
        ]
      },
      "Order": {
        "title": "Order",
        "type": "object",
        "description": "Order information.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request."
              }
            }
          },
          {
            "$ref": "#/components/schemas/OrderBase"
          }
        ]
      },
      "LoyaltyTier": {
        "title": "Loyalty Tier",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyTierBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique loyalty tier ID."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique parent campaign ID."
              },
              "metadata": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format."
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format."
              },
              "config": {
                "type": "object",
                "description": "Defines loyalty tier range in points.",
                "required": [
                  "points"
                ],
                "properties": {
                  "points": {
                    "type": "object",
                    "description": "Defines range of loyalty tier in points.",
                    "properties": {
                      "from": {
                        "type": "integer",
                        "description": "Bottom points threshold value."
                      },
                      "to": {
                        "type": "integer",
                        "description": "Top points threshold value."
                      }
                    }
                  }
                }
              },
              "expiration": {
                "$ref": "#/components/schemas/LoyaltyTierExpiration"
              },
              "object": {
                "type": "string",
                "default": "loyalty_tier",
                "enum": [
                  "loyalty_tier"
                ],
                "description": "The type of the object represented by JSON. This object stores information about the loyalty."
              }
            },
            "required": [
              "id",
              "campaign_id",
              "metadata",
              "created_at",
              "config",
              "object"
            ]
          }
        ]
      },
      "LoyaltyTierBase": {
        "title": "Loyalty Tier Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Loyalty Tier name."
          },
          "earning_rules": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MappingPoints"
            },
            "description": "Contains a list of earning rule IDs and their points mapping for the given earning rule."
          },
          "rewards": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MappingPoints"
            },
            "description": "Contains a list of reward IDs and their points mapping for the given reward."
          },
          "points": {
            "type": "object",
            "description": "Defines range of loyalty tier in points.",
            "properties": {
              "from": {
                "type": "integer",
                "description": "Bottom points threshold value."
              },
              "to": {
                "type": "integer",
                "description": "Top points threshold value."
              }
            }
          }
        },
        "required": [
          "name",
          "points"
        ]
      },
      "LoyaltiesLoyaltyTierReward": {
        "title": "Loyalty Tier Reward Object",
        "type": "object",
        "description": "This is an object representing a loyalty tier reward.",
        "properties": {
          "reward": {
            "$ref": "#/components/schemas/Reward"
          },
          "assignment": {
            "$ref": "#/components/schemas/RewardAssignment"
          },
          "object": {
            "description": "The type of the object represented by JSON. This object stores information about the loyalty tier reward.",
            "default": "loyalty_tier_reward",
            "enum": [
              "loyalty_tier_reward"
            ]
          }
        },
        "required": [
          "reward",
          "assignment",
          "object"
        ]
      },
      "Customer": {
        "title": "Customer",
        "allOf": [
          {
            "type": "object",
            "title": "Customer Id And Source Id",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of an existing customer."
              },
              "source_id": {
                "type": "string",
                "description": "A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored."
              }
            }
          },
          {
            "$ref": "#/components/schemas/CustomerBase"
          }
        ]
      },
      "CustomerId": {
        "title": "Customer Id",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier of an existing customer."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "customer",
            "enum": [
              "customer"
            ]
          }
        },
        "required": [
          "id",
          "object"
        ]
      },
      "ReferrerId": {
        "title": "Referrer Id",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerId"
          }
        ]
      },
      "LoyaltyCampaignVoucher": {
        "type": "object",
        "description": "Schema model for a campaign voucher.",
        "title": "Loyalty Campaign Voucher",
        "properties": {
          "type": {
            "type": "string",
            "default": "LOYALTY_CARD",
            "enum": [
              "LOYALTY_CARD"
            ],
            "description": "Type of voucher."
          },
          "loyalty_card": {
            "description": "Defines the voucher loyalty card details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignLoyaltyCard"
              }
            ]
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            },
            "required": [
              "quantity"
            ]
          },
          "code_config": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CodeConfig"
              }
            ],
            "required": [
              "length",
              "charset",
              "pattern"
            ]
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Always `false` for a loyalty card voucher"
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          }
        },
        "required": [
          "type",
          "redemption",
          "code_config",
          "is_referral_code"
        ]
      },
      "LoyaltyTiersExpirationAll": {
        "title": "Loyalty Tiers Expiration",
        "type": "object",
        "description": "Defines the Loyalty Tiers Expiration.",
        "properties": {
          "qualification_type": {
            "type": "string",
            "enum": [
              "BALANCE",
              "POINTS_IN_PERIOD"
            ],
            "description": "Tier qualification.   \n\n`BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier. \n `POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold."
          },
          "qualification_period": {
            "type": "string",
            "description": "Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period.    \n\n| **Period** | **Definition** |\n|:---|:---|\n| **Calendar Month** | Points collected in one calendar month<br />January, February, March, etc. |\n| **Calendar Quarter** | Points collected in the quarter<br />- January - March<br />- April - June<br />- July - September<br />- October - December |\n| **Calendar Half-year** | Points collected in the half-year<br />- January - June<br />- July - December |\n| **Calendar Year** | Points collected in one calendar year<br />January - December |",
            "enum": [
              "MONTH",
              "QUARTER",
              "HALF_YEAR",
              "YEAR"
            ]
          },
          "start_date": {
            "type": "object",
            "description": "Defines the conditions for the start date of the tier.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "IMMEDIATE",
                  "NEXT_PERIOD"
                ],
                "description": "What triggers the tier to be valid for a customer.    \n`IMMEDIATE`: After reaching the minimum required points. \n`NEXT_PERIOD`: When the next qualification period starts."
              }
            },
            "required": [
              "type"
            ]
          },
          "expiration_date": {
            "type": "object",
            "description": "Defines the conditions for the expiration date of a tier.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "END_OF_PERIOD",
                  "END_OF_NEXT_PERIOD",
                  "BALANCE_DROP",
                  "CUSTOM"
                ],
                "description": "What triggers the tier to expire for a customer.    \n`END_OF_PERIOD`: Expire tier at the end of the period.    \n`END_OF_NEXT_PERIOD`:  Expire tier at the end of the next period. \n `BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier. \n `CUSTOM`: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier."
              },
              "extend": {
                "type": "string",
                "description": "Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of `P3M` will be valid for an additional duration of 3 months and a tier with a duration of `P1D` will be valid for an additional duration of 1 day."
              },
              "rounding": {
                "description": "Defines the rounding mechanism for tier expiration.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "MONTH",
                      "QUARTER",
                      "HALF_YEAR",
                      "YEAR",
                      "CUSTOM"
                    ],
                    "description": "This mechanism describes a custom rounding for the expiration date."
                  },
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "START",
                      "END"
                    ],
                    "description": "This mechanism describes a rounding strategy for the expiration date."
                  },
                  "unit": {
                    "type": "string",
                    "description": "Defines the type of unit of time in which the rounding period is counted.",
                    "default": "MONTH",
                    "enum": [
                      "MONTH"
                    ]
                  },
                  "value": {
                    "type": "integer",
                    "description": "Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter.    \n- `0`: January\n- `1`: February\n- `2`: March\n- `3`: April\n- `4`: May\n- `5`: June\n- `6`: July\n- `7`: August\n- `8`: September\n- `9`: October\n- `10`: November\n- `11`: December"
                  }
                }
              }
            },
            "required": [
              "type",
              "extend"
            ]
          }
        },
        "required": [
          "qualification_type",
          "start_date",
          "expiration_date"
        ]
      },
      "ValidationRulesAssignmentsList": {
        "title": "Validation Rules Assignments List",
        "description": "List of Validation Rules Assignments",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about validation rules assignments."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of validation rules assignments."
          },
          "data": {
            "type": "array",
            "description": "Contains array of validation rules assignments.",
            "items": {
              "$ref": "#/components/schemas/BusValRuleAssignment"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of validation rules assignments."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "AccessSettingsCampaignAssignmentsList": {
        "title": "Access Settings Campaign Assignments List",
        "type": "object",
        "description": "Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](/api-reference/campaigns/list-campaigns), this is returned if the `expand=access_settings_assignments` query parameter is passed in the request. This object is not returned for the [GET Campaign summary endpoint](/api-reference/campaigns/get-campaign-summary).\n\n**NOTE**: This object is returned only if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. Default is `list`. This object stores information about campaign assignments to areas and stores",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of campaign assignments.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Contains an array of campaign assignments.",
            "items": {
              "$ref": "#/components/schemas/AreaStoreCampaignAssignment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of areas and stores to which the campaign is assigned.",
            "minimum": 0
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "CampaignsCreateBase": {
        "type": "object",
        "title": "Campaign Create Schema Base",
        "description": "Base body schema for creating a campaign",
        "properties": {
          "name": {
            "type": "string",
            "description": "Campaign name."
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the campaign such as a campaign description and details."
          },
          "type": {
            "type": "string",
            "description": "Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers.\n\n- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria\n-  `STATIC`: vouchers need to be manually published\n- `STANDALONE`: the campaign is a generic (standalone) one with a single voucher for public use (only for discount and gift card campaigns)",
            "enum": [
              "AUTO_UPDATE",
              "STATIC",
              "STANDALONE"
            ]
          },
          "join_once": {
            "type": "boolean",
            "description": "If this value is set to `true`, customers will be able to join the campaign only once. For loyalty campaigns, it's forced to `true`, even if `join_once: false` is passed in the request."
          },
          "auto_join": {
            "type": "boolean",
            "description": "Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled."
          },
          "use_voucher_metadata_schema": {
            "type": "boolean",
            "description": "Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema."
          },
          "vouchers_count": {
            "type": "integer",
            "description": "Total number of unique vouchers in campaign (size of campaign)."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "activity_duration_after_publishing": {
            "type": "string",
            "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.",
            "example": "cat_0b688929a2476386a7"
          },
          "category": {
            "type": "string",
            "description": "The category assigned to the campaign. Either pass this parameter OR the `category_id`."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format."
          },
          "access_settings": {
            "$ref": "#/components/schemas/AccessSettings"
          }
        }
      },
      "CampaignLoyaltyVoucher": {
        "type": "object",
        "description": "Schema model for a discount voucher.",
        "title": "Campaign Loyalty Voucher",
        "properties": {
          "type": {
            "type": "string",
            "default": "LOYALTY_CARD",
            "description": "Type of voucher.",
            "enum": [
              "LOYALTY_CARD"
            ]
          },
          "loyalty_card": {
            "$ref": "#/components/schemas/CampaignLoyaltyCard"
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfig"
          }
        },
        "required": [
          "type",
          "loyalty_card"
        ]
      },
      "CampaignsUpdateCouponCampaignBase": {
        "type": "object",
        "title": "Update Coupon Campaign Schema Base",
        "description": "Base body schema for updating a campaign which contains coupon codes using **PUT** `v1/campaigns`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateBase"
          },
          {
            "type": "object",
            "properties": {
              "activity_duration_after_publishing": {
                "type": "string",
                "description": "Defines the amount of time the vouchers will be active after publishing. The value is shown in the ISO 8601 format. For example, a voucher with the value of P24D will be valid for a duration of 24 days."
              },
              "join_once": {
                "type": "boolean",
                "description": "If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them."
              },
              "auto_join": {
                "type": "boolean",
                "description": "Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled."
              },
              "type": {
                "type": "string",
                "description": "Defines whether the campaign can be updated with new vouchers after campaign creation.\n\n- `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method).\n-  `STATIC`: vouchers need to be manually published.\n\nIf the `type` of the campaign is `STANDALONE`, the type cannot be changed. Also, the `type` cannot be changed to `STANDALONE`.",
                "enum": [
                  "AUTO_UPDATE",
                  "STATIC"
                ]
              }
            }
          }
        ]
      },
      "VoucherAssets": {
        "title": "Voucher Assets",
        "type": "object",
        "description": "Stores links to images of QR and barcode that correspond to an encrypted voucher code.",
        "properties": {
          "qr": {
            "type": "object",
            "description": "Stores Quick Response (QR) representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK+t4pp7U7oFzjGJzj9q/bmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg+BaZk5QwXMf8k/OzSlOEVybpwSq+AiqPoNtjeuqtIgkDyvT6Q==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX19ucFhvVmBVpVYG5KoswTsjSIaqoKg5L9ie4BK%2Bt4pp7U7oFzjGJzj9q%2FbmuMOj9mEFiVKDMIkSaruKedMvHbKoPX5Sg%2BBaZk5QwXMf8k%2FOzSlOEVybpwSq%2BAiqPoNtjeuqtIgkDyvT6Q%3D%3D",
                "description": "URL to QR code  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          },
          "barcode": {
            "type": "object",
            "description": "Stores barcode representation of encrypted code.",
            "properties": {
              "id": {
                "type": "string",
                "example": "U2FsdGVkX19eJhGfWwUrH9+tulBkON+AnMktic+N6CVWzZ9+fHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ+kJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6/pFs61apEn9SJx32ttCF6d3oxKISQQ==",
                "description": "Encrypted voucher code ID."
              },
              "url": {
                "type": "string",
                "example": "https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19eJhGfWwUrH9%2BtulBkON%2BAnMktic%2BN6CVWzZ9%2BfHVxuVx22WakrzxiWXy0skuvvEHSeZIw9HlgyIJ%2BkJ1iPdUKpyENuNYJKzoZlO0mmTf6WQM6%2FpFs61apEn9SJx32ttCF6d3oxKISQQ%3D%3D",
                "description": "URL to barcode  \n\n*Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code.  \n\n- `size`: integer value from `1` to `100`  \n- `format`: string, either `png` (default) or `svg`"
              }
            }
          }
        }
      },
      "LoyaltyPendingPoints": {
        "type": "object",
        "title": "Loyalty Pending Point Entry",
        "description": "Contains details about the pending point entry.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the pending point entry, assigned by Voucherify.",
            "example": "lopp_0ffd593d5ad207ba6b"
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique identifier of the loyalty card, assigned by Voucherify.",
            "example": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign identifier, assigned by Voucherify.",
            "example": "camp_weer1c3p5ZgktqfW56RfoNaG"
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier, assigned by Voucherify.",
            "example": "cust_IdgAFZxYwwHctOk9ppZMu319"
          },
          "order_id": {
            "type": "string",
            "description": "Unique order identifier, assigned by Voucherify.",
            "example": "ord_0ffc0fa65f15d2df17"
          },
          "points": {
            "type": "integer",
            "description": "Number of points in the pending state."
          },
          "activates_at": {
            "type": "string",
            "description": "Date when the pending points are activated and added to the customer's loyalty card.",
            "format": "date"
          },
          "details": {
            "$ref": "#/components/schemas/LoyaltyPendingPointsDetails"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the pending point entry was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the pending point entry was modified. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "voucher_id",
          "campaign_id",
          "customer_id",
          "order_id",
          "points",
          "activates_at",
          "details",
          "created_at"
        ]
      },
      "MemberActivityData": {
        "title": "Member Activity Data",
        "description": "Event data object schema.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierUpgraded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierDowngraded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierProlonged"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierExpirationChanged"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierJoined"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierLeft"
          },
          {
            "$ref": "#/components/schemas/EventCustomerPublicationSucceeded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerPublicationFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionSucceeded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionRollbackFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionRollbackSucceeded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewarded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardedLoyaltyPoints"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsCreated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsPending"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsCompleted"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsRolledBack"
          },
          {
            "$ref": "#/components/schemas/EventCustomerVoucherDeleted"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyCardPendingPointsActivated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyCardPendingPointsAdded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyCardPendingPointsCanceled"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyCardPendingPointsUpdated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyCardPointsAdded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyCardPointsTransferred"
          },
          {
            "$ref": "#/components/schemas/EventCustomerVouchersLoyaltyPointsExpired"
          }
        ]
      },
      "EventSource": {
        "type": "object",
        "title": "Event Source",
        "description": "Contains the source of the object that initiated the event.",
        "required": [
          "channel"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "description": "Determines the channel that initiated the event.",
            "enum": [
              "USER_PORTAL",
              "API",
              "CLIENT_API",
              "INTERNAL"
            ],
            "example": "API"
          },
          "user": {
            "type": "object",
            "description": "Determines the Voucherify user who triggered the event.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the user.",
                "example": "user_xyzfghSTprSTUVWXYlk6tuvXYst7FGH7"
              }
            },
            "required": [
              "id"
            ]
          },
          "api_key": {
            "type": "object",
            "description": "Determines the API key used to initiate the event.",
            "required": [
              "name",
              "app_id"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Channel name in the application keys."
              },
              "app_id": {
                "type": "string",
                "description": "Contains the application ID from the Voucherify API key pair.",
                "example": "1XXXX5XX-0XXX-XXXb-X7XX-XX2XXaXXX6XX"
              }
            }
          }
        }
      },
      "VoucherTransactionBase": {
        "title": "Voucher Transaction Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique transaction ID."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The merchant's transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null."
          },
          "voucher_id": {
            "type": "string",
            "description": "Unique voucher ID."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes."
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "The channel through which the transaction took place, whether through the API or the Dashboard. In case of a redemption, this value is null."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason why the transaction occurred. In case of a redemption, this value is null."
          },
          "related_transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The related transaction ID on the receiving card."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the transaction was created. The value is shown in the ISO 8601 format."
          }
        },
        "required": [
          "id",
          "source_id",
          "voucher_id",
          "campaign_id",
          "source",
          "reason",
          "type",
          "details",
          "related_transaction_id",
          "created_at"
        ]
      },
      "VoucherBalance": {
        "type": "object",
        "title": "Voucher Balance",
        "description": "Contains information on how the balance was affected by the transaction.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of voucher whose balance is being adjusted due to the transaction.",
            "enum": [
              "loyalty_card",
              "gift_voucher"
            ]
          },
          "total": {
            "type": "integer",
            "description": "The number of all points or credits accumulated on the card as affected by add or subtract operations."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON.",
            "enum": [
              "balance"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Credits added or subtracted on a gift card."
          },
          "points": {
            "type": "integer",
            "description": "Points added or subtracted in the transaction of a loyalty card."
          },
          "balance": {
            "type": "integer",
            "description": "The available points or credits on the card after the transaction as affected by redemption or rollback."
          },
          "operation_type": {
            "type": "string",
            "description": "The type of the operation being performed. The operation type is `AUTOMATIC` if it is an automatic redemption.",
            "enum": [
              "MANUAL",
              "AUTOMATIC"
            ]
          },
          "related_object": {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "description": "Defines the resource that is being modified with the values that are returned in the balance object.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Identifies the voucher that is being modified. The ID is assigned by the Voucherify API."
              },
              "type": {
                "type": "string",
                "description": "The object being modified, i.e. voucher.",
                "enum": [
                  "voucher"
                ]
              }
            }
          }
        },
        "required": [
          "total",
          "object",
          "balance",
          "related_object"
        ]
      },
      "SimpleVoucher": {
        "type": "object",
        "title": "Simple Voucher",
        "description": "Simplified voucher data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique identifier that represents the voucher assigned by Voucherify."
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "gift": {
            "description": "Gift object response.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "loyalty_card": {
            "description": "Defines the loyalty card details.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleLoyaltyCard"
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "Type of the voucher.",
            "enum": [
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD",
              "GIFT_VOUCHER"
            ]
          },
          "campaign": {
            "type": "string",
            "description": "Campaign name."
          },
          "campaign_id": {
            "type": "string",
            "description": "Campaign unique ID."
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "holder_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify."
          },
          "referrer_id": {
            "type": "string",
            "description": "Unique identifier of the referrer assigned by Voucherify.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "category_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique identifier of the category that this voucher belongs to.",
            "example": "cat_0b6152ce12414820dc"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "active": {
            "type": "boolean",
            "description": "Shows whether the voucher is on or off. `true` indicates an *active* voucher and `false` indicates an *inactive* voucher."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the order was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              },
              "redeemed_points": {
                "type": "integer",
                "description": "Total loyalty points redeemed."
              }
            },
            "required": [
              "quantity",
              "redeemed_quantity"
            ]
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date."
          },
          "expiration_date": {
            "type": "string",
            "example": "2021-12-31T00:00:00.000Z",
            "format": "date-time",
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a voucher. The metadata object stores all custom attributes assigned to the voucher."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          }
        },
        "required": [
          "type",
          "code",
          "created_at",
          "object"
        ]
      },
      "LoyaltyCardTransactionsType": {
        "title": "Loyalty Card Transactions Type",
        "type": "string",
        "description": "Transaction types concerning loyalty points.",
        "enum": [
          "PENDING_POINTS_ACTIVATION",
          "POINTS_ACCRUAL",
          "POINTS_REDEMPTION",
          "POINTS_REFUND",
          "POINTS_ADDITION",
          "POINTS_REMOVAL",
          "POINTS_EXPIRATION",
          "POINTS_TRANSFER_IN",
          "POINTS_TRANSFER_OUT"
        ]
      },
      "TransactionsExportFilterConditionsWithCampaign": {
        "description": "Filter condition.",
        "title": "Filter by Campaign ID",
        "type": "object",
        "required": [
          "campaign_id"
        ],
        "properties": {
          "campaign_id": {
            "type": "object",
            "required": [
              "conditions"
            ],
            "description": "Data filters used to narrow down the data records to be returned in the result.",
            "properties": {
              "conditions": {
                "type": "object",
                "required": [
                  "$in"
                ],
                "description": "Data filters used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$in": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 1,
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1
                    }
                  }
                }
              }
            }
          }
        }
      },
      "FieldConditions": {
        "title": "Field Conditions",
        "type": "object",
        "properties": {
          "conditions": {
            "description": "Data filters used to narrow down the data records to be returned in the result.",
            "allOf": [
              {
                "$ref": "#/components/schemas/FiltersCondition"
              }
            ]
          }
        }
      },
      "ExportScheduledBase": {
        "title": "Export Scheduled Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique export ID."
          },
          "object": {
            "type": "string",
            "default": "export",
            "enum": [
              "export"
            ],
            "description": "The type of object being represented. This object stores information about the export."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the export was scheduled in ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated.",
            "default": "SCHEDULED",
            "enum": [
              "SCHEDULED"
            ]
          },
          "channel": {
            "type": "string",
            "description": "The channel through which the export was triggered."
          },
          "result": {
            "type": "null",
            "description": "Contains the URL of the CSV file."
          },
          "user_id": {
            "type": "string",
            "description": "Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "status",
          "result",
          "user_id"
        ]
      },
      "ExportVoucherTransactionsBase": {
        "title": "Export Vouchers Transactions",
        "type": "object",
        "properties": {
          "exported_object": {
            "type": "string",
            "default": "voucher_transactions",
            "enum": [
              "voucher_transactions"
            ],
            "description": "The type of object to be exported."
          },
          "parameters": {
            "type": "object",
            "properties": {
              "order": {
                "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportVoucherTransactionsOrder"
                  }
                ]
              },
              "fields": {
                "type": "array",
                "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file.",
                "items": {
                  "$ref": "#/components/schemas/ExportVoucherTransactionsFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportVoucherTransactionsFilters"
                  }
                ]
              }
            },
            "description": "List of available fields and filters that can be exported with an order along with the sorting order of the returned data."
          }
        },
        "required": [
          "exported_object"
        ]
      },
      "LoyaltiesPointsExpirationExportCreateRequestBodyParametersFilters": {
        "type": "object",
        "description": "Data filters used to narrow down the data records to be returned in the export.",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "voucher_id": {
            "type": "object",
            "description": "Data filters used to narrow down the data records to be returned in the result.",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data filters used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of the resource values that should be included in the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of the resource values that should be included in the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Specify the exact resource value."
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results should omit this value."
                  }
                }
              }
            }
          },
          "campaign_id": {
            "type": "object",
            "description": "Data filters used to narrow down the data records to be returned in the result.",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data filters used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of the resource values that should be included in the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of the resource values that should be included in the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Specify the exact resource value."
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results should omit this value."
                  }
                }
              }
            }
          }
        }
      },
      "LoyaltiesPointsExpirationExportCreateResponseBodyParametersFilters": {
        "type": "object",
        "description": "Data filters used to narrow down the data records to be returned in the export.",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "voucher_id": {
            "type": "object",
            "description": "Data filters used to narrow down the data records to be returned in the result.",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data filters used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of the resource values that should be included in the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of the resource values that should be excluded from the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Specify the exact resource value."
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results should omit this value."
                  }
                }
              }
            }
          },
          "campaign_id": {
            "type": "object",
            "description": "Data filters used to narrow down the data records to be returned in the result.",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data filters used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of the resource values that should be included in the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of the resource values that should be included in the results.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Specify the exact resource value."
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results should omit this value."
                  }
                }
              }
            }
          }
        }
      },
      "EarningRuleProportionalOrder": {
        "title": "Define amount of points proportional to the order",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderTotalAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderMetadata"
          }
        ]
      },
      "EarningRuleProportionalOrderItems": {
        "title": "Define amount of points proportional to order items",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsQuantity"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsSubtotalAmount"
          }
        ]
      },
      "EarningRuleProportionalCustomerMetadata": {
        "title": "Define amount of points proportional to customer metadata",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "CUSTOMER_METADATA",
            "enum": [
              "CUSTOMER_METADATA"
            ],
            "description": "CUSTOMER_METADATA: Customer Metadata (X points for every Y in metadata attribute, defined in the property key under the customer.metadata object)"
          },
          "customer": {
            "type": "object",
            "required": [
              "metadata"
            ],
            "properties": {
              "metadata": {
                "type": "object",
                "required": [
                  "every",
                  "points",
                  "property"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "For how many increments of the customer metadata property to grant points for."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "property": {
                    "type": "string",
                    "description": "Customer metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "customer"
        ]
      },
      "EarningRuleProportionalCustomEvent": {
        "title": "Earning Rule Proportional Custom Event",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "CUSTOM_EVENT_METADATA",
            "enum": [
              "CUSTOM_EVENT_METADATA"
            ],
            "description": "CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute)."
          },
          "custom_event": {
            "type": "object",
            "required": [
              "metadata"
            ],
            "properties": {
              "metadata": {
                "type": "object",
                "required": [
                  "every",
                  "points",
                  "property"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "For how many increments of the customer metadata property to grant points for."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "property": {
                    "type": "string",
                    "description": "\nCustom event metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "custom_event"
        ]
      },
      "EarningRuleEvent": {
        "title": "Earning Rule Event",
        "example": "`order.paid`, `customer.segment.entered`, `customer.loyalty.tier.upgraded`, `customer.loyalty.tier.downgraded`, `customer.loyalty.tier.prolonged`, `customer.loyalty.tier.joined`, `customer.loyalty.tier.left`",
        "type": "string"
      },
      "RewardType": {
        "title": "Reward type",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RewardTypeCampaign"
          },
          {
            "$ref": "#/components/schemas/RewardTypeCoin"
          },
          {
            "$ref": "#/components/schemas/RewardTypeMaterial"
          }
        ]
      },
      "RewardAssignmentBase": {
        "title": "Reward Assignment Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "rewa_PbIRoMXpwe5QhobW4JKu0VjH",
            "description": "Unique reward assignment ID, assigned by Voucherify."
          },
          "reward_id": {
            "type": "string",
            "description": "Associated reward ID.",
            "example": "rew_C7wS9eHFDN4CIbXI5PpLSkGY"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward assignment was created. The value is shown in the ISO 8601 format.",
            "example": "2022-08-11T14:49:22.586Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp representing the date and time when the reward assignment was updated. The value is shown in the ISO 8601 format.",
            "example": "2022-08-11T16:01:34.885Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the reward assignment.",
            "default": "reward_assignment",
            "enum": [
              "reward_assignment"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Related object ID to which the reward was assigned.",
            "example": "camp_wciTvaOfYmAa3EmIIW3QpXXZ"
          },
          "related_object_type": {
            "type": "string",
            "description": "Related object type to which the reward was assigned.",
            "default": "campaign",
            "enum": [
              "campaign"
            ]
          }
        },
        "required": [
          "related_object_id",
          "related_object_type",
          "id",
          "reward_id",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "RewardAssignmentParameters": {
        "title": "Digital or Material Reward - Parameters",
        "type": "object",
        "properties": {
          "parameters": {
            "description": "Defines the cost of the reward.",
            "type": "object",
            "properties": {
              "loyalty": {
                "type": "object",
                "description": "Defines the equivalent points value of the reward.",
                "properties": {
                  "points": {
                    "type": "integer",
                    "description": "The number of points required to redeem the reward."
                  },
                  "auto_redeem": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "description": "Determines if the reward is redeemed automatically when the customer reaches the sufficient number of points to redeem it. Value `true` means that the automatic reward redemption is active. Only one reward can be set to be redeemed automatically in a loyalty campaign, i.e. only one can have the value `true`."
                  }
                }
              }
            },
            "required": [
              "loyalty"
            ]
          }
        }
      },
      "LoyaltiesRewardsCreateAssignmentItemDigitalOrMaterialRequestBody": {
        "title": "Loyalties Rewards Create Assignment Item Digital Or Material Request Body",
        "properties": {
          "reward": {
            "type": "string",
            "description": "The ID of the reward that will be assigned to the campaign."
          },
          "parameters": {
            "type": "object",
            "description": "Defines the cost of the reward.",
            "required": [
              "loyalty"
            ],
            "properties": {
              "loyalty": {
                "type": "object",
                "description": "Defines the equivalent points value of the reward.",
                "properties": {
                  "points": {
                    "type": "integer",
                    "description": "Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed."
                  }
                }
              }
            }
          }
        },
        "required": [
          "reward",
          "parameters"
        ]
      },
      "LoyaltiesRewardsCreateAssignmentItemCoinRequestBody": {
        "title": "Loyalties Rewards Create Assignment Item Coin Request Body",
        "type": "object",
        "properties": {
          "reward": {
            "type": "string",
            "description": "The ID of the reward that will be assigned to the campaign."
          },
          "validation_rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "reward"
        ]
      },
      "RedemptionBase": {
        "title": "Redemption Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON",
            "default": "redemption",
            "enum": [
              "redemption"
            ]
          },
          "date": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "description": "The metadata object stores all custom attributes assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction.",
            "example": 10000
          },
          "redemption": {
            "type": [
              "null",
              "string"
            ],
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCEEDED",
              "FAILED",
              "ROLLED_BACK"
            ],
            "description": "Redemption status."
          },
          "session": {
            "type": "object",
            "description": "Contains details about the redemption session lock. Sessions can be established only for discount vouchers, promotions, and gift cards.",
            "properties": {
              "key": {
                "type": "string",
                "description": "The session unique ID assigned by Voucherify or your own unique session ID sent in the request."
              }
            }
          },
          "related_redemptions": {
            "type": "object",
            "properties": {
              "rollbacks": {
                "type": "array",
                "items": {
                  "title": "Redemption Related Redemptions Rollbacks Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "rr_0bc92f81a6801f9bca",
                      "description": "Unique rollback redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
                      "format": "date-time"
                    },
                    "rollback_order_mode": {
                      "type": "string",
                      "description": "Defines the rollback mode for the order. `WITH_ORDER` is a default setting. The redemption is rolled back together with the data about the order, including related discount values. `WITHOUT_ORDER` allows rolling the redemption back without affecting order data, including the applied discount values. This is returned only in GET `v1/redemptions/` and GET `v1/redemptions/{redemptionId}` endpoints.",
                      "enum": [
                        "WITH_ORDER",
                        "WITHOUT_ORDER"
                      ]
                    }
                  }
                }
              },
              "redemptions": {
                "type": "array",
                "items": {
                  "title": "Redemption Related Redemptions Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "r_0bc92f81a6801f9bca",
                      "description": "Unique redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "failure_code": {
            "type": "string",
            "example": "customer_rules_violated",
            "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed."
          },
          "failure_message": {
            "type": "string",
            "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed."
          },
          "order": {
            "anyOf": [
              {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/OrderCalculated"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "items": {
                        "type": "array",
                        "description": "Array of items applied to the order. It can include up to 500 items.",
                        "items": {
                          "allOf": [
                            {
                              "$ref": "#/components/schemas/OrderCalculatedItem"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "application_details": {
                                  "$ref": "#/components/schemas/ApplicationDetails"
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. For `AUTO_REDEEM`, it is the reward assignment ID."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard, `API` corresponds to the API, and `AUTO_REDEEM` corresponds to a loyalty campaign reward that has been redeemed automatically.",
                "enum": [
                  "USER",
                  "API",
                  "AUTO_REDEEM"
                ]
              }
            }
          },
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              },
              {
                "type": "null"
              }
            ]
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "enum": [
              "voucher",
              "promotion_tier",
              "redemption"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "promotion_tier": {
            "description": "Contains details of the promotion tier and the parent campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          },
          "reward": {
            "$ref": "#/components/schemas/RedemptionRewardResult"
          },
          "gift": {
            "type": "object",
            "description": "Contains the amount subtracted from the gift card for the redemption.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Amount subtracted from the gift card as a result of the redemption. The amount is expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Contains the number of points subtracted from the loyalty card for the redemption.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points subtracted from the loyalty card as a result of the redemption."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "date",
          "customer_id",
          "tracking_id",
          "metadata",
          "redemption",
          "result",
          "status",
          "order",
          "channel",
          "customer",
          "related_object_type",
          "related_object_id"
        ]
      },
      "LoyaltiesRewardRedemption": {
        "title": "Member card with categories and validation rules assignments",
        "description": "This is an object representing a member card with categories and validation rules assignments.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Always returns an empty array.",
                "items": {}
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              }
            }
          }
        ]
      },
      "VoucherHolder": {
        "title": "Voucher Holder",
        "type": "object",
        "description": "This is an object representing a voucher holder.",
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/SimpleCustomer"
          }
        }
      },
      "OrderBase": {
        "title": "Order Base",
        "type": "object",
        "description": "Order information.",
        "properties": {
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique source ID of an existing order that will be linked to the redemption of this request.\n\nFor validation and redemption, if `source_id` is used with an existing order, the original order data will be used, like `items`, `amount`, and so on, not the one sent in the new request."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "initial_amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items": {
            "type": "array",
            "description": "Array of items applied to the order. It can include up to 500 items.",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas."
          }
        }
      },
      "LoyaltyTierExpiration": {
        "title": "Loyalty Tier Expiration",
        "description": "Defines loyalty tier expiration date.",
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_rRsfatlwN7unSeUIJDCYedal"
          },
          "tier_id": {
            "type": "string",
            "description": "Unique tier ID, assigned by Voucherify."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the loyalty tier was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the loyalty tier was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "customer_id",
          "campaign_id",
          "tier_id",
          "created_at"
        ]
      },
      "MappingPoints": {
        "title": "MappingPoints",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/MappingMultiply"
          },
          {
            "$ref": "#/components/schemas/MappingFixed"
          }
        ]
      },
      "CustomerBase": {
        "title": "Customer Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "description": {
            "type": "string",
            "description": "An arbitrary string that you can attach to a customer object."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "phone": {
            "type": "string",
            "description": "Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel."
          },
          "birthday": {
            "type": "string",
            "description": "`Deprecated`. ~~Customer's birthdate; format YYYY-MM-DD~~.",
            "format": "date"
          },
          "birthdate": {
            "type": "string",
            "description": "Customer's birthdate; format YYYY-MM-DD.",
            "format": "date"
          },
          "address": {
            "type": [
              "object",
              "null"
            ],
            "description": "Customer's address.",
            "properties": {
              "city": {
                "type": "string",
                "description": "City"
              },
              "state": {
                "type": "string",
                "description": "State"
              },
              "line_1": {
                "type": "string",
                "description": "First line of address."
              },
              "line_2": {
                "type": "string",
                "description": "Second line of address."
              },
              "country": {
                "type": "string",
                "description": "Country."
              },
              "postal_code": {
                "type": "string",
                "description": "Postal code."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments."
          }
        }
      },
      "CampaignLoyaltyCard": {
        "type": "object",
        "description": "Schema model for a campaign loyalty card.",
        "title": "Campaign Loyalty Card",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card."
          },
          "expiration_rules": {
            "type": "object",
            "description": "Defines the loyalty point expiration rule. This expiration rule applies when there are no `expiration_rules` defined for an earning rule.",
            "properties": {
              "period_type": {
                "type": "string",
                "description": "Type of period. Can be set for `MONTH` or `FIXED_DAY_OF_YEAR`. `MONTH` requires the `period_value` field. `FIXED_DAY_OF_YEAR` requires the `fixed_month` and `fixed_day` fields.",
                "enum": [
                  "FIXED_DAY_OF_YEAR",
                  "MONTH"
                ]
              },
              "period_value": {
                "type": "integer",
                "description": "Value of the period. Required for the `period_type: MONTH`."
              },
              "rounding_type": {
                "type": "string",
                "description": "Type of rounding of the expiration period. Optional for the `period_type: MONTH`.",
                "enum": [
                  "END_OF_MONTH",
                  "END_OF_QUARTER",
                  "END_OF_HALF_YEAR",
                  "END_OF_YEAR",
                  "PARTICULAR_MONTH"
                ]
              },
              "rounding_value": {
                "type": "integer",
                "description": "Value of rounding of the expiration period. Required for the `rounding_type`."
              },
              "fixed_month": {
                "type": "integer",
                "description": "Determines the month when the points expire; `1` is January, `2` is February, and so on. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
                "minimum": 1,
                "maximum": 12
              },
              "fixed_day": {
                "type": "integer",
                "description": "Determines the day of the month when the points expire. Required for the `period_type: FIXED_DAY_OF_YEAR`.",
                "minimum": 1,
                "maximum": 31
              }
            },
            "required": [
              "period_type"
            ]
          }
        },
        "required": [
          "points"
        ]
      },
      "CodeConfig": {
        "title": "Code Config",
        "type": "object",
        "description": "Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).",
        "properties": {
          "length": {
            "type": "number",
            "description": "Number of characters in a generated code (excluding prefix and postfix)."
          },
          "charset": {
            "type": "string",
            "description": "Characters that can appear in the code.  \n\nExamples:\n\n- Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` \n- Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` \n- Numbers: `0123456789`  \n- Custom: a custom character set"
          },
          "prefix": {
            "type": "string",
            "description": "A text appended before the code."
          },
          "postfix": {
            "type": "string",
            "description": "A text appended after the code."
          },
          "pattern": {
            "type": "string",
            "description": "A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`."
          },
          "initial_count": {
            "type": "integer",
            "description": "Internal value, does not change anything if provided."
          }
        }
      },
      "BusValRuleAssignment": {
        "title": "Business Validation Rule Assignment",
        "description": "Assignments of business validation rule",
        "example": {
          "id": "asgm_LnY1g7UNFA9KyDrD",
          "rule_id": "val_3gPNA6SnH4ae",
          "related_object_id": "camp_CZOnEGiZfwIKWmSjhIoIT7Ol",
          "related_object_type": "campaign",
          "object": "validation_rules_assignment",
          "validation_status": "PARTIALLY_VALID",
          "validation_omitted_rules": [
            "1"
          ]
        },
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier for a assignment"
          },
          "rule_id": {
            "type": "string",
            "description": "The unique identifier for a rule"
          },
          "related_object_id": {
            "type": "string",
            "description": "The unique identifier for a related object"
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of related object"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the object was last updated in ISO 8601 format.",
            "example": "2022-03-09T11:19:04.819Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "validation_rules_assignment",
            "enum": [
              "validation_rules_assignment"
            ]
          },
          "validation_status": {
            "type": "string",
            "description": "The validation status of the assignment",
            "enum": [
              "VALID",
              "PARTIALLY_VALID",
              "INVALID"
            ]
          },
          "validation_omitted_rules": {
            "type": "array",
            "description": "The list of omitted rules",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "object"
        ]
      },
      "AreaStoreCampaignAssignment": {
        "title": "Areas and Stores Campain Assignment",
        "type": "object",
        "description": "An object representing an assignment of a campaign to an area or store.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the campaign assignment.",
            "example": "arsca_0ef5ee192117ae2416"
          },
          "area_id": {
            "type": "string",
            "description": "Unique identifier of the area to which the campaign is assigned.",
            "example": "ar_0ea6cd7b781b8f857f"
          },
          "all_stores": {
            "type": "boolean",
            "description": "Determines if the campaign is assigned to all of the stores in the area, i.e. if an area ID is passed in the `access_settings.assign.area_all_stores_ids` in the request."
          },
          "area_store_id": {
            "type": "string",
            "description": "Unique identifier of the store to which the campaign is assigned.",
            "example": "ars_0ec347e2016bed85f4"
          },
          "created_at": {
            "type": "string",
            "description": "Date and time when the assignment was made. The value is shown in the ISO 8601 format.",
            "format": "date-time",
            "example": "2024-06-25T19:04:16.260Z"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the campaign assignment to areas or stores.",
            "default": "area_store_campaign_assignment",
            "enum": [
              "area_store_campaign_assignment"
            ]
          }
        },
        "required": [
          "id",
          "area_id",
          "created_at",
          "object"
        ]
      },
      "AccessSettings": {
        "type": "object",
        "title": "Access Settings",
        "description": "Assigns or unassigns an area or store to the campaign.\n\n**NOTE**: this object can be sent if the Areas and Stores enterprise feature is enabled. Contact [Voucherify Sales](https://www.voucherify.io/contact-sales) to learn more.",
        "properties": {
          "assign": {
            "type": "object",
            "description": "Assigns the campaign to an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it from the area. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assign to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
            "properties": {
              "areas_ids": {
                "type": "array",
                "description": "List all area IDs to which the campaign will be assigned.",
                "items": {
                  "type": "string"
                }
              },
              "area_stores_ids": {
                "type": "array",
                "description": "List all store IDs to which the campaign will be assigned.",
                "items": {
                  "type": "string"
                }
              },
              "area_all_stores_ids": {
                "type": "array",
                "description": "List all area IDs where the campaign is assigned to all stores in the area. This assignment is not equal to the assignment to all `area_stores_ids` listed separately.",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "unassign": {
            "type": "object",
            "description": "Unassigns the campaign from an area or a store. Provide the area and/or store IDs in the respective arrays. If a campaign changes assignments between areas or stores, unassign it first. For example, if a campaign is assigned to Area-01, but it must be now assigned to Store-01 within this area, you have to unassign the campaign from Area-01 and assigned to Store-01 only.\n\nIf you want to assign the campaign to stores only, you do not have to send the area ID.",
            "properties": {
              "areas_ids": {
                "type": "array",
                "description": "List all area IDs from which the campaign will be unassigned.",
                "items": {
                  "type": "string"
                }
              },
              "area_stores_ids": {
                "type": "array",
                "description": "List all store IDs from which the campaign will be unassigned.",
                "items": {
                  "type": "string"
                }
              },
              "area_all_stores_ids": {
                "type": "array",
                "description": "List all area IDs where the campaign will be unassigned from all stores in the area. This unassignment is not equal to the unassignment from all `area_stores_ids` listed separately.",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "CampaignsUpdateBase": {
        "type": "object",
        "title": "Campaign Update Schema Base",
        "description": "Base body schema for creating a campaign using **PUT** `v1/campaigns`.",
        "properties": {
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the campaign such as a campaign description and details."
          },
          "category": {
            "type": "string",
            "description": "The category assigned to the campaign. Either pass this parameter OR the `category_id`."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format."
          },
          "unset_metadata_fields": {
            "type": [
              "array",
              "null"
            ],
            "description": "Determine which metadata should be removed from campaign.",
            "items": {
              "type": "string"
            }
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.",
            "example": "cat_0b688929a2476386a7"
          },
          "access_settings": {
            "$ref": "#/components/schemas/AccessSettings"
          }
        }
      },
      "LoyaltyPendingPointsDetails": {
        "title": "Pending Point Details",
        "type": "object",
        "description": "Details about how the pending points were earned.",
        "properties": {
          "loyalty_tier": {
            "type": "object",
            "description": "The loyalty tier that is mapped for the earning rule and used in the pending point transaction.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
              },
              "name": {
                "type": "string",
                "description": "User-defined name of the loyalty tier."
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "holder_loyalty_tier": {
            "type": "object",
            "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was at the moment pending points were created.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
              },
              "name": {
                "type": "string",
                "description": "User-defined name of the loyalty tier."
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "event": {
            "type": "object",
            "description": "Details about the event that created pending points.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique event identifier, assigned by Voucherify."
              },
              "type": {
                "type": "string",
                "description": "Type of the event that triggered the creation of pending points.",
                "enum": [
                  "customer.order.paid"
                ]
              },
              "group_id": {
                "type": "string",
                "description": "Unique identifier of the request that triggered the event, assigned by Voucherify."
              },
              "entity_id": {
                "type": "string",
                "description": "Unique identifier of the entity that triggered the event, assigned by Voucherify. For pending points, it is the `customer_id` of the customer who paid for the order."
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the event occurred. The value is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "category": {
                "type": "string",
                "description": "Type of the event.",
                "enum": [
                  "ACTION",
                  "EFFECT"
                ]
              },
              "event_source": {
                "$ref": "#/components/schemas/EventSource"
              }
            }
          },
          "earning_rule": {
            "type": "object",
            "description": "Contains information about the earning rule.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of an earning rule, assigned by Voucherify."
              },
              "source": {
                "type": "object",
                "required": [
                  "banner"
                ],
                "description": "Contains the custom earning rule name.",
                "properties": {
                  "banner": {
                    "type": "string",
                    "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                  }
                }
              }
            },
            "required": [
              "id",
              "source"
            ]
          },
          "order": {
            "type": "object",
            "description": "Details about the order that caused adding pending points.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique order identifier, assigned by Voucherify."
              },
              "source_id": {
                "type": [
                  "null",
                  "string"
                ],
                "description": "User-defined order identifier."
              }
            },
            "required": [
              "id",
              "source_id"
            ]
          }
        },
        "required": [
          "event",
          "earning_rule",
          "order"
        ]
      },
      "EventCustomerLoyaltyTierUpgraded": {
        "title": "Event Customer Loyalty Tier Upgraded",
        "description": "Event data object schema for `customer.loyalty.tier.upgraded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Upgraded",
            "type": "object",
            "properties": {
              "loyalty_tier_from": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "loyalty_tier_to": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "loyalty_tier_to"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierDowngraded": {
        "title": "Event Customer Loyalty Tier Downgraded",
        "description": "Event data object schema for `customer.loyalty.tier.downgraded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Downgraded",
            "type": "object",
            "properties": {
              "loyalty_tier_from": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "loyalty_tier_to": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "loyalty_tier_from"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierProlonged": {
        "title": "Event Customer Loyalty Tier Prolonged",
        "description": "Event data object schema for `customer.loyalty.tier.prolonged`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Prolonged",
            "type": "object",
            "properties": {
              "loyalty_tier": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "loyalty_tier"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierExpirationChanged": {
        "title": "Event Customer Loyalty Tier Expiration Changed",
        "description": "Event data object schema for `customer.loyalty.tier.expiration.changed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Expiration Changed",
            "type": "object",
            "properties": {
              "loyalty_tier": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              },
              "expiration_date": {
                "type": "string",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "loyalty_tier",
              "expiration_date"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierJoined": {
        "title": "Event Customer Loyalty Tier Joined",
        "description": "Event data object schema for `customer.loyalty.tier.joined`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Joined",
            "type": "object",
            "properties": {
              "loyalty_tier": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "loyalty_tier"
            ]
          }
        ]
      },
      "EventCustomerLoyaltyTierLeft": {
        "title": "Event Customer Loyalty Tier Left",
        "description": "Event data object schema for `customer.loyalty.tier.left`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyTierBase"
          },
          {
            "title": "Loyalty Tier Left",
            "type": "object",
            "properties": {
              "loyalty_tier": {
                "$ref": "#/components/schemas/LoyaltyTier"
              },
              "created_at": {
                "type": "string",
                "example": "2022-02-25T13:32:08.734Z",
                "format": "date-time"
              }
            },
            "required": [
              "created_at",
              "loyalty_tier"
            ]
          }
        ]
      },
      "EventCustomerPublicationSucceeded": {
        "title": "Event Customer Publication Succeeded",
        "description": "Event data object schema for `customer.publication.succeeded`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "publication": {
            "$ref": "#/components/schemas/ListPublicationsItemValidSingleVoucher"
          }
        }
      },
      "EventCustomerPublicationFailed": {
        "title": "Event Customer Publication Failed",
        "description": "Event data object schema for `customer.publication.failed`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "publication": {
            "$ref": "#/components/schemas/ListPublicationsItemValidSingleVoucher"
          }
        }
      },
      "EventCustomerRedemptionFailed": {
        "title": "Event Customer Redemption Failed",
        "description": "Event data object schema for `customer.redemption.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          }
        ]
      },
      "EventCustomerRedemptionSucceeded": {
        "title": "Event Customer Redemption Succeeded",
        "description": "Event data object schema for `customer.redemption.succeeded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          }
        ]
      },
      "EventCustomerRedemptionRollbackFailed": {
        "title": "Event Customer Redemption Rollback Failed",
        "description": "Event data object schema for `customer.redemption.rollback.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          },
          {
            "type": "object",
            "properties": {
              "redemption_rollback": {
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            }
          }
        ]
      },
      "EventCustomerRedemptionRollbackSucceeded": {
        "title": "Event Customer Redemption Rollback Succeeded",
        "description": "Event data object schema for `customer.redemption.rollback.succeeded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          },
          {
            "type": "object",
            "properties": {
              "redemption_rollback": {
                "$ref": "#/components/schemas/SimpleRedemption"
              }
            }
          }
        ]
      },
      "EventCustomerRewarded": {
        "title": "Event Customer Rewarded",
        "description": "Event data object schema for `customer.rewarded`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "holder": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "redemption": {
            "$ref": "#/components/schemas/RedemptionInternal"
          },
          "reward": {
            "$ref": "#/components/schemas/SimpleRedemptionRewardResult"
          },
          "referral_tier": {
            "$ref": "#/components/schemas/SimpleReferralTier"
          },
          "balance": {
            "type": [
              "null",
              "object"
            ],
            "description": "Balance changed by the event. The `amount` property details a change in a gift card. The `points` property details a change in a loyalty card.",
            "properties": {
              "amount": {
                "type": "integer"
              },
              "points": {
                "type": "integer"
              }
            }
          },
          "custom_event": {
            "$ref": "#/components/schemas/CustomEvent"
          },
          "customer_event": {
            "type": [
              "null",
              "object"
            ],
            "properties": {
              "segment": {
                "$ref": "#/components/schemas/SimpleSegment"
              },
              "event_type": {
                "type": "string",
                "description": "Type of activity that triggered the event."
              }
            }
          }
        }
      },
      "EventCustomerRewardedLoyaltyPoints": {
        "title": "Event Customer Rewarded Loyalty Points",
        "description": "Event data object schema for `customer.rewarded.loyalty_points`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "holder": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty_tier": {
            "$ref": "#/components/schemas/LoyaltyTier"
          },
          "earning_rule": {
            "$ref": "#/components/schemas/EarningRule"
          },
          "balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderCalculated"
              },
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Array of items applied to the order. It can include up to 500 items.",
                    "items": {
                      "$ref": "#/components/schemas/OrderCalculatedItem"
                    }
                  }
                }
              }
            ]
          },
          "event": {
            "$ref": "#/components/schemas/SimpleEvent"
          }
        }
      },
      "EventCustomerRewardRedemptionsCreated": {
        "title": "Event Customer Reward Redemptions Created",
        "description": "Event data object schema for `customer.reward_redemptions.created`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptions"
          }
        ]
      },
      "EventCustomerRewardRedemptionsPending": {
        "title": "Event Customer Reward Redemptions Pending",
        "description": "Event data object schema for `customer.reward_redemptions.pending`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptions"
          }
        ]
      },
      "EventCustomerRewardRedemptionsCompleted": {
        "title": "Event Customer Reward Redemptions Completed",
        "description": "Event data object schema for `customer.reward_redemptions.completed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptions"
          }
        ]
      },
      "EventCustomerRewardRedemptionsRolledBack": {
        "title": "Event Customer Reward Redemptions Rolled Back",
        "description": "Event data object schema for `customer.reward_redemptions.rolledback`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptions"
          }
        ]
      },
      "EventCustomerVoucherDeleted": {
        "title": "Event Customer Voucher Deleted",
        "description": "Event data object schema for `customer.voucher.deleted`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          }
        }
      },
      "EventCustomerLoyaltyCardPendingPointsActivated": {
        "title": "Event Customer Loyalty Card Pending Points Activated",
        "description": "Event data object schema for `customer.voucher.loyalty_card.pending_points.activated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "transaction": {
            "$ref": "#/components/schemas/VoucherTransaction"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "balance",
          "order",
          "transaction",
          "pending_points"
        ]
      },
      "EventCustomerLoyaltyCardPendingPointsAdded": {
        "title": "Event Customer Loyalty Card Pending Points Added",
        "description": "Event data object schema for `customer.voucher.loyalty_card.pending_points.added`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventCustomerLoyaltyCardPendingPointsCanceled": {
        "title": "Event Customer Loyalty Card Pending Points Canceled",
        "description": "Event data object schema for `customer.voucher.loyalty_card.pending_points.canceled`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventCustomerLoyaltyCardPendingPointsUpdated": {
        "title": "Event Customer Loyalty Card Pending Points Updated",
        "description": "Event data object schema for `customer.voucher.loyalty_card.pending_points.updated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "voucher_pending_points_balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "pending_points": {
            "$ref": "#/components/schemas/LoyaltyPendingPoints"
          }
        },
        "required": [
          "customer",
          "campaign",
          "voucher",
          "voucher_pending_points_balance",
          "order",
          "pending_points"
        ]
      },
      "EventCustomerLoyaltyCardPointsAdded": {
        "title": "Event Customer Loyalty Card Points Added",
        "description": "Event data object schema for `customer.voucher.loyalty_card.points_added`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "transaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransactionBase"
              },
              {
                "type": "object",
                "properties": {
                  "details": {
                    "type": "object",
                    "description": "Contains the detailed information about the transaction.",
                    "properties": {
                      "balance": {
                        "$ref": "#/components/schemas/VoucherBalance"
                      },
                      "order": {
                        "type": "object",
                        "description": "Contains information about the original order.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique order ID."
                          },
                          "source_id": {
                            "type": "string",
                            "description": "The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service."
                          }
                        },
                        "required": [
                          "id",
                          "source_id"
                        ]
                      },
                      "event": {
                        "type": "object",
                        "description": "Contains information about the event that triggers the point accrual.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique event ID."
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of event."
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      "earning_rule": {
                        "type": "object",
                        "description": "Contains information about the earning rule.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of an earning rule, assigned by Voucherify."
                          },
                          "source": {
                            "type": "object",
                            "required": [
                              "banner"
                            ],
                            "description": "Contains the custom earning rule name.",
                            "properties": {
                              "banner": {
                                "type": "string",
                                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "source"
                        ]
                      },
                      "segment": {
                        "type": "object",
                        "description": "Contains information about the segment.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "loyalty_tier": {
                        "type": "object",
                        "description": "Contains information about the loyalty tier.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                          },
                          "name": {
                            "type": "string",
                            "description": "User-defined name of the loyalty tier."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "redemption": {
                        "type": "object",
                        "description": "Contains information about the original redemption.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique redemption ID."
                          }
                        },
                        "required": [
                          "id"
                        ]
                      },
                      "rollback": {
                        "type": "object",
                        "description": "Contains information about the redemption rollback.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique redemption rollback ID."
                          }
                        },
                        "required": [
                          "id"
                        ]
                      },
                      "custom_event": {
                        "type": "object",
                        "description": "Contains information about the custom event that triggers the point accrual.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique event ID."
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of custom event."
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      "holder_loyalty_tier": {
                        "type": "object",
                        "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                          },
                          "name": {
                            "type": "string",
                            "description": "User-defined name of the loyalty tier."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "event_schema": {
                        "type": "object",
                        "description": "Contains information about the custom event metadata schema.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique metadata schema ID."
                          },
                          "name": {
                            "type": "string",
                            "description": "Type of custom event."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "reward": {
                        "type": "object",
                        "description": "Contains information about the pay with points reward.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique reward ID."
                          },
                          "name": {
                            "type": "string",
                            "description": "Reward name."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "source_voucher": {
                        "description": "Contains information on how the balance on the donor loyalty card was affected by the transaction.",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SimpleVoucher"
                          }
                        ]
                      },
                      "destination_voucher": {
                        "description": "Contains information on how the balance on the receiving loyalty card was affected by the transaction.",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SimpleVoucher"
                          }
                        ]
                      }
                    }
                  },
                  "type": {
                    "type": "string",
                    "description": "Transaction type concerning loyalty card points.",
                    "enum": [
                      "POINTS_ACCRUAL"
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "EventCustomerLoyaltyCardPointsTransferred": {
        "title": "Event Customer Loyalty Card Points Transferred",
        "description": "Event data object schema for `customer.voucher.loyalty_card.points_transferred`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "source_voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "destination_voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "balance": {
            "$ref": "#/components/schemas/VoucherBalance"
          },
          "transaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransactionBase"
              },
              {
                "type": "object",
                "properties": {
                  "details": {
                    "type": "object",
                    "description": "Contains the detailed information about the transaction.",
                    "properties": {
                      "balance": {
                        "$ref": "#/components/schemas/VoucherBalance"
                      },
                      "order": {
                        "type": "object",
                        "description": "Contains information about the original order.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique order ID."
                          },
                          "source_id": {
                            "type": "string",
                            "description": "The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service."
                          }
                        },
                        "required": [
                          "id",
                          "source_id"
                        ]
                      },
                      "event": {
                        "type": "object",
                        "description": "Contains information about the event that triggers the point accrual.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique event ID."
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of event."
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      "earning_rule": {
                        "type": "object",
                        "description": "Contains information about the earning rule.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of an earning rule, assigned by Voucherify."
                          },
                          "source": {
                            "type": "object",
                            "required": [
                              "banner"
                            ],
                            "description": "Contains the custom earning rule name.",
                            "properties": {
                              "banner": {
                                "type": "string",
                                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "source"
                        ]
                      },
                      "segment": {
                        "type": "object",
                        "description": "Contains information about the segment.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "loyalty_tier": {
                        "type": "object",
                        "description": "Contains information about the loyalty tier.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                          },
                          "name": {
                            "type": "string",
                            "description": "User-defined name of the loyalty tier."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "redemption": {
                        "type": "object",
                        "description": "Contains information about the original redemption.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique redemption ID."
                          }
                        },
                        "required": [
                          "id"
                        ]
                      },
                      "rollback": {
                        "type": "object",
                        "description": "Contains information about the redemption rollback.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique redemption rollback ID."
                          }
                        },
                        "required": [
                          "id"
                        ]
                      },
                      "custom_event": {
                        "type": "object",
                        "description": "Contains information about the custom event that triggers the point accrual.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique event ID."
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of custom event."
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      "event_schema": {
                        "type": "object",
                        "description": "Contains information about the custom event metadata schema.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique metadata schema ID."
                          },
                          "name": {
                            "type": "string",
                            "description": "Type of custom event."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "holder_loyalty_tier": {
                        "type": "object",
                        "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                          },
                          "name": {
                            "type": "string",
                            "description": "User-defined name of the loyalty tier."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "reward": {
                        "type": "object",
                        "description": "Contains information about the pay with points reward.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique reward ID."
                          },
                          "name": {
                            "type": "string",
                            "description": "Reward name."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "source_voucher": {
                        "description": "Contains information on how the balance on the donor loyalty card was affected by the transaction.",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SimpleVoucher"
                          }
                        ]
                      },
                      "destination_voucher": {
                        "description": "Contains information on how the balance on the receiving loyalty card was affected by the transaction.",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SimpleVoucher"
                          }
                        ]
                      }
                    }
                  },
                  "type": {
                    "type": "string",
                    "description": "Transaction type concerning loyalty card points.",
                    "enum": [
                      "POINTS_TRANSFER_IN",
                      "POINTS_TRANSFER_OUT"
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "EventCustomerVouchersLoyaltyPointsExpired": {
        "title": "Event Customer Loyalty Card Points Expired",
        "description": "Event data object schema for `customer.voucher.loyalty_card.points_expired`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "points": {
            "type": "integer",
            "description": "The number of expired points."
          },
          "buckets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoyaltyPointsBucket"
            }
          },
          "transaction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransactionBase"
              },
              {
                "type": "object",
                "properties": {
                  "details": {
                    "type": "object",
                    "description": "Contains the detailed information about the transaction.",
                    "properties": {
                      "balance": {
                        "$ref": "#/components/schemas/VoucherBalance"
                      },
                      "order": {
                        "type": "object",
                        "description": "Contains information about the original order.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique order ID."
                          },
                          "source_id": {
                            "type": "string",
                            "description": "The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service."
                          }
                        },
                        "required": [
                          "id",
                          "source_id"
                        ]
                      },
                      "event": {
                        "type": "object",
                        "description": "Contains information about the event that triggers the point accrual.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique event ID."
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of event."
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      "earning_rule": {
                        "type": "object",
                        "description": "Contains information about the earning rule.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of an earning rule, assigned by Voucherify."
                          },
                          "source": {
                            "type": "object",
                            "required": [
                              "banner"
                            ],
                            "description": "Contains the custom earning rule name.",
                            "properties": {
                              "banner": {
                                "type": "string",
                                "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                              }
                            }
                          }
                        },
                        "required": [
                          "id",
                          "source"
                        ]
                      },
                      "segment": {
                        "type": "object",
                        "description": "Contains information about the segment.",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "loyalty_tier": {
                        "type": "object",
                        "description": "Contains information about the loyalty tier.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                          },
                          "name": {
                            "type": "string",
                            "description": "User-defined name of the loyalty tier."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "redemption": {
                        "type": "object",
                        "description": "Contains information about the original redemption.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique redemption ID."
                          }
                        },
                        "required": [
                          "id"
                        ]
                      },
                      "rollback": {
                        "type": "object",
                        "description": "Contains information about the redemption rollback.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique redemption rollback ID."
                          }
                        },
                        "required": [
                          "id"
                        ]
                      },
                      "custom_event": {
                        "type": "object",
                        "description": "Contains information about the custom event that triggers the point accrual.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique event ID."
                          },
                          "type": {
                            "type": "string",
                            "description": "Type of custom event."
                          }
                        },
                        "required": [
                          "id",
                          "type"
                        ]
                      },
                      "event_schema": {
                        "type": "object",
                        "description": "Contains information about the custom event metadata schema.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique metadata schema ID."
                          },
                          "name": {
                            "type": "string",
                            "description": "Type of custom event."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "holder_loyalty_tier": {
                        "type": "object",
                        "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                          },
                          "name": {
                            "type": "string",
                            "description": "User-defined name of the loyalty tier."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "reward": {
                        "type": "object",
                        "description": "Contains information about the pay with points reward.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique reward ID."
                          },
                          "name": {
                            "type": "string",
                            "description": "Reward name."
                          }
                        },
                        "required": [
                          "id",
                          "name"
                        ]
                      },
                      "source_voucher": {
                        "description": "Contains information on how the balance on the donor loyalty card was affected by the transaction.",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SimpleVoucher"
                          }
                        ]
                      },
                      "destination_voucher": {
                        "description": "Contains information on how the balance on the receiving loyalty card was affected by the transaction.",
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SimpleVoucher"
                          }
                        ]
                      }
                    }
                  },
                  "type": {
                    "type": "string",
                    "description": "Transaction type concerning loyalty card points.",
                    "enum": [
                      "POINTS_EXPIRATION"
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "Gift": {
        "title": "Gift",
        "type": "object",
        "description": "Contains current gift card balance information.",
        "properties": {
          "amount": {
            "type": "number",
            "description": "Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtracted_amount": {
            "type": "integer",
            "description": "Total amount of subtracted credits over the gift card lifetime."
          },
          "balance": {
            "type": "number",
            "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`. `balance` = `amount` - `subtracted_amount` - `redemption.redeemed_amount`."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the credits are applied to the customer's order.",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ]
          }
        },
        "required": [
          "amount",
          "balance"
        ]
      },
      "Discount": {
        "title": "Discount",
        "type": "object",
        "description": "Contains information about discount.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/DiscountAmount"
          },
          {
            "$ref": "#/components/schemas/DiscountUnit"
          },
          {
            "$ref": "#/components/schemas/DiscountUnitMultiple"
          },
          {
            "$ref": "#/components/schemas/DiscountPercent"
          },
          {
            "$ref": "#/components/schemas/DiscountFixed"
          }
        ]
      },
      "SimpleLoyaltyCard": {
        "title": "Simple Loyalty Card",
        "type": "object",
        "description": "Simplified loyalty card data.",
        "required": [
          "points"
        ],
        "properties": {
          "points": {
            "type": "integer",
            "description": "Total number of points added to the loyalty card over its lifespan."
          },
          "balance": {
            "type": "integer",
            "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
          },
          "next_expiration_date": {
            "type": "string",
            "description": "The next closest date when the next set of points are due to expire."
          },
          "next_expiration_points": {
            "type": "integer",
            "description": "The amount of points that are set to expire next."
          },
          "pending_points": {
            "type": "integer",
            "description": "Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually."
          },
          "expired_points": {
            "type": "integer",
            "description": "Shows the total number of expired points over the lifetime of the loyalty card."
          },
          "subtracted_points": {
            "type": "integer",
            "description": "Shows the total number of subtracted points over the lifetime of the loyalty card."
          }
        }
      },
      "FiltersCondition": {
        "title": "Filters Condition",
        "type": "object",
        "properties": {
          "$in": {
            "$ref": "#/components/schemas/Any"
          },
          "$not_in": {
            "$ref": "#/components/schemas/Any"
          },
          "$is": {
            "$ref": "#/components/schemas/Any"
          },
          "$is_days_ago": {
            "$ref": "#/components/schemas/Any"
          },
          "$is_days_in_future": {
            "$ref": "#/components/schemas/Any"
          },
          "$is_not": {
            "$ref": "#/components/schemas/Any"
          },
          "$has_value": {
            "$ref": "#/components/schemas/Any"
          },
          "$is_unknown": {
            "$ref": "#/components/schemas/Any"
          },
          "$contains": {
            "$ref": "#/components/schemas/Any"
          },
          "$not_contain": {
            "$ref": "#/components/schemas/Any"
          },
          "$starts_with": {
            "$ref": "#/components/schemas/Any"
          },
          "$ends_with": {
            "$ref": "#/components/schemas/Any"
          },
          "$more_than": {
            "$ref": "#/components/schemas/Any"
          },
          "$less_than": {
            "$ref": "#/components/schemas/Any"
          },
          "$more_than_ago": {
            "$ref": "#/components/schemas/Any"
          },
          "$less_than_ago": {
            "$ref": "#/components/schemas/Any"
          },
          "$more_than_future": {
            "$ref": "#/components/schemas/Any"
          },
          "$less_than_future": {
            "$ref": "#/components/schemas/Any"
          },
          "$more_than_equal": {
            "$ref": "#/components/schemas/Any"
          },
          "$less_than_equal": {
            "$ref": "#/components/schemas/Any"
          },
          "$after": {
            "$ref": "#/components/schemas/Any"
          },
          "$before": {
            "$ref": "#/components/schemas/Any"
          },
          "$count": {
            "$ref": "#/components/schemas/Any"
          },
          "$count_less": {
            "$ref": "#/components/schemas/Any"
          },
          "$count_more": {
            "$ref": "#/components/schemas/Any"
          }
        }
      },
      "EarningRuleProportionalOrderAmount": {
        "title": "Order Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_AMOUNT",
            "enum": [
              "ORDER_AMOUNT"
            ],
            "description": "`ORDER_AMOUNT`: Pre-discount order amount (X points for every Y spent excluding discounts)"
          },
          "order": {
            "type": "object",
            "required": [
              "amount"
            ],
            "properties": {
              "amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      },
      "EarningRuleProportionalOrderTotalAmount": {
        "title": "Order Total Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_TOTAL_AMOUNT",
            "enum": [
              "ORDER_TOTAL_AMOUNT"
            ],
            "description": "`ORDER_TOTAL_AMOUNT`: Total order amount (X points for every Y spent including discount)"
          },
          "order": {
            "type": "object",
            "required": [
              "total_amount"
            ],
            "properties": {
              "total_amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      },
      "EarningRuleProportionalOrderMetadata": {
        "title": "Order Metadata",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_METADATA",
            "enum": [
              "ORDER_METADATA"
            ],
            "description": "`ORDER_METADATA`: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object)"
          },
          "order": {
            "type": "object",
            "required": [
              "metadata"
            ],
            "description": "Defines the formula for calculating points proportionally.",
            "properties": {
              "metadata": {
                "type": "object",
                "required": [
                  "every",
                  "points",
                  "property"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every given increment of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every order metadata property value, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "For how many increments of the order metadata property to grant points for."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "property": {
                    "type": "string",
                    "description": "Order metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order"
        ]
      },
      "EarningRuleProportionalOrderItemsQuantity": {
        "title": "Order Items Quantity",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_ITEMS_QUANTITY",
            "enum": [
              "ORDER_ITEMS_QUANTITY"
            ],
            "description": "`ORDER_ITEMS_QUANTITY`: Quantity of items defined in the `order_items.quantity.applicable_to` array or `order_items.quantity.object` & `.id` (X points for every Y items excluding free items)."
          },
          "order_items": {
            "type": "object",
            "required": [
              "quantity"
            ],
            "properties": {
              "quantity": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                  },
                  "applicable_to": {
                    "type": "array",
                    "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "description": "Type of object which will be covered by the earning rule.",
                          "enum": [
                            "products_collection",
                            "product",
                            "sku"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "EarningRuleProportionalOrderItemsAmount": {
        "title": "Order Items Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_ITEMS_AMOUNT",
            "enum": [
              "ORDER_ITEMS_AMOUNT"
            ],
            "description": "ORDER_ITEMS_AMOUNT; Pre-discount amount spent on items defined in the `order_items.quantity.applicable_to` array or `order_items.quantity.object` & `.id` (X points for every Y spent on items excluding discounts)"
          },
          "order_items": {
            "type": "object",
            "required": [
              "amount"
            ],
            "properties": {
              "amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                  },
                  "applicable_to": {
                    "type": "array",
                    "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "description": "Type of object which will be covered by the earning rule.",
                          "enum": [
                            "products_collection",
                            "product",
                            "sku"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "EarningRuleProportionalOrderItemsSubtotalAmount": {
        "title": "Order Items Subtotal Amount",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ],
            "description": "Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio."
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_ITEMS_SUBTOTAL_AMOUNT",
            "enum": [
              "ORDER_ITEMS_SUBTOTAL_AMOUNT"
            ],
            "description": "ORDER_ITEMS_SUBTOTAL_AMOUNT; Amount spent on items defined in the order_items.subtotal_amount.object & .id (X points for every Y spent on items including discounts)"
          },
          "order_items": {
            "type": "object",
            "required": [
              "subtotal_amount"
            ],
            "properties": {
              "subtotal_amount": {
                "type": "object",
                "required": [
                  "every",
                  "points"
                ],
                "description": "Defines the ratio based on the property defined in the calculation_type parameter. For every set of value (1, 10, etc) defined in the every parameter for the property defined in calculation_type, give the customer the number of points defined in the points parameter. In other words, for every calculation_type, give points.",
                "properties": {
                  "every": {
                    "type": "integer",
                    "description": "Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000."
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card."
                  },
                  "points_formula": {
                    "type": "string",
                    "description": "Formula used to dynamically calculate the rewarded points."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object which will be covered by the earning rule. This is required together with `id`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource assigned by Voucherify. This is required together with `object`. Can be replaced by the `applicable_to` array. In response, the value of the first object is returned even if `applicable_to` array was used. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                  },
                  "applicable_to": {
                    "type": "array",
                    "description": "Defines products, SKUs, or product collections covered by the earning rule. Can be replaced by `object` and `id` to define only one object.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "object": {
                          "type": "string",
                          "description": "Type of object which will be covered by the earning rule.",
                          "enum": [
                            "products_collection",
                            "product",
                            "sku"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "description": "Unique ID of the resource assigned by Voucherify. Values are, for example, `pc_75U0dHlr7u75BJodrW1AE3t6` for product collection, `prod_0bae32322150fd0546` for a product, or `sku_0b7d7dfb090be5c619` for a SKU."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "RewardTypeCampaign": {
        "title": "Digital",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "description": "Objects stores information about the campaign related to the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID, assigned by Voucherify."
              },
              "balance": {
                "type": "integer",
                "description": "The number of points to be added to a loyalty card or the amount to be added to the current balance on the gift card.\n\nFor gift cards, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              },
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_COUPONS",
                  "GIFT_VOUCHERS",
                  "LOYALTY_PROGRAM"
                ],
                "description": "Campaign type."
              }
            }
          }
        },
        "required": [
          "campaign"
        ]
      },
      "RewardTypeCoin": {
        "title": "Pay with Points",
        "type": "object",
        "properties": {
          "coin": {
            "type": "object",
            "required": [
              "exchange_ratio"
            ],
            "description": "Defines the ratio by mapping the number of loyalty points in points_ratio to a predefined cash amount in exchange_ratio.",
            "properties": {
              "exchange_ratio": {
                "type": "number",
                "description": "The cash equivalent of the points defined in the points_ratio property."
              },
              "points_ratio": {
                "type": "integer",
                "description": "The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property."
              }
            }
          }
        },
        "required": [
          "coin"
        ]
      },
      "RewardTypeMaterial": {
        "title": "Material",
        "type": "object",
        "properties": {
          "product": {
            "type": "object",
            "required": [
              "id"
            ],
            "description": "Contains information about the product given as a reward.",
            "properties": {
              "id": {
                "type": "string",
                "example": "prod_0b7d7dfb05cbe5c616",
                "description": "Unique product ID, assigned by Voucherify."
              },
              "sku_id": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "sku_0b7d7dfb090be5c619",
                "description": "Unique SKU ID, assigned by Voucherify, of the SKU given as a reward."
              }
            }
          }
        },
        "required": [
          "product"
        ]
      },
      "OrderCalculated": {
        "title": "Order Calculated No Customer Data",
        "type": "object",
        "description": "Order information.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "This is the sum of the order items' amounts. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "initial_amount": {
            "type": "integer",
            "description": "This is the sum of the order items' amounts before any discount or other effect (e.g. add missing units) is applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).  \n`sum(items, i => i.applied_discount_amount)`"
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).  \n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "order",
            "enum": [
              "order"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "example": "2021-12-22T10:14:45.316Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the order was last updated in ISO 8601 format."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique referrer ID.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "customer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CustomerId"
              }
            ]
          },
          "referrer": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ReferrerId"
              }
            ]
          },
          "redemptions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/OrderRedemptionsEntry"
            }
          }
        }
      },
      "OrderCalculatedItem": {
        "type": "object",
        "title": "Order Item Calculated",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the order line item."
          },
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify."
          },
          "product_id": {
            "type": "string",
            "description": "Unique identifier of the product. It is assigned by Voucherify."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the source_id property, can be set to either sku or product."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of the particular item in the cart."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of dicounted items."
          },
          "initial_quantity": {
            "type": "integer",
            "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity."
          },
          "amount": {
            "type": "integer",
            "description": "The total amount of the order item (price * quantity)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-item-level discounts applied to the order."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied."
          },
          "applied_discount_quantity": {
            "type": "integer",
            "description": "Number of the discounted items applied in the transaction."
          },
          "applied_quantity": {
            "type": "integer",
            "description": "Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "applied_quantity_amount": {
            "type": "integer",
            "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "initial_amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtotal_amount": {
            "type": "integer",
            "description": "Final order item amount after the applied item-level discount.  If there are no item-level discounts applied, this item is equal to the `amount`.   \n`subtotal_amount`=`amount`-`applied_discount_amount`"
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the product and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
              },
              "name": {
                "type": "string",
                "description": "Product name."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections."
              },
              "price": {
                "type": "number",
                "description": "Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          },
          "sku": {
            "type": "object",
            "description": "An object containing details of the related SKU.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
              },
              "sku": {
                "type": "string",
                "description": "The SKU name."
              },
              "price": {
                "type": "number",
                "description": "SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections."
              }
            }
          },
          "object": {
            "type": "string",
            "default": "order_item",
            "enum": [
              "order_item"
            ],
            "description": "The type of the object represented by JSON."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an item object. It can be useful for storing additional information about the item in a structured format. It can be used to define business validation rules or discount formulas."
          }
        },
        "required": [
          "object"
        ]
      },
      "ApplicationDetails": {
        "type": "array",
        "description": "Array containing details about the items that are replaced and the items that are replacements for discounts with the `REPLACE_ITEMS` effect.",
        "items": {
          "type": "object",
          "description": "Object representing item replacement.",
          "properties": {
            "source_index": {
              "type": "integer",
              "description": "Index number of the source item that is replaced. The enumeration starts from `0`, which represents the first item in the request, e.g., if the replaced item is passed as the second in the request, `source_index` equals `3`.",
              "minimum": 0
            },
            "source_applied_quantity": {
              "type": "integer",
              "description": "Number of source units that are replaced.",
              "maximum": -1
            },
            "source_applied_quantity_amount": {
              "type": "integer",
              "description": "Amount equal to the price of the units that are replaced. Determines the change of the amount of the source item quantity.",
              "maximum": 0
            },
            "target_index": {
              "type": "integer",
              "description": "Index number of the target item that is a replacement of the source item. The enumeration continues the values for the order items, e.g. if there are three items in the request, `target_index` equals `3`, as enumeration starts from `0`."
            },
            "target_applied_quantity": {
              "type": "integer",
              "description": "Number of added target units that are replacements."
            },
            "target_applied_quantity_amount": {
              "type": "integer",
              "description": "Amount equal to the price of the units that are replacements. Determines the change in the amount of the target item quantity."
            },
            "target_applied_discount_amount": {
              "type": "integer",
              "description": "Discount amount applied to the target item with regard to the replacement. Equals the `target_applied_quantity_amount` minus `source_applied_quantity_amount`."
            }
          }
        }
      },
      "SimpleCustomer": {
        "title": "Simple Customer",
        "type": "object",
        "description": "Simplified customer data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of an existing customer. It is assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "source_id": {
            "type": "string",
            "description": "A unique identifier of the customer. It can be a customer ID or email from a CRM system, database, or a third-party service."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that are attached to the customer. It stores all custom attributes assigned to the customer."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "customer"
            ]
          }
        }
      },
      "PromotionTier": {
        "type": "object",
        "description": "This is an object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "title": "Promotion Tier",
        "properties": {
          "id": {
            "type": "string",
            "example": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
            "description": "Unique promotion tier ID."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-15T11:34:01.333Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "example": "2022-02-09T09:20:05.603Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the promotion tier was updated. The value is shown in the ISO 8601 format."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "action": {
            "type": "object",
            "description": "Contains details about the discount applied by the promotion tier.",
            "properties": {
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format."
          },
          "hierarchy": {
            "type": "integer",
            "description": "The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy."
          },
          "promotion_id": {
            "type": "string",
            "description": "Promotion unique ID."
          },
          "campaign": {
            "type": "object",
            "description": "Contains details about promotion tier's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID."
              },
              "start_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. ",
                "format": "date-time",
                "example": "2022-09-22T00:00:00.000Z"
              },
              "expiration_date": {
                "type": "string",
                "format": "date-time",
                "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is *inactive after* this date.",
                "example": "2022-09-30T00:00:00.000Z"
              },
              "validity_timeframe": {
                "$ref": "#/components/schemas/ValidityTimeframe"
              },
              "validity_day_of_week": {
                "$ref": "#/components/schemas/ValidityDayOfWeek"
              },
              "validity_hours": {
                "$ref": "#/components/schemas/ValidityHours"
              },
              "active": {
                "type": "boolean",
                "description": "A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the [Disable Campaign](/api-reference/campaigns/disable-campaign) endpoint.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "category_id": {
                "type": "string",
                "example": "cat_0b688929a2476386a6",
                "description": "Unique category ID that this campaign belongs to."
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign.",
                "default": "campaign"
              }
            }
          },
          "campaign_id": {
            "type": "string",
            "description": "Promotion tier's parent campaign's unique ID."
          },
          "active": {
            "type": "boolean",
            "description": "A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* promotion tier\n- `false` indicates an *inactive* promotion tier"
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. ",
            "format": "date-time",
            "example": "2022-09-23T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. ",
            "format": "date-time",
            "example": "2022-09-26T00:00:00.000Z"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "summary": {
            "type": "object",
            "description": "Contains statistics about promotion tier redemptions and orders.",
            "properties": {
              "redemptions": {
                "type": "object",
                "description": "Contains statistics about promotion tier redemptions.",
                "properties": {
                  "total_redeemed": {
                    "type": "integer",
                    "description": "Number of times the promotion tier was redeemed."
                  }
                }
              },
              "orders": {
                "type": "object",
                "description": "Contains statistics about orders related to the promotion tier.",
                "properties": {
                  "total_amount": {
                    "type": "integer",
                    "description": "Sum of order totals."
                  },
                  "total_discount_amount": {
                    "type": "integer",
                    "description": "Sum of total discount applied using the promotion tier."
                  }
                }
              }
            }
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          },
          "validation_rule_assignments": {
            "$ref": "#/components/schemas/ValidationRuleAssignmentsList"
          },
          "category_id": {
            "type": "string",
            "description": "Promotion tier category ID.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          }
        }
      },
      "RedemptionRewardResult": {
        "title": "Redemption Reward Result",
        "type": "object",
        "properties": {
          "customer": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              },
              {
                "type": "null"
              }
            ]
          },
          "assignment_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique reward assignment ID assigned by Voucherify."
          },
          "voucher": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              },
              {
                "type": "null"
              }
            ]
          },
          "product": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Product"
              },
              {
                "type": "null"
              }
            ]
          },
          "sku": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Sku"
              },
              {
                "type": "null"
              }
            ]
          },
          "loyalty_tier_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique loyalty tier ID assigned by Voucherify."
          },
          "id": {
            "type": "string",
            "example": "rew_0bc92f81a6801f9bca",
            "description": "Unique reward ID."
          },
          "name": {
            "type": "string",
            "example": "Reward Name",
            "description": "Name of the reward."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON",
            "default": "reward",
            "enum": [
              "reward"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was updated."
          },
          "parameters": {
            "type": "object",
            "description": "These are parameters representing a material reward.",
            "properties": {
              "campaign": {
                "type": "object",
                "description": "Defines the product redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Campaign unique ID.",
                    "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
                  },
                  "balance": {
                    "type": "integer",
                    "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
                  },
                  "type": {
                    "type": "string",
                    "description": "Defines the type of the campaign."
                  }
                }
              },
              "product": {
                "type": "object",
                "description": "Defines the product redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "prod_0b7d7dfb05cbe5c616",
                    "description": "Unique product ID, assigned by Voucherify. "
                  },
                  "sku_id": {
                    "type": "string",
                    "description": "Unique identifier of the SKU. It is assigned by Voucherify.",
                    "example": "sku_0a41e31c7b41c28358"
                  }
                }
              },
              "coin": {
                "type": "object",
                "description": "Defines the ratio by mapping the number of loyalty points in `points_ratio` to a predefined cash amount in `exchange_ratio`.",
                "properties": {
                  "exchange_ratio": {
                    "type": "number",
                    "description": "The cash equivalent of the points defined in the `points_ratio` property."
                  },
                  "points_ratio": {
                    "type": "integer",
                    "description": "The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property."
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          }
        },
        "required": [
          "reward",
          "customer",
          "assignment_id",
          "voucher",
          "product",
          "sku",
          "loyalty_tier_id"
        ]
      },
      "VoucherBase": {
        "title": "Voucher Base",
        "description": "This is an object representing a voucher.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "v_mkZN9v7vjYUadXnHrMza8W5c34fE5KiV",
            "description": "Assigned by the Voucherify API, identifies the voucher."
          },
          "code": {
            "type": "string",
            "example": "WVPblOYX",
            "description": "A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters."
          },
          "campaign": {
            "type": "string",
            "example": "Gift Card Campaign",
            "description": "A unique campaign name, identifies the voucher's parent campaign."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
            "description": "Assigned by the Voucherify API, identifies the voucher's parent campaign."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify.",
            "example": "cat_0bb343dee3cdb5ec0c"
          },
          "type": {
            "type": "string",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "gift": {
            "type": "object",
            "description": "Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`.",
            "properties": {
              "amount": {
                "type": "integer",
                "example": 10000,
                "description": "Total gift card income over the lifetime of the card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "subtracted_amount": {
                "type": "integer",
                "description": "Total amount of subtracted credits over the gift card lifetime. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "balance": {
                "type": "integer",
                "example": 500,
                "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "effect": {
                "type": "string",
                "enum": [
                  "APPLY_TO_ORDER",
                  "APPLY_TO_ITEMS"
                ],
                "description": "Defines how the credits are applied to the customer's order."
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`. Defaults to `null`.",
            "properties": {
              "points": {
                "type": "integer",
                "example": 7000,
                "description": "Total number of points added to the loyalty card over its lifespan."
              },
              "balance": {
                "type": "integer",
                "example": 6970,
                "description": "Points available for reward redemption. This is calculated as follows: `balance` = `points` - `expired_points` - `subtracted_points` - `redemption.redeemed_points`."
              },
              "next_expiration_date": {
                "type": "string",
                "format": "date",
                "example": "2023-05-30",
                "description": "The next closest date when the next set of points are due to expire."
              },
              "next_expiration_points": {
                "type": "integer",
                "description": "The amount of points that are set to expire next."
              },
              "pending_points": {
                "type": "integer",
                "description": "Shows the number of pending points that will be added to the loyalty card when they are activated automatically or manually."
              },
              "expired_points": {
                "type": "integer",
                "description": "Shows the total number of expired points over the lifetime of the loyalty card."
              },
              "subtracted_points": {
                "type": "integer",
                "description": "Shows the total number of subtracted points over the lifetime of the loyalty card."
              }
            }
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. "
          },
          "expiration_date": {
            "type": "string",
            "example": "2021-12-31T00:00:00.000Z",
            "format": "date-time",
            "description": "Expiration timestamp defines when the code expires in ISO 8601 format.  Voucher is *inactive after* this date."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`.  \n\n- `true` indicates an *active* voucher\n- `false` indicates an *inactive* voucher"
          },
          "additional_info": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format."
          },
          "assets": {
            "$ref": "#/components/schemas/VoucherAssets"
          },
          "is_referral_code": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the voucher was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2021-12-22T10:14:45.316Z",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the voucher was last updated in ISO 8601 format."
          },
          "holder_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify."
          },
          "referrer_id": {
            "type": "string",
            "description": "Unique identifier of the referring person.",
            "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          },
          "publish": {
            "type": "object",
            "description": "Stores a summary of publication events: an event counter and endpoint to return details of each event. Publication is an assignment of a code to a customer, e.g. through a distribution.",
            "properties": {
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute."
              },
              "count": {
                "type": "integer",
                "example": 0,
                "description": "Publication events counter."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/publications?page=1&limit=10",
                "description": "The endpoint where this list of publications can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/publications`"
              }
            }
          },
          "redemption": {
            "type": "object",
            "description": "Stores a summary of redemptions that have been applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              },
              "redeemed_points": {
                "type": "integer",
                "example": 100000,
                "description": "Total loyalty points redeemed."
              },
              "object": {
                "type": "string",
                "default": "list",
                "description": "The type of the object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute."
              },
              "url": {
                "type": "string",
                "example": "/v1/vouchers/WVPblOYX/redemptions?page=1&limit=10",
                "description": "The endpoint where this list of redemptions can be accessed using a **GET** method. `/v1/vouchers/{voucher_code}/redemptions`"
              }
            }
          }
        }
      },
      "OrderItem": {
        "type": "object",
        "title": "Order Item",
        "properties": {
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify."
          },
          "product_id": {
            "type": "string",
            "description": "Unique identifier of the product. It is assigned by Voucherify."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the source_id property, can be set to either sku or product."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of the particular item in the cart."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of dicounted items."
          },
          "initial_quantity": {
            "type": "integer",
            "description": "A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity."
          },
          "amount": {
            "type": "integer",
            "description": "The total amount of the order item (price * quantity)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-item-level discounts applied to the order."
          },
          "initial_amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the product and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. Override works only for endpoints that create an order in the database."
              },
              "name": {
                "type": "string",
                "description": "Product name."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections."
              },
              "price": {
                "type": "number",
                "description": "Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          },
          "sku": {
            "type": "object",
            "description": "An object containing details of the related SKU.",
            "properties": {
              "id": {
                "type": "string",
                "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "The merchant's SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service."
              },
              "override": {
                "type": "boolean",
                "description": "The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system."
              },
              "sku": {
                "type": "string",
                "description": "The SKU name."
              },
              "price": {
                "type": "number",
                "description": "SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00)."
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to create product collections."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order item. It can be useful for storing additional information about the order item in a structured format. It can be used to define business validation rules."
          }
        },
        "required": [
          "object"
        ]
      },
      "MappingMultiply": {
        "title": "MappingMultiply",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "MULTIPLY",
            "enum": [
              "MULTIPLY"
            ],
            "description": "Type of calculation."
          },
          "multiplier": {
            "type": "number",
            "description": "Multiplication factor used to multiply the points to obtain the mapped points."
          }
        }
      },
      "MappingFixed": {
        "title": "MappingFixed",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "CUSTOM",
            "enum": [
              "CUSTOM"
            ],
            "description": "Type of calculation."
          },
          "points": {
            "type": "integer",
            "description": "Fixed number of points to be applied."
          }
        }
      },
      "EventCustomerLoyaltyTierBase": {
        "title": "Event Customer Loyalty Tier Base",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          }
        },
        "required": [
          "created_at",
          "loyalty_tier_to"
        ]
      },
      "SimpleCampaign": {
        "title": "Simple Campaign",
        "type": "object",
        "description": "Simplified campaign data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Campaign ID."
          },
          "name": {
            "type": "string",
            "description": "Campaign name."
          },
          "campaign_type": {
            "type": "string",
            "description": "Type of campaign."
          },
          "type": {
            "type": "string",
            "description": "Defines whether the campaign can be updated with new vouchers after campaign creation or if the campaign consists of generic (standalone) vouchers.\n\n- `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria\n-  `STATIC`: vouchers need to be manually published\n- `STANDALONE`: campaign for single vouchers",
            "enum": [
              "AUTO_UPDATE",
              "STATIC",
              "STANDALONE"
            ]
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleCampaignVoucher"
          },
          "referral_program": {
            "$ref": "#/components/schemas/ReferralProgram"
          },
          "auto_join": {
            "type": "boolean",
            "description": "Indicates whether customers will be able to auto-join the campaign if any earning rule is fulfilled."
          },
          "join_once": {
            "type": "boolean",
            "description": "If this value is set to `true`, customers will be able to join the campaign only once. It is always `false` for generic (standalone) vouchers campaigns and it cannot be changed in them. It is always `true` for loyalty campaigns and it cannot be changed in them."
          },
          "active": {
            "type": "boolean",
            "description": "Indicates whether the campaign is active."
          },
          "category_id": {
            "type": [
              "null",
              "string"
            ],
            "description": "The unique category ID that this campaign belongs to."
          },
          "category": {
            "type": "string",
            "description": "Unique category name."
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a campaign. The metadata object stores all custom attributes assigned to the campaign."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is inactive *before* this date. ",
            "example": "2022-09-20T00:00:00.000Z"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration timestamp defines when the campaign expires in ISO 8601 format.  Campaign is inactive *after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep extra textual information about the campaign such as a campaign description and details."
          },
          "created_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the campaign was updated in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "enum": [
              "campaign"
            ],
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          }
        }
      },
      "ListPublicationsItemValidSingleVoucher": {
        "title": "Valid Single Voucher",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ListPublicationsItemBase"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "type": "string",
                "default": "SUCCESS",
                "enum": [
                  "SUCCESS"
                ],
                "description": "Status of the publication attempt."
              },
              "voucher": {
                "$ref": "#/components/schemas/ListPublicationsItemVoucher"
              }
            },
            "required": [
              "result",
              "voucher"
            ]
          }
        ]
      },
      "EventCustomerRedemption": {
        "title": "Event Customer Redemption",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "holder": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "promotion_tier": {
            "$ref": "#/components/schemas/SimplePromotionTier"
          },
          "promotion_stack": {
            "$ref": "#/components/schemas/SimplePromotionStack"
          },
          "redemption": {
            "$ref": "#/components/schemas/SimpleRedemption"
          }
        }
      },
      "SimpleRedemption": {
        "type": "object",
        "title": "Simple Redemption",
        "description": "Simplified redemption data.",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "date": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the redemption was created in the ISO 8601 format.",
            "format": "date-time"
          },
          "amount": {
            "type": "integer",
            "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction.\nIn the case of redemption rollback, the numbers are expressed as negative integers.",
            "example": 10000
          },
          "order": {
            "$ref": "#/components/schemas/SimpleOrder"
          },
          "reward": {
            "$ref": "#/components/schemas/SimpleRedemptionRewardResult"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "SUCCEEDED",
              "FAILED",
              "ROLLED BACK"
            ]
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "promotion_tier": {
            "$ref": "#/components/schemas/SimplePromotionTier"
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "failure_code": {
            "type": "string",
            "example": "customer_rules_violated",
            "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed."
          },
          "failure_message": {
            "type": "string",
            "description": "If the result is `FAILURE`, this parameter will provide an expanded reason as to why the redemption failed."
          },
          "reason": {
            "type": "string",
            "description": "The reason for the redemption rollback."
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard, an X-APP-Id of a user using the API, or the reward assignment ID for automatic reward redemption."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption:\n`USER` - the redemption was made in the Voucherify Dashboard by a user,\n `API` - redemption was made through the API,\n`AUTO_REDEEM` - the redemption was made automatically for a reward.",
                "enum": [
                  "API",
                  "AUTO_REDEEM",
                  "USER"
                ]
              }
            }
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          }
        },
        "required": [
          "id",
          "date",
          "metadata",
          "status",
          "object"
        ]
      },
      "RedemptionInternal": {
        "title": "Redemption Internal",
        "description": "Model Used for internal communication",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "r_0bc92f81a6801f9bca",
            "description": "Unique redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the redemption."
          },
          "channel_type": {
            "type": "string",
            "description": "The source of the channel for the redemption rollback. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
            "enum": [
              "USER",
              "API"
            ]
          },
          "channel_id": {
            "type": "string",
            "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
            "description": "Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
          },
          "failure_code": {
            "type": "string",
            "example": "customer_rules_violated",
            "description": "If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed."
          },
          "failure_message": {
            "type": "string",
            "description": "If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed."
          },
          "order": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderCalculated"
              },
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Array of items applied to the order. It can include up to 500 items.",
                    "items": {
                      "$ref": "#/components/schemas/OrderCalculatedItem"
                    }
                  }
                }
              }
            ]
          },
          "previous_order": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderCalculated"
              },
              {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "description": "Array of items applied to the order. It can include up to 500 items.",
                    "items": {
                      "$ref": "#/components/schemas/OrderCalculatedItem"
                    }
                  }
                }
              }
            ]
          },
          "reward": {
            "$ref": "#/components/schemas/RedemptionRewardResult"
          },
          "amount": {
            "type": "integer",
            "description": "For gift cards, this is a positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the number of redeemed credits.\nFor loyalty cards, this is the number of loyalty points used in the transaction.",
            "example": 10000
          },
          "reason": {
            "type": "string",
            "description": "System generated cause for the redemption being invalid in the context of the provided parameters."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "status": {
            "type": "string",
            "enum": [
              "SUCCEEDED",
              "FAILED"
            ],
            "description": "Redemption status."
          },
          "related_redemptions": {
            "type": "object",
            "properties": {
              "rollbacks": {
                "type": "array",
                "items": {
                  "title": "Redemption Internal Related Redemptions Rollbacks Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "rr_0bc92f81a6801f9bca",
                      "description": "Unique rollback redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
                      "format": "date-time"
                    }
                  }
                }
              },
              "redemptions": {
                "type": "array",
                "items": {
                  "title": "Redemption Internal Related Redemptions Item",
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "r_0bc92f81a6801f9bca",
                      "description": "Unique redemption ID."
                    },
                    "date": {
                      "type": "string",
                      "example": "2021-12-22T10:13:06.487Z",
                      "description": "Timestamp representing the date and time when the object was created. The value is shown in the ISO 8601 format.",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "parent_redemption_id": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "enum": [
              "voucher",
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "related_object_parent_id": {
            "type": "string",
            "description": "Unique related parent object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "campaign_name": {
            "type": "string",
            "description": "Campaign name"
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              },
              {
                "$ref": "#/components/schemas/VoucherHolder"
              }
            ]
          },
          "promotion_tier": {
            "description": "Contains details of the promotion tier and the parent campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          }
        }
      },
      "SimpleRedemptionRewardResult": {
        "title": "Simple Redemption Reward Result",
        "type": "object",
        "description": "Simplified redemption reward result data",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "assignment_id": {
            "type": "string",
            "description": "Unique reward assignment ID assigned by Voucherify."
          },
          "voucher": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleVoucher"
              }
            ]
          },
          "product": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProduct"
              }
            ]
          },
          "sku": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleSku"
              }
            ]
          },
          "loyalty_tier_id": {
            "type": "string",
            "description": "Unique loyalty tier ID assigned by Voucherify."
          },
          "id": {
            "type": "string",
            "example": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
            "description": "Unique reward ID, assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "enum": [
              "reward"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the reward."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the reward was created. The value is shown in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp representing the date and time when the reward was updated. The value is shown in the ISO 8601 format.",
            "example": "2024-01-01T11:11:11.111Z",
            "format": "date-time"
          },
          "parameters": {
            "description": "Defines how the reward is generated.",
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/RewardType"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a reward. The metadata object stores all custom attributes assigned to the reward."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          }
        }
      },
      "SimpleReferralTier": {
        "title": "Simple Referral Tier",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique referral tier ID.",
            "example": "seg_DNAOhUtJffvX0f57ajLMFBYR"
          },
          "campaign_id": {
            "type": "string",
            "description": "Campaign Id."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "parameters": {
            "type": "object",
            "description": "Referral tier parameters.",
            "properties": {
              "event_type": {
                "type": "string",
                "description": "Type of the event."
              },
              "segment": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the segment."
                  }
                }
              },
              "custom_event": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the custome event."
                  }
                }
              },
              "distribution": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier of the distribution."
                  }
                }
              }
            }
          }
        }
      },
      "CustomEvent": {
        "title": "Custom Event",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique custom event ID."
          },
          "object": {
            "type": "string",
            "default": "event",
            "description": "The object represented is an `event`.",
            "enum": [
              "event"
            ]
          },
          "type": {
            "type": "string",
            "description": "The event name."
          },
          "customer": {
            "description": "A simple customer object",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomerRequiredObjectType"
              }
            ]
          },
          "referral": {
            "type": "object",
            "description": "Referral object.",
            "properties": {
              "referrer_id": {
                "type": "string",
                "description": "Unique referrer ID.",
                "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
              },
              "code": {
                "type": "string",
                "description": "Voucher code."
              },
              "id": {
                "type": "string",
                "description": "Unique voucher ID."
              }
            }
          },
          "loyalty": {
            "type": "object",
            "description": "Loyalty object.",
            "properties": {
              "code": {
                "type": "string",
                "description": "Loyalty card code."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer object."
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the custom event was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "object",
          "type",
          "customer",
          "referral",
          "loyalty"
        ]
      },
      "SimpleSegment": {
        "title": "Simple Segment",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique segment ID.",
            "example": "seg_DNAOhUtJffvX0f57ajLMFBYR"
          },
          "name": {
            "type": "string",
            "description": "Segment name."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the ID.",
            "default": "segment",
            "enum": [
              "segment"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "object"
        ]
      },
      "SimpleEvent": {
        "title": "Simple Event",
        "type": "object",
        "description": "Simplified event data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify that will be linked to the this event.",
            "example": "evcus_0e3070fef399b70b00"
          },
          "type": {
            "type": "string",
            "description": "Type of the triggering event.",
            "example": "customer.order.paid"
          },
          "category": {
            "type": "string",
            "description": "Type of the event.",
            "enum": [
              "EFFECT",
              "ACTION"
            ]
          },
          "entity_id": {
            "type": "string",
            "description": "ID of the entity that initiated the event.",
            "example": "cust_ADqZIwGvWFvugWXVbrHwXRHO"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2024-01-01T11:11:11.111Z",
            "description": "Timestamp representing the date and time when the event was created in the ISO 8601 format."
          },
          "group_id": {
            "type": "string",
            "description": "Unique identifier of the request that triggered the event.",
            "example": "v-1f36113948e50fc4ge"
          }
        }
      },
      "EventCustomerRewardRedemptions": {
        "title": "Event Customer Reward Redemptions",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "holder": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "reward_redemption": {
            "type": "object"
          },
          "reward": {
            "$ref": "#/components/schemas/SimpleRedemptionRewardResult"
          },
          "reward_assignment": {
            "$ref": "#/components/schemas/RewardAssignment"
          },
          "source": {
            "type": "string"
          },
          "balance": {
            "type": "integer"
          }
        }
      },
      "SimpleOrder": {
        "title": "Simple Order",
        "type": "object",
        "description": "Order information.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of an existing order that will be linked to the redemption of this request."
          },
          "source_id": {
            "type": "string",
            "description": "Unique source identifier of an existing order that will be linked to the redemption of this request."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique identifier of the referrer assigned by Voucherify.",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
          },
          "amount": {
            "type": "integer",
            "description": "A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order.  It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).  \n`sum(items, i => i.applied_discount_amount)`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied in a particular request. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00).\n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption. It is expressed as an integer in the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "items": {
            "type": "array",
            "description": "Array of items applied to the order. It can include up to 500 items.",
            "items": {
              "$ref": "#/components/schemas/SimpleOrderItem"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. It can be used to define business validation rules or discount formulas."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "order",
            "enum": [
              "order"
            ]
          }
        },
        "required": [
          "object"
        ]
      },
      "VoucherTransaction": {
        "title": "Voucher Transaction",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherTransactionBase"
          },
          {
            "type": "object",
            "properties": {
              "details": {
                "type": "object",
                "description": "Contains the detailed information about the transaction.",
                "properties": {
                  "balance": {
                    "$ref": "#/components/schemas/VoucherBalance"
                  },
                  "order": {
                    "type": "object",
                    "description": "Contains information about the original order.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique order ID."
                      },
                      "source_id": {
                        "type": "string",
                        "description": "The merchant's order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service."
                      }
                    },
                    "required": [
                      "id",
                      "source_id"
                    ]
                  },
                  "event": {
                    "type": "object",
                    "description": "Contains information about the event that triggers the point accrual.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique event ID."
                      },
                      "type": {
                        "type": "string",
                        "description": "Type of event."
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  },
                  "earning_rule": {
                    "type": "object",
                    "description": "Contains information about the earning rule.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of an earning rule, assigned by Voucherify."
                      },
                      "source": {
                        "type": "object",
                        "required": [
                          "banner"
                        ],
                        "description": "Contains the custom earning rule name.",
                        "properties": {
                          "banner": {
                            "type": "string",
                            "description": "Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard."
                          }
                        }
                      }
                    },
                    "required": [
                      "id",
                      "source"
                    ]
                  },
                  "segment": {
                    "type": "object",
                    "description": "Contains information about the segment.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the segment."
                      },
                      "name": {
                        "type": "string",
                        "description": "Name of the segment."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "loyalty_tier": {
                    "type": "object",
                    "description": "Contains information about the loyalty tier that is mapped for the earning rule and used in the transaction.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                      },
                      "name": {
                        "type": "string",
                        "description": "User-defined name of the loyalty tier."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "redemption": {
                    "type": "object",
                    "description": "Contains information about the original redemption.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique redemption ID."
                      }
                    },
                    "required": [
                      "id"
                    ]
                  },
                  "rollback": {
                    "type": "object",
                    "description": "Contains information about the redemption rollback.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the redemption rollback."
                      }
                    },
                    "required": [
                      "id"
                    ]
                  },
                  "custom_event": {
                    "type": "object",
                    "description": "Contains information about the custom event that triggers the point accrual.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the event."
                      },
                      "type": {
                        "type": "string",
                        "description": "Type of the custom event."
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  },
                  "event_schema": {
                    "type": "object",
                    "description": "Contains information about the custom event metadata schema.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the metadata schema."
                      },
                      "name": {
                        "type": "string",
                        "description": "Type of the custom event."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "holder_loyalty_tier": {
                    "type": "object",
                    "description": "Loyalty tier of the loyalty card holder at the moment when the transaction occurred. The loyalty tier is the tier in which the holder was before the loyalty point balance changed.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the loyalty tier, assigned by Voucherify."
                      },
                      "name": {
                        "type": "string",
                        "description": "User-defined name of the loyalty tier."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "pending_points": {
                    "$ref": "#/components/schemas/LoyaltyPendingPoints"
                  },
                  "reward": {
                    "type": "object",
                    "description": "Contains information about the pay with points reward.",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique reward ID."
                      },
                      "name": {
                        "type": "string",
                        "description": "Reward name."
                      }
                    },
                    "required": [
                      "id",
                      "name"
                    ]
                  },
                  "source_voucher": {
                    "description": "Contains information on how the balance on the donor loyalty card was affected by the transaction.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/SimpleVoucher"
                      }
                    ]
                  },
                  "destination_voucher": {
                    "description": "Contains information on how the balance on the receiving loyalty card was affected by the transaction.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/SimpleVoucher"
                      }
                    ]
                  }
                }
              },
              "type": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/GiftVoucherTransactionsType"
                  },
                  {
                    "$ref": "#/components/schemas/LoyaltyCardTransactionsType"
                  }
                ]
              }
            }
          }
        ]
      },
      "DiscountAmount": {
        "type": "object",
        "title": "Amount",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "enum": [
              "AMOUNT"
            ],
            "description": "Defines the type of the voucher."
          },
          "amount_off": {
            "type": "number",
            "description": "Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000."
          },
          "amount_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discount."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountAmountVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "amount_off"
        ]
      },
      "DiscountUnit": {
        "type": "object",
        "title": "Unit",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the number of units."
          },
          "effect": {
            "description": "Defines how the unit is added to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountUnitVouchersEffectTypes"
              }
            ]
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "unit_type"
        ]
      },
      "DiscountUnitMultiple": {
        "type": "object",
        "title": "Unit Multiple",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "enum": [
              "UNIT"
            ],
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "enum": [
              "ADD_MANY_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DiscountUnitMultipleOneUnit"
            }
          }
        },
        "required": [
          "type",
          "units"
        ]
      },
      "DiscountPercent": {
        "type": "object",
        "title": "Percent",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "enum": [
              "PERCENT"
            ],
            "description": "Defines the type of the voucher."
          },
          "percent_off": {
            "type": "number",
            "description": "The percent discount that the customer will receive."
          },
          "percent_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discount."
          },
          "amount_limit": {
            "type": "number",
            "description": "Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountPercentVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "percent_off"
        ]
      },
      "DiscountFixed": {
        "title": "Fixed",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "enum": [
              "FIXED"
            ],
            "description": "Defines the type of the voucher."
          },
          "fixed_amount": {
            "type": "number",
            "description": "Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value."
          },
          "fixed_amount_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the discount."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DiscountFixedVouchersEffectTypes"
              }
            ]
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        },
        "required": [
          "type",
          "fixed_amount"
        ]
      },
      "Any": {
        "title": "Any",
        "type": "array",
        "items": {
          "oneOf": [
            {
              "title": "string",
              "type": "string"
            },
            {
              "title": "string - date",
              "type": "string",
              "format": "date"
            },
            {
              "title": "string - date-time",
              "type": "string",
              "format": "date-time"
            },
            {
              "title": "number",
              "type": "number"
            },
            {
              "title": "object",
              "type": "object"
            }
          ]
        }
      },
      "OrderRedemptionsEntry": {
        "title": "Order Redemptions",
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Timestamp representing the date and time when the redemption was created. The value is shown in the ISO 8601 format.",
            "example": "2022-09-02T17:06:56.649Z",
            "format": "date-time"
          },
          "rollback_id": {
            "type": "string",
            "description": "Unique ID of the redemption rollback.",
            "example": "rr_0c63c84eb78ee0a6c0"
          },
          "rollback_date": {
            "type": "string",
            "description": "Timestamp representing the date and time when the redemption rollback was created. The value is shown in the ISO 8601 format.",
            "example": "2023-01-31T14:18:37.150Z",
            "format": "date-time"
          },
          "related_object_type": {
            "type": "string",
            "description": "The source of the incentive.",
            "default": "redemption"
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique ID of the parent redemption.",
            "example": "r_0ba186c4824e4881e1"
          },
          "related_object_parent_id": {
            "type": "string",
            "description": "Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign."
          },
          "stacked": {
            "type": "array",
            "description": "Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.",
            "items": {
              "type": "string"
            }
          },
          "rollback_stacked": {
            "type": "array",
            "description": "Lists the rollback redemption IDs of the particular child redemptions.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ValidationRuleAssignmentsList": {
        "type": "object",
        "description": "Validation Rule Assignments List",
        "title": "Validation Rule Assignments List",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about validation rule assignments.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of validation rule assignments.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of validation rule assignments.",
            "items": {
              "$ref": "#/components/schemas/ValidationRuleAssignment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of validation rule assignments."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "Voucher": {
        "title": "Voucher",
        "description": "This is an object representing a voucher with categories and validation rules assignments.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Contains details about the category.",
                "items": {
                  "$ref": "#/components/schemas/Category"
                }
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              }
            }
          }
        ]
      },
      "Product": {
        "type": "object",
        "description": "This is an object representing a product.  \n\nThis entity should be used to map product items from your inventory management system. The aim of products is to build which reflect product-specific campaigns.",
        "title": "Product",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductWithoutSkus"
          },
          {
            "type": "object",
            "properties": {
              "skus": {
                "$ref": "#/components/schemas/SkusListForProduct"
              }
            }
          }
        ]
      },
      "Sku": {
        "title": "SKU Object",
        "type": "object",
        "description": "This is an object representing a product SKU.",
        "properties": {
          "id": {
            "type": "string",
            "example": "sku_0b1621b319d248b79f",
            "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "sku_source_id_4",
            "description": "A unique SKU identifier from your inventory system."
          },
          "product_id": {
            "type": "string",
            "example": "prod_0b15f6b9f650c16990",
            "description": "The parent product's unique ID."
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "example": "Large Pink Shirt",
            "description": "Unique user-defined SKU name."
          },
          "price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "SKU price currency.",
            "example": "USD"
          },
          "attributes": {
            "type": "object",
            "description": "The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family."
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. It can be used to create product collections."
          },
          "created_at": {
            "type": "string",
            "example": "2022-05-17T10:36:30.187Z",
            "description": "Timestamp representing the date and time when the SKU was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "example": "2022-05-17T10:55:09.137Z",
            "description": "Timestamp representing the date and time when the SKU was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "sku",
            "description": "The type of the object represented by JSON. This object stores information about the `SKU`.",
            "enum": [
              "sku"
            ]
          }
        },
        "required": [
          "id",
          "source_id",
          "product_id",
          "sku",
          "price",
          "attributes",
          "metadata",
          "image_url",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "SimpleCampaignVoucher": {
        "type": "object",
        "description": "Simplified campaign voucher data.",
        "title": "Simple Campaign Voucher",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of the voucher.",
            "enum": [
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD",
              "GIFT_VOUCHER"
            ]
          },
          "discount": {
            "description": "Defines the voucher discount type and details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Discount"
              }
            ]
          },
          "gift": {
            "description": "Defines the voucher gift details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty_card": {
            "description": "Defines the voucher loyalty card details.",
            "allOf": [
              {
                "$ref": "#/components/schemas/CampaignLoyaltyCard"
              }
            ]
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              },
              "redeemed_quantity": {
                "type": "integer",
                "example": 1,
                "description": "How many times a voucher has already been redeemed."
              }
            },
            "required": [
              "quantity",
              "redeemed_quantity"
            ]
          },
          "code_config": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CodeConfig"
              }
            ],
            "required": [
              "length",
              "charset",
              "pattern"
            ]
          }
        },
        "required": [
          "type",
          "redemption",
          "code_config"
        ]
      },
      "ReferralProgram": {
        "title": "Referral Program",
        "description": "Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.",
        "type": "object",
        "properties": {
          "conversion_event_type": {
            "type": "string",
            "enum": [
              "redemption",
              "custom_event"
            ],
            "description": "Define how a referral is triggered."
          },
          "custom_event": {
            "type": "object",
            "description": "Contains details about the custom event.",
            "properties": {
              "id": {
                "type": "string",
                "example": "ms_Ll9enAm2BCN0M1s4VxWobLFM",
                "description": "Unique custom event ID."
              },
              "name": {
                "type": "string",
                "description": "Custom event name."
              }
            }
          },
          "referee_reward": {
            "type": "object",
            "description": "Defines the referee reward.",
            "properties": {
              "related_object_parent": {
                "type": "object",
                "description": "Details of the resource from which the reward originates.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                    "description": "Unique ID of the reward source."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the reward source."
                  },
                  "object": {
                    "type": "string",
                    "default": "CAMPAIGN",
                    "enum": [
                      "CAMPAIGN"
                    ],
                    "description": "Type of resource represented by the source of the reward."
                  }
                }
              },
              "type": {
                "type": "string",
                "enum": [
                  "LOYALTY_CARD",
                  "GIFT_VOUCHER"
                ],
                "description": "Type of reward."
              },
              "amount": {
                "type": "integer",
                "description": "Define the number of `points` to add to a loyalty card or `credits` to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000."
              }
            }
          }
        }
      },
      "ListPublicationsItemBase": {
        "title": "List Publications Item Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "pub_BbjAXnmm8e0SIm3zG8qvvFCP0KuLywtp",
            "description": "Unique publication ID, assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "publication",
            "enum": [
              "publication"
            ],
            "description": "The type of the object represented by the JSON. This object stores information about the `publication`."
          },
          "created_at": {
            "type": "string",
            "example": "2022-09-23T09:57:00.434Z",
            "description": "Timestamp representing the date and time when the publication was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique customer ID of the customer receiving the publication."
          },
          "tracking_id": {
            "type": "string",
            "description": "Customer's `source_id`."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.",
            "properties": {
              "source_type": {
                "type": "string",
                "description": "Defines the type of the distribution source."
              },
              "source_id": {
                "type": "string",
                "description": "Unique identifier of the distribution source."
              },
              "distribution_id": {
                "type": "string",
                "description": "Unique identifier of the distribution."
              }
            }
          },
          "channel": {
            "type": "string",
            "description": "How the publication was originated. It can be your own custom channel or an example value provided here."
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The merchant's publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. "
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          },
          "vouchers": {
            "type": "array",
            "description": "Contains the voucher IDs that was assigned by Voucherify.",
            "items": {
              "type": "string",
              "example": "ZFMKNAEK"
            }
          },
          "vouchers_id": {
            "type": "array",
            "description": "Contains the unique internal voucher IDs that was assigned by Voucherify.",
            "items": {
              "type": "string",
              "example": "v_Bw3qWZWv47yb1Onra8F2LlFI1enLakfA"
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "customer_id",
          "metadata",
          "channel",
          "source_id",
          "customer",
          "vouchers_id"
        ]
      },
      "ListPublicationsItemVoucher": {
        "type": "object",
        "title": "List Publications Item Voucher",
        "properties": {
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "campaign": {
            "description": "Campaign name",
            "type": "string"
          },
          "gift": {
            "description": "Gift object response",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty_card": {
            "description": "Defines the loyalty card details.",
            "type": "object"
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          }
        },
        "required": [
          "code",
          "object",
          "campaign"
        ]
      },
      "SimplePromotionTier": {
        "title": "Simple Promotion Tier",
        "type": "object",
        "description": "This is an object representing a simple promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "properties": {
          "id": {
            "type": "string",
            "example": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
            "description": "Unique promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "campaign": {
            "type": "object",
            "description": "Contains details about promotion tier's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique campaign ID."
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a promotion tier. The metadata object stores all custom attributes assigned to the promotion tier."
          }
        }
      },
      "SimplePromotionStack": {
        "title": "Simple Promotion Stack",
        "type": "object",
        "description": "Represents simplified promotion stack data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the promotion stack."
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion stack."
          },
          "category_id": {
            "type": "string",
            "description": "Unique identifier of the category of the promotion stack."
          },
          "campaign": {
            "type": "object",
            "description": "Represents simplified promotion stack campaign data.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the campaign."
              }
            }
          },
          "tiers": {
            "type": "object",
            "required": [
              "ids"
            ],
            "description": "Contains the tier configuration. A promotion stack can include up to 30 tiers.",
            "properties": {
              "ids": {
                "type": "array",
                "minItems": 1,
                "description": "Contains the list of tiers in a pre-defined sequence.",
                "items": {
                  "type": "string"
                }
              },
              "hierarchy_mode": {
                "type": "string",
                "default": "MANUAL",
                "enum": [
                  "MANUAL"
                ]
              }
            }
          }
        }
      },
      "SimpleProduct": {
        "title": "Simple Product",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID."
          },
          "source_id": {
            "type": "string",
            "description": "Product source ID."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          }
        }
      },
      "SimpleSku": {
        "title": "Simple Sku",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique sku ID."
          },
          "source_id": {
            "type": "string",
            "description": "Sku source ID."
          },
          "sku": {
            "type": "string",
            "description": "Sku name."
          }
        }
      },
      "SimpleCustomerRequiredObjectType": {
        "type": "object",
        "description": "This is an object representing a customer with limited properties used in Event Tracking endpoints.",
        "title": "Customer Object Required Object Type",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of a customer that is assigned by Voucherify.",
            "example": "cust_CSnYd37MXmrbS19XCrghjBsv"
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service."
          },
          "name": {
            "type": "string",
            "description": "Customer's first and last name."
          },
          "email": {
            "type": "string",
            "description": "Customer's email address."
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. "
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the customer.",
            "default": "customer"
          }
        },
        "required": [
          "object"
        ]
      },
      "SimpleOrderItem": {
        "type": "object",
        "title": "Simple Order Item",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the order line item."
          },
          "object": {
            "type": "string",
            "default": "order_item",
            "enum": [
              "order_item"
            ],
            "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
          },
          "source_id": {
            "type": "string",
            "description": "The merchant's product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service."
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "Used along with the `source_id` property, can be set to either SKU or product."
          },
          "product_id": {
            "type": "string",
            "description": "Unique identifier of the product. It is assigned by Voucherify."
          },
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify."
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the particular item in the cart."
          },
          "applied_quantity": {
            "type": "integer",
            "description": "Quantity of items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "applied_quantity_amount": {
            "type": "integer",
            "description": "Amount for the items changed by the application of a new quantity items. It can be positive when an item is added or negative if an item is replaced."
          },
          "discount_quantity": {
            "type": "integer",
            "description": "Number of discounted items."
          },
          "applied_discount_quantity": {
            "type": "integer",
            "description": "Number of the discounted items applied in the transaction."
          },
          "amount": {
            "type": "integer",
            "description": "Total amount of the order item (price * quantity)."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-item-level discounts applied to the order."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "Order-level discount amount applied in the transaction."
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "subtotal_amount": {
            "type": "integer",
            "description": "Final order item amount after the applied item-level discount.  If there are no item-level discounts applied, this item is equal to the `amount`.   \n`subtotal_amount`=`amount`-`discount_amount`"
          }
        }
      },
      "GiftVoucherTransactionsType": {
        "title": "Gift Card Transactions Type",
        "type": "string",
        "description": "Transaction types concerning gift card credits.",
        "enum": [
          "CREDITS_REDEMPTION",
          "CREDITS_REFUND",
          "CREDITS_ADDITION",
          "CREDITS_REMOVAL"
        ]
      },
      "DiscountAmountVouchersEffectTypes": {
        "title": "Discount Amount Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS",
          "APPLY_TO_ITEMS_PROPORTIONALLY",
          "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
          "APPLY_TO_ITEMS_BY_QUANTITY"
        ],
        "type": "string"
      },
      "DiscountUnitVouchersEffectTypes": {
        "title": "Discount Unit Vouchers Effect Types",
        "enum": [
          "ADD_MISSING_ITEMS",
          "ADD_NEW_ITEMS",
          "ADD_MANY_ITEMS",
          "ADD_SAME_ITEMS"
        ],
        "type": "string"
      },
      "SimpleProductDiscountUnit": {
        "type": "object",
        "title": "Simple Product Discount Unit",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product's source ID."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "SimpleSkuDiscountUnit": {
        "type": "object",
        "title": "Simple Sku Discount Unit",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique SKU ID, assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "Product variant's source ID."
          },
          "name": {
            "type": "string",
            "description": "Sku name"
          }
        },
        "required": [
          "id",
          "name"
        ]
      },
      "DiscountUnitMultipleOneUnit": {
        "type": "object",
        "title": "One Unit",
        "properties": {
          "unit_off": {
            "type": "number",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to dynamically calculate the number of units."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_NEW_ITEMS",
              "ADD_MISSING_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order.\n\n"
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "description": "Contains information about the product.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleProductDiscountUnit"
              }
            ]
          },
          "sku": {
            "description": "Contains information about the sku.",
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleSkuDiscountUnit"
              }
            ]
          }
        },
        "required": [
          "effect",
          "unit_type"
        ]
      },
      "DiscountPercentVouchersEffectTypes": {
        "title": "Discount Percent Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "DiscountFixedVouchersEffectTypes": {
        "title": "Discount Fixed Vouchers Effect Types",
        "enum": [
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS"
        ],
        "type": "string"
      },
      "ValidationRuleAssignment": {
        "title": "Validation Rule Assignment",
        "type": "object",
        "description": "This is an object representing a validation rule assignment.",
        "properties": {
          "id": {
            "type": "string",
            "example": "asgm_74F7QZoYbUoljwQO",
            "description": "Validation rule assignment ID."
          },
          "rule_id": {
            "type": "string",
            "example": "val_4j7DCRm2IS59",
            "description": "Validation rule ID."
          },
          "related_object_id": {
            "type": "string",
            "example": "v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT",
            "description": "The resource ID to which the validation rule was assigned."
          },
          "related_object_type": {
            "type": "string",
            "description": "The type of resource to which the validation rule was assigned.",
            "enum": [
              "voucher",
              "campaign",
              "earning_rule",
              "reward_assignment",
              "promotion_tier",
              "distribution"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-17T08:18:15.085Z",
            "description": "Timestamp representing the date and time when the validation rule assignment was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "validation_rules_assignment",
            "description": "The type of the object represented by the ID.",
            "enum": [
              "validation_rules_assignment"
            ]
          }
        },
        "required": [
          "id",
          "rule_id",
          "related_object_id",
          "related_object_type",
          "created_at",
          "object"
        ]
      },
      "ProductWithoutSkus": {
        "title": "Product without Skus Object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0b1da8105693710357"
          },
          "source_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "productSourceID16",
            "description": "Unique product source ID."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Unique user-defined product name.",
            "example": "T-shirt"
          },
          "price": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`."
          },
          "attributes": {
            "type": "array",
            "description": "A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute.",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. It can be used to create product collections."
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image.",
            "example": "https://images.com/original.jpg"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the product was created. The value is shown in the ISO 8601 format.",
            "example": "2022-05-23T06:52:55.008Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "Timestamp representing the date and time when the product was updated. The value is shown in the ISO 8601 format.",
            "example": "2022-05-23T09:24:07.405Z",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the product.",
            "default": "product",
            "enum": [
              "product"
            ]
          }
        },
        "required": [
          "id",
          "source_id",
          "name",
          "attributes",
          "metadata",
          "object",
          "price"
        ]
      },
      "SkusListForProduct": {
        "type": "object",
        "description": "Contains information about child SKUs.",
        "title": "Skus List For Product",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about SKUs.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of SKUs.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of SKUs.",
            "items": {
              "$ref": "#/components/schemas/Sku"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of SKUs in the product."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "CustomerWithSummaryLoyaltyReferrals": {
        "title": "Customer With Summary Loyalty Referrals",
        "allOf": [
          {
            "type": "object",
            "title": "Customer Response Data",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of an existing customer that will be linked to redemption in this request."
              },
              "source_id": {
                "type": "string",
                "description": "A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored."
              },
              "summary": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CustomerSummary"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loyalty": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CustomerLoyalty"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "referrals": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/CustomerReferrals"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "system_metadata": {
                "type": "object",
                "description": "Object used to store system metadata information."
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer was created. The value is shown in the ISO 8601 format.",
                "example": "2022-08-30T06:32:07.380Z",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the customer was updated. The value is shown in the ISO 8601 format.",
                "example": "2022-08-31T06:32:07.380Z",
                "format": "date-time"
              },
              "assets": {
                "type": "object",
                "description": "Contains information about the customer's cockpit.\n\n⚠️ Warning: Customer cockpits were removed. The customer cockpit URLs redirect to customer preference center.",
                "properties": {
                  "cockpit_url": {
                    "type": "string",
                    "description": "URL address to customer preference center. Previously, a customer's cockpit URL address."
                  },
                  "cockpit_preference_center_url": {
                    "type": "string",
                    "description": "URL address to customer preference center."
                  }
                }
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "default": "customer",
                "enum": [
                  "customer"
                ]
              }
            },
            "required": [
              "summary",
              "loyalty",
              "referrals",
              "object"
            ]
          },
          {
            "$ref": "#/components/schemas/CustomerBase"
          }
        ]
      },
      "CustomerSummary": {
        "title": "Customer Summary",
        "type": "object",
        "properties": {
          "redemptions": {
            "$ref": "#/components/schemas/CustomerSummaryRedemptions"
          },
          "orders": {
            "$ref": "#/components/schemas/CustomerSummaryOrders"
          }
        },
        "required": [
          "redemptions",
          "orders"
        ]
      },
      "CustomerLoyalty": {
        "title": "Customer Loyalty",
        "type": "object",
        "properties": {
          "points": {
            "type": "integer",
            "description": "Customer's loyalty points minus expired for all loyalty cards which the customer has."
          },
          "referred_customers": {
            "type": "integer",
            "description": "Total number of customers referred by the customer."
          },
          "campaigns": {
            "type": "object",
            "description": "Contains campaigns with details about point balances and how many customers were referred by the customer.",
            "additionalProperties": {
              "type": "object",
              "description": "Contains details about the point balances left on loyalty cards and the number of referred customers in each campaign.",
              "properties": {
                "points": {
                  "type": "integer",
                  "description": "Remaining point balance in campaign."
                },
                "loyalty_tier": {
                  "type": "string",
                  "example": "ltr_UJ5Q54Q0OvEhua87Qfv2Ki5x",
                  "description": "Customer's loyalty tier within the campaign."
                },
                "referred_customers": {
                  "type": "integer",
                  "description": "Number of customers referred by the customer in campaign."
                }
              }
            }
          }
        },
        "required": [
          "points",
          "referred_customers",
          "campaigns"
        ]
      },
      "CustomerReferrals": {
        "title": "Customer Referrals",
        "type": "object",
        "description": "Summary of customer's referrals, in this case, the customer being the referee, i.e. information about the source of referrals and number of times the customer was referred by other customers.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of times this customer received a referral, i.e. was referred by another customer."
          },
          "campaigns": {
            "type": "array",
            "description": "Contains an array of campaigns that served as the source of a referral for the customer.",
            "items": {
              "title": "Customer Referrals Campaigns Item",
              "type": "object",
              "description": "Contains information about the source of the referral.",
              "properties": {
                "campaign_id": {
                  "type": "string",
                  "description": "Unique campaign ID, assigned by Voucherify.",
                  "example": "camp_rRsfatlwN7unSeUIJDCYedal"
                },
                "referrer_id": {
                  "type": "string",
                  "example": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                  "description": "Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer."
                },
                "related_object_id": {
                  "type": "string",
                  "description": "Related object id",
                  "example": "r_0b9d4cc4aa164dd073"
                },
                "related_object_type": {
                  "type": "string",
                  "description": "Related object type, i.e. `redemption`."
                },
                "date": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2022-08-30T10:19:39.196Z",
                  "description": "Timestamp representing the date and time when the customer was referred in ISO 8601 format."
                }
              },
              "required": [
                "campaign_id",
                "referrer_id",
                "related_object_id",
                "related_object_type",
                "date"
              ]
            }
          }
        },
        "required": [
          "total",
          "campaigns"
        ]
      },
      "CustomerSummaryRedemptions": {
        "title": "Customer Summary Redemptions",
        "type": "object",
        "properties": {
          "total_redeemed": {
            "type": "integer",
            "description": "Total number of redemptions made by the customer."
          },
          "total_failed": {
            "type": "integer",
            "description": "Total number of redemptions that failed."
          },
          "total_succeeded": {
            "type": "integer",
            "description": "Total number of redemptions that succeeded."
          },
          "total_rolled_back": {
            "type": "integer",
            "description": "Total number of redemptions that were rolled back for the customer."
          },
          "total_rollback_failed": {
            "type": "integer",
            "description": "Total number of redemption rollbacks that failed."
          },
          "total_rollback_succeeded": {
            "type": "integer",
            "description": "Total number of redemption rollbacks that succeeded."
          },
          "gift": {
            "type": "object",
            "description": "Summary of gift card credits.",
            "required": [
              "redeemed_amount",
              "amount_to_go"
            ],
            "properties": {
              "redeemed_amount": {
                "type": "integer",
                "description": "Total amount of gift card credits redeemed by customer. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "default": 0
              },
              "amount_to_go": {
                "type": "integer",
                "description": "Remaining gift card balance across all gift cards. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "default": 0
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Summary of loyalty points.",
            "required": [
              "redeemed_points",
              "points_to_go"
            ],
            "properties": {
              "redeemed_points": {
                "type": "integer",
                "description": "Total number of loyalty points redeemed by the customer."
              },
              "points_to_go": {
                "type": "integer",
                "description": "Sum of remaining available point balance across all loyalty cards."
              }
            }
          }
        },
        "required": [
          "total_redeemed",
          "total_failed",
          "total_succeeded",
          "total_rolled_back",
          "total_rollback_failed",
          "total_rollback_succeeded",
          "gift",
          "loyalty_card"
        ]
      },
      "CustomerSummaryOrders": {
        "title": "Customer Summary Orders",
        "description": "Lists details about orders related to the customer. Lists only data for orders with the `PAID` or `FULFILLED` status. Data from orders with a `CREATED` or `CANCELED` status are not included. The data is updated also when an order changes status.",
        "type": "object",
        "properties": {
          "total_amount": {
            "type": "integer",
            "description": "The total amount spent by the customer. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "total_count": {
            "type": "integer",
            "description": "Total number of orders made by the customer."
          },
          "average_amount": {
            "type": "integer",
            "description": "Average amount spent on orders. `total_amount` &divide; `total_count`. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "last_order_amount": {
            "type": "integer",
            "description": "Amount spent on last order. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "last_order_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-08-30T11:51:08.029Z",
            "description": "Timestamp representing the date and time of the customer's last order in ISO 8601 format."
          }
        },
        "required": [
          "total_amount",
          "total_count",
          "average_amount",
          "last_order_amount"
        ]
      }
    },
    "securitySchemes": {
      "X-App-Id": {
        "type": "apiKey",
        "name": "X-App-Id",
        "in": "header"
      },
      "X-App-Token": {
        "type": "apiKey",
        "name": "X-App-Token",
        "in": "header"
      },
      "X-Voucherify-OAuth": {
        "type": "oauth2",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://api.voucherify.io/v1/oauth/token",
            "scopes": {
              "api": "Gives access to whole server-side API.",
              "vouchers": "Gives access to all endpoints and methods starting with `v1/vouchers`.",
              "client_api": "Gives access to whole client-side API.",
              "client_vouchers": "Gives access to all endpoints and methods starting with `/client/v1/vouchers`.",
              "promotions": "Gives access to all endpoints and methods starting with `/v1/promotions`.",
              "client_promotions": "Gives access to all endpoints and methods starting with `/client/v1/promotions`",
              "campaigns": "Gives access to all endpoints and methods starting with `v1/campaigns`.",
              "client_publish": "Gives access to all endpoints and methods starting with `/client/v1/publish`.",
              "exports": "Gives access to all endpoints and methods starting with `/v1/exports`.",
              "publications": "Gives access to all endpoints and methods starting with `/v1/publications`.",
              "client_validate": "Gives access to all endpoints and methods starting with `/client/v1/validate`.",
              "validations": "Gives access to all endpoints and methods starting with `/v1/validations`.",
              "client_validations": "Gives access to all endpoints and methods starting with `/client/v1/validations`.",
              "qualifications": "Gives access to all endpoints and methods starting with `/v1/qualifications`.",
              "client_qualifications": "Gives access to all endpoints and methods starting with `/client/v1/qualifications`.",
              "client_redeem": "Gives access to all endpoints and methods starting with `/client/v1/redeem",
              "redemptions": "Gives access to all endpoints and methods starting with `/v1/redemptions`.",
              "client_redemptions": "Gives access to all endpoints and methods starting with `/client/v1/redemptions`",
              "customers": "Gives access to all endpoints and methods starting with `/v1/customers`.",
              "client_customers": "Gives access to all endpoints and methods starting with `/client/v1/customers`.",
              "orders": "Gives access to all endpoints and methods starting with `/v1/orders`.",
              "products": "Gives access to all endpoints and methods starting with `/v1/products`.",
              "skus": "Gives access to all endpoints and methods starting with `/v1/SKUs`.",
              "validation-rules": "Gives access to all endpoints and methods starting with `/v1/validation-rules`.",
              "validation-rules-assignments": "Gives access to all endpoints and methods starting with `/v1/validation-rules-assignments",
              "segments": "Gives access to all endpoints and methods starting with `/v1/segments`.",
              "events": "Gives access to all endpoints and methods starting with `/v1/events`.",
              "client_events": "Gives access to all endpoints and methods starting with `client/v1/events`.",
              "rewards": "Gives access to all endpoints and methods starting with `/v1/rewards`.",
              "assets": "Gives access to all endpoints and methods starting with `/v1/assets`.",
              "task-results": "Gives access to all endpoints and methods starting with `/v1/task-results`.",
              "loyalties": "Gives access to all endpoints and methods starting with `/v1/loyalties`.",
              "client_consents": "Gives access to all endpoints and methods starting with `client/v1/consents`.",
              "consents": "Gives access to all endpoints and methods starting with `/v1/consents`.",
              "async-actions": "Gives access to all endpoints and methods starting with `/v1/async-actions`.",
              "product-collections": "Gives access to all endpoints and methods starting with `/v1/product-collections`.",
              "categories": "Gives access to all endpoints and methods starting with `/v1/categories`.",
              "metadata-schemas": "Gives access to all endpoints and methods starting with `/v1/metadata-schemas`.",
              "locations": "Gives access to all endpoints and methods starting with `/v1/locations`.",
              "referrals": "Gives access to all endpoints and methods starting with `/v1/referrals`.",
              "trash-bin": "Gives access to all endpoints and methods starting with `/v1/trash-bin`.",
              "templates": "Gives access to all endpoints and methods starting with `/v1/templates`."
            }
          }
        }
      }
    }
  }
}