{
  "openapi": "3.1.0",
  "info": {
    "title": "Voucherify API",
    "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"
    }
  },
  "x-readme": {
    "samples-languages": [
      "curl"
    ],
    "headers": [
      {
        "key": "X-Voucherify-Channel",
        "value": "Voucherify Documentation"
      }
    ]
  },
  "servers": [
    {
      "url": "https://{cluster}.voucherify.io",
      "description": "Base URL",
      "variables": {
        "cluster": {
          "default": "api",
          "enum": [
            "api",
            "us1.api",
            "as1.api",
            "download",
            "us1.download",
            "as1.download"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Publications",
      "description": "Manage publications."
    },
    {
      "name": "Qualifications",
      "description": "List applicable incentives."
    },
    {
      "name": "Validations",
      "description": "Validate vouchers and promotions."
    },
    {
      "name": "Redemptions",
      "description": "Manage redemptions."
    },
    {
      "name": "Vouchers",
      "description": "Manage discount and gift card vouchers."
    },
    {
      "name": "Campaigns",
      "description": "Group vouchers or promotion tiers of a specific type."
    },
    {
      "name": "Promotions",
      "description": "Manage promotions."
    },
    {
      "name": "Templates",
      "description": "Manage templates."
    },
    {
      "name": "Rewards",
      "description": "Manage rewards."
    },
    {
      "name": "Loyalties",
      "description": "Manage loyalty campaigns."
    },
    {
      "name": "Referrals",
      "description": "List referrals."
    },
    {
      "name": "Customers",
      "description": "Manage customers."
    },
    {
      "name": "Orders",
      "description": "Manage orders."
    },
    {
      "name": "Products",
      "description": "Manage products."
    },
    {
      "name": "Product Collections",
      "description": "Group products."
    },
    {
      "name": "Validation Rules",
      "description": "Configure validation rules."
    },
    {
      "name": "Segments",
      "description": "Manage customer segments."
    },
    {
      "name": "Events",
      "description": "Track custom and internal events."
    },
    {
      "name": "Async Actions",
      "description": "Track asynchronous operations scheduled in Projects."
    },
    {
      "name": "Exports",
      "description": "Export data from Voucherify."
    },
    {
      "name": "Categories",
      "description": "Manage categories."
    },
    {
      "name": "Metadata Schemas",
      "description": "List metadata schemas."
    },
    {
      "name": "Locations",
      "description": "List locations."
    },
    {
      "name": "Bin",
      "description": "Manage soft-deleted items."
    },
    {
      "name": "Management",
      "description": "Manage projects."
    },
    {
      "name": "OAuth",
      "description": "Manage OAuth."
    },
    {
      "name": "Client-side",
      "description": "Use client-side APIs."
    }
  ],
  "components": {
    "securitySchemes": {
      "X-App-Id": {
        "type": "apiKey",
        "name": "X-App-Id",
        "in": "header"
      },
      "X-App-Token": {
        "type": "apiKey",
        "name": "X-App-Token",
        "in": "header"
      },
      "X-Client-Token": {
        "type": "apiKey",
        "name": "X-Client-Token",
        "in": "header"
      },
      "X-Client-Application-Id": {
        "type": "apiKey",
        "name": "X-Client-Application-Id",
        "in": "header"
      },
      "X-Management-Id": {
        "type": "apiKey",
        "name": "X-Management-Id",
        "in": "header"
      },
      "X-Management-Token": {
        "type": "apiKey",
        "name": "X-Management-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`."
            }
          }
        }
      }
    },
    "parameters": {
      "ids": {
        "name": "ids",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterIds"
        }
      },
      "code": {
        "name": "code",
        "in": "path",
        "schema": {
          "$ref": "#/components/schemas/ParameterCode"
        },
        "description": "A **code** that identifies the voucher.",
        "required": true
      },
      "audienceRulesOnly": {
        "name": "audienceRulesOnly",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterBoolean"
        },
        "description": "This parameter set to true will ask only for verifying vouchers' validation rules only against conditions applied to audiences' attributes (belonging into segment, customer metadata, customer redemption count). The remaining checks against limits and rules will be omitted during validation."
      },
      "order": {
        "name": "order",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterOrder"
        },
        "description": "Sorts the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
      },
      "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`."
      },
      "category": {
        "name": "category",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterString"
        },
        "description": "Limit search results to vouchers within the specified category."
      },
      "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."
      },
      "campaign": {
        "name": "campaign",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterCampaignId"
        },
        "description": "A unique campaign name, identifies the parent campaign."
      },
      "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
      },
      "start_date": {
        "name": "start_date",
        "in": "query",
        "schema": {
          "$ref": "#/components/schemas/ParameterDate"
        },
        "description": "Timestamp representing the date and time which results must end on. Represented in ISO 8601 format."
      },
      "end_date": {
        "name": "end_date",
        "in": "query",
        "schema": {
          "$ref": "#/components/schemas/ParameterDate"
        },
        "description": "Timestamp representing the date and time which results must end on. Represented in ISO 8601 format."
      },
      "starting_after": {
        "name": "starting_after",
        "in": "query",
        "schema": {
          "$ref": "#/components/schemas/ParameterDate"
        },
        "description": "Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format."
      },
      "campaign_type": {
        "name": "campaign_type",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterCampaignType"
        },
        "description": "This attribute allows filtering by campaign type."
      },
      "origin": {
        "name": "origin",
        "in": "header",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/ParameterOrigin"
        },
        "description": "Indicates the origin (scheme, hostname, and port)."
      },
      "metadata": {
        "name": "metadata",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/ParameterObject"
        },
        "style": "deepObject",
        "explode": true,
        "description": "Metadata key value pairs."
      },
      "item": {
        "name": "item",
        "in": "query",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/6_query_validate_voucher_client_side_orders_order_item"
        },
        "description": "Array of order items.",
        "style": "deepObject",
        "explode": true
      }
    },
    "schemas": {
      "ParameterCode": {
        "type": "string",
        "example": "2CpRCE2c"
      },
      "ParameterIds": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "ParameterActivityCategory": {
        "type": "string",
        "enum": [
          "ACTION",
          "EFFECT"
        ]
      },
      "ParameterCustomerEvent": {
        "type": "string",
        "enum": [
          "customer.confirmed",
          "customer.created",
          "customer.updated",
          "customer.deleted",
          "customer.referred",
          "customer.custom_event",
          "customer.segment.entered",
          "customer.segment.left",
          "customer.sms.sent",
          "customer.sms.recovered",
          "customer.sms.failed",
          "customer.email.sent",
          "customer.email.recovered",
          "customer.email.failed",
          "customer.activecampaign.sent",
          "customer.activecampaign.recovered",
          "customer.activecampaign.failed",
          "customer.braze.sent",
          "customer.braze.recovered",
          "customer.braze.failed",
          "customer.mailchimp.sent",
          "customer.mailchimp.recovered",
          "customer.mailchimp.failed",
          "customer.intercom.sent",
          "customer.intercom.recovered",
          "customer.intercom.failed",
          "customer.shopify.sent",
          "customer.shopify.recovered",
          "customer.shopify.failed",
          "customer.klaviyo.sent",
          "customer.klaviyo.recovered",
          "customer.klaviyo.failed",
          "customer.batch.sent",
          "customer.batch.recovered",
          "customer.batch.failed",
          "customer.rewarded",
          "customer.rewarded.loyalty_points",
          "customer.voucher.gift.balance_added",
          "customer.voucher.loyalty_card.points_added",
          "customer.voucher.loyalty_card.points_transferred",
          "customer.voucher.loyalty_card.points_expired",
          "customer.voucher.deleted",
          "customer.publication.succeeded",
          "customer.publication.failed",
          "customer.validation.succeeded",
          "customer.validation.failed",
          "customer.redemption.failed",
          "customer.redemption.succeeded",
          "customer.redemption.rollback.failed",
          "customer.redemption.rollback.succeeded",
          "customer.order.canceled",
          "customer.order.created",
          "customer.order.fulfilled",
          "customer.order.paid",
          "customer.order.processing",
          "customer.order.updated",
          "customer.reward_redemptions.created",
          "customer.reward_redemptions.pending",
          "customer.reward_redemptions.completed",
          "customer.reward_redemptions.rolledback",
          "customer.loyalty.updated",
          "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"
        ]
      },
      "ParameterOrder": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "type",
          "-type",
          "code",
          "-code",
          "campaign",
          "-campaign",
          "category",
          "-category"
        ]
      },
      "ParameterOrderCreatedAt": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at"
        ]
      },
      "ParameterOrderListLocations": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterFiltersListLocations": {
        "properties": {
          "name": {
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "created_at": {
            "description": "Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.",
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "updated_at": {
            "description": "Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.",
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          }
        }
      },
      "ParameterResultListPublications": {
        "type": "string",
        "enum": [
          "SUCCESS",
          "FAILURE"
        ]
      },
      "ParameterVoucherTypeListPublications": {
        "type": "string",
        "enum": [
          "discount",
          "loyalty"
        ]
      },
      "ParameterOrderListPublications": {
        "type": "string",
        "enum": [
          "id",
          "-id",
          "voucher_code",
          "-voucher_code",
          "tracking_id",
          "-tracking_id",
          "customer_id",
          "-customer_id",
          "created_at",
          "-created_at",
          "channel",
          "-channel"
        ]
      },
      "ParameterOrderListCustomers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "source_id",
          "-source_id"
        ]
      },
      "ParameterOrderListPromotionTiers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterOrderListPromotionTiersClientSide": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterExpandListCampaigns": {
        "type": "string",
        "enum": [
          "category",
          "access_settings_assignments"
        ]
      },
      "ParameterOrderListCampaigns": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterOrderVouchers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "code",
          "-code"
        ]
      },
      "ParameterOrderExamineVouchersQualification": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "code",
          "-code"
        ]
      },
      "ParameterLimit": {
        "type": "integer",
        "maximum": 100,
        "minimum": 1
      },
      "ParameterLimitExamineVouchersQualification": {
        "type": "integer",
        "maximum": 50,
        "minimum": 1
      },
      "ParameterLimitExamineCampaignsQualification": {
        "type": "integer",
        "maximum": 50,
        "minimum": 1
      },
      "ParameterOrderExamineCampaignsQualification": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "type",
          "-type",
          "code",
          "-code",
          "category",
          "-category",
          "campaign",
          "-campaign"
        ]
      },
      "ParameterOrderListAllPromotionStacks": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "name",
          "-name"
        ]
      },
      "ParameterOrderListExports": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "status",
          "-status"
        ]
      },
      "ParameterPage": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "ParameterPage99": {
        "type": "integer",
        "minimum": 1,
        "maximum": 99
      },
      "ParameterString": {
        "type": "string"
      },
      "ParameterBoolean": {
        "type": "boolean"
      },
      "ParameterInteger": {
        "type": "integer"
      },
      "ParameterCustomerId": {
        "type": "string",
        "example": "cust_nk0N1uNQ1YnupAoJGOgvsODC"
      },
      "ParameterOrderId": {
        "type": "string",
        "example": "ord_smEh8p1p6W6DgOmeERk092LG"
      },
      "ParameterProjectId": {
        "type": "string",
        "example": "proj_TrlkLiH4"
      },
      "ParameterBinEntryId": {
        "type": "string",
        "example": "tbe_0ec1cf03fe133e2de7"
      },
      "ParameterCampaignId": {
        "type": "string",
        "example": "camp_rRsfatlwN7unSeUIJDCYedal"
      },
      "ParameterCampaignTemplateId": {
        "type": "string",
        "example": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHcq"
      },
      "ParameterEarningRuleId": {
        "type": "string",
        "example": "ern_CFuv1O0IDl8Jgph0ojhMu8bH"
      },
      "ParameterValidationRuleId": {
        "type": "string",
        "example": "val_TU4de3EP4dlL"
      },
      "ParameterSegmentId": {
        "type": "string",
        "example": "seg_DNAOhUtJffvX0f57ajLMFBYR"
      },
      "ParameterAsyncActionId": {
        "type": "string",
        "example": "aa_0afb3d009a55814a48"
      },
      "ParameterBrandingId": {
        "type": "string",
        "example": "brd_06d06m1944y0630hD4y"
      },
      "ParameterCustomEventSchemaId": {
        "type": "string",
        "example": "ms_f1r5Tcu5T0m3v3nT5ch3ma"
      },
      "ParameterMetadataSchemaId": {
        "type": "string",
        "example": "ms_f0r4hm3ta6a4a5ch3ma"
      },
      "ParameterMemberId": {
        "type": "string",
        "example": "MmFAzfDe"
      },
      "ParameterRedeemableHolderId": {
        "type": "string",
        "example": "rh_0f1ab744ce8277d0dc"
      },
      "ParameterUserId": {
        "type": "string",
        "example": "user_v18mvPOjOXE5733eO4cAz8k1pn492wKK"
      },
      "ParameterStackingRulesId": {
        "type": "string",
        "example": "stk_0d6264108617006147"
      },
      "ParameterWebhookId": {
        "type": "string",
        "example": "wh_Fk1HzL9lqC1lpuIFxp3TShB4"
      },
      "ParameterRedemptionId": {
        "type": "string",
        "example": "r_0ba186c4824e4881e1"
      },
      "ParameterOrderListBin": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterOrderListPendingPoints": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterOrderListRedemptions": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "id",
          "-id",
          "voucher_code",
          "-voucher_code",
          "tracking_id",
          "-tracking_id",
          "customer_id",
          "-customer_id"
        ]
      },
      "ParameterOrderListValidationRuleAssignments": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at"
        ]
      },
      "ParameterOrderListLoyaltyTiers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterOrderListOrders": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterOrderListValidationRules": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at",
          "name",
          "-name"
        ]
      },
      "ParameterOrderListLoyaltyPrograms": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterOrderListEarningRules": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterOrderListMembers": {
        "type": "string",
        "enum": [
          "created_at",
          "-created_at",
          "updated_at",
          "-updated_at"
        ]
      },
      "ParameterOrderListTransactions": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterOrderListRedeemables": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterTemplatesList": {
        "type": "string",
        "enum": [
          "id",
          "-id"
        ]
      },
      "ParameterIsReferralCodeListCampaigns": {
        "type": "boolean",
        "description": "Lists campaigns that have or do not have referral codes."
      },
      "ParameterCampaignStatusListCampaigns": {
        "type": "string",
        "description": "Status of the campaign. Allowed values:\n`DONE`,\n`IN_PROGRESS`,\n`DRAFT`,\n`FAILED`\n`MODIFYING`",
        "enum": [
          "DONE",
          "IN_PROGRESS",
          "FAILED",
          "DRAFT",
          "MODIFYING"
        ]
      },
      "ParameterFiltersListPublications": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "failure_code": {
            "type": "object",
            "description": "Filter publications by ids.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "result": {
            "type": "object",
            "description": "Filter publications by names.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "customer_id": {
            "type": "object",
            "description": "Filter publications by customer ids.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaign_name": {
            "type": "object",
            "description": "Filter publications by campaign names.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "voucher_type": {
            "type": "object",
            "description": "Filter publications by voucher types.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "is_referral_code": {
            "type": "object",
            "description": "Filter publications by is referall code.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "parent_object_id": {
            "type": "object",
            "description": "Filter publications by parent object id.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "related_object_id": {
            "type": "object",
            "description": "Filter publications by related object id.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "source_id": {
            "type": "object",
            "description": "Filter publications by source id.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          }
        }
      },
      "ParameterFiltersListBin": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "id": {
            "type": "object",
            "description": "Unique identifier of the bin entry.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "resource_type": {
            "type": "object",
            "description": "Resource type of the resource moved to the bin.",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "product",
                        "sku",
                        "voucher"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "campaign",
                        "product",
                        "sku",
                        "voucher"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "campaign",
                      "product",
                      "sku",
                      "voucher"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "campaign",
                      "product",
                      "sku",
                      "voucher"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "resource_name": {
            "type": "object",
            "description": "Name of the resource moved to the bin: the name of the campaign, voucher, product, or SKU.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "resource_id": {
            "type": "object",
            "description": "Unique identifier of the resource moved to the bin.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          }
        }
      },
      "ParameterFiltersListMemberTransactions": {
        "type": "object",
        "properties": {
          "created_at": {
            "$ref": "#/components/schemas/FilterConditionsDateTime"
          },
          "id": {
            "$ref": "#/components/schemas/FilterConditionsString"
          }
        }
      },
      "ParameterFiltersListCampaigns": {
        "type": "object",
        "properties": {
          "campaigns": {
            "type": "object",
            "description": "Name of the campaign.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaigns_id": {
            "type": "object",
            "description": "Unique identifier of the campaign. It is assigned by Voucherify.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaign_status": {
            "type": "object",
            "description": "Status of the campaign. Allowed values:\n`DONE`,\n`IN_PROGRESS`,\n`DRAFT`,\n`FAILED`\n`MODIFYING`",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data conditions 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",
                      "enum": [
                        "DONE",
                        "IN_PROGRESS",
                        "FAILED",
                        "DRAFT",
                        "MODIFYING"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "DONE",
                        "IN_PROGRESS",
                        "FAILED",
                        "DRAFT",
                        "MODIFYING"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "DONE",
                      "IN_PROGRESS",
                      "FAILED",
                      "DRAFT",
                      "MODIFYING"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "DONE",
                      "IN_PROGRESS",
                      "FAILED",
                      "DRAFT",
                      "MODIFYING"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "status": {
            "type": "object",
            "description": "Filters campaigns by their code generation status. Pass the filter as an empty object, for example `filters[status][conditions][$active]=`",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data conditions used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$active": {
                    "type": "object",
                    "description": "Campaigns finished generation codes. This also returns campaigns regardless of their `expiration_date` and `start_date`.",
                    "additionalProperties": false
                  },
                  "$failed": {
                    "type": "object",
                    "description": "Campaigs failed to generated codes.",
                    "additionalProperties": false
                  },
                  "$in_progress": {
                    "type": "object",
                    "description": "Campaigns are generating codes or they are updating.",
                    "additionalProperties": false
                  },
                  "$expired": {
                    "type": "object",
                    "description": "Campaigns generated codes, but their `expiration_date` is in the past.",
                    "additionalProperties": false
                  },
                  "before_start": {
                    "type": "object",
                    "description": "Campaigns generated codes, but their `start_date` is in the future.",
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "active": {
            "type": "object",
            "description": "Filters campaigns by their `active` state. Pass the filter as an empty object, for example `filters[active][conditions][$enabled]=`.",
            "properties": {
              "$enabled": {
                "type": "object",
                "description": "Campaigns are enabled.",
                "additionalProperties": false
              },
              "$disabled": {
                "type": "object",
                "description": "Campaigns are disabled.",
                "additionalProperties": false
              },
              "$expired": {
                "type": "object",
                "description": "Campaign `expiration_date` is in the past.",
                "additionalProperties": false
              },
              "$active": {
                "type": "object",
                "description": "Campaigns are active, `start_date` is `null` or in the past, and `expiration_date` is `null` or in the future.",
                "additionalProperties": false
              }
            }
          },
          "is_referral_code": {
            "type": "object",
            "description": "Determines if the campaign is or is not a referral campaign.",
            "properties": {
              "conditions": {
                "type": "object",
                "properties": {
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "TRUE",
                      "FALSE"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "TRUE",
                      "FALSE"
                    ]
                  }
                }
              }
            }
          },
          "validity_timeframe": {
            "description": "Filter by validity timeframe",
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "voucher_type": {
            "type": "object",
            "description": "Type of the voucher. Allowed values:\n`DISCOUNT_VOUCHER`,\n`GIFT_VOUCHER`,\n`LOYALTY_CARD`.",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "GIFT_VOUCHER",
                        "DISCOUNT_VOUCHER",
                        "LOYALTY_CARD"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "GIFT_VOUCHER",
                        "DISCOUNT_VOUCHER",
                        "LOYALTY_CARD"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "GIFT_VOUCHER",
                      "DISCOUNT_VOUCHER",
                      "LOYALTY_CARD"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "GIFT_VOUCHER",
                      "DISCOUNT_VOUCHER",
                      "LOYALTY_CARD"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "categories": {
            "type": "object",
            "description": "Filter by categories names",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "category_ids": {
            "type": "object",
            "description": "Filter by categories IDs",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "type": {
            "type": "object",
            "description": "Type of the campaign. Allowed values:\n`AUTO_UPDATE`,\n`BULK`,\n`STANDALONE`,\n`STATIC`.\n`BULK` is a virtual type that returns campaigns with the `AUTO_UPDATE` or `STATIC` type.",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "AUTO_UPDATE",
                        "BULK",
                        "STANDALONE",
                        "STATIC"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "AUTO_UPDATE",
                        "BULK",
                        "STANDALONE",
                        "STATIC"
                      ]
                    }
                  }
                }
              }
            }
          },
          "created_date": {
            "description": "Timestamp representing the date and time when the campaign was created. The value is shown in the ISO 8601 format.",
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "updated_at": {
            "type": "object",
            "description": "Timestamp representing the date and time when the campaign was last updated. The value is shown in the ISO 8601 format.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "start_date": {
            "type": "object",
            "description": "Timestamp representing the date and time when the campaign starts to be active. Campaign is *inactive before* this date. The value is shown in the ISO 8601 format.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "expiration_date": {
            "description": "Timestamp representing the date and time when the campaign expired. The value is shown in the ISO 8601 format.",
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "validity_day_of_week": {
            "description": "Filters days of week when the campaign is active. The value is an integer array corresponding to the particular days of the week in which the campaign is valid.\n\n- `0` Sunday\n- `1` Monday\n- `2` Tuesday\n- `3` Wednesday\n- `4` Thursday\n- `5` Friday\n- `6` Saturday\n\nIf the campaign is valid throughout all week days, it is always returned.",
            "type": "object",
            "properties": {
              "conditions": {
                "type": "object",
                "description": "Data conditions used to narrow down the data records to be returned in the result.",
                "properties": {
                  "$is": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 6,
                      "enum": [
                        0,
                        1,
                        2,
                        3,
                        4,
                        5,
                        6
                      ]
                    }
                  }
                }
              }
            }
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "ParameterCampaignsAccessSetttings": {
        "type": "object",
        "properties": {
          "filter": {
            "type": "object",
            "properties": {
              "areas_ids": {
                "type": "array",
                "description": "Add area IDs to list all campaigns that are assigned to those areas.",
                "items": {
                  "type": "string",
                  "example": "ar_0ab12cde3456789fgh"
                }
              },
              "area_all_stores_ids": {
                "type": "array",
                "description": "Add area IDs to list all campaigns that are assigned to all stores in those areas.",
                "items": {
                  "type": "string",
                  "example": "ar_0ab12cde3456789fgh"
                }
              },
              "area_stores_ids": {
                "type": "array",
                "description": "Add store IDs to list all campaigns that are assigned to those stores. The response returns also those campaigns that are assigned to those stores with the assignment to all stores.",
                "items": {
                  "type": "string",
                  "example": "ars_0ab12cde3456789fgh"
                }
              }
            }
          }
        }
      },
      "ParameterFiltersListRedemptions": {
        "type": "object",
        "properties": {
          "voucher_code": {
            "type": "object",
            "description": "Unique voucher code.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "related_object_id": {
            "type": "object",
            "description": "Unique related object ID, i.e. v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "related_object_parent_id": {
            "type": "object",
            "description": "Unique related object parent ID, i.e. camp_22noMlhTADb7Fq2UL3vWu3d1.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "parent_redemption_id": {
            "type": "object",
            "description": "Unique parent redemption ID, i.e. r_0c5952900bcbfd54b6.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "failure_code": {
            "type": "object",
            "description": "Failure code, i.e. quantity_exceeded.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "result": {
            "type": "object",
            "description": "Result, i.e. `SUCCESS` or `FAILURE`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "object": {
            "type": "object",
            "description": "Specify which type of object to return, i.e. `redemption` or `redemption_rollback`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "customer_id": {
            "type": "object",
            "description": "Unique customer ID, i.e. cust_sehkNIi8Uq2qQuRqSr7xn4Zi.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaign_name": {
            "type": "object",
            "description": "Campaign name.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "user_login": {
            "type": "object",
            "description": "User login used to login to Voucherify, i.e. name.lastname@email.com",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "ParameterFiltersListCustomerRedeemables": {
        "type": "object",
        "properties": {
          "id": {
            "type": "object",
            "description": "Unique redeemable holder ID, i.e. `rh_0e77502f84f0f4a6a8`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "created_at": {
            "description": "Timestamp representing the date and time when the customer redeemable was created. The value is shown in the ISO 8601 format.",
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "redeemable_id": {
            "type": "object",
            "description": "Unique redeemable ID, e.g. `v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "redeemable_object": {
            "type": "object",
            "description": "Unique related object, i.e. `voucher`.",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "voucher"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "voucher"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "voucher"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "voucher"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "holder_role": {
            "type": "object",
            "description": "Holder role of the redeemable. Allowed values:\n`OWNER`,\n`REFEREE`,\n`REFERRER`.",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "REFEREE",
                        "REFERRER"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "OWNER",
                        "REFEREE",
                        "REFERRER"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "OWNER",
                      "REFEREE",
                      "REFERRER"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "OWNER",
                      "REFEREE",
                      "REFERRER"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "campaign_id": {
            "type": "object",
            "description": "Unique campaign identifer, e.g. `camp_bfrwAVsP6Q1EM1ZjgHwheKYr`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaign_type": {
            "type": "object",
            "description": "Type of the campaign. Allowed values:\n`DISCOUNT_COUPONS`,\n`REFERRAL_PROGRAM`,\n`GIFT_VOUCHERS`,\n`LOYALTY_PROGRAM`",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "LOYALTY_PROGRAM",
                        "GIFT_VOUCHERS",
                        "DISCOUNT_COUPONS",
                        "REFERRAL_PROGRAM"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "LOYALTY_PROGRAM",
                        "GIFT_VOUCHERS",
                        "DISCOUNT_COUPONS",
                        "REFERRAL_PROGRAM"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "LOYALTY_PROGRAM",
                      "GIFT_VOUCHERS",
                      "DISCOUNT_COUPONS",
                      "REFERRAL_PROGRAM"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "LOYALTY_PROGRAM",
                      "GIFT_VOUCHERS",
                      "DISCOUNT_COUPONS",
                      "REFERRAL_PROGRAM"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "voucher_type": {
            "type": "object",
            "description": "Type of the voucher. Allowed values:\n`DISCOUNT_VOUCHER`,\n`GIFT_VOUCHER`,\n`LOYALTY_CARD`.",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "GIFT_VOUCHER",
                        "DISCOUNT_VOUCHER",
                        "LOYALTY_CARD"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "GIFT_VOUCHER",
                        "DISCOUNT_VOUCHER",
                        "LOYALTY_CARD"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "GIFT_VOUCHER",
                      "DISCOUNT_VOUCHER",
                      "LOYALTY_CARD"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "GIFT_VOUCHER",
                      "DISCOUNT_VOUCHER",
                      "LOYALTY_CARD"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "ParameterFiltersListReferralsRedeemableHolders": {
        "type": "object",
        "properties": {
          "id": {
            "type": "object",
            "description": "Unique redeemable holder ID, i.e. `rh_0e77502f84f0f4a6a8`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "created_at": {
            "description": "Timestamp representing the date and time when the redeemable was added to the holder. The value is shown in the ISO 8601 format.",
            "type": "object",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsDateTime"
              }
            }
          },
          "holder_role": {
            "type": "object",
            "description": "Holder role of the redeemable. Allowed values:\n`REFEREE`,\n`REFERRER`",
            "properties": {
              "conditions": {
                "properties": {
                  "$in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "REFEREE",
                        "REFERRER"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "REFEREE",
                        "REFERRER"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "REFEREE",
                      "REFERRER"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "REFEREE",
                      "REFERRER"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          },
          "customer_id": {
            "type": "object",
            "description": "Unique customer ID, i.e. `cust_sehkNIi8Uq2qQuRqSr7xn4Zi`.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "ParameterFiltersListTemplates": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "id": {
            "type": "object",
            "description": "Unique template ID.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "name": {
            "type": "object",
            "description": "Unique user-defined template name.",
            "properties": {
              "conditions": {
                "$ref": "#/components/schemas/FilterConditionsString"
              }
            }
          },
          "campaign_type": {
            "type": "object",
            "description": "Campaign template campaign type.",
            "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 resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "DISCOUNT_COUPONS",
                        "GIFT_VOUCHERS"
                      ]
                    }
                  },
                  "$not_in": {
                    "type": "array",
                    "description": "Array of resource values that should be included in the results (multiple values).",
                    "items": {
                      "type": "string",
                      "enum": [
                        "DISCOUNT_COUPONS",
                        "GIFT_VOUCHERS"
                      ]
                    }
                  },
                  "$is": {
                    "type": "string",
                    "description": "Value is exactly this value (single value).",
                    "enum": [
                      "DISCOUNT_COUPONS",
                      "GIFT_VOUCHERS"
                    ]
                  },
                  "$is_not": {
                    "type": "string",
                    "description": "Results omit this value (single value).",
                    "enum": [
                      "DISCOUNT_COUPONS",
                      "GIFT_VOUCHERS"
                    ]
                  },
                  "$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."
                  }
                }
              }
            }
          }
        }
      },
      "ParametersFiltersListTransactions": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "id": {
            "$ref": "#/components/schemas/FilterConditionsString"
          },
          "voucher_id": {
            "$ref": "#/components/schemas/FilterConditionsString"
          },
          "campaign_id": {
            "$ref": "#/components/schemas/FilterConditionsString"
          }
        }
      },
      "ParametersFiltersListCampaignTransactions": {
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "id": {
            "$ref": "#/components/schemas/FilterConditionsString"
          },
          "voucher_id": {
            "$ref": "#/components/schemas/FilterConditionsString"
          }
        }
      },
      "ParameterFiltersValidatePromotions": {
        "type": "object",
        "title": "Promotion filters",
        "description": "Promotion filter conditions.",
        "properties": {
          "metadata": {
            "type": "object",
            "description": "Allows you to create a filter based on the conditions set for promotion metadata values. The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that are attached to a promotion tier object. Stores additional information about the promotion tier in a structured format."
          },
          "promotion_id": {
            "type": "object",
            "description": "Allows you to create a filter based on the unique promotion ID."
          }
        }
      },
      "ParameterCustomerValidateVoucherClientSide": {
        "oneOf": [
          {
            "type": "object",
            "title": "Customer details",
            "description": "Customer source ID and/or customer metadata.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "Customer source ID.",
                "example": "name.lastname@email.com"
              },
              "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."
              }
            }
          },
          {
            "type": "string",
            "title": "Customer ID",
            "description": "Unique customer ID assigned by Voucherify, i.e. `cust_eWgXlBBiY6THFRJwX45Iakv4`.",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
          }
        ]
      },
      "ParameterOrderMetadata": {
        "type": "object",
        "title": "Order details",
        "description": "Order details.",
        "properties": {
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are attached to an order object. Stores additional information about the order in a structured format."
          }
        }
      },
      "ParameterSessionKey": {
        "type": "string",
        "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
      },
      "ParameterSessionTtlUnit": {
        "type": "string",
        "enum": [
          "HOURS",
          "DAYS",
          "MINUTES",
          "SECONDS",
          "MILLISECONDS",
          "MICROSECONDS",
          "NANOSECONDS"
        ]
      },
      "ParameterPromotionTierId": {
        "type": "string",
        "example": "promo_2EnAik6Jt7dKTOMkRTIgEjZH"
      },
      "ParameterExportId": {
        "type": "string",
        "example": "exp_2bYLdY2lQ2886wmYIHyeBWUZ"
      },
      "ParameterLocationId": {
        "type": "string",
        "example": "loc_NoMGXmHO9OUs7iz9mGWpamma"
      },
      "ParameterCategoryId": {
        "type": "string",
        "example": "cat_0bb81a481615a37b5e"
      },
      "ParameterLoyaltyTierId": {
        "type": "string",
        "example": "promo_2EnAik6Jt7dKTOMkRTIgEjZH"
      },
      "ParameterProductId": {
        "type": "string",
        "example": "prod_3ttSkdxGuAfcv3"
      },
      "ParameterProductCollectionId": {
        "type": "string",
        "example": "pc_41V4DiQQO8YGqj0J2oZD57j4"
      },
      "ParameterSkuId": {
        "type": "string",
        "example": "sku_0b661e41eccd35a8e9"
      },
      "ParameterPromotionStackId": {
        "type": "string",
        "example": "stack_KOIde7AUf08at12lZ1r3OfFL"
      },
      "ParameterRewardAssignmentId": {
        "type": "string",
        "example": "rewa_m9hEAu10KsPcLhGXiHG85aY0"
      },
      "ParameterRewardId": {
        "type": "string",
        "example": "rew_2erjvECLs92GYzKbak3QkyTV"
      },
      "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"
          }
        }
      },
      "ParameterDate": {
        "type": "string",
        "example": "2023-12-22T10:13:06.487Z",
        "format": "date-time"
      },
      "ParameterDateOnly": {
        "type": "string",
        "example": "2023-12-22T10:13:06.487Z",
        "format": "date"
      },
      "ParameterCampaignType": {
        "type": "string",
        "enum": [
          "PROMOTION",
          "GIFT_VOUCHERS",
          "REFERRAL_PROGRAM",
          "DISCOUNT_COUPONS",
          "LOYALTY_PROGRAM"
        ]
      },
      "ParameterOrigin": {
        "type": "string",
        "format": "hostname"
      },
      "ParameterObject": {
        "type": "object"
      },
      "OAuthTokenGenerateRequestBody": {
        "title": "OAuth Token Generate Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `/oauth/token`.",
        "properties": {
          "grant_type": {
            "type": "string",
            "description": "Gives an access token outside of the context of a user.",
            "enum": [
              "client_credentials"
            ],
            "required": [
              "client_credentials"
            ]
          },
          "scope": {
            "type": "string",
            "description": "Defines the scope of possible actions that can be done with the OAuth token. The `api` scope allows using the server-side API. The `client_api` scope allows using the whole client-side API. The values are space-delimited; do **not** use commas to separate the values.\n\nAllowed values: `api`, `assets`, `async-actions`, `campaigns`, `categories`, `client_api`, `client_consents`, `client_customers`, `client_events`, `client_promotions`, `client_publish`, `client_qualifications`, `client_redeem`, `client_redemptions`, `client_validate`, `client_validations`, `client_vouchers`, `consents`, `customers`, `events`, `exports`, `locations`, `loyalties`, `metadata-schemas`, `orders`, `product-collections`, `products`, `promotions`, `publications`, `qualifications`, `redemptions`, `referrals`, `rewards`, `segments`, `skus`, `task-results`, `templates`, `trash-bin`, `validation-rules-assignments`, `validation-rules`, `validations`, `vouchers`."
          }
        },
        "required": [
          "grant_type",
          "scope"
        ]
      },
      "OAuthTokenGenerateResponseBody": {
        "title": "OAuth Token Generate Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `/oauth/token`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/OAuthToken"
          }
        ],
        "required": [
          "access_token",
          "client_id",
          "expires_at",
          "expires_in",
          "scope",
          "token_type"
        ]
      },
      "OAuthTokenIntrospectRequestBody": {
        "title": "OAuth Token Introspect Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `/oauth/introspect`.",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "An OAuth 2.0 token generated with the API token and key.",
            "example": "1ABCde2FGHijKl3m4NO5pqR6STUv7wxYzAbc8dE90FgH1IJkLm"
          }
        },
        "required": [
          "access_token"
        ]
      },
      "OAuthTokenIntrospectResponseBody": {
        "title": "OAuth Token Introspect Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `/oauth/introspect`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/OAuthToken"
          },
          {
            "type": "object",
            "properties": {
              "active": {
                "type": "boolean",
                "description": "Determines if the token is active. Nonexistent tokens are also marked as inactive."
              }
            }
          }
        ],
        "required": [
          "access_token",
          "client_id",
          "expires_at",
          "expires_in",
          "scope",
          "token_type",
          "active"
        ]
      },
      "OAuthTokenRevokeRequestBody": {
        "title": "OAuth Token Revoke Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `/oauth/token/revoke`.",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "An OAuth 2.0 token generated with the API token and key.",
            "example": "1ABCde2FGHijKl3m4NO5pqR6STUv7wxYzAbc8dE90FgH1IJkLm"
          }
        },
        "required": [
          "access_token"
        ]
      },
      "OAuthToken": {
        "title": "OAuth Token Details",
        "type": "object",
        "description": "Details about the OAuth token.",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "The access token used to authorize access to the Voucherify API."
          },
          "client_id": {
            "type": "string",
            "description": "Unique client identifier, assigned by Voucherify, for OAuth."
          },
          "expires_at": {
            "type": "integer",
            "description": "Timestamp in seconds in the Unix format indicating when the token expires."
          },
          "expires_in": {
            "type": "integer",
            "description": "Number of seconds left until the token expires."
          },
          "scope": {
            "type": "string",
            "description": "Defines the scope of possible actions that can be done with the OAuth token. The `api` scope allows using the server-side API. The `client_api` scope allows using the whole client-side API.\nPossible values: `api`, `assets`, `async-actions`, `campaigns`, `categories`, `client_api`, `client_consents`, `client_customers`, `client_events`, `client_promotions`, `client_publish`, `client_qualifications`, `client_redeem`, `client_redemptions`, `client_validate`, `client_validations`, `client_vouchers`, `consents`, `customers`, `events`, `exports`, `locations`, `loyalties`, `metadata-schemas`, `orders`, `product-collections`, `products`, `promotions`, `publications`, `qualifications`, `redemptions`, `referrals`, `rewards`, `segments`, `skus`, `task-results`, `templates`, `trash-bin`, `validation-rules-assignments`, `validation-rules`, `validations`, `vouchers`."
          },
          "token_type": {
            "type": "string",
            "description": "Type of the token. Use the value as the header prefix for authorization.",
            "default": "Bearer",
            "enum": [
              "Bearer"
            ]
          }
        }
      },
      "VouchersValidateRequestBody": {
        "title": "Validate Voucher Request Body",
        "description": "Request schema model for validating a voucher using **POST** `v1/vouchers/{code}/validate`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VouchersValidateDiscountRequestBody"
          },
          {
            "$ref": "#/components/schemas/VouchersValidateGiftRequestBody"
          },
          {
            "$ref": "#/components/schemas/VouchersValidateLoyaltyRequestBody"
          }
        ]
      },
      "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"
          }
        }
      },
      "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",
            "nullable": true,
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "nullable": true,
            "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"
        ]
      },
      "OrderBase": {
        "title": "Order Base",
        "type": "object",
        "description": "Order information.",
        "properties": {
          "source_id": {
            "type": "string",
            "nullable": true,
            "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": "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."
          }
        }
      },
      "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"
          }
        ]
      },
      "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
            "nullable": true,
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "nullable": true,
            "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"
            }
          }
        }
      },
      "OrdersGetResponseBody": {
        "title": "Orders Get Response Body",
        "description": "Response body schema for **GET** `v1/orders/{orderId}`.",
        "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"
                }
              }
            }
          }
        ]
      },
      "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"
            }
          }
        }
      },
      "VouchersValidateDiscountRequestBody": {
        "type": "object",
        "title": "Vouchers Validate Discount Request Body",
        "description": "Request schema model for validating a voucher using **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "description": "Order information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Order"
              }
            ]
          },
          "session": {
            "description": "Schema model for session lock object. The session object is required to establish a session between multiple parallel validation and redemption requests. If you only send the type parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a validation session.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ]
          },
          "tracking_id": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "options": {
            "type": "object",
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ]
                }
              }
            }
          }
        }
      },
      "VouchersValidateGiftRequestBody": {
        "type": "object",
        "title": "Vouchers Validate Gift Request Body",
        "description": "Request schema model for **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "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.\n\n"
              },
              "source_id": {
                "type": "string",
                "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": "string",
                "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."
              },
              "items": {
                "type": "array",
                "description": "Array of items applied to the order.",
                "items": {
                  "$ref": "#/components/schemas/OrderItem"
                }
              },
              "customer": {
                "description": "This is an object containing information about the customer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Customer"
                  }
                ]
              },
              "customer_id": {
                "type": "string"
              },
              "referrer": {
                "description": "This is an ojbect containing information about the referrer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Referrer"
                  }
                ]
              },
              "referrer_id": {
                "type": "string"
              },
              "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."
              }
            }
          },
          "gift": {
            "type": "object",
            "description": "Contains information on the number of gift card credits that the customer wants to apply to the order.",
            "properties": {
              "credits": {
                "type": "number",
                "minimum": 0,
                "description": "The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              }
            },
            "required": [
              "credits"
            ]
          },
          "session": {
            "description": "Schema model for session lock object. The session object is required to establish a session between multiple parallel validation and redemption requests. If you only send the type parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a validation session.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ]
          },
          "tracking_id": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "options": {
            "type": "object",
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "gift"
        ]
      },
      "VouchersValidateLoyaltyRequestBody": {
        "type": "object",
        "title": "Vouchers Validate Loyalty Request Body",
        "description": "Request schema model for **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "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.\n\n"
              },
              "source_id": {
                "type": "string",
                "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": "string",
                "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.\n\n"
              },
              "items": {
                "type": "array",
                "description": "Array of items applied to the order.",
                "items": {
                  "$ref": "#/components/schemas/OrderItem"
                }
              },
              "customer": {
                "description": "This is an object containing information about the customer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Customer"
                  }
                ]
              },
              "customer_id": {
                "type": "string"
              },
              "referrer": {
                "description": "This is an ojbect containing information about the referrer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Referrer"
                  }
                ]
              },
              "referrer_id": {
                "type": "string"
              },
              "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."
              }
            }
          },
          "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.",
            "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."
              },
              "assignment_id": {
                "type": "string"
              },
              "points": {
                "type": "number",
                "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. If the user gives more points than he/she has on the loyalty card, the application will return an error code in response."
              }
            },
            "required": [
              "id"
            ]
          },
          "session": {
            "description": "Schema model for session lock object. The session object is required to establish a session between multiple parallel validation and redemption requests. If you only send the type parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a validation session.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ]
          },
          "tracking_id": {
            "type": "string"
          },
          "metadata": {
            "type": "object"
          },
          "options": {
            "type": "object",
            "properties": {
              "expand": {
                "type": "array",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ]
                }
              }
            }
          }
        },
        "required": [
          "reward"
        ]
      },
      "Referrer": {
        "title": "Referrer",
        "allOf": [
          {
            "$ref": "#/components/schemas/Customer"
          }
        ]
      },
      "ReferrerWithSummaryLoyaltyReferrals": {
        "title": "Referrer With Summary Loyalty Referrals",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        ]
      },
      "ReferrerId": {
        "title": "Referrer Id",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerId"
          }
        ]
      },
      "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",
            "nullable": true,
            "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."
          }
        }
      },
      "CustomersCreateRequestBody": {
        "title": "Customers Create Request Body",
        "description": "Request body schema for **POST** `v1/customers`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Customer"
          }
        ]
      },
      "CustomersUpdateRequestBody": {
        "title": "Customers Update Request Body",
        "description": "Request body schema for **PUT** `v1/customers/{customerId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerBase"
          }
        ]
      },
      "CustomersUpdateResponseBody": {
        "title": "Customers Update Response Body",
        "description": "Response body schema for **PUT** `v1/customers/{customerId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        ]
      },
      "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"
        ]
      },
      "CustomersCreateResponseBody": {
        "description": "Response body for **POST** `v1/customers`.",
        "title": "Customers Create Response Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        ]
      },
      "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": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CustomerSummary"
                  }
                ]
              },
              "loyalty": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CustomerLoyalty"
                  }
                ]
              },
              "referrals": {
                "nullable": true,
                "allOf": [
                  {
                    "$ref": "#/components/schemas/CustomerReferrals"
                  }
                ]
              },
              "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.",
                "properties": {
                  "cockpit_url": {
                    "type": "string",
                    "description": "Customer's cockpit URL address."
                  }
                }
              },
              "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"
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "CustomerSummary": {
        "title": "Customer Summary",
        "type": "object",
        "properties": {
          "redemptions": {
            "$ref": "#/components/schemas/CustomerSummaryRedemptions"
          },
          "orders": {
            "$ref": "#/components/schemas/CustomerSummaryOrders"
          }
        },
        "required": [
          "redemptions",
          "orders"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "SimpleCustomEvent": {
        "title": "Simple Custom Event",
        "type": "object",
        "description": "Simplified custom event data.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the custom event."
          },
          "name": {
            "type": "string",
            "description": "Name of the custom event."
          }
        }
      },
      "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"
            ]
          }
        }
      },
      "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`"
          }
        }
      },
      "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"
        ]
      },
      "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`."
            }
          }
        }
      },
      "Session": {
        "type": "object",
        "title": "Session",
        "properties": {
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated."
          },
          "type": {
            "type": "string",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ],
            "description": "This parameter is required to establish a new session."
          },
          "ttl": {
            "type": "number",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter."
          },
          "ttl_unit": {
            "type": "string",
            "enum": [
              "DAYS",
              "HOURS",
              "MICROSECONDS",
              "MILLISECONDS",
              "MINUTES",
              "NANOSECONDS",
              "SECONDS"
            ],
            "description": "Defines the type of unit in which the session time is counted."
          }
        }
      },
      "VouchersValidateValidResponseBody": {
        "type": "object",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/validate`.",
        "title": "Vouchers Validate Valid Response Body",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": true,
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "applicable_to": {
            "description": "Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApplicableToResultList"
              }
            ]
          },
          "inapplicable_to": {
            "description": "Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/InapplicableToResultList"
              }
            ]
          },
          "campaign": {
            "type": "string",
            "description": "Voucher's parent campaign name."
          },
          "campaign_id": {
            "type": "string",
            "description": "Voucher's parent campaign's unique ID."
          },
          "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."
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "gift": {
            "description": "Gift object response",
            "allOf": [
              {
                "$ref": "#/components/schemas/Gift"
              }
            ]
          },
          "loyalty": {
            "type": "object",
            "description": "Contains the cost of reward in points.",
            "properties": {
              "points_cost": {
                "type": "number",
                "description": "Number of points that wlil be deducted from loyaty card for the associated reward."
              }
            },
            "required": [
              "points_cost"
            ]
          },
          "reward": {
            "type": "object",
            "description": "Contains information about the reward that is being validated.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique reward ID assigned by Voucherify."
              },
              "assignment_id": {
                "type": "string",
                "description": "Unique reward assignment ID assigned by Voucherify."
              },
              "points": {
                "type": "number",
                "description": "Number of points applied to the reward."
              }
            },
            "required": [
              "id",
              "assignment_id",
              "points"
            ]
          },
          "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"
                    }
                  }
                }
              }
            ]
          },
          "session": {
            "description": "Schema model for session lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.\n\n\n",
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ]
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is inactive before this date."
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is inactive after this date."
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed order source ID."
          }
        },
        "required": [
          "valid",
          "code",
          "applicable_to",
          "inapplicable_to",
          "metadata",
          "tracking_id"
        ]
      },
      "VouchersValidateInvalidResponseBody": {
        "type": "object",
        "title": "Vouchers Validate Invalid Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "error": {
            "type": "object",
            "description": "Detailed failure cause for the invalid voucher if the reason has a translation defined in the Dashboard → Project Settings → Error Messages.",
            "properties": {
              "code": {
                "type": "number",
                "description": "Voucher code."
              },
              "key": {
                "type": "string"
              },
              "message": {
                "type": "string",
                "description": "Customized error message."
              },
              "details": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "resource_id": {
                "type": "string"
              },
              "resource_type": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "key",
              "message",
              "details"
            ]
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
          },
          "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."
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "valid",
          "code"
        ]
      },
      "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"
        ]
      },
      "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 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"
        ]
      },
      "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 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"
        ]
      },
      "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"
          },
          "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"
        ]
      },
      "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"
          },
          "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"
          },
          "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"
        ]
      },
      "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"
      },
      "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"
      },
      "DiscountUnitVouchersEffectTypes": {
        "title": "Discount Unit Vouchers Effect Types",
        "enum": [
          "ADD_MISSING_ITEMS",
          "ADD_NEW_ITEMS",
          "ADD_MANY_ITEMS"
        ],
        "type": "string"
      },
      "DiscountVouchersEffectTypes": {
        "title": "Discount Vouchers Effect Types",
        "enum": [
          "ADD_MISSING_ITEMS",
          "ADD_NEW_ITEMS",
          "ADD_MANY_ITEMS",
          "APPLY_TO_ORDER",
          "APPLY_TO_ITEMS",
          "APPLY_TO_ITEMS_PROPORTIONALLY",
          "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
          "APPLY_TO_ITEMS_BY_QUANTITY"
        ],
        "type": "string"
      },
      "DiscountVouchersTypes": {
        "title": "Discount Vouchers Types",
        "enum": [
          "AMOUNT",
          "PERCENT",
          "UNIT",
          "FIXED"
        ],
        "type": "string"
      },
      "VouchersGetResponseBody": {
        "type": "object",
        "title": "Vouchers Get Response Body",
        "description": "Response body schema for **GET** `v1/vouchers/{code}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VouchersUpdateResponseBody": {
        "type": "object",
        "title": "Vouchers Update Response Body",
        "description": "Response body schema for **PUT** `v1/vouchers/{code}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VouchersCreateResponseBody": {
        "type": "object",
        "title": "Vouchers Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers` and `/vouchers/{code}`",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VouchersEnableResponseBody": {
        "type": "object",
        "title": "Vouchers Enable Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/enable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VouchersDisableResponseBody": {
        "type": "object",
        "title": "Vouchers Disable Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/disable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "VoucherWithCategories": {
        "title": "Voucher With Categories",
        "description": "This is an object representing a voucher with categories.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Contains details about the category.",
                "items": {
                  "$ref": "#/components/schemas/Category"
                }
              }
            }
          }
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "VoucherWithStackingRulesTypeCategories": {
        "title": "Voucher with categories and validation rules assignments",
        "description": "This is an object representing a voucher with categories and validation rules assignments for **POST** `v1/qualifications`, **POST** `v1/redemptions`, and **POST** `v1/validations`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherBase"
          },
          {
            "type": "object",
            "properties": {
              "categories": {
                "type": "array",
                "description": "Contains details about the category.",
                "items": {
                  "$ref": "#/components/schemas/CategoryWithStackingRulesType"
                }
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              }
            }
          }
        ]
      },
      "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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`"
              }
            }
          }
        }
      },
      "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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`"
              }
            }
          }
        }
      },
      "RedeemableVoucher": {
        "title": "Voucher",
        "type": "object",
        "description": "This is an object representing a voucher.",
        "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",
            "nullable": true,
            "description": "The value is null."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify.",
            "example": "cat_0bb343dee3cdb5ec0c"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Contains an empty array."
          },
          "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`. `balance` = `amount` - `subtracted_amount` - `redemption.redeemed_amount`."
              },
              "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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."
          },
          "referrer_id": {
            "type": "string",
            "description": "Unique identifier of the referring person.",
            "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
          },
          "holder_id": {
            "type": "string",
            "example": "cust_eWgXlBBiY6THFRJwX45Iakv4",
            "description": "Unique customer identifier of the redeemable holder. It equals to the customer ID assigned by Voucherify."
          },
          "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 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`"
              }
            }
          }
        }
      },
      "VoucherHolder": {
        "title": "Voucher Holder",
        "type": "object",
        "description": "This is an object representing a voucher holder.",
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/SimpleCustomer"
          }
        }
      },
      "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`"
              }
            }
          }
        }
      },
      "1_obj_voucher_object_list_vouchers": {
        "title": "Voucher Object",
        "type": "object",
        "description": "This is an object representing a voucher.",
        "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"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_amount"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_percentage"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_one"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_shipping"
              }
            ]
          },
          "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`."
              },
              "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`."
              },
              "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`."
              },
              "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."
              }
            }
          },
          "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",
            "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": {
            "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`."
          },
          "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."
          },
          "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_amount": {
                "type": "integer",
                "example": 100000,
                "description": "Total amount redeemed. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "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`"
              }
            }
          },
          "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 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`"
              }
            }
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          }
        }
      },
      "VouchersCreateRequestBody": {
        "title": "Vouchers Create Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/vouchers`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCardWithSpecificCodeOrCodeConfig"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGiftWithSpecificCodeOrCodeConfig"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscountWithSpecificCodeOrCodeConfig"
          }
        ]
      },
      "VouchersCreateWithSpecificCodeRequestBody": {
        "title": "Vouchers Create With Specific Code Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/vouchers/{code}`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCard"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGift"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscount"
          }
        ]
      },
      "VoucherCreateLoyaltyCardWithSpecificCodeOrCodeConfig": {
        "title": "Create loyalty card",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCardWithSpecificCode"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCardWithCodeConfig"
          }
        ]
      },
      "VoucherCreateLoyaltyCardWithSpecificCode": {
        "title": "Create loyalty card with specific code",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "WVPblOYX",
                "description": "Code that identifies a voucher. The pattern can use all the letters of the English alphabet, Arabic numerals, and special characters. Pass this attribute in the request body to create a distinct code. Otherwise, either use the `code_config` object to set the rules that the Voucherify API will use to create a random code, or don't pass any code and Voucherify will generate a random code."
              }
            },
            "required": [
              "code"
            ]
          },
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCard"
          }
        ]
      },
      "VoucherCreateLoyaltyCardWithCodeConfig": {
        "title": "Create loyalty card with code config",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateLoyaltyCard"
          },
          {
            "type": "object",
            "properties": {
              "code_config": {
                "$ref": "#/components/schemas/CodeConfig"
              }
            }
          }
        ]
      },
      "VoucherUpdateLoyaltyCard": {
        "title": "Update loyalty card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateBase"
          }
        ]
      },
      "VoucherCreateLoyaltyCard": {
        "title": "Create loyalty card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "LOYALTY_CARD"
                ],
                "description": "Defines the type of the voucher. "
              },
              "loyalty_card": {
                "$ref": "#/components/schemas/SimpleLoyaltyCard"
              }
            },
            "required": [
              "type",
              "loyalty_card"
            ]
          }
        ]
      },
      "VoucherCreateGiftWithSpecificCodeOrCodeConfig": {
        "title": "Create gift card",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateGiftWithSpecificCode"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGiftWithCodeConfig"
          }
        ]
      },
      "VoucherCreateGiftWithSpecificCode": {
        "title": "Create gift card with specific code",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "WVPblOYX",
                "description": "Code that identifies a voucher. The pattern can use all the letters of the English alphabet, Arabic numerals, and special characters. Pass this attribute in the request body to create a distinct code. Otherwise, either use the `code_config` object to set the rules that the Voucherify API will use to create a random code, or don't pass any code and Voucherify will generate a random code."
              }
            },
            "required": [
              "code"
            ]
          },
          {
            "$ref": "#/components/schemas/VoucherCreateGift"
          }
        ]
      },
      "VoucherCreateGiftWithCodeConfig": {
        "title": "Create gift card with code config",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateGift"
          },
          {
            "type": "object",
            "properties": {
              "code_config": {
                "$ref": "#/components/schemas/CodeConfig"
              }
            },
            "required": [
              "code_config"
            ]
          }
        ]
      },
      "VoucherUpdateGift": {
        "title": "Update gift card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateBase"
          }
        ]
      },
      "VoucherCreateGift": {
        "title": "Create gift card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "GIFT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "gift": {
                "$ref": "#/components/schemas/Gift"
              }
            },
            "required": [
              "type",
              "gift"
            ]
          }
        ]
      },
      "VoucherCreateDiscountWithSpecificCodeOrCodeConfig": {
        "title": "Create voucher in a discount campaign",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateDiscountWithSpecificCode"
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscountWithCodeConfig"
          }
        ]
      },
      "VoucherCreateDiscountWithSpecificCode": {
        "title": "Create voucher in a discount campaign with specific code",
        "type": "object",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "WVPblOYX",
                "description": "Code that identifies a voucher. The pattern can use all the letters of the English alphabet, Arabic numerals, and special characters. Pass this attribute in the request body to create a distinct code. Otherwise, either use the `code_config` object to set the rules that the Voucherify API will use to create a random code, or don't pass any code and Voucherify will generate a random code."
              }
            },
            "required": [
              "code"
            ]
          },
          {
            "$ref": "#/components/schemas/VoucherCreateDiscount"
          }
        ]
      },
      "VoucherCreateDiscountWithCodeConfig": {
        "title": "Create voucher in a discount campaign with code config",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateDiscount"
          },
          {
            "type": "object",
            "properties": {
              "code_config": {
                "$ref": "#/components/schemas/CodeConfig"
              }
            }
          }
        ]
      },
      "VoucherCreateDiscount": {
        "title": "Create voucher in a discount campaign",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            },
            "required": [
              "type",
              "discount"
            ]
          }
        ]
      },
      "VoucherUpdateDiscount": {
        "title": "Update voucher in a discount campaign",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "DISCOUNT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            }
          }
        ]
      },
      "VoucherCreateBase": {
        "title": "Voucher Create Base",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "string",
            "example": "Gift Card Campaign",
            "description": "Identifies the voucher's parent campaign using a unique campaign name."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
            "description": "Identifies the voucher's parent campaign using a unique campaign ID assigned by the Voucherify API."
          },
          "category": {
            "type": "string",
            "description": "The name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify to the name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint.",
            "example": "cat_0b6152ce12414820dc"
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the code starts to be active. Activation timestamp is presented in the 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 date defines when the code expires. Expiration timestamp is presented in the 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",
            "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."
          },
          "validation_rules": {
            "type": "array",
            "description": "Array containing the ID of the validation rule associated with the voucher.",
            "items": {
              "type": "string",
              "example": "[val_4j7DCRm2IS59]"
            }
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          }
        }
      },
      "1_req_vouchers_code_POST": {
        "title": "Create Voucher Request Body",
        "type": "object",
        "description": "Request body schema for creating a voucher.",
        "properties": {
          "campaign": {
            "type": "string",
            "example": "Gift Card Campaign",
            "description": "Identifies the voucher's parent campaign using a unique campaign name. **Required** for `LOYALTY_CARD` type."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
            "description": "Identifies the voucher's parent campaign using a unique campaign ID assigned by the Voucherify API."
          },
          "category": {
            "type": "string",
            "description": "The name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify to the name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint.",
            "example": "cat_0b6152ce12414820dc"
          },
          "type": {
            "type": "string",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_amount_POST"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_percentage_POST"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_fixed_POST"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_one_POST"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_multiple_POST"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_shipping_POST"
              }
            ]
          },
          "gift": {
            "type": "object",
            "description": "Defines gift card; **required** when type parameter is `GIFT_VOUCHER`.",
            "properties": {
              "amount": {
                "type": "integer",
                "example": 10000,
                "description": "Define how many credits the gift card should have initially. 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": "Defines loyalty card; **required** when type parameter is `LOYALTY_CARD`.",
            "properties": {
              "points": {
                "type": "integer",
                "example": 7000,
                "description": "Define how many points the loyalty card should have initially."
              }
            }
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the code starts to be active. Activation timestamp is presented in the 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 date defines when the code expires. Expiration timestamp is presented in the 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",
            "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."
          },
          "validation_rules": {
            "type": "array",
            "description": "Array containing the ID of the validation rule associated with the voucher.",
            "items": {
              "type": "string",
              "example": "[val_4j7DCRm2IS59]"
            }
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          }
        }
      },
      "VouchersListResponseBody": {
        "title": "Vouchers List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/vouchers`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON."
          },
          "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": "A dictionary that contains an array of  vouchers. Each entry in the array is a separate voucher object.",
            "items": {
              "$ref": "#/components/schemas/VoucherWithCategories"
            }
          },
          "total": {
            "type": "integer",
            "example": 20,
            "description": "Returns how many vouchers in the project meet the limits defined by the query parameter definitions."
          }
        }
      },
      "VoucherUpdateBase": {
        "title": "Voucher Update Base",
        "type": "object",
        "properties": {
          "category": {
            "type": "string",
            "description": "The name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint."
          },
          "category_id": {
            "type": "string",
            "description": "Unique identifier assigned by Voucherify to the name of the category that this voucher belongs to. Useful when listing vouchers with the [List Vouchers](ref:list-vouchers) endpoint.",
            "example": "cat_0bb81a481615a37b5e"
          },
          "start_date": {
            "type": "string",
            "example": "2021-12-01T00:00:00.000Z",
            "format": "date-time",
            "description": "Start date defines when the code starts to be active. Activation timestamp is presented in the 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 date defines when the code expires. Expiration timestamp is presented in the 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",
            "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."
          }
        }
      },
      "VouchersUpdateRequestBody": {
        "title": "Update Voucher Request Body",
        "type": "object",
        "description": "Request body schema for **PUT** `v1/vouchers/{code}`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherUpdateLoyaltyCard"
          },
          {
            "$ref": "#/components/schemas/VoucherUpdateGift"
          },
          {
            "$ref": "#/components/schemas/VoucherUpdateDiscount"
          }
        ]
      },
      "VouchersMetadataUpdateInBulkRequestBody": {
        "title": "Update Vouchers' Metadata in Bulk Request Body",
        "type": "object",
        "description": "Request body schema for `vouchers/metadata/async`.",
        "x-examples": {
          "example-1": {
            "$ref": "#/components/examples/req_vouchers_metadata_1"
          },
          "example-2": {
            "$ref": "#/components/examples/req_vouchers_metadata_2"
          }
        },
        "properties": {
          "codes": {
            "type": "array",
            "description": "An array of voucher codes.",
            "items": {
              "type": "string"
            }
          },
          "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.",
            "example": {
              "lang": "en",
              "authorized_internally": true
            }
          }
        },
        "required": [
          "codes",
          "metadata"
        ]
      },
      "1_obj_voucher_object_discount_amount": {
        "title": "Amount",
        "type": "object",
        "description": "Amount discount type.",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "description": "Applies an amount discount."
          },
          "amount_off": {
            "type": "integer",
            "example": 100,
            "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. In case of the amount being calculated by the formula, i.e. the `amount_off_formula` parameter is present in the amount definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the amount off."
          },
          "amount_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS",
              "APPLY_TO_ITEMS_PROPORTIONALLY",
              "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
              "APPLY_TO_ITEMS_BY_QUANTITY"
            ],
            "description": "Defines how the discount is applied to the customer's order. The discount effects are defined as follows:\n- `APPLY_TO_ORDER` (discount applies to the total order amount)\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_PROPORTIONALLY` (split discount proportionally to amount)\n- `APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY` (split discount proportionally to quantity)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          }
        }
      },
      "1_obj_voucher_object_discount_percentage": {
        "title": "Percentage",
        "type": "object",
        "description": "Percentage discount type.",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "description": "Applies a percentage discount."
          },
          "amount_limit": {
            "type": "string",
            "description": "Upper limit allowed to be applied as a discount per order line item. 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. This value is definable for the `APPLY_TO_ITEMS` discount effect. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600."
          },
          "percent_off": {
            "type": "integer",
            "description": "Percent taken off the subtotal amount. In case of the percent being calculated by the formula, i.e. the `percent_off_formula` parameter is present in the percent definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the percent off.",
            "minimum": 0,
            "maximum": 100
          },
          "percent_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "1_obj_voucher_object_discount_fixed": {
        "title": "Fixed",
        "description": "Fixed discount type.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "description": "Sets a fixed total on cart or item(s) and then calculates the discount to apply."
          },
          "fixed_amount": {
            "type": "integer",
            "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.",
            "example": 1000
          },
          "fixed_amount_formula": {
            "type": "string",
            "description": "Formula used to calculate the discounted price of an item or a new order total."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "\n| **Effect** | **Definition** |\n|:---|:---|\n| **APPLY_TO_ORDER** | Sets the order total amount to the value of the fixed amount. The discount value is calculated dynamically during the redemption as it's a difference between the total amount of the customer's order and the fixed amount. For example, if the fixed amount is set to equal $10 and the order amount equals $25, then the calculated discount will be $15. |\n| **APPLY_TO_ITEMS** | Sets a new price on items. The total discount amount is dynamically calculated during the redemption and it's a difference between the initial item price and the fixed amount. During the redemption, prices for items will change only if the new price is lower than the original price. If the new product price you set is different from the product price in a collection, then the new product price will be passed during the redemption. If a prodct is in more than one collection, the price is always changed to the lowest price. The new price for products with several SKUs will force the price change for SKUs if their original price is higher than the new price. |"
          }
        }
      },
      "1_obj_voucher_object_discount_unit_one": {
        "title": "Unit, single item",
        "type": "object",
        "description": "Single item type.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Applies a full value discount to item(s)."
          },
          "unit_off": {
            "type": "number",
            "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
            "example": 1,
            "format": "float"
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the number of units."
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from the product  inventory (e.g. time, items).",
            "example": "prod_f1r5Tpr0DuC7"
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_NEW_ITEMS",
              "ADD_MISSING_ITEMS"
            ],
            "default": "ADD_MISSING_ITEMS",
            "description": "Defines how the unit is added to the customer's order."
          }
        }
      },
      "1_obj_voucher_object_discount_unit_multiple": {
        "title": "Unit, multiple items",
        "type": "object",
        "description": "Multiple item types.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a full value discount to item(s).",
            "default": "UNIT"
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "description": "Defines the effect for adding multiple item types."
          },
          "units": {
            "type": "array",
            "description": "Array of objects defining items to be offered for free. Each item type can have a different discount effect assigned.",
            "items": {
              "type": "object",
              "description": "Object defining a unit discount.",
              "properties": {
                "unit_off": {
                  "type": "integer",
                  "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
                  "example": 1
                },
                "unit_off_formula": {
                  "type": "string",
                  "description": "Formula used to calculate the number of units."
                },
                "unit_type": {
                  "type": "string",
                  "description": "The product deemed as free, chosen from the product  inventory (e.g. time, items).",
                  "example": "prod_f1r5Tpr0DuC7"
                },
                "effect": {
                  "type": "string",
                  "enum": [
                    "ADD_NEW_ITEMS",
                    "ADD_MISSING_ITEMS"
                  ],
                  "description": "Defines how the unit is added to the customer's order."
                }
              }
            }
          }
        }
      },
      "1_obj_voucher_object_discount_shipping": {
        "title": "Shipping",
        "description": "Shipping discount type.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Applies a full value discount to item(s)."
          },
          "unit_off": {
            "type": "number",
            "format": "float",
            "description": "Subtracts 1 shipping item from the subtotal.",
            "default": 1
          },
          "unit_type": {
            "type": "string",
            "description": "The shipping product deemed as free.",
            "default": "prod_5h1pp1ng"
          },
          "effect": {
            "type": "string",
            "description": "Defines how the unit is added to the customer's order.",
            "default": "ADD_MISSING_ITEMS"
          }
        }
      },
      "1_obj_voucher_object_discount_amount_POST": {
        "title": "Amount",
        "type": "object",
        "description": "Create amount discount type.",
        "properties": {
          "type": {
            "type": "string",
            "example": "AMOUNT",
            "description": "Applies an amount discount."
          },
          "amount_off": {
            "type": "integer",
            "example": 100,
            "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. In case of the amount being calculated by the formula, i.e. the `amount_off_formula` parameter is present in the amount definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the amount off."
          },
          "amount_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS",
              "APPLY_TO_ITEMS_PROPORTIONALLY",
              "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
              "APPLY_TO_ITEMS_BY_QUANTITY"
            ],
            "description": "Defines how the discount is applied to the customer's order. The discount effects are defined as follows:\n- `APPLY_TO_ORDER` (discount applies to the total order amount)\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_PROPORTIONALLY` (split discount proportionally to amount)\n- `APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY` (split discount proportionally to quantity)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          }
        }
      },
      "1_obj_voucher_object_discount_percentage_POST": {
        "title": "Percentage",
        "type": "object",
        "description": "Create percentage discount type.",
        "properties": {
          "type": {
            "type": "string",
            "example": "PERCENT",
            "description": "Applies a percentage discount."
          },
          "percent_off": {
            "type": "integer",
            "example": 10,
            "description": "Percent taken off the subtotal amount. In case of the percent being calculated by the formula, i.e. the `percent_off_formula` parameter is present in the percent definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the percent off.",
            "minimum": 0,
            "maximum": 100
          },
          "percent_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "amount_limit": {
            "type": "integer",
            "description": "Upper limit allowed to be applied as a discount per order line item. 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. This value is definable for the `APPLY_TO_ITEMS` discount effect. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "1_obj_voucher_object_discount_fixed_POST": {
        "title": "Fixed",
        "description": "Create fixed discount type.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "FIXED",
            "description": "Sets a fixed total on cart or item(s) and then calculates the discount to apply."
          },
          "fixed_amount": {
            "type": "integer",
            "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.",
            "example": 1000
          },
          "fixed_amount_formula": {
            "type": "string",
            "description": "Formula used to calculate the discounted price of an item or a new order total."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "\n| **Effect** | **Definition** |\n|---|---|\n| **APPLY_TO_ORDER** | Sets the order total amount to the value of the fixed amount. The discount value is calculated dynamically during the redemption as it's a difference between the total amount of the customer's order and the fixed amount. For example, if the fixed amount is set to equal $10 and the order amount equals $25, then the calculated discount will be $15. |\n| **APPLY_TO_ITEMS** | Sets a new price on items. The total discount amount is dynamically calculated during the redemption and it's a difference between the initial item price and the fixed amount. During the redemption, prices for items will change only if the new price is lower than the original price. If the new product price you set is different from the product price in a collection, then the new product price will be passed during the redemption. If a prodct is in more than one collection, the price is always changed to the lowest price. The new price for products with several SKUs will force the price change for SKUs if their original price is higher than the new price. |"
          }
        }
      },
      "1_obj_voucher_object_discount_unit_one_POST": {
        "title": "Unit, single item",
        "type": "object",
        "description": "Define single item type.",
        "properties": {
          "type": {
            "type": "string",
            "example": "UNIT",
            "description": "Applies a full value discount to item(s)."
          },
          "unit_off": {
            "type": "number",
            "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
            "example": 1,
            "format": "float"
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from the product  inventory (e.g. time, items).",
            "example": "prod_0a9f9aeddb019a42db"
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_NEW_ITEMS",
              "ADD_MISSING_ITEMS"
            ],
            "default": "ADD_MISSING_ITEMS",
            "description": "Defines how the unit is added to the customer's order."
          }
        }
      },
      "1_obj_voucher_object_discount_unit_multiple_POST": {
        "title": "Unit, multiple items",
        "type": "object",
        "description": "Define multiple item types.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a full value discount to item(s).",
            "default": "UNIT"
          },
          "effect": {
            "type": "string",
            "example": "ADD_MANY_ITEMS",
            "description": "Defines the effect for adding multiple item types."
          },
          "units": {
            "type": "array",
            "description": "Array of objects defining items to be offered for free. Each item type can have a different discount effect assigned.",
            "items": {
              "type": "object",
              "description": "Object defining a unit discount.",
              "properties": {
                "unit_off": {
                  "type": "integer",
                  "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
                  "example": 1
                },
                "unit_off_formula": {
                  "type": "string",
                  "description": "Formula used to calculate the discount."
                },
                "unit_type": {
                  "type": "string",
                  "description": "The product deemed as free, chosen from the product  inventory (e.g. time, items).",
                  "example": "prod_0a9f9aeddb019a42db"
                },
                "effect": {
                  "type": "string",
                  "enum": [
                    "ADD_NEW_ITEMS",
                    "ADD_MISSING_ITEMS"
                  ],
                  "description": "Defines how the unit is added to the customer's order."
                }
              }
            }
          }
        }
      },
      "1_obj_voucher_object_discount_shipping_POST": {
        "title": "Shipping",
        "description": "Create shipping discount type.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "example": "UNIT",
            "description": "Applies a full value discount to item(s)."
          },
          "unit_off": {
            "type": "number",
            "format": "float",
            "description": "Subtracts 1 shipping item from the subtotal.",
            "default": 1
          },
          "unit_type": {
            "type": "string",
            "description": "The shipping product deemed as free.",
            "default": "prod_5h1pp1ng"
          },
          "effect": {
            "type": "string",
            "default": "ADD_MISSING_ITEMS",
            "enum": [
              "ADD_MISSING_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          }
        }
      },
      "1_obj_voucher_object_discount_amount_PUT": {
        "title": "Amount",
        "type": "object",
        "description": "Update amount discount type.",
        "properties": {
          "type": {
            "type": "string",
            "example": "AMOUNT",
            "description": "Applies an amount type discount. **Requires** child attribute\n `type`=`AMOUNT` when modifying this discount."
          },
          "amount_off": {
            "type": "integer",
            "example": 100,
            "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. In case of the amount being calculated by the formula, i.e. the `amount_off_formula` parameter is present in the amount definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the amount off."
          },
          "amount_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS",
              "APPLY_TO_ITEMS_PROPORTIONALLY",
              "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
              "APPLY_TO_ITEMS_BY_QUANTITY"
            ],
            "description": "Defines how the discount is applied to the customer's order. The discount effects are defined as follows:\n- `APPLY_TO_ORDER` (discount applies to the total order amount)\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_PROPORTIONALLY` (split discount proportionally to amount)\n- `APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY` (split discount proportionally to quantity)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          }
        }
      },
      "1_obj_voucher_object_discount_percentage_PUT": {
        "title": "Percentage",
        "type": "object",
        "description": "Update percentage discount type.",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "description": "Applies a percentage discount."
          },
          "percent_off": {
            "type": "integer",
            "example": 10,
            "description": "Percent taken off the subtotal amount. In case of the percent being calculated by the formula, i.e. the `percent_off_formula` parameter is present in the percent definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the percent off.",
            "minimum": 0,
            "maximum": 100
          },
          "percent_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "aggregated_amount_limit": {
            "type": "integer",
            "description": "Maximum discount amount per order. This value is definable for the `APPLY_TO_ITEMS` discount effect. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600."
          },
          "amount_limit": {
            "type": "integer",
            "description": "Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "1_obj_voucher_object_discount_fixed_PUT": {
        "title": "Fixed",
        "type": "object",
        "description": "Update fixed discount type.",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "description": "Sets a fixed total on cart or item(s) and then calculates the discount to apply. **Requires** child attribute\n `type`=`FIXED` when modifying this discount."
          },
          "fixed_amount": {
            "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.",
            "example": 1000,
            "type": "integer"
          },
          "fixed_amount_formula": {
            "type": "string",
            "description": "Formula used to calculate the discounted price of an item or a new order total."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "\n| **Effect** | **Definition** |\n|---|---|\n| **APPLY_TO_ORDER** | Sets the order total amount to the value of the fixed amount. The discount value is calculated dynamically during the redemption as it's a difference between the total amount of the customer's order and the fixed amount. For example, if the fixed amount is set to equal $10 and the order amount equals $25, then the calculated discount will be $15. |\n| **APPLY_TO_ITEMS** | Sets a new price on items. The total discount amount is dynamically calculated during the redemption and it's a difference between the initial item price and the fixed amount. During the redemption, prices for items will change only if the new price is lower than the original price. If the new product price you set is different from the product price in a collection, then the new product price will be passed during the redemption. If a prodct is in more than one collection, the price is always changed to the lowest price. The new price for products with several SKUs will force the price change for SKUs if their original price is higher than the new price. |"
          }
        }
      },
      "1_obj_voucher_object_discount_unit_one_PUT": {
        "title": "Unit, single item",
        "type": "object",
        "description": "Update single item type.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a full value discount to item(s). **Requires** child attribute `type`=`UNIT` when modifying this discount.",
            "default": "UNIT"
          },
          "unit_off": {
            "type": "number",
            "format": "float",
            "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
            "example": 1
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from the product inventory (e.g. time, items).",
            "example": "prod_f1r5Tpr0DuC7"
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order.",
            "default": "ADD_MISSING_ITEMS"
          }
        }
      },
      "1_obj_voucher_object_discount_unit_multiple_PUT": {
        "title": "Unit, multiple items",
        "type": "object",
        "description": "Update multiple item types.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a full value discount to item(s)",
            "default": "UNIT"
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "description": "Defines the effect for adding multiple item types."
          },
          "units": {
            "type": "array",
            "description": "Array of objects defining items to be offered for free. Each item type can have a different discount effect assigned.",
            "items": {
              "type": "object",
              "description": "Object defining a unit discount.",
              "properties": {
                "unit_off": {
                  "type": "integer",
                  "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
                  "example": 1
                },
                "unit_off_formula": {
                  "type": "string",
                  "description": "Formula used to calculate the discount."
                },
                "unit_type": {
                  "type": "string",
                  "description": "The product deemed as free, chosen from the product  inventory (e.g. time, items).",
                  "example": "prod_f1r5Tpr0DuC7"
                },
                "effect": {
                  "type": "string",
                  "enum": [
                    "ADD_NEW_ITEMS",
                    "ADD_MISSING_ITEMS"
                  ],
                  "description": "Defines how the unit is added to the customer's order."
                }
              }
            }
          }
        }
      },
      "1_obj_vouchers_import_discount_amount": {
        "title": "Import amount discount type",
        "type": "object",
        "description": "Import amount discount type.",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "description": "Applies an amount type discount. **Requires** child attribute\n `type`=`AMOUNT` when importing this discount."
          },
          "amount_off": {
            "type": "integer",
            "example": 100,
            "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. In case of the amount being calculated by the formula, i.e. the `amount_off_formula` parameter is present in the amount definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the amount off."
          },
          "amount_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS",
              "APPLY_TO_ITEMS_PROPORTIONALLY",
              "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
              "APPLY_TO_ITEMS_BY_QUANTITY"
            ],
            "description": "Defines how the discount is applied to the customer's order"
          }
        },
        "required": [
          "type",
          "amount_off",
          "effect"
        ]
      },
      "1_obj_vouchers_import_discount_percentage": {
        "title": "Import percentage discount type",
        "type": "object",
        "description": "Import percentage discount type.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a percentage discount. Requires child attribute `type`=`PERCENT` when importing this discount.",
            "default": "PERCENT"
          },
          "percent_off": {
            "type": "integer",
            "example": 10,
            "description": "Percent taken off the subtotal amount. In case of the percent being calculated by the formula, i.e. the `percent_off_formula` parameter is present in the percent definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the percent off.",
            "minimum": 0,
            "maximum": 100
          },
          "percent_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "amount_limit": {
            "type": "integer",
            "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."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        },
        "required": [
          "type",
          "percent_off",
          "effect"
        ]
      },
      "1_obj_vouchers_import_discount_fixed": {
        "title": "Import fixed discount type",
        "type": "object",
        "description": "Import fixed discount type.",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "description": "Sets a fixed total on cart or item(s) and then calculates the discount to apply. **Requires** child attribute\n `type`=`FIXED` when importing this discount."
          },
          "fixed_amount": {
            "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.",
            "example": 1000,
            "type": "integer"
          },
          "fixed_amount_formula": {
            "type": "string",
            "description": "Formula used to calculate the discounted price of an item or a new order total."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "\n| **Effect** | **Definition** |\n|---|---|\n| **APPLY_TO_ORDER** | Sets the order total amount to the value of the fixed amount. The discount value is calculated dynamically during the redemption as it's a difference between the total amount of the customer's order and the fixed amount. For example, if the fixed amount is set to equal $10 and the order amount equals $25, then the calculated discount will be $15. |\n| **APPLY_TO_ITEMS** | Sets a new price on items. The total discount amount is dynamically calculated during the redemption and it's a difference between the initial item price and the fixed amount. During the redemption, prices for items will change only if the new price is lower than the original price. If the new product price you set is different from the product price in a collection, then the new product price will be passed during the redemption. If a prodct is in more than one collection, the price is always changed to the lowest price. The new price for products with several SKUs will force the price change for SKUs if their original price is higher than the new price. |"
          }
        },
        "required": [
          "type",
          "fixed_amount",
          "effect"
        ]
      },
      "1_obj_vouchers_import_discount_unit_one": {
        "title": "Import unit discount type, single item",
        "type": "object",
        "description": "Define single item type.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a full value discount to item(s). **Requires** child attribute `type`=`UNIT` when importing this discount.",
            "default": "UNIT"
          },
          "unit_off": {
            "type": "number",
            "format": "float",
            "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
            "example": 1
          },
          "unit_off_formula": {
            "type": "string",
            "description": "Formula used to calculate the discount."
          },
          "unit_type": {
            "type": "string",
            "description": "The product deemed as free, chosen from the product  inventory (e.g. time, items).",
            "example": "prod_f1r5Tpr0DuC7"
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order.",
            "default": "ADD_MISSING_ITEMS"
          }
        },
        "required": [
          "type",
          "unit_off",
          "unit_type",
          "effect"
        ]
      },
      "1_obj_vouchers_import_discount_unit_multiple": {
        "title": "Import unit discount type, multiple items",
        "type": "object",
        "description": "Define multiple item types.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a full value discount to item(s).",
            "default": "UNIT"
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "description": "Defines the effect for adding multiple item types."
          },
          "units": {
            "type": "array",
            "description": "Array of objects defining items to be offered for free. Each item type can have a different discount effect assigned.",
            "items": {
              "type": "object",
              "description": "Object defining a unit discount.",
              "properties": {
                "unit_off": {
                  "type": "integer",
                  "description": "Number of units to be granted a full value discount. In case of the unit being calculated by the formula, i.e. the `unit_off_formula` parameter is present in the unit definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the unit value.",
                  "example": 1
                },
                "unit_off_formula": {
                  "type": "string",
                  "description": "Formula used to calculate the discount."
                },
                "unit_type": {
                  "type": "string",
                  "description": "The product deemed as free, chosen from the product  inventory (e.g. time, items).",
                  "example": "prod_f1r5Tpr0DuC7"
                },
                "effect": {
                  "type": "string",
                  "enum": [
                    "ADD_NEW_ITEMS",
                    "ADD_MISSING_ITEMS"
                  ],
                  "description": "Defines how the unit is added to the customer's order."
                }
              },
              "required": [
                "unit_off",
                "unit_type",
                "effect"
              ]
            }
          }
        },
        "required": [
          "type",
          "effect",
          "units"
        ]
      },
      "1_obj_vouchers_import_discount_shipping": {
        "title": "Import shipping discount type",
        "description": "Import shipping discount type.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Applies a full value discount to item(s).",
            "default": "UNIT"
          },
          "unit_off": {
            "type": "number",
            "format": "float",
            "description": "Subtracts 1 shipping item from the subtotal.",
            "default": 1
          },
          "unit_type": {
            "type": "string",
            "description": "The shipping product deemed as free.",
            "default": "prod_5h1pp1ng"
          },
          "effect": {
            "type": "string",
            "default": "ADD_MISSING_ITEMS",
            "enum": [
              "ADD_MISSING_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          }
        },
        "required": [
          "type",
          "unit_off",
          "unit_type",
          "effect"
        ]
      },
      "VouchersTransactionsListResponseBody": {
        "title": "Vouchers Transactions List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/vouchers/{code}/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/VoucherTransaction"
            },
            "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"
        ]
      },
      "RewardsListResponseBody": {
        "title": "Rewards List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/rewards`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of transaction objects."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Reward"
            },
            "description": "A dictionary that contains an array of rewards. Each entry in the array is a separate transaction object."
          },
          "total": {
            "type": "integer",
            "example": 20,
            "description": "Returns how many rewards in the project meet the limits defined by the query parameter definitions."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "VoucherTransactionsExportParameters": {
        "description": "List of available fields and filters that can be exported with a gift card or loyalty card transactions export along with the sorting order of the returned data.",
        "title": "Export Transactions",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "-created_at",
              "created_at"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `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. | 8638 |\n| reason | Contains the reason for the transaction if one was included originally. |  |\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. | 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 |\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 |",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "type",
                "source_id",
                "reason",
                "balance",
                "amount",
                "created_at",
                "voucher_id",
                "campaign_id",
                "source",
                "details",
                "related_transaction_id"
              ]
            }
          }
        }
      },
      "VoucherTransactionsExport": {
        "title": "Voucher Transactions Export",
        "type": "object",
        "description": "This is an object representing an export. \n\n Using this endpoint, you can export voucher transactions as a CSV file. This functionality works asynchronously and comes down to the following steps: create an export object and return its id so you can track its status, trigger a CSV file generation, change the status to SCHEDULED when the generation is over, store the file in S3 and change the status to DONE. Now you can download it.\n\nWith parameters you can select which fields will be exported. An export request will almost always result in a single file being generated by the system. However, when your volume of data is large, the system may split the results into multiple chunks.",
        "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"
          },
          "exported_object": {
            "type": "string",
            "description": "The type of exported object.",
            "default": "voucher_transactions",
            "enum": [
              "voucher_transactions"
            ]
          },
          "parameters": {
            "$ref": "#/components/schemas/VoucherTransactionsFilters"
          },
          "result": {
            "type": "object",
            "nullable": true,
            "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](ref:download-export) method."
              }
            }
          },
          "user_id": {
            "type": "string",
            "nullable": true,
            "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"
        ]
      },
      "VouchersImportCreateRequestBody": {
        "title": "Vouchers Import Request Body",
        "type": "array",
        "description": "Request body schema for **POST** `v1/vouchers/import`.",
        "items": {
          "$ref": "#/components/schemas/VouchersImportCreateItemRequestBody"
        }
      },
      "VouchersImportCreateItemRequestBody": {
        "title": "Vouchers Import Request Body Item",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherImportGift"
          },
          {
            "$ref": "#/components/schemas/VoucherImportDiscount"
          }
        ]
      },
      "VoucherImportBase": {
        "title": "Voucher Import Base",
        "type": "object",
        "description": "Object model for gift card object being imported.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Value representing the imported code."
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited.",
                "example": 10
              }
            }
          },
          "active": {
            "type": "boolean",
            "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"
          },
          "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."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the [List Vouchers](ref:list-vouchers) endpoint."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp presented in the ISO 8601 format. Voucher is *inactive before* this date. Start date defines when the code starts to be active.\nAllowed date formats are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2020-12-28T12:49:16.272Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format.  Voucher is *inactive after* this date.\nAllowed date formats are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2053-12-28T12:49:16.272Z"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "additional_info": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          }
        },
        "required": [
          "code"
        ]
      },
      "VoucherImportLoyaltyCard": {
        "title": "Voucher Import Loyalty Card",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherImportBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "default": "LOYALTY_CARD",
                "enum": [
                  "LOYALTY_CARD"
                ],
                "description": "Defines the type of the voucher. "
              },
              "loyalty_card": {
                "$ref": "#/components/schemas/SimpleLoyaltyCard"
              }
            },
            "required": [
              "loyalty_card"
            ]
          }
        ]
      },
      "VoucherImportGift": {
        "title": "Voucher Import Gift",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherImportBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "default": "GIFT_VOUCHER",
                "enum": [
                  "GIFT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "gift": {
                "$ref": "#/components/schemas/Gift"
              }
            },
            "required": [
              "gift"
            ]
          }
        ]
      },
      "VoucherImportDiscount": {
        "title": "Voucher Import Discount",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherImportBase"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "default": "DISCOUNT_VOUCHER",
                "enum": [
                  "DISCOUNT_VOUCHER"
                ],
                "description": "Defines the type of the voucher. "
              },
              "discount": {
                "$ref": "#/components/schemas/Discount"
              }
            },
            "required": [
              "discount"
            ]
          }
        ]
      },
      "VouchersImportGiftVoucherRequestBody": {
        "title": "Import Gift Voucher",
        "type": "object",
        "description": "Object model for gift card object being imported.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Value representing the imported code."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the [List Vouchers](ref:list-vouchers) endpoint."
          },
          "active": {
            "type": "boolean",
            "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"
          },
          "type": {
            "type": "string",
            "description": "Represents the voucher type.  ",
            "default": "GIFT_VOUCHER"
          },
          "gift": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "string",
                "description": "Total gift card income. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              }
            },
            "required": [
              "amount"
            ]
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp presented in the ISO 8601 format. Voucher is *inactive before* this date. Start date defines when the code starts to be active.\nAllowed date formats are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2020-12-28T12:49:16.272Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format.  Voucher is *inactive after* this date.\nAllowed date formats are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2053-12-28T12:49:16.272Z"
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited.",
                "example": 10
              }
            }
          },
          "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."
          }
        },
        "required": [
          "code"
        ]
      },
      "VouchersImportDiscountVoucherRequestBody": {
        "title": "Import Discount Voucher",
        "type": "object",
        "description": "Object model for discount voucher object being imported.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Value representing the imported code."
          },
          "category": {
            "type": "string",
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the [List Vouchers](ref:list-vouchers) endpoint."
          },
          "active": {
            "type": "boolean",
            "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"
          },
          "type": {
            "type": "string",
            "description": "Represents the voucher type.",
            "default": "DISCOUNT_VOUCHER"
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/1_obj_vouchers_import_discount_amount"
              },
              {
                "$ref": "#/components/schemas/1_obj_vouchers_import_discount_percentage"
              },
              {
                "$ref": "#/components/schemas/1_obj_vouchers_import_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/1_obj_vouchers_import_discount_unit_one"
              },
              {
                "$ref": "#/components/schemas/1_obj_vouchers_import_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/1_obj_vouchers_import_discount_shipping"
              }
            ]
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp is presented in the ISO 8601 format. Voucher is *inactive before* this date. Start date defines when the code starts to be active.\nAllowed formats of dates are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2020-12-28T12:49:16.272Z"
          },
          "expiration_date": {
            "type": "string",
            "description": "Expiration date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format.  Voucher is *inactive after* this date.\nAllowed formats of dates are:\n- YYYY-MM-DD\n- YYYY-MM-DDTHH\n- YYYY-MM-DDTHH:mm\n- YYYY-MM-DDTHH:mm:ss\n- YYYY-MM-DDTHH:mm:ssZ\n- YYYY-MM-DDTHH:mm:ss.SSSZ",
            "format": "date-time",
            "example": "2053-12-28T12:49:16.272Z"
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited.",
                "example": 10
              }
            }
          },
          "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."
          }
        },
        "required": [
          "code"
        ]
      },
      "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"
          }
        ]
      },
      "Bundle": {
        "title": "Bundle Details",
        "type": "object",
        "description": "Determines how the bundle conditions are met by the customer's order items. The items in the order meet the bundle condition in the following way: SKU, then product, then collection.",
        "properties": {
          "quantity": {
            "type": "integer",
            "description": "Determines how many bundles are qualified. If there are missing bundle products, the value is `0`. If the bundle is qualified, the value is `1`. The maximum number of identified bundles can equal the number set in `limit`. Also defines the multiplier of the discount for `AMOUNT`, `PERCENT`, and `UNIT` discount types. To inform end-customers that more products can be added to meet additional bundles, compare this parameter with `limit`.",
            "minimum": 0,
            "maximum": 100
          },
          "limit": {
            "type": "integer",
            "description": "Determines the maximum number of identified bundles. This also defines the maximum multiplier of the bundle discount.",
            "minimum": 1,
            "maximum": 100
          },
          "identified": {
            "type": "array",
            "description": "Determines products from the customer's order items that meet bundle conditions. SKUs meet the conditions for their product that is used in the bundle. Returns only the products and their quantity that meet the bundle.",
            "items": {
              "type": "object",
              "description": "Determines a product from the customer's order items that meets bundle conditions.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the product or SKU that meets the bundle condition. This is an ID assigned by Voucherify."
                },
                "object": {
                  "type": "string",
                  "description": "Determines the type of the object that meets the bundle condition.",
                  "enum": [
                    "product",
                    "sku"
                  ]
                },
                "item_index": {
                  "type": "integer",
                  "description": "Number assigned to the order line item in accordance with the order sent in the request. It starts with `0` for the first order line item in the request.",
                  "minimum": 0
                },
                "item_quantity": {
                  "type": "integer",
                  "description": "Quantity of items that meet the bundle conditions. If the quantity in the order is higher than the quantity required by the bundle, this returns only the number that meets the bundle. For example, if the bundle requires `5` coffees, but the order includes `10` coffees, `item_quantity` returns `5`."
                }
              },
              "required": [
                "id",
                "object",
                "item_index",
                "item_quantity"
              ]
            }
          },
          "missing": {
            "type": "array",
            "description": "Determines products, SKUs, or collections from the bundle that are missing in the customer's order items. Determines also the missing quantity. For collections, this means that order items do not include a sufficient number of items that belong to the collection. Not returned when all required bundle items are in the order.",
            "items": {
              "type": "object",
              "description": "Determines a product, SKU, or collection that is in bundle conditions, but is missing in the customer's order items. Determines also the missing quantity.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the collection, product, or SKU that is missing in the customer's order items. This is an ID assigned by Voucherify."
                },
                "object": {
                  "type": "string",
                  "description": "Determines the type of the object that is missing in the customer's order items.",
                  "enum": [
                    "product",
                    "products_collection",
                    "sku"
                  ]
                },
                "item_quantity": {
                  "type": "integer",
                  "description": "Quantity of items that are missing in the order items to meet the bundle conditions."
                }
              },
              "required": [
                "id",
                "object",
                "item_quantity"
              ]
            }
          }
        },
        "required": [
          "quantity",
          "limit"
        ]
      },
      "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"
        ]
      },
      "RedeemableGift": {
        "title": "Redeemable Gift",
        "type": "object",
        "description": "Contains current gift card balance information.",
        "properties": {
          "balance": {
            "type": "number",
            "description": "Available funds. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "credits": {
            "type": "number",
            "description": "The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "locked_credits": {
            "type": "number",
            "description": "The number of credits that are locked under a validation session. This is returned if the qualification request includes `session.type: LOCK` parameter in the body. The value is multiplied by 100 to represent 2 decimal places. For example `10000` for `$100.00`. Returns `0` if there aren't any active validation sessions for the gift card."
          }
        }
      },
      "1_res_vouchers_qualification": {
        "title": "Vouchers Qualification Response Body",
        "type": "object",
        "description": "Response body schema for vouchers/qualification",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. Default is `list`."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of qualified vouchers."
          },
          "data": {
            "type": "array",
            "description": "Array of qualified vouchers.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Voucher"
                },
                {
                  "$ref": "#/components/schemas/1_res_obj_vouchers_qualification_applicable_to"
                },
                {
                  "$ref": "#/components/schemas/1_res_obj_vouchers_qualification_inapplicable_to"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "example": 37,
            "description": "Total valid and active vouchers matching the qualification criteria in given context. "
          },
          "id": {
            "type": "string",
            "example": "qfl_nAMVLoxIqSLh9O6YmfoAXRPG",
            "description": "Unique qualification ID."
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-25T13:32:08.734Z",
            "description": "Timestamp representing the date and time when the qualification was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          }
        }
      },
      "1_res_obj_vouchers_qualification_applicable_to": {
        "title": "ApplicableToObject",
        "type": "object",
        "description": "",
        "properties": {
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          }
        }
      },
      "1_res_obj_vouchers_qualification_inapplicable_to": {
        "title": "InapplicableToObject",
        "type": "object",
        "properties": {
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          }
        }
      },
      "VouchersUpdateInBulkRequestBody": {
        "title": "Vouchers Update In Bulk Request Body",
        "type": "array",
        "description": "Request body schema for **POST** `v1/vouchers/bulk/async`.",
        "items": {
          "$ref": "#/components/schemas/VouchersUpdateInBulkItemRequestBody"
        }
      },
      "VouchersUpdateInBulkItemRequestBody": {
        "title": "Vouchers Update In Bulk Request Body Item",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Unique voucher code."
          },
          "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."
          }
        },
        "required": [
          "code",
          "metadata"
        ]
      },
      "1_req_vouchers_qualification": {
        "title": "Vouchers Qualification Request Body",
        "type": "object",
        "description": "Request body schema for /vouchers/qualification.",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_customer"
          },
          "order": {
            "type": "object",
            "description": "Tracks purchase transactions. You can send the order in the request body to check against vouchers requiring specific order validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of an existing order in Voucherify's system that will be linked to the redemption of this request. This ID was assigned by the Voucherify API. You can send the order id in the request body to check against vouchers requiring specific order validation rules to be satisfied.",
                "example": "ord_gqj1QYW2j2A1E3Ula2YjdPf4"
              },
              "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 an integration between multiple systems. It can be an order ID from a CRM system, database or 3rd-party service."
              },
              "amount": {
                "type": "integer",
                "minimum": 0,
                "description": "Pre-discount order amount represents the total amount of order items' amounts (sum of each item's `amount` property). You can send the total order amount or the amount of each item individually in the request body to check against vouchers requiring specific total order amount validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_ \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "items": {
                "type": "array",
                "description": "List of Order Items constituting the order. Order items can be defined either by `product_id` or `sku_id`. For every item, you must define the quantity.",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_product"
                    },
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_sku"
                    },
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_product_using_product_id"
                    },
                    {
                      "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_product_using_source_id"
                    }
                  ]
                }
              },
              "customer": {
                "$ref": "#/components/schemas/1_req_obj_vouchers_qualification_customer"
              },
              "referrer": {
                "description": "The person who referred the customer to make the order.",
                "type": "object"
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Order metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _ORDER METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
              }
            }
          },
          "reward": {
            "type": "object",
            "properties": {
              "points": {
                "type": "integer"
              },
              "assignment_id": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            }
          },
          "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 qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          }
        }
      },
      "1_req_obj_vouchers_qualification_customer": {
        "title": "Customer Object",
        "type": "object",
        "description": "This object stores customer details. You can send this object in the request body to check against vouchers requiring specific customer validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Audience_ &rarr; _Customer segment_ or _Basic Builder_ &rarr; _Customer Activity_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). ",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of an existing customer that will be linked to the redemption in this request. This ID was assigned by the Voucherify API.",
            "example": "cust_J1CDUdbqn5Exva8ASWk1Fq0j"
          },
          "source_id": {
            "type": "string",
            "description": "A unique customer identifier. This is a tracking identifier of a user that is validating a voucher. The `source_id` is built based on your internal id (e.g., email, database ID). If you also pass a customer ID, the source ID will be ignored. Otherwise, if you do not pass a customer ID, the source ID you provide must either be a token, like the one returned in the original voucher validation method done by a specific customer, or a string identifying the customer (e.g., email, database ID, CRM ID).",
            "example": "firstname.lastname@mycompany.com"
          },
          "name": {
            "type": "string",
            "description": "First and Last Name. You can send the name in the request body to check against vouchers requiring specific name validation rules to be satisfied.",
            "example": "FirstName LastName"
          },
          "email": {
            "type": "string",
            "description": "You can send the email in the request body to check against vouchers requiring specific email validation rules to be satisfied.",
            "example": "firstname.lastname@mycompany.com"
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30,
            "pattern": "^[-+.() 0-9]",
            "description": "You can send the phone in the request body to check against vouchers requiring specific phone validation rules to be satisfied."
          },
          "address": {
            "type": "object",
            "description": "A set of key/value pairs which describes the address. You can send the address in the request body to check against vouchers requiring specific address validation rules to be satisfied.",
            "properties": {
              "city": {
                "type": "string",
                "description": "You can send the city in the request body to check against vouchers requiring specific city validation rules to be satisfied.",
                "example": "New York"
              },
              "country": {
                "type": "string",
                "description": "You can send the country in the request body to check against vouchers requiring specific country validation rules to be satisfied.",
                "example": "United States of America"
              },
              "postal_code": {
                "type": "string",
                "description": "You can send the postal code in the request body to check against vouchers requiring specific postal code validation rules to be satisfied.",
                "example": "10001"
              },
              "state": {
                "type": "string",
                "description": "You can send the state in the request body to check against vouchers requiring specific state validation rules to be satisfied.",
                "example": "NY"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **customer** metadata validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Audience_ &rarr; _Customer metadata satisfy_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "birthdate": {
            "type": "string",
            "example": "2022-01-01",
            "format": "date",
            "description": "You can send the birthdate in the request body to check against vouchers requiring specific birthdate validation rules to be satisfied."
          }
        }
      },
      "1_req_obj_vouchers_qualification_product": {
        "title": "Product Item",
        "type": "object",
        "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique product identifier from your inventory system. __Requires__ the `related_object` property to be defined. \n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on Source Id filters_ . [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).",
            "example": "product_1234"
          },
          "product_id": {
            "type": "string",
            "description": "A unique identifier that represents the product and is assigned by Voucherify.",
            "example": "prod_0a9f9aeddb019a42db"
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Subtotal of matched items_.  \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).",
            "example": 1
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. [This is not true in the case of using sourceid what was the case that this happened.]This `price` property takes precedence. If you provide a value at this level, then a price property defined once again in the `related_object` will be ignored. If this property will not be defined here, then the `price` property in the `related_object` will be used in the qualification.\n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Unit Price of any matching order line_ and also _Order Volume_ &rarr; _Price of each item/Price of any item_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).\n\n The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "related_object": {
            "type": "string",
            "default": "product",
            "enum": [
              "product"
            ],
            "description": "A reference to the object containing details of the related product. __Required__ when sending `source_id` in payload."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique product identifier from your inventory system.",
                "example": "product_1234"
              },
              "name": {
                "type": "string",
                "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on name filters_.",
                "example": "Phone"
              },
              "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`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
              }
            }
          }
        }
      },
      "1_req_obj_vouchers_qualification_product_using_product_id": {
        "title": "Product Item using product_id",
        "type": "object",
        "description": "Schema model for a product item sent using the `product_id`. \n\nYou can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. \nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).",
        "properties": {
          "product_id": {
            "type": "string",
            "description": "A unique identifier that represents the product and is assigned by Voucherify.",
            "example": "prod_0a9f9aeddb019a42db"
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Subtotal of matched items_.  \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).",
            "example": 1
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. [This is not true in the case of using sourceid what was the case that this happened.]This `price` property takes precedence. If you provide a value at this level, then a price property defined once again in the `related_object` will be ignored. If this property will not be defined here, then the `price` property in the `related_object` will be used in the qualification.\n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Unit Price of any matching order line_ and also _Order Volume_ &rarr; _Price of each item/Price of any item_. Even if this price is explicitly provided, it will not override the `price` when running qualifications against _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select/create a product collection filtered by a Price_.   [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).\n\n The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on name filters_.",
                "example": "Phone"
              },
              "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`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
              }
            }
          }
        }
      },
      "1_req_obj_vouchers_qualification_product_using_source_id": {
        "title": "Product Item using source_id",
        "type": "object",
        "description": "Schema model for a product item. You can send this object in the request body to check against vouchers requiring specific product validation rules to be satisfied. The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure/Order volume_ or _Basic Builder_ &rarr; _Order_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule).",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique product identifier from your inventory system. __Requires__ the `related_object` property to be defined. \n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on Source Id filters_ . [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).",
            "example": "product_1234"
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total pre-discount amount of order item (`price` * `quantity`). You can send the total item amount to check against vouchers requiring specific order amount validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order volume_ &rarr; _Total amount_. The qualification adds the individual amounts of the items and checks whether the sum meets the limits set by the _Total amount_. Additionally, another rule checked is one that is defined in _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Subtotal of matched items_.  \n\nThe value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. \n\nThe qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. Another validation rule against which the qualification does the checks is defined in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Quantity of matched items_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).",
            "example": 1
          },
          "price": {
            "type": "integer",
            "description": "Unit price of an item. [This is not true in the case of using sourceid what was the case that this happened.]This `price` property takes precedence. If you provide a value at this level, then a price property defined once again in the `related_object` will be ignored. If this property will not be defined here, then the `price` property in the `related_object` will be used in the qualification.\n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item_ &rarr; _Unit Price of any matching order line_ and also _Order Volume_ &rarr; _Price of each item/Price of any item_. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).\n\n The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
            "example": 10000
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **order line item** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item_ &rarr; _Metadata of matched items_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "related_object": {
            "type": "string",
            "default": "product",
            "enum": [
              "product"
            ],
            "description": "A reference to the object containing details of the related product. __Required__ when sending `source_id` in payload."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique product identifier from your inventory system.",
                "example": "product_1234"
              },
              "name": {
                "type": "string",
                "description": "Product name.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on name filters_.",
                "example": "Phone"
              },
              "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`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
              }
            }
          }
        },
        "required": [
          "source_id",
          "related_object"
        ]
      },
      "1_req_obj_vouchers_qualification_sku": {
        "title": "SKU Item",
        "type": "object",
        "description": "Schema model for a SKU item.",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique sku identifier from your inventory system. __Requires__ the `related_object` property to be defined. \n\n The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on Source Id filters_ . [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).",
            "example": "product_1234"
          },
          "sku_id": {
            "type": "string",
            "example": "sku_0a41e31c7b41c28358",
            "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
          },
          "amount": {
            "type": "integer",
            "description": "Represents a total amount of order item (price * quantity).\n\nYou should provide it to retrieve `discount_amount` if the discount is applied only to this item.[I'm not sure what this means here, it's from the original docs]",
            "example": 10000
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of the item in the cart. The qualification runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order Volume_ &rarr; _Items quantity_. The qualification adds the individual quantities of the items and checks whether the sum meets the limits set by _Items quantity_ validation rule. [Read more](https://support.voucherify.io/article/529-validation-rules-campaign-limits).",
            "example": 1
          },
          "related_object": {
            "type": "string",
            "enum": [
              "product",
              "sku"
            ],
            "description": "A reference to the object containing details of the related product/sku. __Required__ when sending `source_id` in payload."
          },
          "product": {
            "type": "object",
            "description": "An object containing details of the related product. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique product identifier from your inventory system.",
                "example": "product_1234"
              },
              "name": {
                "type": "string",
                "description": "Product name.",
                "example": "Phone"
              },
              "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`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of key/value pairs that you can send in the request body to check against vouchers requiring **product** metadata validation rules to be satisfied.\n\n The qualification runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Order structure_ &rarr; _Every order item/Any order item/None of the order items_ &rarr; _Select a product collection or create a new product collection based on metadata filters_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
              }
            }
          },
          "sku": {
            "type": "object",
            "description": "An object containing details of the related SKU. __Required__ when sending `source_id` in payload. These details will be used for qualification on top of details already stored in the system.",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "A unique SKU identifier from your inventory system.",
                "example": "sku_1234"
              },
              "sku": {
                "type": "string",
                "description": "SKU name.",
                "example": "iPhone 12"
              },
              "price": {
                "type": "integer",
                "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`.",
                "example": 10000
              },
              "metadata": {
                "type": "object",
                "description": "A set of custom key/value pairs that you can attach to a SKU."
              }
            }
          }
        }
      },
      "EmptyJson": {
        "type": "object",
        "description": "Schema model for an empty json.",
        "title": "Empty JSON"
      },
      "CampaignBase": {
        "type": "object",
        "title": "Campaign Base",
        "description": "This is an object representing a 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",
            "enum": [
              "LOYALTY_PROGRAM",
              "GIFT_VOUCHERS",
              "DISCOUNT_COUPONS",
              "PROMOTION",
              "REFERRAL_PROGRAM"
            ],
            "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) voucherss.\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"
            ]
          },
          "voucher": {
            "$ref": "#/components/schemas/CampaignVoucher"
          },
          "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": "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."
          },
          "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 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."
          },
          "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. It is also not returned for restricted users who use the [GET Campaign summary](ref:campaign-summary) endpoint."
          },
          "protected": {
            "type": "boolean",
            "description": "Indicates whether the resource can be deleted."
          },
          "category_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique category ID that this campaign belongs to.",
            "example": "cat_0b688929a2476386a7"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the campaign category. For the GET [List campaigns](ref:list-campaigns) endpoint, this is returned only if the `expand=category` query parameter is passed in the request. Otherwise, it is returned as an empty array. For GET [Campaign summary](ref:get-campaign-summary) endpoint, it is always returned as an empty array.",
            "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."
          },
          "referral_program": {
            "$ref": "#/components/schemas/ReferralProgram"
          },
          "loyalty_tiers_expiration": {
            "$ref": "#/components/schemas/LoyaltyTiersExpirationAll"
          },
          "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"
        ]
      },
      "Campaign": {
        "title": "Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignBase"
          },
          {
            "title": "Campaign Additional Data",
            "type": "object",
            "properties": {
              "promotion": {
                "$ref": "#/components/schemas/PromotionTiersList"
              },
              "validation_rules_assignments": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
              }
            }
          }
        ]
      },
      "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",
            "nullable": true,
            "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"
        ]
      },
      "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",
                "nullable": true,
                "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"
        ]
      },
      "CampaignVoucher": {
        "type": "object",
        "description": "Schema model for a campaign voucher.",
        "title": "Campaign Voucher",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of 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",
                "nullable": true,
                "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": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          },
          "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"
        ]
      },
      "CodeConfigBase": {
        "title": "Code Config Base",
        "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`."
          }
        }
      },
      "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."
          }
        }
      },
      "CampaignsImportVoucherLoyaltyCard": {
        "type": "object",
        "description": "Schema model for a campaign loyalty card.",
        "title": "Campaigns Import Voucher 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."
          }
        },
        "required": [
          "points"
        ]
      },
      "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"
        ]
      },
      "2_loyalty_tiers_expiration_balance": {
        "title": "Balance",
        "type": "object",
        "description": "Defines the Balance expiration mechanism for loyalty tiers.",
        "properties": {
          "qualification_type": {
            "type": "string",
            "default": "BALANCE",
            "enum": [
              "BALANCE"
            ],
            "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."
          },
          "start_date": {
            "type": "object",
            "description": "Defines the conditions for the start date of the tier.",
            "properties": {
              "type": {
                "type": "string",
                "default": "IMMEDIATE",
                "enum": [
                  "IMMEDIATE"
                ],
                "description": "What triggers the tier to be valid for a customer.    \n`IMMEDIATE`: After reaching the minimum required points."
              }
            }
          },
          "expiration_date": {
            "description": "Defines the conditions for the expiration date of a tier.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_balance_expiration_date_balance_drop"
              },
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_balance_expiration_date_custom"
              }
            ]
          }
        }
      },
      "2_loyalty_tiers_expiration_balance_expiration_date_balance_drop": {
        "title": "Balance Drop",
        "type": "object",
        "description": "Defines the conditions for the expiration date of a tier based on a pure balance drop.",
        "properties": {
          "type": {
            "type": "string",
            "default": "BALANCE_DROP",
            "enum": [
              "BALANCE_DROP"
            ],
            "description": "What triggers the tier to expire for a customer.    \n`BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier."
          }
        }
      },
      "2_loyalty_tiers_expiration_balance_expiration_date_custom": {
        "title": "Custom",
        "type": "object",
        "description": "Defines the custom conditions for the expiration date of a tier.",
        "properties": {
          "type": {
            "type": "string",
            "default": "CUSTOM",
            "enum": [
              "CUSTOM"
            ],
            "description": "What triggers the tier to expire for a customer.    \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": "Defines the amount of time the tier will remain active in ISO 8601 format. The expiration date counter starts at the moment when the customer reaches the minimum required points that are required to be in the tier. For example, a tier with a duration of P3M will be valid for a duration of 3 months."
          },
          "rounding": {
            "description": "Defines the rounding mechanism for tier expiration.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_expiration_date_rounding_default_options"
              },
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_expiration_date_rounding_custom"
              }
            ]
          }
        }
      },
      "2_loyalty_tiers_expiration_expiration_date_rounding_default_options": {
        "title": "Calendar Periods",
        "type": "object",
        "description": "Defines the rounding mechanism for tier expiration based on a list of available time periods.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "MONTH",
              "QUARTER",
              "HALF_YEAR",
              "YEAR"
            ],
            "description": "Period to which the expiration will be rounded to.    \n- `MONTH`: The expiration date will be rounded to the end of the month. \n- `QUARTER`: The expiration date will be rounded to the end of the quarter. \n- `HALF_YEAR`: The expiration date will be rounded to the half year. \n- `YEAR`: The expiration date will be rounded to the end of the year."
          },
          "strategy": {
            "type": "string",
            "description": "Which portion of the given period should the rounding be applied to.",
            "default": "END",
            "enum": [
              "END"
            ]
          }
        }
      },
      "2_loyalty_tiers_expiration_expiration_date_rounding_custom": {
        "title": "Specific Month",
        "type": "object",
        "description": "Defines the custom rounding mechanism for tier expiration.",
        "properties": {
          "type": {
            "type": "string",
            "default": "CUSTOM",
            "enum": [
              "CUSTOM"
            ],
            "description": "This mechanism describes a custom rounding for the expiration date."
          },
          "strategy": {
            "type": "string",
            "description": "Which portion of the given period should the rounding be applied to.",
            "default": "END",
            "enum": [
              "END"
            ]
          },
          "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"
          }
        }
      },
      "2_loyalty_tiers_expiration_points_in_period": {
        "title": "Points in Period",
        "type": "object",
        "description": "Defines the Points in Period expiration mechanism for loyalty tiers.",
        "properties": {
          "qualification_type": {
            "type": "string",
            "default": "POINTS_IN_PERIOD",
            "enum": [
              "POINTS_IN_PERIOD"
            ],
            "description": "Tier qualification.   \n\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."
              }
            }
          },
          "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"
                ],
                "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."
              },
              "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."
              }
            }
          }
        }
      },
      "CampaignsCreateBaseValidationRules": {
        "type": "object",
        "title": "Campaign Create Schema Base With Validation Rules",
        "description": "Base body schema for creating a campaign using **POST** `v1/campaigns`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "validation_rules": {
                "type": "array",
                "description": "Array containing the ID of the validation rule associated with the promotion tier.",
                "items": {
                  "type": "string"
                },
                "maxItems": 1
              }
            }
          }
        ]
      },
      "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) voucherss.\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"
            ]
          },
          "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"
          }
        }
      },
      "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",
            "nullable": true,
            "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"
          }
        }
      },
      "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"
                ]
              }
            }
          }
        ]
      },
      "CampaignsUpdateDiscountCouponsCampaign": {
        "type": "object",
        "title": "Update Discount Coupons Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateCouponCampaignBase"
          },
          {
            "type": "object",
            "title": "Properties For Discount Coupons Campaign",
            "description": "Body schema for update a campaign of discount coupons type using **PUT** `v1/campaigns`.",
            "properties": {
              "discount": {
                "description": "Defines the voucher discount type and details.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Discount"
                  }
                ]
              }
            }
          }
        ]
      },
      "CampaignsUpdateGiftCampaign": {
        "type": "object",
        "title": "Update Gift Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateCouponCampaignBase"
          },
          {
            "type": "object",
            "title": "Properties For Gift Campaign",
            "description": "Body schema for update a campaign of give type using **PUT** `v1/campaigns`.",
            "properties": {
              "gift": {
                "description": "Defines the voucher gift details.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Gift"
                  }
                ]
              }
            }
          }
        ]
      },
      "CampaignsUpdateReferralCampaign": {
        "type": "object",
        "title": "Update Referral Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateCouponCampaignBase"
          },
          {
            "type": "object",
            "title": "Properties For Referral Campaign",
            "description": "Body schema for update a campaign of referral type using **PUT** `v1/campaigns`.",
            "properties": {
              "discount": {
                "description": "Defines the voucher discount type and details.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Discount"
                  }
                ]
              },
              "referral_program": {
                "$ref": "#/components/schemas/ReferralProgram"
              }
            }
          }
        ]
      },
      "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."
                  }
                }
              }
            }
          }
        ]
      },
      "CampaignsUpdatePromotionCampaign": {
        "type": "object",
        "title": "Update Promotion Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateBase"
          }
        ]
      },
      "CampaignsCreateRequestBody": {
        "type": "object",
        "title": "Campaigns Create Request Body",
        "description": "Request body schema for **POST** `v1/campaigns`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateDiscountCouponsCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsCreateReferralCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsCreateGiftCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsCreateLoyaltyCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsCreatePromotionCampaign"
          }
        ]
      },
      "CampaignsUpdateRequestBody": {
        "type": "object",
        "title": "Campaigns Update Request Body",
        "description": "Request body schema for **PUT** `v1/campaigns/{campaignId}`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CampaignsUpdateDiscountCouponsCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsUpdateReferralCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsUpdateGiftCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsUpdateLoyaltyCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsUpdatePromotionCampaign"
          }
        ]
      },
      "CampaignsCreateDiscountCouponsCampaign": {
        "title": "Create Discount Coupons Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateBaseValidationRules"
          },
          {
            "type": "object",
            "title": "Schema that contains unique properties for Discount Coupons Campaign",
            "description": "Body schema for creating a campaign of discount coupons type using **POST** `v1/campaigns`.",
            "properties": {
              "campaign_type": {
                "type": "string",
                "default": "DISCOUNT_COUPONS",
                "enum": [
                  "DISCOUNT_COUPONS"
                ],
                "description": "Type of campaign."
              },
              "voucher": {
                "$ref": "#/components/schemas/DiscountCouponsCampaignVoucher"
              }
            }
          }
        ]
      },
      "CampaignsCreateReferralCampaign": {
        "title": "Create Referral Program",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateBaseValidationRules"
          },
          {
            "type": "object",
            "title": "Schema that contains unique properties for Referral Program",
            "description": "Body schema for creating a campaign of referral type using **POST** `v1/campaigns`.",
            "properties": {
              "campaign_type": {
                "type": "string",
                "default": "REFERRAL_PROGRAM",
                "enum": [
                  "REFERRAL_PROGRAM"
                ],
                "description": "Type of campaign."
              },
              "referral_program": {
                "$ref": "#/components/schemas/ReferralProgram"
              },
              "voucher": {
                "$ref": "#/components/schemas/ReferralCampaignVoucher"
              }
            }
          }
        ]
      },
      "CampaignsCreateGiftCampaign": {
        "title": "Create Gift Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateBaseValidationRules"
          },
          {
            "type": "object",
            "title": "Schema that contains unique properties for Gift Campaign",
            "description": "Body schema for creating a campaign of gift type using **POST** `v1/campaigns`.",
            "properties": {
              "campaign_type": {
                "type": "string",
                "default": "GIFT_VOUCHERS",
                "enum": [
                  "GIFT_VOUCHERS"
                ],
                "description": "Type of campaign."
              },
              "voucher": {
                "$ref": "#/components/schemas/GiftCampaignVoucher"
              }
            }
          }
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "CampaignsCreatePromotionCampaign": {
        "title": "Create Promotion Campaign",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateBaseValidationRules"
          },
          {
            "type": "object",
            "title": "Schema that contains unique properties for Promotion Campaign",
            "description": "Body schema for creating a campaign of promotion type using **POST** `v1/campaigns`.",
            "properties": {
              "campaign_type": {
                "type": "string",
                "default": "PROMOTION",
                "enum": [
                  "PROMOTION"
                ],
                "description": "Type of campaign."
              },
              "promotion": {
                "type": "object",
                "properties": {
                  "tiers": {
                    "type": "array",
                    "nullable": true,
                    "items": {
                      "$ref": "#/components/schemas/PromotionTierCreateParams"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "2_req_add_vouchers_with_specific_code_to_campaign": {
        "type": "object",
        "title": "Add Vouchers with Specific Code to Campaign Request Body",
        "description": "Request body schema for **POST** `v1/campaigns/{campaignId}/vouchers/{code}`.",
        "properties": {
          "category_id": {
            "type": "string",
            "description": "Unique category ID that you would like to assign to the voucher.",
            "example": "cat_0b688929a2476386a7"
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher 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 voucher expires in ISO 8601 format.  Voucher is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          },
          "active": {
            "type": "boolean",
            "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"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the voucher. 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."
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "additional_info": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          }
        }
      },
      "AccessSettingsCampaignAssignmentsList": {
        "title": "Access Settings Campaign Assignments List",
        "type": "object",
        "description": "Lists all assignments of the campaign to areas and stores. For [GET List Campaigns](ref: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](ref: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"
        ]
      },
      "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"
                }
              }
            }
          }
        }
      },
      "2_req_examine_qualification": {
        "type": "object",
        "title": "Examine Qualification Request Body",
        "description": "Request body schema for **POST** `v1/campaigns/qualification`.",
        "properties": {
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information. This object enables you to pass purchase transaction data. Read what properties you can use in the [Order object](ref:get-order)."
          }
        }
      },
      "2_res_examine_qualification": {
        "type": "object",
        "title": "Examine Qualification Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/qualification`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about campaigns in a dictionary.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of campaign objects.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "Contains array of campaign objects.",
            "items": {
              "$ref": "#/components/schemas/2_obj_campaign_object_campaigns_qualification"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total valid and active campaigns matching the qualification criteria in given context."
          },
          "id": {
            "type": "string",
            "description": "Unique qualification ID.",
            "example": "qfl_dNZ3gWfKVNa8Zw15hn30uqdU"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the qualification was created. The value is shown in the ISO 8601 format.",
            "example": "2023-04-04T13:13:03.119Z"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          }
        }
      },
      "2_obj_campaign_object_campaigns_qualification": {
        "type": "object",
        "title": "Campaign Object",
        "description": "This is an object representing a 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",
            "enum": [
              "GIFT_VOUCHERS",
              "DISCOUNT_COUPONS",
              "REFERRAL_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": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/2_obj_campaign_object_voucher_object_DISCOUNT"
              },
              {
                "$ref": "#/components/schemas/2_obj_campaign_object_voucher_object_GIFT_CARD"
              },
              {
                "$ref": "#/components/schemas/2_obj_campaign_object_voucher_object_LOYALTY_CARD"
              }
            ]
          },
          "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": "If this value is set to `true`, customers will be able to join the campaign only once."
          },
          "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 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."
          },
          "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 voucher was updated. The value is shown in the 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 vouchers.",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT"
            ]
          },
          "protected": {
            "type": "boolean",
            "description": "Indicates whether the resource can be deleted."
          },
          "validation_rules_assignments": {
            "type": "object",
            "description": "Stores information about validation rules assigned to the campaign.",
            "properties": {
              "object": {
                "type": "string",
                "description": "The type of the object represented is by default `list`.",
                "default": "list"
              },
              "data_ref": {
                "type": "string",
                "description": "Identifies the name of the attribute that contains the array of validation rule assignments.",
                "default": "data"
              },
              "data": {
                "type": "array",
                "description": "Array of validation rule assignment objects. Each validation rule assignment object contains details about the rule.",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "asgm_N7t39epaQR2SkQcW",
                      "description": "Assigned by the Voucherify API, identifies the validation rule assignment."
                    },
                    "rule_id": {
                      "type": "string",
                      "example": "val_ssbxf1L9aKri",
                      "description": "Assigned by the Voucherify API, identifies the validation rule."
                    },
                    "related_object_id": {
                      "type": "string",
                      "example": "camp_AaP9MC1Y0GpBII84UTIuasvb",
                      "description": "ID of the object from which the rule originates."
                    },
                    "related_object_type": {
                      "type": "string",
                      "example": "campaign",
                      "description": "Which object does the rule originate from: the  `voucher` itself or inherited from its parent `campaign`."
                    },
                    "created_at": {
                      "type": "string",
                      "example": "2022-02-14T15:12:06.817Z",
                      "description": "Timestamp representing the date and time when the validation rule 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 resource represented by the object. Default is `validation_rules_assignment`."
                    },
                    "rule": {
                      "type": "object",
                      "description": "Describes the details of the rule."
                    }
                  }
                }
              },
              "total": {
                "type": "integer",
                "description": "Total number of validation rules assigned to the campaign."
              }
            }
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID that this campaign belongs to.",
            "example": "cat_0b688929a2476386a7"
          },
          "categories": {
            "$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."
          },
          "referral_program": {
            "type": "object",
            "description": "Defines the referee reward and the way a referral is triggered. Context: `REFERRAL_PROGRAM`.",
            "properties": {
              "conversion_event_type": {
                "type": "string",
                "enum": [
                  "redemption",
                  "custom_event"
                ],
                "description": "How a referral is triggered."
              },
              "custom_event": {
                "type": "object",
                "description": "Contains details about the custom event.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "ms_fi47Dcu5T0m3v3nT5ch3ma",
                    "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",
                        "description": "Unique ID of the reward source."
                      },
                      "name": {
                        "type": "string",
                        "description": "Name of the reward source."
                      },
                      "object": {
                        "type": "string",
                        "description": "Type of resource represented by the source of the reward."
                      }
                    }
                  },
                  "type": {
                    "type": "string",
                    "description": "Type of reward.",
                    "enum": [
                      "LOYALTY_CARD",
                      "GIFT_VOUCHER"
                    ]
                  },
                  "amount": {
                    "type": "string",
                    "description": "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."
                  }
                }
              }
            }
          }
        }
      },
      "CampaignsListResponseBody": {
        "type": "object",
        "description": "Schema model for **GET** `v1/campaigns`.",
        "title": "Campaigns List Response Body",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about campaigns in a dictionary.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of campaign objects.",
            "default": "campaigns"
          },
          "campaigns": {
            "type": "array",
            "description": "Contains array of campaign objects.",
            "items": {
              "$ref": "#/components/schemas/CampaignBase"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of campaigns."
          }
        }
      },
      "DiscountCouponsCampaignVoucher": {
        "title": "Object representing voucher property for Discount Coupons Campaign",
        "properties": {
          "type": {
            "type": "string",
            "default": "DISCOUNT_VOUCHER",
            "description": "Type of voucher.",
            "enum": [
              "DISCOUNT_VOUCHER"
            ]
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfig"
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          }
        },
        "required": [
          "type",
          "discount"
        ]
      },
      "ReferralCampaignVoucher": {
        "title": "Object representing voucher property for Referral Program",
        "properties": {
          "type": {
            "type": "string",
            "default": "DISCOUNT_VOUCHER",
            "description": "Type of voucher.",
            "enum": [
              "DISCOUNT_VOUCHER"
            ]
          },
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfig"
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          }
        },
        "required": [
          "type",
          "discount",
          "is_referral_code"
        ]
      },
      "GiftCampaignVoucher": {
        "type": "object",
        "description": "Schema model for a discount voucher.",
        "title": "Discount Voucher",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of voucher.",
            "default": "GIFT_VOUCHER",
            "enum": [
              "GIFT_VOUCHER"
            ]
          },
          "gift": {
            "$ref": "#/components/schemas/Gift"
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfig"
          }
        },
        "required": [
          "type",
          "gift"
        ]
      },
      "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",
                "nullable": true,
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "code_config": {
            "$ref": "#/components/schemas/CodeConfig"
          }
        },
        "required": [
          "type",
          "loyalty_card"
        ]
      },
      "2_obj_campaign_object_voucher_object_DISCOUNT": {
        "type": "object",
        "description": "Schema model for a discount voucher.",
        "title": "Discount Voucher",
        "properties": {
          "type": {
            "type": "string",
            "default": "DISCOUNT_VOUCHER",
            "description": "Type of voucher."
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_amount"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_percentage"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_one"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/1_obj_voucher_object_discount_shipping"
              }
            ],
            "description": "Defines the voucher discount type and details."
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "code_config": {
            "type": "object",
            "description": "Defines code's pattern (prefix, suffix, length, charset, etc). ",
            "properties": {
              "length": {
                "type": "string",
                "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`."
              }
            }
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          }
        }
      },
      "2_obj_campaign_object_voucher_object_GIFT_CARD": {
        "type": "object",
        "description": "Schema model for a gift card.",
        "title": "Gift Card",
        "properties": {
          "type": {
            "type": "string",
            "default": "GIFT_VOUCHER",
            "description": "Type of voucher."
          },
          "gift": {
            "description": "Defines the gift card details.",
            "type": "object",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Initial gift card income to be applied to the gift card at voucher generation. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "effect": {
                "type": "string",
                "description": "Defines how the credits are applied to the customer's order.",
                "enum": [
                  "APPLY_TO_ORDER",
                  "APPLY_TO_ITEMS"
                ]
              }
            }
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "code_config": {
            "type": "object",
            "description": "Defines code's pattern (prefix, suffix, length, charset, etc). ",
            "properties": {
              "length": {
                "type": "string",
                "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`."
              }
            }
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          }
        }
      },
      "2_obj_campaign_object_voucher_object_LOYALTY_CARD": {
        "type": "object",
        "description": "Schema model for a loyalty card.",
        "title": "Loyalty Card",
        "properties": {
          "type": {
            "type": "string",
            "default": "LOYALTY_CARD",
            "description": "Type of voucher."
          },
          "loyalty_card": {
            "description": "Defines the loyalty card details.",
            "type": "object",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Initial loyalty card income in points to be applied to the loyalty card at voucher generation."
              },
              "expiration_rules": {
                "type": "object",
                "description": "Defines point expiration rules.",
                "properties": {
                  "period_type": {
                    "type": "string",
                    "default": "MONTH",
                    "enum": [
                      "MONTH"
                    ],
                    "description": "The expiration period."
                  },
                  "period_value": {
                    "type": "integer",
                    "description": "How many periods should pass before the expiration occurs."
                  },
                  "rounding_type": {
                    "type": "string",
                    "enum": [
                      "END_OF_MONTH",
                      "END_OF_QUARTER",
                      "END_OF_HALF_YEAR",
                      "END_OF_YEAR",
                      "PARTICULAR_MONTH"
                    ],
                    "description": "Round up expiration till the end of the given period type."
                  }
                }
              }
            }
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "code_config": {
            "type": "object",
            "description": "Defines code's pattern (prefix, suffix, length, charset, etc). ",
            "properties": {
              "length": {
                "type": "string",
                "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`."
              }
            }
          },
          "is_referral_code": {
            "type": "boolean",
            "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
          }
        }
      },
      "2_req_campaign_object_voucher_object_LOYALTY_CARD": {
        "type": "object",
        "description": "Schema model for a loyalty card.",
        "title": "Loyalty Card",
        "properties": {
          "type": {
            "type": "string",
            "default": "LOYALTY_CARD",
            "description": "Type of voucher."
          },
          "loyalty_card": {
            "description": "Defines the loyalty card details.",
            "type": "object",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Initial loyalty card income in points to be applied to the loyalty card at voucher generation."
              },
              "expiration_rules": {
                "type": "object",
                "description": "Defines point expiration rules.",
                "properties": {
                  "period_type": {
                    "type": "string",
                    "default": "MONTH",
                    "enum": [
                      "MONTH"
                    ],
                    "description": "The expiration period."
                  },
                  "period_value": {
                    "type": "integer",
                    "description": "How many periods should pass before the expiration occurs."
                  },
                  "rounding_type": {
                    "type": "string",
                    "enum": [
                      "END_OF_MONTH",
                      "END_OF_QUARTER",
                      "END_OF_HALF_YEAR",
                      "END_OF_YEAR",
                      "PARTICULAR_MONTH"
                    ],
                    "description": "Round up expiration till the end of the given period type."
                  }
                }
              }
            }
          },
          "redemption": {
            "type": "object",
            "description": "Defines the redemption limits on vouchers.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "code_config": {
            "type": "object",
            "description": "Defines code's pattern (prefix, suffix, length, charset, etc). ",
            "properties": {
              "length": {
                "type": "string",
                "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`."
              }
            }
          }
        }
      },
      "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."
          }
        }
      },
      "PromotionsTiersCreateRequestBody": {
        "title": "Promotions Tiers Create Request Body",
        "description": "Request body schema for **POST** `v1/v1/promotions/{campaignId}/tiers`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTierCreate"
          }
        ]
      },
      "PromotionsTiersCreateResponseBody": {
        "title": "Promotions Tiers Create Response Body",
        "description": "Response body schema for **POST** `v1/promotions/{campaignId}/tiers`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTier"
          }
        ]
      },
      "PromotionsTiersUpdateRequestBody": {
        "title": "Promotions Tiers Update Request Body",
        "description": "Request body schema for **PUT** `v1/promotions/tiers/{promotionTierId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTierUpdate"
          }
        ]
      },
      "PromotionsTiersUpdateResponseBody": {
        "title": "Promotions Tiers Update Response Body",
        "description": "Response body schema for **PUT** `v1/promotions/tiers/{promotionTierId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTier"
          }
        ]
      },
      "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](ref: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"
            }
          }
        }
      },
      "PromotionTierCreate": {
        "title": "Promotion Tier Create",
        "type": "object",
        "description": "This is an object representing a promotion tier. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTierCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "object",
                "description": "Contains details about the discount applied by the promotion tier.",
                "properties": {
                  "discount": {
                    "$ref": "#/components/schemas/Discount"
                  }
                }
              },
              "validation_rule_assignments": {
                "$ref": "#/components/schemas/ValidationRuleAssignmentsList"
              }
            }
          }
        ]
      },
      "PromotionTierCreateBase": {
        "title": "Promotion Tier Create Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the promotion tier."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website."
          },
          "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."
          },
          "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"
          },
          "category": {
            "type": "string",
            "description": "Assign a new or update the promotion tier's category using name.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "category_id": {
            "type": "string",
            "description": "Assign a new or update the promotion tier's category using id",
            "example": "cat_0c9da30e7116ba6bba"
          }
        },
        "required": [
          "name"
        ]
      },
      "PromotionTierUpdate": {
        "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 Update",
        "properties": {
          "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."
          },
          "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"
          },
          "validation_rule_assignments": {
            "$ref": "#/components/schemas/ValidationRuleAssignmentsList"
          },
          "category": {
            "type": "string",
            "description": "Assign a new or update the promotion tier's category using name.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "category_id": {
            "type": "string",
            "description": "Assign a new or update the promotion tier's category using id",
            "example": "cat_0c9da30e7116ba6bba"
          }
        }
      },
      "PromotionTierCreateParams": {
        "type": "object",
        "description": "This is an object representing a promotion tier create params. Promotion tiers are always assigned to a campaign and cannot be used standalone.",
        "title": "Promotion Tier Create Params",
        "properties": {
          "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."
          },
          "validation_rules": {
            "type": "array",
            "description": "Array containing the ID of the validation rule associated with the promotion tier.",
            "items": {
              "type": "string"
            }
          },
          "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"
          },
          "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."
          },
          "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"
          },
          "category": {
            "type": "string",
            "description": "Assign category to the promotion tier."
          },
          "category_id": {
            "type": "string",
            "description": "Instead of using the category name, you can alternatively assign a new category to a promotion tier using a unique category ID, i.e. `cat_0c9da30e7116ba6bba`.",
            "example": "cat_0c9da30e7116ba6bba"
          }
        },
        "required": [
          "name"
        ]
      },
      "3_res_list_promotion_tiers": {
        "type": "object",
        "description": "Promotion Tiers",
        "title": "Promotion Tiers",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "tiers",
            "description": "Identifies the name of the attribute that contains the array of promotion tier objects."
          },
          "tiers": {
            "type": "array",
            "description": "Contains array of promotion tier objects.",
            "items": {
              "$ref": "#/components/schemas/PromotionTier"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of promotion tiers."
          }
        }
      },
      "PromotionTiersList": {
        "type": "object",
        "description": "Promotion Tiers",
        "title": "Promotion Tiers",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about promotion tiers in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "tiers",
            "description": "Identifies the name of the attribute that contains the array of promotion tier objects."
          },
          "tiers": {
            "type": "array",
            "description": "Contains array of promotion tier objects.",
            "items": {
              "$ref": "#/components/schemas/PromotionTier"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of promotion tiers."
          },
          "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."
          }
        }
      },
      "4_obj_reward_object": {
        "title": "Reward Object",
        "type": "object",
        "description": "This is an object representing a reward.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
            "description": "Unique reward ID, assigned by Voucherify."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "type": {
            "type": "string",
            "enum": [
              "CAMPAIGN",
              "COIN",
              "MATERIAL"
            ],
            "description": "Reward type."
          },
          "parameters": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_COIN"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_MATERIAL"
              }
            ],
            "description": "Defines how the reward is generated."
          },
          "stock": {
            "type": "integer",
            "description": "Configurable for **material rewards**. The number of units of the product that you want to share as reward."
          },
          "redeemed": {
            "type": "integer",
            "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."
              }
            }
          },
          "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",
            "nullable": true,
            "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"
          },
          "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."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "The type of the object represented by the JSON. This object stores information about the reward."
          }
        }
      },
      "4_obj_reward_object_parameters_CAMPAIGN": {
        "title": "Digital",
        "type": "object",
        "description": "These are parameters representing a digital (CAMPAIGN) reward. These can be in the form of discount coupons, gift card credits, or loyalty point credits.",
        "properties": {
          "campaign": {
            "description": "Objects stores information about the campaign related to the reward.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN_DISCOUNT_COUPONS"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN_GIFT_VOUCHERS"
              },
              {
                "$ref": "#/components/schemas/4_obj_reward_object_parameters_CAMPAIGN_LOYALTY_PROGRAM"
              }
            ]
          }
        }
      },
      "4_obj_reward_object_parameters_CAMPAIGN_DISCOUNT_COUPONS": {
        "title": "Discount Coupons",
        "type": "object",
        "description": "These are parameters representing a discount coupon, which is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "DISCOUNT_COUPONS"
          }
        },
        "required": [
          "id",
          "type"
        ]
      },
      "4_obj_reward_object_parameters_CAMPAIGN_GIFT_VOUCHERS": {
        "title": "Gift Vouchers",
        "type": "object",
        "description": "These are parameters representing a gift card, which is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental amount to be added to the current balance on the gift card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "GIFT_VOUCHERS"
          }
        },
        "required": [
          "id",
          "balance",
          "type"
        ]
      },
      "4_obj_reward_object_parameters_CAMPAIGN_LOYALTY_PROGRAM": {
        "title": "Points on loyalty card",
        "type": "object",
        "description": "These are parameters representing points on a loyalty card, which is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental points to be added to the current balance on the loyalty card."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "LOYALTY_PROGRAM"
          }
        },
        "required": [
          "id",
          "balance",
          "type"
        ]
      },
      "4_obj_reward_object_parameters_COIN": {
        "title": "Pay with Points",
        "type": "object",
        "description": "These are parameters representing a Pay with Points (COIN) reward. ",
        "properties": {
          "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": "integer",
                "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."
              }
            }
          }
        }
      },
      "4_obj_reward_object_parameters_MATERIAL": {
        "title": "Material",
        "type": "object",
        "description": "These are parameters representing products as a (MATERIAL) reward.",
        "properties": {
          "product": {
            "type": "object",
            "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",
                "nullable": true,
                "description": "Unique SKU ID, assigned by Voucherify, of the SKU given as a reward.",
                "example": "sku_0b7d7dfb090be5c619"
              }
            }
          }
        }
      },
      "RewardsCreateRequestBody": {
        "title": "Rewards Create Request Body",
        "description": "Request body schema for **POST** `v1/rewards`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RewardsCreateRequestBodyDigital"
          },
          {
            "$ref": "#/components/schemas/RewardsCreateRequestBodyMaterial"
          },
          {
            "$ref": "#/components/schemas/RewardsCreateRequestBodyPayWithPoints"
          }
        ]
      },
      "RewardsCreateResponseBody": {
        "title": "Rewards Create Response Body",
        "description": "Response body schema for **POST** `v1/rewards`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Reward"
          }
        ]
      },
      "RewardsCreateRequestBodyDigital": {
        "title": "Digital Reward",
        "type": "object",
        "description": "Request body schema for creating a digital reward using **POST** `v1/rewards`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "parameters": {
            "$ref": "#/components/schemas/RewardsCreateRequestBodyDigitalParameters"
          },
          "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."
          }
        },
        "required": [
          "parameters"
        ]
      },
      "RewardsCreateRequestBodyPayWithPoints": {
        "title": "Pay with Points Reward",
        "type": "object",
        "description": "Request body schema for creating a pay with points reward using **POST** `v1/rewards`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "parameters": {
            "$ref": "#/components/schemas/RewardsCreateRequestBodyPayWithPointsParameters"
          },
          "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."
          }
        },
        "required": [
          "parameters"
        ]
      },
      "RewardsCreateRequestBodyMaterial": {
        "title": "Material Reward",
        "type": "object",
        "description": "Request body schema to create a material reward using\n **POST** `v1/rewards`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "parameters": {
            "$ref": "#/components/schemas/RewardsCreateRequestBodyMaterialParameters"
          },
          "stock": {
            "type": "integer",
            "description": "The number of units of the product that you want to share as a reward."
          },
          "attributes": {
            "type": "object",
            "description": "Attributes of a material reward.",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "HTTPS URL pointing to a .png or .jpg file."
              },
              "description": {
                "type": "string",
                "description": "Description of 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."
          }
        },
        "required": [
          "parameters"
        ]
      },
      "RewardsUpdateResponseBody": {
        "title": "Rewards Update Response Body",
        "description": "Response body schema for **PUT** `v1/rewards/{rewardId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Reward"
          }
        ]
      },
      "RewardsUpdateRequestBody": {
        "title": "Rewards Update Request Body",
        "description": "Request body schema for **PUT** `v1/rewards/{rewardId}`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RewardsUpdateRequestBodyDigital"
          },
          {
            "$ref": "#/components/schemas/RewardsUpdateRequestBodyMaterial"
          },
          {
            "$ref": "#/components/schemas/RewardsUpdateRequestBodyPayWithPoints"
          }
        ]
      },
      "RewardsUpdateRequestBodyDigital": {
        "title": "Digital Reward",
        "type": "object",
        "description": "Request body schema for updating a digital reward using **PUT** `v1/rewards/{rewardId}`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "parameters": {
            "$ref": "#/components/schemas/RewardsUpdateRequestBodyDigitalParameters"
          },
          "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."
          }
        }
      },
      "RewardsUpdateRequestBodyPayWithPoints": {
        "title": "Pay with Points Reward",
        "type": "object",
        "description": "Request body schema for updating a pay with points reward using **PUT** `v1/rewards/{rewardId}`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "parameters": {
            "$ref": "#/components/schemas/RewardsUpdateRequestBodyPayWithPointsParameters"
          },
          "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."
          }
        }
      },
      "RewardsUpdateRequestBodyMaterial": {
        "title": "Material Reward",
        "type": "object",
        "description": "Request body schema to update a material reward using **PUT** `v1/rewards/{rewardId}`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "parameters": {
            "$ref": "#/components/schemas/RewardsUpdateRequestBodyMaterialParameters"
          },
          "stock": {
            "type": "integer",
            "description": "The number of units of the product that you want to share as a reward."
          },
          "attributes": {
            "type": "object",
            "description": "Attributes of a material reward.",
            "properties": {
              "image_url": {
                "type": "string",
                "description": "HTTPS URL pointing to a .png or .jpg file."
              },
              "description": {
                "type": "string",
                "description": "Description of 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."
          }
        }
      },
      "RewardsUpdateRequestBodyDigitalParametersLoyaltyProgram": {
        "title": "Points on loyalty card",
        "type": "object",
        "description": "Configure a reward that adds points to a loyalty card. This type of reward is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assign the reward to the campaign that contains the loyalty cards that will be replenished by the reward. Provide the unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental points to be added to the current balance on the loyalty card."
          }
        },
        "required": [
          "id",
          "balance"
        ]
      },
      "RewardsUpdateRequestBodyDigitalParametersGiftVouchers": {
        "title": "Gift Vouchers",
        "type": "object",
        "description": "Configure a reward that adds cash to a gift card. This type of reward is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assign the reward to the campaign that contains the gift cards that will be replenished by the reward. Provide the unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental amount to be added to the current balance on the gift card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          }
        },
        "required": [
          "id",
          "balance"
        ]
      },
      "RewardsUpdateRequestBodyDigitalParametersDiscountCoupons": {
        "title": "Discount Coupons",
        "type": "object",
        "description": "Configure a reward that provides a discount coupon. This type of reward is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assign the reward to the campaign that contains the vouchers that will be the source of the reward. Provide the unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          }
        },
        "required": [
          "id"
        ]
      },
      "RewardsUpdateRequestBodyDigitalParameters": {
        "title": "Digital Reward",
        "type": "object",
        "description": "Configure a digital (CAMPAIGN) reward. These can be in the form of discount coupons, gift card credits, or loyalty point credits.",
        "properties": {
          "campaign": {
            "description": "Objects stores information about the campaign related to the reward.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RewardsUpdateRequestBodyDigitalParametersLoyaltyProgram"
              },
              {
                "$ref": "#/components/schemas/RewardsUpdateRequestBodyDigitalParametersGiftVouchers"
              },
              {
                "$ref": "#/components/schemas/RewardsUpdateRequestBodyDigitalParametersDiscountCoupons"
              }
            ]
          }
        },
        "required": [
          "campaign"
        ]
      },
      "RewardsUpdateRequestBodyMaterialParameters": {
        "title": "Material Reward",
        "type": "object",
        "description": "Configure parameters representing products as a (MATERIAL) reward.",
        "properties": {
          "product": {
            "type": "object",
            "description": "Define the product given as a reward.",
            "properties": {
              "id": {
                "type": "string",
                "example": "prod_0b7d7dfb05cbe5c616",
                "description": "Unique product ID, assigned by Voucherify, given as a reward."
              },
              "sku_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique SKU ID, assigned by Voucherify, of the SKU given as a reward.",
                "example": "sku_0b7d7dfb090be5c619"
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "product"
        ]
      },
      "RewardsUpdateRequestBodyPayWithPointsParameters": {
        "title": "Pay with Points Reward",
        "type": "object",
        "description": "Configure parameters representing a Pay with Points (COIN) reward. ",
        "properties": {
          "coin": {
            "type": "object",
            "description": "Define the ratio by mapping the number of loyalty points in `points_ratio` to a predefined cash amount in `exchange_ratio`.",
            "properties": {
              "exchange_ratio": {
                "type": "string",
                "description": "The cash equivalent of the points defined in the `points_ratio` property."
              },
              "points_ratio": {
                "type": "string",
                "description": "The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property."
              }
            },
            "required": [
              "exchange_ratio"
            ]
          }
        },
        "required": [
          "coin"
        ]
      },
      "RewardsCreateRequestBodyDigitalParametersLoyaltyProgram": {
        "title": "Points on loyalty card",
        "type": "object",
        "description": "Configure a reward that adds points to a loyalty card. This type of reward is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assign the reward to the campaign that contains the loyalty cards that will be replenished by the reward. Provide the unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental points to be added to the current balance on the loyalty card."
          }
        },
        "required": [
          "id",
          "balance"
        ]
      },
      "RewardsCreateRequestBodyDigitalParametersGiftVouchers": {
        "title": "Gift Vouchers",
        "type": "object",
        "description": "Configure a reward that adds cash to a gift card. This type of reward is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assign the reward to the campaign that contains the gift cards that will be replenished by the reward. Provide the unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          },
          "balance": {
            "type": "integer",
            "description": "The incremental amout to be added to the current balance on the gift card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          }
        },
        "required": [
          "id",
          "balance"
        ]
      },
      "RewardsCreateRequestBodyDigitalParametersDiscountCoupons": {
        "title": "Discount Coupons",
        "type": "object",
        "description": "Configure a reward that provides a discount coupon. This type of reward is a subset of a Digital (CAMPAIGN) reward.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Assign the reward to the campaign that contains the vouchers that will be the source of the reward. Provide the unique campaign ID, assigned by Voucherify.",
            "example": "camp_13BbZ0kQsNinhqsX3wUts2UP"
          }
        },
        "required": [
          "id"
        ]
      },
      "RewardsCreateRequestBodyDigitalParameters": {
        "title": "Digital Reward",
        "type": "object",
        "description": "Configure a digital (CAMPAIGN) reward. These can be in the form of discount coupons, gift card credits, or loyalty point credits.",
        "properties": {
          "campaign": {
            "description": "Objects stores information about the campaign related to the reward.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RewardsCreateRequestBodyDigitalParametersLoyaltyProgram"
              },
              {
                "$ref": "#/components/schemas/RewardsCreateRequestBodyDigitalParametersGiftVouchers"
              },
              {
                "$ref": "#/components/schemas/RewardsCreateRequestBodyDigitalParametersDiscountCoupons"
              }
            ]
          }
        },
        "required": [
          "campaign"
        ]
      },
      "RewardsCreateRequestBodyMaterialParameters": {
        "title": "Material Reward",
        "type": "object",
        "description": "Configure parameters representing products as a (MATERIAL) reward.",
        "properties": {
          "product": {
            "type": "object",
            "description": "Define the product given as a reward.",
            "properties": {
              "id": {
                "type": "string",
                "example": "prod_0b7d7dfb05cbe5c616",
                "description": "Unique product ID, assigned by Voucherify, given as a reward."
              },
              "sku_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique SKU ID, assigned by Voucherify, of the SKU given as a reward.",
                "example": "sku_0b7d7dfb090be5c619"
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "product"
        ]
      },
      "RewardsCreateRequestBodyPayWithPointsParameters": {
        "title": "Pay with Points Reward",
        "type": "object",
        "description": "Configure parameters representing a Pay with Points (COIN) reward. ",
        "properties": {
          "coin": {
            "type": "object",
            "description": "Define the ratio by mapping the number of loyalty points in `points_ratio` to a predefined cash amount in `exchange_ratio`.",
            "properties": {
              "exchange_ratio": {
                "type": "string",
                "description": "The cash equivalent of the points defined in the `points_ratio` property."
              },
              "points_ratio": {
                "type": "string",
                "description": "The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property."
              }
            },
            "required": [
              "exchange_ratio"
            ]
          }
        },
        "required": [
          "coin"
        ]
      },
      "4_obj_reward_assignment_object": {
        "title": "Reward Assignment Object",
        "type": "object",
        "description": "This is an object representing a reward assignment.",
        "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"
          },
          "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.",
            "example": "campaign"
          },
          "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."
                  }
                }
              }
            }
          },
          "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",
            "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",
            "default": "reward_assignment",
            "description": "The type of the object represented by the JSON. This object stores information about the reward assignment."
          }
        }
      },
      "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",
            "nullable": true,
            "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"
        ]
      },
      "RewardAssignment": {
        "title": "Reward Assignment",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignmentBase"
          },
          {
            "$ref": "#/components/schemas/RewardAssignmentParameters"
          }
        ],
        "type": "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",
                    "nullable": true,
                    "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"
            ]
          }
        }
      },
      "RewardsAssignmentsCreateDigitalOrMaterialRewardRequestBody": {
        "description": "Request body schema for **POST** `v1/rewards/{rewardID}/assignments`.",
        "title": "Digital Or Material Reward",
        "properties": {
          "campaign": {
            "type": "string",
            "description": "The campaign ID of the campaign to which the reward is to be assigned."
          },
          "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",
                    "minimum": 1,
                    "description": "Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed. Must be positive integer."
                  },
                  "auto_redeem": {
                    "type": "boolean",
                    "nullable": true,
                    "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": [
          "campaign",
          "parameters"
        ]
      },
      "RewardsAssignmentsCreateCoinRewardRequestBody": {
        "title": "Pay with Points Reward",
        "description": "Request body schema for **POST** `v1/rewards/{rewardID}/assignments`.",
        "type": "object",
        "properties": {
          "campaign": {
            "type": "string",
            "description": "The campaign ID of the campaign to which the reward is to be assigned."
          },
          "validation_rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "campaign"
        ]
      },
      "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.",
            "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"
        ]
      },
      "CreatePublicationWithSpecificVoucher": {
        "title": "Create Publication With Specific Voucher",
        "type": "object",
        "description": "Create publication with specific voucher.",
        "allOf": [
          {
            "title": "Voucher code",
            "type": "object",
            "properties": {
              "voucher": {
                "description": "Code of the voucher being published.",
                "type": "string"
              }
            },
            "required": [
              "voucher"
            ]
          },
          {
            "$ref": "#/components/schemas/CreatePublicationBase"
          }
        ]
      },
      "CreatePublicationCampaign": {
        "title": "Create Publication Campaign",
        "type": "object",
        "description": "Create publication with campaign.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of voucher's parent campaign or unique campaign ID that was assigned by Voucherify.",
            "example": "camp_dphuwqH7BOVkgh4JmpDtS32l"
          },
          "count": {
            "type": "integer",
            "description": "Number of vouchers to be published to customer.",
            "minimum": 1,
            "maximum": 20
          }
        },
        "required": [
          "name"
        ]
      },
      "CreatePublicationWithCampaign": {
        "title": "Create Publication With Campaign",
        "type": "object",
        "description": "Create publication with campaign.",
        "allOf": [
          {
            "title": "Campaign",
            "type": "object",
            "properties": {
              "campaign": {
                "$ref": "#/components/schemas/CreatePublicationCampaign"
              }
            },
            "required": [
              "campaign"
            ]
          },
          {
            "$ref": "#/components/schemas/CreatePublicationBase"
          }
        ]
      },
      "PublicationsCreateRequestBody": {
        "title": "Publications Create Request Body",
        "description": "Request body schema for **POST** `v1/publications`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreatePublicationWithSpecificVoucher"
          },
          {
            "$ref": "#/components/schemas/CreatePublicationWithCampaign"
          }
        ]
      },
      "ClientPublicationsCreateRequestBody": {
        "title": "Client Publications Create Request Body",
        "description": "Request body schema for **POST** `v1/publish`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreatePublicationWithSpecificVoucher"
          },
          {
            "$ref": "#/components/schemas/CreatePublicationWithCampaign"
          }
        ]
      },
      "PublicationsCreateVoucherResponseBody": {
        "title": "Publications Create Voucher Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `v1/publication` and **GET** `v1/publications/create`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicationsCreateBaseResponseBody"
          },
          {
            "type": "object",
            "properties": {
              "voucher": {
                "$ref": "#/components/schemas/Voucher"
              }
            },
            "required": [
              "voucher"
            ]
          }
        ]
      },
      "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",
            "nullable": true,
            "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"
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
        ]
      },
      "ListPublicationsItemValidMultipleVouchers": {
        "title": "Valid Multiple Vouchers",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ListPublicationsItemBase"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "type": "string",
                "default": "SUCCESS",
                "enum": [
                  "SUCCESS"
                ],
                "description": "Status of the publication attempt."
              },
              "vouchers": {
                "type": "array",
                "description": "Contains the unique voucher codes that was assigned by Voucherify.",
                "items": {
                  "type": "string",
                  "example": "Q1K4XT5S"
                }
              }
            },
            "required": [
              "result",
              "vouchers"
            ]
          }
        ]
      },
      "ListPublicationsItemInvalid": {
        "title": "Invalid",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ListPublicationsItemBase"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "type": "string",
                "default": "FAILURE",
                "enum": [
                  "FAILURE"
                ],
                "description": "Status of the publication attempt."
              },
              "failure_code": {
                "type": "string",
                "description": "Generic reason as to why the create publication operation failed."
              },
              "failure_message": {
                "type": "string",
                "description": "This parameter will provide more expanded reason as to why the create publication operation failed."
              }
            },
            "required": [
              "result",
              "vouchers"
            ]
          }
        ]
      },
      "PublicationsCreateBaseResponseBody": {
        "title": "Publications Create Base Response Body",
        "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."
          },
          "channel": {
            "type": "string",
            "description": "How the publication was originated. It can be your own custom channel or an example value provided here.",
            "default": "API",
            "enum": [
              "API"
            ]
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "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. "
          },
          "result": {
            "type": "string",
            "default": "SUCCESS",
            "enum": [
              "SUCCESS"
            ],
            "description": "Status of the publication attempt."
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          },
          "vouchers_id": {
            "type": "array",
            "description": "Contains the unique internal voucher ID that was assigned by Voucherify.",
            "items": {
              "type": "string",
              "example": "v_Bw3qWZWv47yb1Onra8F2LlFI1enLakfA"
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "customer_id",
          "metadata",
          "channel",
          "source_id",
          "result",
          "customer",
          "vouchers_id"
        ]
      },
      "PublicationsCreateVouchersResponseBody": {
        "title": "Publications Create Vouchers Response Body",
        "description": "Response body schema for **POST** `v1/publication` and **GET** `v1/publications/create`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PublicationsCreateBaseResponseBody"
          },
          {
            "type": "object",
            "properties": {
              "vouchers": {
                "type": "array",
                "description": "Contains the unique voucher codes that was assigned by Voucherify.",
                "items": {
                  "type": "string",
                  "example": "Q1K4XT5S"
                }
              }
            },
            "required": [
              "vouchers"
            ]
          }
        ]
      },
      "PublicationsCreateResponseBody": {
        "title": "Publications Create Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `v1/publication` and **GET** `v1/publications/create`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PublicationsCreateVoucherResponseBody"
          },
          {
            "$ref": "#/components/schemas/PublicationsCreateVouchersResponseBody"
          }
        ]
      },
      "ClientPublicationsCreateResponseBody": {
        "title": "Client Publications Create Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `v1/publish`",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PublicationsCreateVoucherResponseBody"
          },
          {
            "$ref": "#/components/schemas/PublicationsCreateVouchersResponseBody"
          }
        ]
      },
      "PublicationsListResponseBody": {
        "type": "object",
        "description": "Response body schema for listing publications using **GET** `v1/publications`.",
        "title": "Publications List Response Body",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about publications in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "publications",
            "description": "Identifies the name of the attribute that contains the array of publications."
          },
          "publications": {
            "type": "array",
            "description": "Contains array of publication objects, voucher object will be simplified.",
            "items": {
              "title": "Publications List Response Body Publications Item",
              "description": "Response schema model for publishing vouchers to a specific customer.",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ListPublicationsItemValidSingleVoucher"
                },
                {
                  "$ref": "#/components/schemas/ListPublicationsItemValidMultipleVouchers"
                },
                {
                  "$ref": "#/components/schemas/ListPublicationsItemInvalid"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of publications."
          }
        },
        "required": [
          "object",
          "data_ref",
          "publications",
          "total"
        ]
      },
      "6_req_validate_voucher_customer_id": {
        "title": "Customer ID",
        "description": "You can pass the unique customer ID that was assigned by Voucherify.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of an existing customer that will be linked to redemption in this request.",
            "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
          }
        }
      },
      "6_req_rollback_redemption_customer_id": {
        "title": "Customer ID",
        "description": "You can pass the unique customer ID that was assigned by Voucherify.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The ID of an existing customer that will be linked to redemption rollback in this request.",
            "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
          }
        }
      },
      "6_req_validate_voucher_customer_source_id": {
        "title": "Customer Source ID",
        "description": "You can send the source ID that you used to create the customer in Voucherify.",
        "type": "object",
        "properties": {
          "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."
          }
        }
      },
      "6_req_rollback_redemption_customer_source_id": {
        "title": "Customer Source ID",
        "description": "You can send the source ID that you used to create the customer in Voucherify.",
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique identifier of a customer that redeemed a resource. It can be a customer ID or email from a CRM system, database or 3rd-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored."
          }
        }
      },
      "6_req_validate_voucher_order_id": {
        "title": "Order ID",
        "description": "You can pass the unique order ID that was assigned by Voucherify.",
        "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."
          }
        }
      },
      "6_req_validate_voucher_order_source_id": {
        "title": "Order Source ID",
        "description": "You can send the source ID that you used to create the order in Voucherify.",
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "Unique source ID of an existing order that will be linked to the redemption of this request."
          }
        }
      },
      "6_req_rollback_redemption_order_id": {
        "title": "Order ID",
        "description": "You can pass the unique order ID that was assigned by Voucherify.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID assigned by Voucherify of an existing order that will be linked to the redemption rollback of this request."
          },
          "status": {
            "type": "string",
            "description": "After a redemption rollback, Voucherify will default the order status to `CANCELED`. You can set the order status to one of the other options: `CREATED`, `PAID`, `FULFILLED`.",
            "enum": [
              "CREATED",
              "PAID",
              "FULFILLED"
            ]
          }
        }
      },
      "6_req_rollback_redemption_order_source_id": {
        "title": "Order Source ID",
        "description": "You can send the source ID that you used to create the order in Voucherify.",
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "Unique source ID of an existing order that will be linked to the redemption rollback of this request."
          },
          "status": {
            "type": "string",
            "description": "After a redemption rollback, Voucherify will default the order status to `CANCELED`. You can set the order status to one of the other options: `CREATED`, `PAID`, `FULFILLED`.",
            "enum": [
              "CREATED",
              "PAID",
              "FULFILLED"
            ]
          }
        }
      },
      "6_req_session_lock_discount_code": {
        "title": "Discount Code Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).",
        "properties": {
          "type": {
            "type": "string",
            "description": "This parameter is **required** to establish a new session. The session locks the redemption **quantity** by 1.",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ]
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_req_session_lock_gift_card": {
        "title": "Gift Card Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).",
        "properties": {
          "type": {
            "type": "string",
            "description": "This parameter is **required** to establish a new session. The session locks the redemption **quantity** by 1 and the redemption **gift credits** specified within the request.",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ]
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_req_session_lock_loyalty_card": {
        "title": "Loyalty Card Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object is **required** to establish a session between multiple parallel validation and redemption requests. If you only send the `type` parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a [validation session](doc:locking-validation-session).",
        "properties": {
          "type": {
            "type": "string",
            "description": "This parameter is **required** to establish a new session. The session locks the redemption **quantity** by 1 and the redemption **loyalty points** specified within the request.",
            "default": "LOCK",
            "enum": [
              "LOCK"
            ]
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_res_session_lock_discount_voucher": {
        "title": "Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.",
        "properties": {
          "type": {
            "type": "string",
            "description": "This session locks the redemption **quantity** by 1.",
            "default": "LOCK"
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. ",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_res_session_lock_gift_card": {
        "title": "Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.",
        "properties": {
          "type": {
            "type": "string",
            "description": "This session locks the redemption **quantity** by 1 and the redemption **gift credits** specified within the request.",
            "default": "LOCK"
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_res_session_lock_loyalty_card": {
        "title": "Session Lock",
        "type": "object",
        "description": "Schema model for `session` lock object. The session object contains information about the session key that was used to establish a session between multiple parallel validation and redemption requests.",
        "properties": {
          "type": {
            "type": "string",
            "description": "This session locks the redemption **quantity** by 1 and the redemption **loyalty points** specified within the request.",
            "default": "LOCK"
          },
          "key": {
            "type": "string",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.",
            "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts"
          },
          "ttl_unit": {
            "type": "string",
            "description": "Defines the type of unit in which the session time is counted.",
            "enum": [
              "HOURS",
              "DAYS",
              "MINUTES",
              "SECONDS",
              "MILLISECONDS",
              "MICROSECONDS",
              "NANOSECONDS"
            ]
          },
          "ttl": {
            "type": "integer",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session.ttl_unit` parameter."
          }
        }
      },
      "6_res_validate_voucher_false": {
        "type": "object",
        "title": "Not Valid",
        "description": "Response schema for a voucher that is not valid.",
        "properties": {
          "valid": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "reason": {
            "type": "string",
            "description": "System generated cause for the voucher being invalid in the context of the provided parameters."
          },
          "error": {
            "type": "object",
            "description": "Detailed failure cause for the invalid voucher if the reason has a translation defined in the Dashboard &rarr; Project Settings &rarr; Error Messages.",
            "properties": {
              "message": {
                "type": "string",
                "description": "Customized error message."
              }
            }
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "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."
          }
        }
      },
      "6_res_validate_voucher_discount_amount": {
        "title": "Amount Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "AMOUNT",
            "description": "Defines the type of the voucher."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the discount is applied to the customer's order.",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS",
              "APPLY_TO_ITEMS_PROPORTIONALLY",
              "APPLY_TO_ITEMS_PROPORTIONALLY_BY_QUANTITY",
              "APPLY_TO_ITEMS_BY_QUANTITY"
            ]
          },
          "amount_off": {
            "type": "integer",
            "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. "
          }
        }
      },
      "6_res_validate_voucher_discount_percent": {
        "title": "Percent Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "PERCENT",
            "description": "Defines the type of the voucher."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "percent_off": {
            "type": "integer",
            "description": "The percent discount that the customer will receive."
          },
          "amount_limit": {
            "type": "integer",
            "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."
          },
          "is_dynamic": {
            "type": "boolean",
            "description": "Flag indicating whether the discount was calculated using a formula."
          }
        }
      },
      "6_res_validate_voucher_discount_fixed": {
        "title": "Fixed Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value. A fixed discounts sets a fixed total on cart or item(s) and then calculates the discount to apply.",
        "properties": {
          "type": {
            "type": "string",
            "default": "FIXED",
            "description": "Type of discount."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_ORDER",
              "APPLY_TO_ITEMS"
            ],
            "description": "Defines how the discount is applied to the customer's order.    \n    \n| **Effect** | **Definition** |\n|---|---|\n| **APPLY_TO_ORDER** | Sets the order total amount to the value of the fixed amount. The discount value is calculated during the redemption as it's a difference between the total amount of the customer's order and the fixed amount. |\n| **APPLY_TO_ITEMS** | Sets a new price on items. The total discount amount is calculated during the redemption and it's a difference between the initial item price and the fixed amount. |"
          },
          "fixed_amount": {
            "type": "integer",
            "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."
          }
        }
      },
      "6_res_validate_voucher_discount_unit": {
        "title": "Unit Discount, single item",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_product"
          },
          {
            "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_sku"
          }
        ]
      },
      "6_res_validate_voucher_discount_unit_product": {
        "title": "Unit Discount, Product",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "prod_0a9f9ab4ab019a42d5",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "type": "object",
            "description": "Contains information about the product.",
            "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."
              }
            }
          }
        }
      },
      "6_res_validate_voucher_discount_unit_sku": {
        "title": "Unit Discount, SKU",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "sku_0bae3b28f610fd0da1",
            "description": "The product variant deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "sku": {
            "type": "object",
            "description": "Contains information about the SKU.",
            "properties": {
              "id": {
                "type": "string",
                "example": "sku_0bae3b28f610fd0da1",
                "description": "Unique SKU ID, assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "Product variant's source ID."
              },
              "sku": {
                "type": "string",
                "description": "Product varient's name."
              }
            }
          },
          "product": {
            "type": "object",
            "description": "Contains information about the parent product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique parent product ID, assigned by Voucherify.",
                "example": "prod_0bae2dc5a090fd0184"
              },
              "source_id": {
                "type": "string",
                "description": "Source ID of parent product."
              },
              "name": {
                "type": "string",
                "description": "Name of parent product."
              }
            }
          }
        }
      },
      "6_res_validate_voucher_discount_unit_multiple": {
        "title": "Unit Discount, multiple items",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "default": "ADD_MANY_ITEMS",
            "description": "Defines how the discount is applied to the customer's order."
          },
          "units": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_product_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_sku_multiple"
              }
            ]
          }
        }
      },
      "6_res_validate_voucher_discount_unit_product_multiple": {
        "title": "Product Item",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "prod_0a9f9ab4ab019a42d5",
            "description": "The product deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "product": {
            "type": "object",
            "description": "Contains information about the product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique product ID, assigned by Voucherify.",
                "example": "prod_0a9f9ab4ab019a42d5"
              },
              "source_id": {
                "type": "string",
                "description": "Product's source ID."
              },
              "name": {
                "type": "string",
                "description": "Product name."
              }
            }
          }
        }
      },
      "6_res_validate_voucher_discount_unit_sku_multiple": {
        "title": "SKU Item",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "effect": {
            "type": "string",
            "enum": [
              "ADD_MISSING_ITEMS",
              "ADD_NEW_ITEMS"
            ],
            "description": "Defines how the unit is added to the customer's order."
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount."
          },
          "unit_type": {
            "type": "string",
            "example": "sku_0bae3b28f610fd0da1",
            "description": "The product variant deemed as free, chosen from product inventory (e.g. time, items)."
          },
          "sku": {
            "type": "object",
            "description": "Contains information about the SKU.",
            "properties": {
              "id": {
                "type": "string",
                "example": "sku_0bae3b28f610fd0da1",
                "description": "Unique SKU ID, assigned by Voucherify."
              },
              "source_id": {
                "type": "string",
                "description": "Product variant's source ID."
              },
              "sku": {
                "type": "string",
                "description": "Product varient's name."
              }
            }
          },
          "product": {
            "type": "object",
            "description": "Contains information about the parent product.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique parent product ID, assigned by Voucherify.",
                "example": "prod_0b7d7dfb05cbe5c616"
              },
              "source_id": {
                "type": "string",
                "description": "Source ID of parent product."
              },
              "name": {
                "type": "string",
                "description": "Name of parent product."
              }
            }
          }
        }
      },
      "6_res_validate_voucher_discount_shipping": {
        "title": "Shipping Discount",
        "type": "object",
        "description": "This is an object representing the discount that the customer would receive in the context of the provided request body parameters. If the discount is calculated based on a formula, this object will return either the discount calculated based on the formula or the fallback value.",
        "properties": {
          "type": {
            "type": "string",
            "default": "UNIT",
            "description": "Discount type."
          },
          "effect": {
            "type": "string",
            "description": "Defines how the unit is added to the customer's order.",
            "default": "ADD_MISSING_ITEMS"
          },
          "unit_off": {
            "type": "integer",
            "description": "Number of units to be granted a full value discount.",
            "default": 1
          },
          "unit_type": {
            "type": "string",
            "description": "The shipping \"product\" deemed as free.",
            "default": "prod_5h1pp1ng"
          },
          "product": {
            "type": "object",
            "description": "Contains information about the shipping \"product\".",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique shipping \"product\" ID, assigned by Voucherify.",
                "default": "prod_5h1pp1ng"
              },
              "source_id": {
                "type": "string",
                "description": "\"Product's\" source ID.",
                "default": "5h1pp1ng"
              },
              "name": {
                "type": "string",
                "description": "\"Product\" name.",
                "default": "Shipping"
              }
            }
          }
        }
      },
      "6_res_validate_voucher": {
        "title": "Valid",
        "description": "Response schema model for validating a voucher using **POST** `v1/vouchers/{code}/validate`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/6_res_validate_voucher_discount_code"
          },
          {
            "$ref": "#/components/schemas/6_res_validate_voucher_gift_card"
          },
          {
            "$ref": "#/components/schemas/6_res_validate_voucher_loyalty_card"
          }
        ]
      },
      "6_res_validate_voucher_discount_code": {
        "type": "object",
        "title": "Valid - Discount Code",
        "description": "Response schema model for validating a discount code using **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "order": {
            "$ref": "#/components/schemas/6_obj_order_object"
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_amount"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_percent"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_shipping"
              }
            ],
            "description": "Contains information about the discount to be applied to the order."
          },
          "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."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-04T00:00:00.000Z",
            "description": "Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is _inactive_ before this date."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-31T00:00:00.000Z",
            "description": "Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is _inactive_ after this date."
          },
          "campaign": {
            "type": "string",
            "description": "Voucher's parent campaign name."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_W8DJVd8J0btqXT6FBwn7BSkC",
            "description": "Voucher's parent campaign's unique ID."
          },
          "session": {
            "$ref": "#/components/schemas/6_res_session_lock_discount_voucher"
          }
        }
      },
      "6_res_validate_voucher_gift_card": {
        "type": "object",
        "title": "Valid - Gift Card",
        "description": "Response schema model for validating a gift card using **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "order": {
            "$ref": "#/components/schemas/6_obj_order_object"
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "gift": {
            "type": "object",
            "description": "Contains current gift card balance information.",
            "properties": {
              "amount": {
                "type": "integer",
                "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`."
              },
              "balance": {
                "type": "integer",
                "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."
              }
            }
          },
          "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."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-04T00:00:00.000Z",
            "description": "Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is _inactive_ before this date."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-31T00:00:00.000Z",
            "description": "Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is _inactive_ after this date."
          },
          "campaign": {
            "type": "string",
            "description": "Voucher's parent campaign name."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_W8DJVd8J0btqXT6FBwn7BSkC",
            "description": "Voucher's parent campaign's unique ID."
          },
          "session": {
            "$ref": "#/components/schemas/6_res_session_lock_gift_card"
          }
        }
      },
      "6_res_validate_voucher_loyalty_card": {
        "type": "object",
        "title": "Valid - Loyalty Card",
        "description": "Response schema model for validating a loyalty card using **POST** `v1/vouchers/{code}/validate`.",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Indicates whether the voucher is valid within the context of the parameters provided in the request body."
          },
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "order": {
            "$ref": "#/components/schemas/6_obj_order_object_apply_to_order"
          },
          "code": {
            "type": "string",
            "description": "Voucher code."
          },
          "loyalty": {
            "type": "object",
            "description": "Contains the cost of reward in points.",
            "properties": {
              "points_cost": {
                "type": "integer",
                "description": "Number of points that wlil be deducted from loyaty card for the associated reward."
              }
            }
          },
          "reward": {
            "type": "object",
            "description": "Contains information about the reward that is being validated.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique reward ID assigned by Voucherify.",
                "example": "rew_Crmu3hu2FKZWZIML59AeAs1n"
              },
              "assignment_id": {
                "type": "string",
                "example": "rewa_xZr6Ks0j5AHeMRVdELmpI9sc",
                "description": "Unique reward assignment ID assigned by Voucherify."
              },
              "points": {
                "type": "integer",
                "description": "Number of points applied to the reward."
              }
            }
          },
          "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."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-04T00:00:00.000Z",
            "description": "Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is _inactive_ before this date."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-31T00:00:00.000Z",
            "description": "Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is _inactive_ after this date."
          },
          "campaign": {
            "type": "string",
            "description": "Voucher's parent campaign name."
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_W8DJVd8J0btqXT6FBwn7BSkC",
            "description": "Voucher's parent campaign's unique ID."
          },
          "session": {
            "$ref": "#/components/schemas/6_res_session_lock_loyalty_card"
          }
        }
      },
      "6_res_applicable_to_object": {
        "title": "Included  Items",
        "type": "object",
        "description": "Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.",
        "properties": {
          "data": {
            "type": "array",
            "description": "Contains array of items to which the discount can apply.",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/6_res_product_collection"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_collection_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_collection_fixed_amount"
                },
                {
                  "$ref": "#/components/schemas/6_res_product"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_fixed_amount"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_unit"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_unit_fixed_amount"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of objects defining included products, SKUs, or product collections."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of included objects."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about included products, SKUs, or product collections in a dictionary."
          }
        }
      },
      "6_res_inapplicable_to_object": {
        "title": "Excluded Items",
        "type": "object",
        "description": "Contains list of items that **do not** qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These **CANNOT** be discounted.",
        "properties": {
          "data": {
            "description": "Contains array of items to which the discount cannot apply.",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/6_res_product_collection_excluded"
                },
                {
                  "$ref": "#/components/schemas/6_res_product_excluded"
                },
                {
                  "$ref": "#/components/schemas/6_res_sku_excluded"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of objects defining excluded products, SKUs, or product collections."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of excluded objects."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about excluded products, SKUs, or product collections in a dictionary."
          }
        }
      },
      "6_res_product_collection": {
        "title": "Product Collection",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_collection_unit": {
        "title": "Product Collection for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          }
        }
      },
      "6_res_product_collection_fixed_amount": {
        "title": "Product Collection for Fixed Amount Discount",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "price": {
            "type": "integer",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the `price_formula` parameter is present in the fixed price definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "string",
            "description": "Formula used to calculate the discounted price of an item.",
            "example": "\"IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_collection_excluded": {
        "title": "Product Collection",
        "type": "object",
        "description": "Contains definition for a product collection.",
        "properties": {
          "object": {
            "type": "string",
            "default": "products_collection",
            "description": "This object stores information about the product collection."
          },
          "id": {
            "type": "string",
            "example": "pc_4ndRXAsTOzwSdHcQcxf489uU",
            "description": "Unique product collection ID assigned by Voucherify."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku": {
        "title": "SKU",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku_unit": {
        "title": "SKU for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          }
        }
      },
      "6_res_sku_unit_fixed_amount": {
        "title": "SKU for Amount Discount",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "price": {
            "type": "integer",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the `price_formula` parameter is present in the fixed price definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "string",
            "description": "Formula used to calculate the discounted price of an item.",
            "example": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.2;6)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_sku_excluded": {
        "title": "SKU",
        "type": "object",
        "description": "Contains definition for a product variant.",
        "properties": {
          "object": {
            "type": "string",
            "default": "sku",
            "description": "This object stores information about the product variant."
          },
          "id": {
            "type": "string",
            "description": "Unique SKU ID assigned by Voucherify.",
            "example": "sku_0b7d7dfb090be5c619"
          },
          "source_id": {
            "type": "string",
            "description": "The source ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product": {
        "title": "Product",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_unit": {
        "title": "Product for Unit Discount",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          }
        }
      },
      "6_res_product_fixed_amount": {
        "title": "Product for Fixed Amount Discount",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This object stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "price": {
            "type": "integer",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the `price_formula` parameter is present in the fixed price definition, this value becomes the **fallback value**. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "string",
            "description": "Formula used to calculate the discounted price of an item.",
            "example": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)"
          },
          "effect": {
            "type": "string",
            "enum": [
              "APPLY_TO_EVERY",
              "APPLY_TO_CHEAPEST",
              "APPLY_TO_MOST_EXPENSIVE"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_res_product_excluded": {
        "title": "Product",
        "type": "object",
        "description": "Contains definition for a product.",
        "properties": {
          "object": {
            "type": "string",
            "default": "product",
            "description": "This product stores information about the product."
          },
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0bae2dc5a090fd0184"
          },
          "source_id": {
            "type": "string",
            "description": "The product ID from your inventory system."
          },
          "effect": {
            "type": "string",
            "default": "APPLY_TO_EVERY",
            "enum": [
              "APPLY_TO_EVERY"
            ],
            "description": "Defines how the discount is applied to the customer's order."
          }
        }
      },
      "6_obj_order_object": {
        "title": "Order object",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/6_obj_order_object_apply_to_order"
          },
          {
            "$ref": "#/components/schemas/6_obj_order_object_apply_to_items"
          }
        ]
      },
      "6_obj_order_object_apply_to_order": {
        "type": "object",
        "title": "Order object - Effect: Apply to order",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "status": {
            "type": "string",
            "description": "Order status. This parameter is returned if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body or if you send the request body parameter when defining an order in the request body. This parameter can be passed but it's not required for validation at all. It's used in the redemption process. Normally after the redemption is done, the order is automatically to a `PAID` status. To avoid such default behaviour, the user can pass any of the other status options and it will be set the order status after the redemption instead of the default `PAID`.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order."
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after applying all the discounts.  \n`total_amount` = `amount` - `total_discount_amount`"
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "This field sums up all order-level discounts applied to the order."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order. Each order item can show the effects of particular discounts on the item-level.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "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`"
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          }
        }
      },
      "6_obj_order_object_apply_to_items": {
        "type": "object",
        "title": "Order object - Effect: Apply to items",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "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. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format. This parameter is returned only if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body."
          },
          "status": {
            "type": "string",
            "description": "Order status. This parameter is returned if you use the order ID parameter of an already created and synced order in the Voucherify application, i.e by sending the `order.id` parameter in the request body or if you send the request body parameter when defining an order in the request body. This parameter can be passed but it's not required for validation at all. It's used in the redemption process. Normally after the redemption is done, the order is automatically to a `PAID` status. To avoid such default behaviour, the user can pass any of the other status options and it will be set the order status after the redemption instead of the default `PAID`.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied.  \n`sum(items, i => i.discount_amount)`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after applying all the discounts.  \n`total_amount` = `amount` - `total_discount_amount`"
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Product-specifc discounts applied to all the items."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Product-specific discounts applied in the order."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order. Each order item can show the effects of particular discounts on the item-level.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "applied_discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "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`"
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          }
        }
      },
      "6_query_validate_voucher_client_side_orders_order_item": {
        "type": "array",
        "items": {
          "type": "object",
          "title": "Order Item",
          "description": "This object represents an order line item.",
          "properties": {
            "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",
              "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.",
              "example": "prod_0a7e62db1fca8322a2"
            },
            "sku_id": {
              "type": "string",
              "description": "Unique identifier of the SKU. It is assigned by Voucherify.",
              "example": "sku_0a41e31c7b41c28358"
            },
            "quantity": {
              "type": "string",
              "description": "The quantity of the particular item in the cart."
            },
            "price": {
              "type": "string",
              "description": "The unit price of the item."
            },
            "amount": {
              "type": "string",
              "description": "The total amount of the order item (`price` * `quantity`)."
            }
          }
        }
      },
      "6_req_validate_promotion": {
        "title": "Validate Promotion Request Body",
        "type": "object",
        "description": "Request schema model for validating a promotion using **POST** `v1/promotions/validation`.",
        "properties": {
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "options": {
            "type": "object",
            "description": "Configure parameters returned in the response.",
            "properties": {
              "expand": {
                "type": "array",
                "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. Add `category` as a string in the array to include a `categories` object in the response.",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ],
                  "example": "category"
                }
              }
            }
          }
        }
      },
      "6_res_validate_promotion": {
        "title": "Validate Promotion Response Body",
        "type": "object",
        "description": "Response schema model for validating a promotion using **POST** `v1/promotions/validation`.",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters."
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "promotions": {
            "type": "array",
            "description": "Contains an array of promotion tier objects.",
            "items": {
              "$ref": "#/components/schemas/6_res_validate_promotion_object"
            }
          }
        }
      },
      "6_res_validate_promotion_object": {
        "title": "Validate Promotion",
        "type": "object",
        "description": "Validate Promotion",
        "properties": {
          "valid": {
            "type": "string",
            "description": "Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters."
          },
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "order": {
            "$ref": "#/components/schemas/6_obj_order_object"
          },
          "id": {
            "type": "string",
            "example": "promo_4TqHr24boFISDrcOHSlfAxwm",
            "description": "Unique promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Custom promotion tier name."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website.",
            "example": "Get 45% off items"
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_amount"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_percent"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_shipping"
              }
            ],
            "description": "Contains information about the discount to be applied to the order."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-02T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Campaign is *inactive* before this date."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-04T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive* after this date."
          },
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "camp_h8RyP6FV94F3Ev2odP24j5p1",
                "description": "Unique promotion tier 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.",
                "example": "2022-11-01T00:00:00.000Z",
                "format": "date-time"
              },
              "expiration_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign expires in ISO 8601 format. Promotion tier is *inactive* after this date.",
                "example": "2022-11-30T00:00:00.000Z",
                "format": "date-time"
              },
              "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`.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "categories": {
                "$ref": "#/components/schemas/Category"
              },
              "object": {
                "type": "string",
                "default": "campaign",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign."
              }
            }
          },
          "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."
          },
          "discount_amount": {
            "type": "integer",
            "description": "The calculated discount amount based on the discount type and effect."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "The effective discount amount that would be applied to the order."
          },
          "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."
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          },
          "category_id": {
            "type": "string",
            "description": "Promotion tier category ID.",
            "example": "cat_0c9da30e7116ba6bba"
          },
          "categories": {
            "description": "Details about the category assigned to the promotion tier.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Category"
              }
            ]
          }
        }
      },
      "6_req_validate_promotion_tier": {
        "title": "Validate Promotion Tier Request Body",
        "type": "object",
        "description": "Request schema model for validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "properties": {
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          }
        }
      },
      "6_res_validate_promotion_tier": {
        "title": "Validate Promotion Tier Response Body",
        "description": "Response schema model for validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/6_res_validate_promotion_tier_true"
          },
          {
            "$ref": "#/components/schemas/6_res_validate_promotion_tier_false"
          }
        ]
      },
      "6_res_validate_promotion_tier_true": {
        "title": "Promotion Tier Valid",
        "type": "object",
        "description": "Response schema model for valid promotion tier when validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "properties": {
          "valid": {
            "type": "string",
            "description": "Indicates whether the promotion is valid within the context of the parameters provided in the request body and filters in the query parameters."
          },
          "applicable_to": {
            "$ref": "#/components/schemas/6_res_applicable_to_object"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/6_res_inapplicable_to_object"
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "order": {
            "$ref": "#/components/schemas/6_obj_order_object"
          },
          "id": {
            "type": "string",
            "example": "promo_4TqHr24boFISDrcOHSlfAxwm",
            "description": "Unique promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Custom promotion tier name."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website.",
            "example": "Get 45% off items"
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_amount"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_percent"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_shipping"
              }
            ],
            "description": "Contains information about the discount to be applied to the order."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-02T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Campaign is *inactive* before this date."
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-11-04T00:00:00.000Z",
            "description": "Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive* after this date."
          },
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "camp_h8RyP6FV94F3Ev2odP24j5p1",
                "description": "Unique promotion tier 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.",
                "example": "2022-11-01T00:00:00.000Z",
                "format": "date-time"
              },
              "expiration_date": {
                "type": "string",
                "description": "Activation timestamp defines when the campaign expires in ISO 8601 format. Promotion tier is *inactive* after this date.",
                "example": "2022-11-30T00:00:00.000Z",
                "format": "date-time"
              },
              "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`.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "categories": {
                "$ref": "#/components/schemas/Category"
              },
              "object": {
                "type": "string",
                "default": "campaign",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign."
              }
            }
          },
          "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."
          },
          "discount_amount": {
            "type": "integer",
            "description": "The calculated discount amount based on the discount type and effect."
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "The effective discount amount that would be applied to the order."
          },
          "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."
          },
          "object": {
            "type": "string",
            "default": "promotion_tier",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier."
          }
        }
      },
      "6_res_validate_promotion_tier_false": {
        "type": "object",
        "description": "Response schema model for a non-valid promotion tier when validating a promotion using **POST** `v1/promotions/tiers/{tierId}/validation`.",
        "title": "Promotion Tier Not Valid",
        "properties": {
          "valid": {
            "type": "boolean",
            "description": "Response schema for a voucher that is not valid."
          },
          "reason": {
            "type": "string",
            "description": "System generated cause for the voucher being invalid in the context of the provided parameters."
          },
          "error": {
            "description": "Detailed failure cause for the invalid voucher if the reason has a translation defined in the Dashboard &rarr; Project Settings &rarr; Error Messages.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_promotion_tier_false_custom_message"
              },
              {
                "$ref": "#/components/schemas/Error"
              }
            ]
          },
          "tracking_id": {
            "type": "string",
            "description": "Hashed customer source ID."
          },
          "id": {
            "type": "string",
            "example": "promo_ByIIAHC1Mz9ouJsitzAWsush",
            "description": "Promotion tier ID."
          },
          "name": {
            "type": "string",
            "description": "Custom promotion tier name."
          },
          "banner": {
            "type": "string",
            "description": "Text to be displayed to your customers on your website.",
            "example": "Get 25% off"
          },
          "discount": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_amount"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_percent"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_fixed"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_unit_multiple"
              },
              {
                "$ref": "#/components/schemas/6_res_validate_voucher_discount_shipping"
              }
            ],
            "description": "Contains information about the discount to be applied to the order."
          },
          "start_date": {
            "type": "string",
            "description": "Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Campaign is *inactive* before this date.",
            "format": "date-time",
            "example": "2022-11-02T00: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-11-04T00:00:00.000Z"
          },
          "campaign": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion tier 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-11-01T00:00:00.000Z"
              },
              "expiration_date": {
                "type": "string",
                "format": "date-time",
                "description": "Activation timestamp defines when the campaign expires in ISO 8601 format. Promotion tier is *inactive* after this date.",
                "example": "2022-11-30T00:00:00.000Z"
              },
              "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`.  \n\n- `true` indicates an *active* campaign\n- `false` indicates an *inactive* campaign"
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by the campaign object. This object stores information about the campaign.",
                "default": "campaign"
              }
            }
          },
          "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."
          },
          "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."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the promotion tier.",
            "default": "promotion_tier"
          }
        }
      },
      "6_res_validate_promotion_tier_false_custom_message": {
        "type": "object",
        "description": "Custom Error Message",
        "title": "Custom Message",
        "properties": {
          "message": {
            "type": "string",
            "description": "Customized error message."
          }
        }
      },
      "19_obj_order_object_rollback_stacked": {
        "title": "Order object",
        "description": "This is an object representing an order that was rolled back for a stacked redemption.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify."
          },
          "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."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "default": "CANCELED",
            "enum": [
              "CANCELED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "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 removing an item-level discount."
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          },
          "redemptions": {
            "description": "Lists details related to the redemption and redemption rollback.",
            "properties": {
              "redemption_ID": {
                "type": "object",
                "description": "The property name is the unique redemption ID; i.e. `r_0ba186c4824e4881e1`. This object contains information about the redemption rollback of incentives.",
                "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 redemption is a `redemption` because this rollback is in the context of a stacked redemption.",
                    "default": "redemption",
                    "enum": [
                      "redemption"
                    ]
                  },
                  "related_object_id": {
                    "type": "string",
                    "description": "Unique ID of the parent redemption.",
                    "example": "r_0ba186c4824e4881e1"
                  },
                  "stacked": {
                    "type": "array",
                    "description": "Lists the stacked redemption IDs in the initial redemption request.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "rollback_stacked": {
                    "type": "array",
                    "description": "Lists the rollback redemption IDs of the particular child redemptions.",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "19_obj_order_object_rollback_stacked_per_redemption_apply_to_order": {
        "title": "Order object",
        "description": "This is an object representing an order that was rolled back for a stacked redemption.",
        "properties": {
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "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`."
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          }
        }
      },
      "19_obj_order_object_rollback_stacked_per_redemption_apply_to_items": {
        "title": "Order object",
        "description": "This is an object representing an order that was rolled back for a stacked redemption.",
        "properties": {
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order.`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "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 removing an item-level discount."
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          }
        }
      },
      "RedeemPromotionStack": {
        "title": "Promotion Stack Redeemable",
        "type": "object",
        "description": "Validate or redeem a promotion stack.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Redeemable object type.",
            "default": "promotion_stack",
            "enum": [
              "promotion_stack"
            ]
          },
          "id": {
            "type": "string",
            "description": "Promotion stack unique id, such as: stack_KxSD0GahLUg9ULB6TseGfUHJ"
          }
        },
        "required": [
          "object",
          "id"
        ]
      },
      "RedeemPromotionTier": {
        "title": "Promotion Tier Redeemable",
        "type": "object",
        "description": "Validate or redeem a promotion tier.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Redeemable object type.",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "id": {
            "type": "string",
            "description": "Promotion tier unique id, such as: promo_Mwy9XpA0TLctSGriM5kum0qp"
          }
        },
        "required": [
          "object",
          "id"
        ]
      },
      "RedeemGiftCard": {
        "title": "Gift Card Redeemable",
        "description": "Validate or redeem a gift card",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedeemVoucher"
          },
          {
            "type": "object",
            "properties": {
              "gift": {
                "type": "object",
                "description": "Contains information on the number of gift card credits that the customer wants to apply to the order.",
                "properties": {
                  "credits": {
                    "type": "integer",
                    "description": "The number of credits that the user wants to use from the gift card to fulfill the order. The value of credits cannot be higher than the current balance on the gift card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                  }
                }
              }
            }
          }
        ]
      },
      "RedeemLoyaltyCard": {
        "title": "Loyalty Card Redeemable",
        "description": "Validate or redeem a loyalty card",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedeemVoucher"
          },
          {
            "type": "object",
            "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.",
                "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_EPx1hCTpqzF0HW1z9NKckZH4"
                  },
                  "points": {
                    "type": "integer",
                    "description": "The number of loyalty points that the user wants to spend in order to fulfill the order using a **pay with points** reward. The number of points cannot be higher than the current balance on the loyalty card."
                  }
                }
              }
            }
          }
        ]
      },
      "RedeemVoucher": {
        "title": "Voucher Redeemable",
        "type": "object",
        "description": "Validate or redeem a discount code.",
        "properties": {
          "object": {
            "type": "string",
            "description": "Redeemable object type.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "id": {
            "type": "string",
            "description": "Redeemable code."
          }
        },
        "required": [
          "object",
          "id"
        ]
      },
      "StackableValidateRedeemBase": {
        "title": "Stackable Validate Redeem Base",
        "type": "object",
        "properties": {
          "redeemables": {
            "type": "array",
            "minItems": 1,
            "maxItems": 30,
            "description": "An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. Each unique redeemable can be sent in one request only once.",
            "items": {
              "title": "Stackable Validate Redeem Base Redeemables Item",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RedeemVoucher"
                },
                {
                  "$ref": "#/components/schemas/RedeemPromotionTier"
                },
                {
                  "$ref": "#/components/schemas/RedeemPromotionStack"
                },
                {
                  "$ref": "#/components/schemas/RedeemGiftCard"
                },
                {
                  "$ref": "#/components/schemas/RedeemLoyaltyCard"
                }
              ]
            }
          },
          "order": {
            "description": "Order information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Order"
              }
            ]
          },
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "session": {
            "description": "Schema model for session lock object. The session object is required to establish a session between multiple parallel validation and redemption requests. If you only send the type parameter in the request, then by default the session lock will be established for 7 days. Read more on establishing a validation session.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Session"
              }
            ]
          },
          "tracking_id": {
            "description": "Is correspondent to Customer's source_id",
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format."
          }
        },
        "required": [
          "redeemables"
        ]
      },
      "ValidationsValidateRequestBody": {
        "title": "Validations Validate Request Body",
        "description": "Response body schema for **POST** `v1/validations`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "options": {
                "type": "object",
                "description": "Configure parameters returned in the response.",
                "properties": {
                  "expand": {
                    "type": "array",
                    "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. \n\n| **Expand Option** | **Response Body** |\n|:---|:---|\n| [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. |\n| [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. |\n| [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. |\n| [\"category\"] | - Returns an expanded `categories` object, showing details about the category. |",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "redemption",
                        "redeemable",
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/StackableValidateRedeemBase"
          }
        ]
      },
      "RedemptionsRedeemRequestBody": {
        "type": "object",
        "title": "Redemptions Redeem Request Body",
        "description": "Response body schema for **POST** `v1/redemptions`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "options": {
                "type": "object",
                "description": "Configure parameters returned in the response.",
                "properties": {
                  "expand": {
                    "type": "array",
                    "description": "Expand array lets you configure params included in the response. Depending on the strings included in the array, the response will contain different details. \n\n| **Expand Option** | **Response Body** |\n|:---|:---|\n| [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. |\n| [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. |\n| [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. |\n| [\"redeemable\", \"redemption\", \"category\"] | - Returns each discount type's `metadata` in each child redemption object.<br>- Returns redemption object `metadata`.<br>- Returns an expanded `categories` object, showing details about the category. |",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "redemption",
                        "redeemable",
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/StackableValidateRedeemBase"
          }
        ]
      },
      "ValidationsValidateResponseBody": {
        "title": "Validations Validate Response Body",
        "description": "Response body schema for **POST** `v1/validations`.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the validation, assigned by Voucherify.",
            "example": "valid_101740aa2869354c6d"
          },
          "valid": {
            "type": "boolean",
            "description": "The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable."
          },
          "redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable. If redeemables_application_mode=\"PARTIAL\" all redeemables here will be \"APPLICABLE\"",
            "items": {
              "title": "Validations Validate All Response Body Redeemables Item",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableApplicable"
                },
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableInapplicable"
                },
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableSkipped"
                }
              ]
            }
          },
          "skipped_redeemables": {
            "type": "array",
            "description": "Lists validation results of each skipped redeemable.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableSkipped"
                }
              ]
            }
          },
          "inapplicable_redeemables": {
            "type": "array",
            "description": "Lists validation results of each inapplicable redeemable.",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ValidationsRedeemableInapplicable"
                }
              ]
            }
          },
          "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": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OrderCalculatedItem"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "application_details": {
                              "$ref": "#/components/schemas/ApplicationDetails"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "tracking_id": {
            "type": "string",
            "example": "track_VAVo1/z+G2GI2LPw==",
            "description": "Hashed customer source ID."
          },
          "session": {
            "$ref": "#/components/schemas/Session"
          },
          "stacking_rules": {
            "$ref": "#/components/schemas/StackingRules"
          }
        },
        "required": [
          "valid",
          "redeemables",
          "stacking_rules"
        ]
      },
      "ValidationsRedeemableApplicable": {
        "type": "object",
        "title": "Applicable Redeemable",
        "properties": {
          "status": {
            "type": "string",
            "default": "APPLICABLE",
            "enum": [
              "APPLICABLE"
            ],
            "description": "Indicates whether the redeemable can be applied or not applied based on the validation rules."
          },
          "id": {
            "type": "string",
            "description": "Redeemable ID, i.e. the voucher code."
          },
          "object": {
            "type": "string",
            "description": "Redeemable's object type.",
            "enum": [
              "voucher",
              "promotion_tier"
            ]
          },
          "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"
                    }
                  }
                }
              }
            ]
          },
          "applicable_to": {
            "$ref": "#/components/schemas/ApplicableToResultList"
          },
          "inapplicable_to": {
            "$ref": "#/components/schemas/InapplicableToResultList"
          },
          "result": {
            "description": "Specifies the redeemable's end effect on the order. This object is unique to each type of redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/RedeemableResultVoucherCode"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultGiftCard"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultLoyaltyCard"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultPromotionTier"
              },
              {
                "$ref": "#/components/schemas/RedeemableResultPromotionStack"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryWithStackingRulesType"
            }
          },
          "campaign_name": {
            "type": "string",
            "description": "Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.",
            "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          }
        },
        "required": [
          "status",
          "id",
          "object",
          "result"
        ]
      },
      "ValidationsRedeemableInapplicable": {
        "type": "object",
        "title": "Inapplicable Redeemable",
        "properties": {
          "status": {
            "type": "string",
            "default": "INAPPLICABLE",
            "enum": [
              "INAPPLICABLE"
            ],
            "description": "Indicates whether the redeemable can be applied or not applied based on the validation rules."
          },
          "id": {
            "type": "string",
            "description": "Redeemable ID, i.e. the voucher code."
          },
          "object": {
            "type": "string",
            "description": "Redeemable's object type.",
            "enum": [
              "voucher",
              "promotion_tier"
            ]
          },
          "result": {
            "type": "object",
            "description": "Includes the error object with details about the reason why the redeemable is inapplicable",
            "properties": {
              "error": {
                "$ref": "#/components/schemas/Error"
              },
              "details": {
                "type": "object",
                "description": "Provides details about the reason why the redeemable is inapplicable.",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Generic message from the `message` string shown in the `error` object or the message configured in a validation rule."
                  },
                  "key": {
                    "type": "string",
                    "description": "Generic message from the `key` string shown in the `error` object."
                  }
                }
              },
              "bundle": {
                "$ref": "#/components/schemas/Bundle"
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryWithStackingRulesType"
            }
          },
          "campaign_name": {
            "type": "string",
            "description": "Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.",
            "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          }
        },
        "required": [
          "status",
          "id",
          "object",
          "result"
        ]
      },
      "ValidationsRedeemableSkipped": {
        "type": "object",
        "title": "Skipped Redeemable",
        "properties": {
          "status": {
            "type": "string",
            "default": "SKIPPED",
            "enum": [
              "SKIPPED"
            ],
            "description": "Indicates whether the redeemable can be applied or not applied based on the validation rules."
          },
          "id": {
            "type": "string",
            "description": "Redeemable ID, i.e. the voucher code."
          },
          "object": {
            "type": "string",
            "description": "Redeemable's object type.",
            "enum": [
              "voucher",
              "promotion_tier"
            ]
          },
          "result": {
            "type": "object",
            "description": "Provides details about the reason why the redeemable is skipped.",
            "properties": {
              "details": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultCategoryLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultRedeemablesLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultRedeemablesCategoryLimitExceeded"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultExclusionRulesNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/ValidationsRedeemableSkippedResultPrecedingValidationFailed"
                  }
                ]
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable."
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryWithStackingRulesType"
            }
          },
          "campaign_name": {
            "type": "string",
            "description": "Campaign name. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique campaign ID assigned by Voucherify. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body.",
            "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion tier. Displayed only if the `options.expand` is passed with a `redeemable` value in the validation request body."
          }
        },
        "required": [
          "status",
          "id",
          "object",
          "result"
        ]
      },
      "ValidationsRedeemableSkippedResultLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Limit Exceeded",
        "type": "object",
        "description": "Displayed when the `applicable_redeemables_limit` defined in the stacking rules is exceeded.",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_redeemables_limit_exceeded",
            "enum": [
              "applicable_redeemables_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable redeemables limit exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultCategoryLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Category Limit Exceeded",
        "type": "object",
        "description": "Displayed when `applicable_redeemables_per_category_limit` defined in the stacking rules is exceeded",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_redeemables_per_category_limit_exceeded",
            "enum": [
              "applicable_redeemables_per_category_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable redeemables limit per category exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultRedeemablesLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Redeemables Limit Exceeded",
        "type": "object",
        "description": "Displayed when `applicable_exclusive_redeemables_limit` defined in the  stacking rules is exceeded.",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_exclusive_redeemables_limit_exceeded",
            "enum": [
              "applicable_exclusive_redeemables_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable exclusive redeemables limit exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultRedeemablesCategoryLimitExceeded": {
        "title": "Validations Redeemable Skipped Result Redeemables Category Limit Exceeded",
        "type": "object",
        "description": "Displayed when `applicable_exclusive_redeemables_per_category_limit` defined in the stacking rules is exceeded.",
        "properties": {
          "key": {
            "type": "string",
            "default": "applicable_exclusive_redeemables_per_category_limit_exceeded",
            "enum": [
              "applicable_exclusive_redeemables_per_category_limit_exceeded"
            ]
          },
          "message": {
            "type": "string",
            "example": "Applicable exclusive redeemables limit per category exceeded"
          }
        }
      },
      "ValidationsRedeemableSkippedResultExclusionRulesNotMet": {
        "title": "Validations Redeemable Skipped Result Exclusion Rules Not Met",
        "type": "object",
        "description": "Displayed when the redeemable cannot be applied because the exclusion rules are not fulfilled.",
        "properties": {
          "key": {
            "type": "string",
            "default": "exclusion_rules_not_met",
            "enum": [
              "exclusion_rules_not_met"
            ]
          },
          "message": {
            "type": "string",
            "example": "Redeemable cannot be applied due to exclusion rules"
          }
        }
      },
      "ValidationsRedeemableSkippedResultPrecedingValidationFailed": {
        "title": "Validations Redeemable Skipped Result Preceding Validation Failed",
        "type": "object",
        "description": "Displayed in the ALL application rule when one of the preceding redeeambles is `INAPPLICABLE`, so the rest becomes `SKIPPED`",
        "properties": {
          "key": {
            "type": "string",
            "default": "preceding_validation_failed",
            "enum": [
              "preceding_validation_failed"
            ]
          },
          "message": {
            "type": "string",
            "example": "Redeemable cannot be applied due to preceding validation failure"
          }
        }
      },
      "RedeemableResultVoucherCode": {
        "type": "object",
        "title": "Coupon Code",
        "description": "This is a `result` object representing the results for a coupon code.",
        "properties": {
          "discount": {
            "description": "Discount details about the type of discount to be applied for the redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DiscountAmount"
              },
              {
                "$ref": "#/components/schemas/DiscountUnit"
              },
              {
                "$ref": "#/components/schemas/DiscountUnitMultiple"
              },
              {
                "$ref": "#/components/schemas/DiscountPercent"
              },
              {
                "$ref": "#/components/schemas/DiscountFixed"
              }
            ]
          },
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          }
        }
      },
      "RedeemableResultGiftCard": {
        "type": "object",
        "title": "Gift Card",
        "description": "This is a `result` object representing the results for a gift card.",
        "properties": {
          "gift": {
            "description": "Stores the amount of gift card credits to be applied.",
            "type": "object",
            "properties": {
              "balance": {
                "type": "integer",
                "description": "Available funds at the moment of validation. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              },
              "credits": {
                "type": "integer",
                "description": "Total number of gift card credits to be applied. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              }
            }
          }
        }
      },
      "RedeemableResultLoyaltyCard": {
        "type": "object",
        "title": "Loyalty Card",
        "description": "This is a `result` object representing the results for a loyalty card.",
        "properties": {
          "loyalty_card": {
            "description": "Stores the amount of loyalty card points to be applied in the redemption.",
            "type": "object",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Total number of loyalty points to be applied in the redemption."
              }
            }
          }
        }
      },
      "RedeemableResultPromotionTier": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "This is a `result` object representing the results for a promotion tier.",
        "properties": {
          "discount": {
            "description": "Discount details about the type of discount to be applied for the redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DiscountAmount"
              },
              {
                "$ref": "#/components/schemas/DiscountUnit"
              },
              {
                "$ref": "#/components/schemas/DiscountUnitMultiple"
              },
              {
                "$ref": "#/components/schemas/DiscountPercent"
              },
              {
                "$ref": "#/components/schemas/DiscountFixed"
              }
            ]
          },
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          }
        }
      },
      "RedeemableResultPromotionStack": {
        "type": "object",
        "title": "Promotion Stack",
        "description": "This is a `result` object representing the results for a promotion stack.",
        "properties": {
          "discount": {
            "description": "Discount details about the type of discount to be applied for the redeemable.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/DiscountAmount"
              },
              {
                "$ref": "#/components/schemas/DiscountUnit"
              },
              {
                "$ref": "#/components/schemas/DiscountUnitMultiple"
              },
              {
                "$ref": "#/components/schemas/DiscountPercent"
              },
              {
                "$ref": "#/components/schemas/DiscountFixed"
              }
            ]
          },
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          }
        }
      },
      "19_obj_redemption_rollback_object_discount_voucher_stacked": {
        "type": "object",
        "title": "Rollback Discount Voucher",
        "description": "This is an object representing a redemption rollback for a discount voucher.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0c5eba630bc4979e70",
            "description": "Unique redemption rollback ID."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_order"
              },
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_items"
              }
            ]
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "discount": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/1_obj_voucher_object_discount_amount"
                  },
                  {
                    "$ref": "#/components/schemas/1_obj_voucher_object_discount_percentage"
                  },
                  {
                    "$ref": "#/components/schemas/1_obj_voucher_object_discount_fixed"
                  },
                  {
                    "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_one"
                  },
                  {
                    "$ref": "#/components/schemas/1_obj_voucher_object_discount_unit_multiple"
                  },
                  {
                    "$ref": "#/components/schemas/1_obj_voucher_object_discount_shipping"
                  }
                ]
              },
              "type": {
                "type": "string",
                "description": "Indicates the voucher type.",
                "default": "DISCOUNT_VOUCHER",
                "enum": [
                  "DISCOUNT_VOUCHER"
                ]
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              },
              "is_referral_code": {
                "type": "boolean",
                "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
              }
            }
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the original redemption."
          }
        }
      },
      "19_obj_redemption_rollback_object_loyalty_card_stacked": {
        "type": "object",
        "title": "Rollback Loyalty Card Voucher",
        "description": "This is an object representing a redemption rollback for a loyalty card.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0c5eaf4060133bf784",
            "description": "Unique redemption rollback ID."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "amount": {
            "type": "integer",
            "description": "Number of points being returned to the loyalty card."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_order"
              },
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_items"
              }
            ]
          },
          "reward": {
            "description": "Defines the reward that was initially redeemed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_pay_with_points"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_product"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_sku"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital"
              }
            ]
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "loyalty_card": {
                "type": "object",
                "description": "Stores the number of points being added back to the loyalty card for the reward redemption rollback.",
                "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 after the redemption rollback."
                  }
                }
              },
              "type": {
                "type": "string",
                "description": "Indicates the voucher type.",
                "default": "LOYALTY_CARD",
                "enum": [
                  "LOYALTY_CARD"
                ]
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              },
              "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.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              }
            }
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the original redemption."
          }
        }
      },
      "19_obj_redemption_rollback_object_gift_card_stacked": {
        "type": "object",
        "title": "Rollback Gift Card",
        "description": "This is an object representing a gift card redemption rollback.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0bc92f81a6801f9bca",
            "description": "Unique redemption rollback ID."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "amount": {
            "type": "integer",
            "description": "The amount added back to the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_order"
              },
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_items"
              }
            ]
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the gift card.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "gift": {
                "type": "object",
                "description": "Contains the balance of the gift card after credits are added back to the gift card for the redemption rollback.",
                "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`."
                  },
                  "balance": {
                    "type": "integer",
                    "example": 500,
                    "description": "Available funds after the redemption rollback credits back the amount used up during the initial redemption. 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."
                  }
                }
              },
              "type": {
                "type": "string",
                "description": "Indicates the voucher type.",
                "default": "GIFT_VOUCHER",
                "enum": [
                  "GIFT_VOUCHER"
                ]
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              },
              "is_referral_code": {
                "type": "boolean",
                "description": "Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`."
              }
            }
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the initial redemption.",
            "example": "r_0c5bf3323008a35032"
          }
        }
      },
      "19_obj_redemption_rollback_object_promotion_tier_stacked": {
        "type": "object",
        "title": "Rollback Promotion Tier",
        "description": "This is an object representing a promotion tier redemption rollback",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0bc92f81a6801f9bca",
            "description": "Unique redemption rollback ID."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_order"
              },
              {
                "$ref": "#/components/schemas/19_obj_order_object_rollback_stacked_per_redemption_apply_to_items"
              }
            ]
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "promotion_tier": {
            "type": "object",
            "description": "Contains details of the promotion tier and the parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion tier ID assigned by Voucherify.",
                "example": "promo_NzjTc3ZXTe7md5SziK3uYtei"
              },
              "name": {
                "type": "string",
                "description": "Promotion tier name."
              },
              "banner": {
                "type": "string",
                "description": "Text to be displayed to your customers on your website."
              },
              "campaign": {
                "type": "object",
                "description": "Promotion tier's parent campaign.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                    "description": "Unique ID assigned by Voucherify of the promotion tier's parent campaign."
                  }
                }
              }
            }
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of initial redemption."
          }
        }
      },
      "RedemptionsRedeemResponseBody": {
        "type": "object",
        "title": "Redemptions Redeem Response Body",
        "description": "Response body schema for **POST** `v1/redemptions`.",
        "properties": {
          "redemptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Redemption"
            }
          },
          "parent_redemption": {
            "$ref": "#/components/schemas/Redemption"
          },
          "order": {
            "description": "Contains the order details associated with the redemption.",
            "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"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "inapplicable_redeemables": {
            "type": "array",
            "description": "Lists validation results of each inapplicable redeemable.",
            "items": {
              "$ref": "#/components/schemas/ValidationsRedeemableInapplicable"
            }
          },
          "skipped_redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`.",
            "items": {
              "$ref": "#/components/schemas/ValidationsRedeemableSkipped"
            }
          }
        }
      },
      "7_obj_order_object_rollback": {
        "title": "Order object",
        "description": "This is an object representing an order that was rolled back.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify."
          },
          "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."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "default": "CANCELED",
            "enum": [
              "CANCELED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after undoing all the discounts through the rollback redemption."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "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 removing an item-level discount."
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          },
          "redemptions": {
            "description": "Lists details related to the redemption and redemption rollback.",
            "properties": {
              "redemption_ID": {
                "type": "object",
                "description": "The property name is the unique redemption ID; i.e. `r_0ba186c4824e4881e1`. This object contains information about the redemption of an incentive.",
                "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.",
                    "enum": [
                      "voucher",
                      "promotion_tier"
                    ]
                  },
                  "related_object_id": {
                    "type": "string",
                    "description": "Unique ID of the related object that defines the incentive."
                  },
                  "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."
                  }
                }
              }
            }
          }
        }
      },
      "7_obj_order_object": {
        "title": "Order object",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/7_obj_order_object_apply_to_order"
          },
          {
            "$ref": "#/components/schemas/7_obj_order_object_apply_to_items"
          }
        ]
      },
      "7_obj_order_object_apply_to_order": {
        "type": "object",
        "title": "Order object - Effect: Apply to order",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify."
          },
          "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."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order."
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order.  \n`total_discount_amount` = `discount_amount` + `items_discount_amount`"
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after applying all the discounts.  \n`total_amount` = `amount` - `total_discount_amount`"
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the order-level discount applied."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "This field sums up all order-level and all product-specific discounts applied in a particular request."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order. Each order item can show the effects of particular discounts on the item-level.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "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`"
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          },
          "redemptions": {
            "description": "Lists details related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/10_obj_order_object_unstacked_redemptions"
              }
            ]
          }
        }
      },
      "7_obj_order_object_apply_to_items": {
        "type": "object",
        "title": "Order object - Effect: Apply to items",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify. "
          },
          "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."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order.  \n`sum(items, i => i.discount_amount)`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order."
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after applying all the discounts.  \n`total_amount` = `amount` - `total_discount_amount`"
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied."
          },
          "total_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order."
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order. Each order item can show the effects of particular discounts on the item-level.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "applied_discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "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`"
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          },
          "redemptions": {
            "description": "Lists details related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/10_obj_order_object_unstacked_redemptions"
              }
            ]
          }
        }
      },
      "7_obj_order_object_stacked_redemptions": {
        "type": "object",
        "title": "Order",
        "description": "This is an object representing an order with calculated discounts applied using the voucher code.",
        "properties": {
          "id": {
            "type": "string",
            "example": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
            "description": "Unique order ID, assigned by Voucherify. "
          },
          "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."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:40:48.705Z",
            "description": "Timestamp representing the date and time when the order was created. The value is shown in the ISO 8601 format."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-06T11:47:20.760Z",
            "description": "Timestamp representing the date and time when the order was updated. The value is shown in the ISO 8601 format."
          },
          "status": {
            "type": "string",
            "description": "Order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULFILLED"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Order amount before applying any discount."
          },
          "discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level discounts applied to the order."
          },
          "items_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied to the order.  \n`sum(items, i => i.discount_amount)`"
          },
          "total_discount_amount": {
            "type": "integer",
            "description": "Sum of all order-level AND all product-specific discounts applied to the order. \n`total_discount_amount` = `discount_amount` + `items_discount_amount`"
          },
          "total_amount": {
            "type": "integer",
            "description": "Order amount after applying all the discounts.  \n`total_amount` = `amount` - `total_discount_amount`"
          },
          "applied_discount_amount": {
            "type": "integer",
            "description": "This field shows the sum of all order-level discounts applied."
          },
          "items_applied_discount_amount": {
            "type": "integer",
            "description": "Sum of all product-specific discounts applied.\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 to the order.\n`total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount`"
          },
          "items": {
            "type": "array",
            "description": "Array of order items that have been applied to the order. Each order item can show the effects of particular discounts on the item-level.",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "default": "order_item",
                  "description": "The type of the object represented by JSON. This object stores information about the `order_item`."
                },
                "product_id": {
                  "type": "string",
                  "example": "prod_5h0wc453_1",
                  "description": "A unique identifier that represents the product and is assigned by Voucherify."
                },
                "sku_id": {
                  "type": "string",
                  "example": "sku_prod_5h0wc453_1_1",
                  "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                },
                "quantity": {
                  "type": "integer",
                  "description": "Quantity of the item in the cart."
                },
                "amount": {
                  "type": "integer",
                  "description": "Represents a total pre-discount amount of order item (`price` * `quantity`)."
                },
                "discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "applied_discount_amount": {
                  "type": "integer",
                  "description": "The item-level discount applied to the item."
                },
                "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`"
                },
                "product": {
                  "type": "object",
                  "description": "This object stores more information about the related product.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "prod_5h0wc453_1",
                      "description": "A unique identifier that represents the product and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "A unique product identifier from your inventory system.",
                      "example": "illy-arabica"
                    },
                    "name": {
                      "type": "string",
                      "example": "Brewing System",
                      "description": "Product name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a product. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                },
                "sku": {
                  "type": "object",
                  "description": "This object stores more information about the related SKU.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "example": "sku_prod_5h0wc453_1_1",
                      "description": "A unique identifier that represents the SKU and is assigned by Voucherify."
                    },
                    "source_id": {
                      "type": "string",
                      "example": "illy-arabica-250g",
                      "description": "A unique SKU identifier from your inventory system."
                    },
                    "sku": {
                      "type": "string",
                      "description": "SKU name."
                    },
                    "price": {
                      "type": "integer",
                      "description": "Unit price of a SKU. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
                    }
                  }
                }
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the order. A set of key/value pairs that are att to an order object. Stores additional information about the order in a structured format."
          },
          "customer": {
            "type": "object",
            "description": "Object containing information about the customer that is making the purchase.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `customer` object."
              }
            }
          },
          "referrer": {
            "type": "object",
            "description": "Object containing information about the referrer.",
            "properties": {
              "id": {
                "type": "string",
                "example": "cust_7iUa6ICKyU6gH40dBU25kQU1",
                "description": "Unique referrer ID, who referred the customer making the purchase."
              },
              "object": {
                "type": "string",
                "default": "customer",
                "description": "Type of object represented by the `referrer` object."
              }
            }
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "referrer_id": {
            "type": "string",
            "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
            "description": "Unique referrer ID."
          },
          "object": {
            "type": "string",
            "default": "order",
            "description": "The type of the object represented by JSON. This object stores information about the `order`."
          },
          "redemptions": {
            "description": "Lists details related to the redemption",
            "allOf": [
              {
                "$ref": "#/components/schemas/10_obj_order_object_stacked_redemptions"
              }
            ]
          }
        }
      },
      "7_obj_redemption_object_voucher_extended": {
        "title": "Redemption Object",
        "description": "This is an object representing an attempted or successful voucher redemption.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_discount_voucher_extended"
          },
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_extended"
          },
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_gift_card_extended"
          }
        ]
      },
      "7_obj_redemption_object_discount_voucher_extended": {
        "type": "object",
        "title": "Discount Voucher",
        "description": "This is an object representing a redemption.  \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              },
              {
                "$ref": "#/components/schemas/VoucherHolder"
              }
            ]
          }
        }
      },
      "RedemptionRollback": {
        "title": "Redemption Rollback",
        "type": "object",
        "description": "This is an object representing a redemption rollback.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0efeb3dab05e62e599",
            "description": "Unique identifier of the redemption rollback."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON",
            "default": "redemption_rollback",
            "enum": [
              "redemption_rollback"
            ]
          },
          "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",
            "nullable": true,
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "nullable": true,
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "description": "The metadata object stores all custom attributes assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "For gift cards, this represents the number of the credits restored to the card in the rolledback redemption. The number is a negative integer in the smallest currency unit, e.g. -100 cents for $1.00 added back to the card.\nFor loyalty cards, this represents the number of loyalty points restored to the card in the rolledback redemption. The number is a negative integer.",
            "example": -10000
          },
          "redemption": {
            "nullable": true,
            "type": "string",
            "description": "Unique redemption ID of the parent redemption.",
            "example": "r_0c656311b5878a2031"
          },
          "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."
          },
          "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": {
            "nullable": true,
            "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"
                    }
                  }
                }
              }
            ]
          },
          "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 identifier of the channel which was used by the user performing the redemption rollback. This is either a user ID from the user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "enum": [
              "voucher",
              "promotion_tier",
              "redemption"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique identifier of the related object. It is assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being originally redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/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 returned to the gift card in the redemption rollback. It is expressed as a negative integer.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "Amount returned to the gift card as a result of the redemption rollback and expressed as a negative integer. The amount is expressed as the smallest currency unit (e.g. -100 cents for $1.00 returned)."
              }
            }
          },
          "loyalty_card": {
            "type": "object",
            "description": "Contains the number of points returned to the loyalty card in the reward redemption rollback. It is expressed as a negative integer.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points being returned to the loyalty card for the reward redemption rollback. It is expressed as a negative integer."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "date",
          "customer_id",
          "tracking_id",
          "metadata",
          "redemption",
          "result",
          "status",
          "order",
          "channel",
          "customer",
          "related_object_type",
          "related_object_id"
        ]
      },
      "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"
                  }
                ]
              }
            }
          }
        ]
      },
      "Redemption": {
        "title": "Redemption",
        "type": "object",
        "description": "This is an object representing a redemption for **POST** `v1/redemptions` and **POST** `/client/v1/redemptions`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedemptionBase"
          },
          {
            "type": "object",
            "properties": {
              "voucher": {
                "description": "Defines the details of the voucher being redeemed.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/VoucherWithStackingRulesTypeCategories"
                  },
                  {
                    "$ref": "#/components/schemas/VoucherHolder"
                  }
                ]
              }
            }
          }
        ]
      },
      "RedemptionWithVoucherWithoutStackingRulesTypeCategories": {
        "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/Voucher"
                  },
                  {
                    "$ref": "#/components/schemas/VoucherHolder"
                  }
                ]
              }
            }
          }
        ]
      },
      "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",
            "nullable": true,
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "nullable": true,
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "nullable": true,
            "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": {
            "nullable": true,
            "type": "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": {
            "nullable": true,
            "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"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "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": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "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"
        ]
      },
      "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",
            "nullable": true,
            "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"
              }
            ]
          }
        }
      },
      "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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"
        ]
      },
      "7_obj_redemption_object_loyalty_card_extended": {
        "type": "object",
        "title": "Loyalty Card Voucher",
        "description": "This is an object representing a redemption.  \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "Number of points being redeemed for a reward."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object, i.e. `voucher`.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "reward": {
            "description": "Defines the reward being redeemed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_pay_with_points"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_product"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_sku"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital"
              }
            ]
          },
          "loyalty_card": {
            "type": "object",
            "description": "Stores the number of points being subtracted from the loyalty card for the reward redemption.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points being subtracted from the loyalty card for the reward redemption."
              }
            }
          }
        }
      },
      "7_obj_redemption_object_gift_card_extended": {
        "type": "object",
        "title": "Gift Card",
        "description": "This is an object representing a gift card redemption.",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the gift card.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "gift": {
            "type": "object",
            "description": "Contains the amount being subtracted from the gift card for the redemption.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          }
        }
      },
      "7_obj_redemption_object_discount_voucher": {
        "type": "object",
        "title": "Discount Voucher",
        "description": "This is an object representing a redemption.  \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption if this particular redemption was issued through a stacked redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher being redeemed.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          }
        }
      },
      "7_obj_redemption_rollback_object_discount_voucher": {
        "type": "object",
        "title": "Rollback Discount Voucher",
        "description": "This is an object representing a redemption rollback for a discount voucher.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0c5eba630bc4979e70",
            "description": "Unique redemption rollback ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption_rollback`.",
            "default": "redemption_rollback"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the original redemption."
          },
          "reason": {
            "type": "string",
            "description": "The reason for the redemption rollback."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object_rollback"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption rollback was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "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"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher being redeemed.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          }
        }
      },
      "7_obj_redemption_rollback_object_loyalty_card": {
        "type": "object",
        "title": "Rollback Loyalty Card Voucher",
        "description": "This is an object representing a redemption rollback for a loyalty card.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0c5eaf4060133bf784",
            "description": "Unique redemption rollback ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption_rollback`.",
            "default": "redemption_rollback"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "Number of points being returned to the loyalty card. The value is expressed as a negative integer."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the original redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object_rollback"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption rollback was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "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"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object, i.e. `voucher`.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher being redeemed.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          },
          "reward": {
            "description": "Defines the reward that was initially redeemed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_pay_with_points"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_product"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_sku"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital"
              }
            ]
          },
          "loyalty_card": {
            "type": "object",
            "description": "Stores the number of points being added back to the loyalty card for the reward redemption rollback.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points being added back to the loyalty card for the reward redemption rollback."
              }
            }
          }
        }
      },
      "7_obj_redemption_object_loyalty_card": {
        "type": "object",
        "title": "Loyalty Card Voucher",
        "description": "This is an object representing a redemption.  \n\nRedemption is the key operation in the voucher and promotion tier lifecycle. A customer can redeem a voucher or promotion tier once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "Number of points being redeemed for a reward."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption if this particular redemption was issued through a stacked redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object, i.e. `voucher`.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher being redeemed.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          },
          "reward": {
            "description": "Defines the reward being redeemed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_pay_with_points"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_product"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_sku"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital"
              }
            ]
          },
          "loyalty_card": {
            "type": "object",
            "description": "Stores the number of points being subtracted from the loyalty card for the reward redemption.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points being subtracted from the loyalty card for the reward redemption."
              }
            }
          }
        }
      },
      "7_obj_redemption_object_loyalty_card_pay_with_points": {
        "type": "object",
        "description": "Defines the pay with points reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "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 Pay with Points (COIN) reward.",
            "properties": {
              "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": "integer",
                    "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."
                  }
                }
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "COIN",
            "enum": [
              "COIN"
            ]
          }
        },
        "title": "Pay with Points Reward"
      },
      "7_obj_redemption_object_loyalty_card_material_product": {
        "type": "object",
        "description": "Defines the product material reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "product": {
            "description": "Details of the product redeemed as a reward.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Product"
              }
            ]
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "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": {
              "product": {
                "type": "object",
                "description": "Defines the product redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique product ID assignedy by Voucherify of the product.",
                    "example": "prod_0b2c2ddf35150b83bb"
                  },
                  "sku_id": {
                    "type": "string",
                    "nullable": true
                  }
                }
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "MATERIAL",
            "enum": [
              "MATERIAL"
            ]
          }
        },
        "title": "Product Material Reward"
      },
      "7_obj_redemption_object_loyalty_card_material_sku": {
        "type": "object",
        "description": "Defines the SKU material reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "product": {
            "description": "Details of the SKU's parent product redeemed as a reward.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Product"
              }
            ]
          },
          "sku": {
            "description": "Details of the SKU redeemed as a reward.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Sku"
              }
            ]
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "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": {
              "product": {
                "type": "object",
                "description": "Defines the SKU redeemed as a reward.",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique product ID assignedy by Voucherify of the SKU's parent."
                  },
                  "sku_id": {
                    "type": "string",
                    "description": "Unique SKU ID assigned by Voucherify of the SKU redeemed as a reward."
                  }
                }
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "MATERIAL",
            "enum": [
              "MATERIAL"
            ]
          }
        },
        "title": "SKU Material Reward"
      },
      "7_obj_redemption_object_loyalty_card_digital": {
        "type": "object",
        "description": "Defines the digital reward redeemed for the particular loyalty card.",
        "properties": {
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "assignment_id": {
            "type": "string",
            "example": "rewa_YAIuU7AY6LNJVlUbRxSbNgiD",
            "description": "Unique reward assginment ID assigned by Voucherify."
          },
          "voucher": {
            "description": "Voucher object.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "id": {
            "type": "string",
            "example": "rew_INt3fGH3n7xIr3ZQcq4kkUZ1",
            "description": "Unique reward ID assigned by Voucherify."
          },
          "object": {
            "type": "string",
            "default": "reward",
            "description": "Type of object represented is `reward`."
          },
          "name": {
            "type": "string",
            "description": "Reward name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the reward was created."
          },
          "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 digital reward. These can be in the form of discount coupons, gift card credits, or loyalty point credits.",
            "properties": {
              "campaign": {
                "description": "Defines the source of the digital reward.",
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital_discount_voucher"
                  },
                  {
                    "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital_gift_card_credits"
                  },
                  {
                    "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital_loyalty_card_points"
                  }
                ]
              }
            }
          },
          "type": {
            "type": "string",
            "description": "Reward type",
            "default": "CAMPAIGN",
            "enum": [
              "CAMPAIGN"
            ]
          }
        },
        "title": "Digital Reward"
      },
      "7_obj_redemption_object_loyalty_card_digital_discount_voucher": {
        "type": "object",
        "title": "Discount Voucher",
        "description": "Contains information about the source of the digital reward.",
        "properties": {
          "id": {
            "type": "string",
            "example": "camp_0dJG7cCAjquzcxWmZ634bA0C",
            "description": "Unique parent campaign ID of reward."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "DISCOUNT_COUPONS",
            "enum": [
              "DISCOUNT_COUPONS"
            ]
          }
        }
      },
      "7_obj_redemption_object_loyalty_card_digital_gift_card_credits": {
        "type": "object",
        "title": "Gift Card",
        "description": "Contains information about the source of the digital reward.",
        "properties": {
          "id": {
            "type": "string",
            "example": "camp_0dJG7cCAjquzcxWmZ634bA0C",
            "description": "Unique parent campaign ID of reward."
          },
          "balance": {
            "type": "integer",
            "description": "The amount credited to the gift card as a reward expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "GIFT_VOUCHERS",
            "enum": [
              "GIFT_VOUCHERS"
            ]
          }
        }
      },
      "7_obj_redemption_object_loyalty_card_digital_loyalty_card_points": {
        "type": "object",
        "title": "Loyalty Card",
        "description": "Contains information about the source of the digital reward.",
        "properties": {
          "id": {
            "type": "string",
            "example": "camp_0dJG7cCAjquzcxWmZ634bA0C",
            "description": "Unique parent campaign ID of reward."
          },
          "balance": {
            "type": "integer",
            "description": "The number of loyalty points that is added to the loyalty card as a reward."
          },
          "type": {
            "type": "string",
            "description": "Campaign type.",
            "default": "LOYALTY_PROGRAM",
            "enum": [
              "LOYALTY_PROGRAM"
            ]
          }
        }
      },
      "7_obj_redemption_rollback_object_gift_card": {
        "type": "object",
        "title": "Rollback Gift Card",
        "description": "This is an object representing a gift card redemption rollback.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0bc92f81a6801f9bca",
            "description": "Unique redemption rollback ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption_rollback`.",
            "default": "redemption_rollback"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "The amount added back to the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00). The value is expressed as a negative integer."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the initial redemption.",
            "example": "r_0c5bf3323008a35032"
          },
          "reason": {
            "type": "string",
            "description": "The reason for the redemption rollback."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object_rollback"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption rollback was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "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"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the gift card.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher being redeemed.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          },
          "gift": {
            "type": "object",
            "description": "Contains the amount being adde back to the gift card for the redemption rollback",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "The amount added back to the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          }
        }
      },
      "7_obj_redemption_object_gift_card": {
        "type": "object",
        "title": "Gift Card",
        "description": "This is an object representing a gift card redemption.",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption if this particular redemption was issued through a stacked redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the gift card.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher."
          },
          "voucher": {
            "type": "object",
            "description": "Defines the details of the voucher being redeemed.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          },
          "gift": {
            "type": "object",
            "description": "Contains the amount being subtracted from the gift card for the redemption.",
            "properties": {
              "amount": {
                "type": "integer",
                "description": "The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00)."
              }
            }
          }
        }
      },
      "7_obj_redemption_object_voucher_fail": {
        "type": "object",
        "title": "Failed Voucher Redemption",
        "description": "This is an object representing a failed redemption for a voucher.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rf_0bbaccc96e0830ff9e",
            "description": "Unique failed redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption`.",
            "default": "redemption"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "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": {
            "type": "object",
            "nullable": true
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |\n",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify.",
            "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
          },
          "voucher": {
            "type": "object",
            "description": "Defines the voucher details.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          }
        }
      },
      "7_obj_redemption_object_promotion_tier_fail": {
        "type": "object",
        "title": "Failed Promotion Tier Redemption",
        "description": "This is an object representing a failed redemption for a promotion tier.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rf_0bbaccc96e0830ff9e",
            "description": "Unique failed redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the redemption.",
            "default": "redemption"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "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": {
            "type": "object",
            "nullable": true
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the promotion.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify.",
            "example": "promo_NzjTc3ZXTe7md5SziK3uYtei"
          },
          "voucher": {
            "type": "object",
            "nullable": true
          },
          "promotion_tier": {
            "type": "object",
            "description": "Contains details about the promotion tier and it's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion tier ID assigned by Voucherify.",
                "example": "promo_NzjTc3ZXTe7md5SziK3uYtei"
              },
              "campaign": {
                "type": "object",
                "description": "Promotion tier's parent campaign.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                    "description": "Unique ID assigned by Voucherify of the promotion tier's parent campaign."
                  }
                }
              }
            }
          }
        }
      },
      "7_obj_redemption_object_fail": {
        "type": "object",
        "title": "Failed Redemption",
        "description": "This is an object representing a failed redemption when a resource to be redeemed cannot be found.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rf_0c4c7baf58c243af6b",
            "description": "Unique failed redemption ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the redemption.",
            "default": "redemption"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "nullable": true,
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "failure_code": {
            "type": "string",
            "example": "not_found",
            "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": {
            "type": "object",
            "nullable": true
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "nullable": true
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| redemption | Related redemption. |\n",
            "default": "redemption",
            "enum": [
              "redemption"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify.",
            "example": "rf_0c5bde8dfc0156f0e3"
          },
          "voucher": {
            "type": "object",
            "nullable": true
          }
        }
      },
      "7_obj_redemption_rollback_object_voucher_fail": {
        "type": "object",
        "title": "Failed Voucher Redemption Rollback",
        "description": "This is an object representing a failed redemption rollback for a voucher.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rrf_0c63990fed133bfb88",
            "description": "Unique failed redemption rollback ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption_rollback`.",
            "default": "redemption_rollback"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "redemption": {
            "type": "string",
            "description": "The unique redemption ID of the initial redemption.",
            "example": "r_0c5d6689b35320059a"
          },
          "reason": {
            "type": "string",
            "description": "The reason for the redemption rollback."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "failure_code": {
            "type": "string",
            "example": "already_rolled_back",
            "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": {
            "type": "object",
            "nullable": true
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption rollback was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "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"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n\n| **Related Object** | **Definition** |\n| :--- | :--- |\n| voucher | Either a discount voucher, gift card, or loyalty card. |\n",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify.",
            "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
          },
          "voucher": {
            "type": "object",
            "description": "Defines the voucher details.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique voucher ID assigned by Voucherify.",
                "example": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
              },
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "campaign": {
                "type": "string",
                "description": "Voucher's parent campaign name."
              },
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign ID assigned by Voucherify.",
                "example": "camp_pqZjuhG6Mgtp4GD0zD7b8hA3"
              }
            }
          }
        }
      },
      "7_obj_redemption_rollback_object_promotion_tier_fail": {
        "type": "object",
        "title": "Failed Promotion Tier Redemption Rollback",
        "description": "This is an object representing a failed redemption rollback for a promotion tier.",
        "properties": {
          "id": {
            "type": "string",
            "example": "rrf_0c5eb3bd884497ed05",
            "description": "Unique failed redemption rollback ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption_rollback`.",
            "default": "redemption_rollback"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "redemption": {
            "type": "string",
            "description": "The unique redemption ID of the initial redemption.",
            "example": "r_0c5d6689b35320059a"
          },
          "reason": {
            "type": "string",
            "description": "The reason for the redemption rollback."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "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": {
            "type": "object",
            "nullable": true
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption rollback was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "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"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the promotion.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.\n",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify.",
            "example": "promo_NzjTc3ZXTe7md5SziK3uYtei"
          },
          "voucher": {
            "type": "object",
            "nullable": true
          },
          "promotion_tier": {
            "type": "object",
            "description": "Contains details about the promotion tier and it's parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion tier ID assigned by Voucherify.",
                "example": "promo_NzjTc3ZXTe7md5SziK3uYtei"
              },
              "campaign": {
                "type": "object",
                "description": "Promotion tier's parent campaign.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                    "description": "Unique ID assigned by Voucherify of the promotion tier's parent campaign."
                  }
                }
              }
            }
          }
        }
      },
      "7_obj_redemption_rollback_object_promotion_tier": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "This is an object representing a promotion tier redemption rollback",
        "properties": {
          "id": {
            "type": "string",
            "example": "rr_0bc92f81a6801f9bca",
            "description": "Unique redemption rollback ID."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by the JSON. This object stores information about the `redemption_rollback`.",
            "default": "redemption_rollback"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption rollback occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of initial redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption rollback result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption rollback.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object_rollback"
              }
            ]
          },
          "channel": {
            "type": "object",
            "description": "Defines the details of the channel through which the redemption rollback was issued.",
            "properties": {
              "channel_id": {
                "type": "string",
                "example": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                "description": "Unique channel ID of the user performing the redemption rollback. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API."
              },
              "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"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. promo_NzjTc3ZXTe7md5SziK3uYtei for a promotion tier."
          },
          "voucher": {
            "type": "object",
            "nullable": true
          },
          "promotion_tier": {
            "type": "object",
            "description": "Contains details of the promotion tier and the parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion tier ID assigned by Voucherify.",
                "example": "promo_NzjTc3ZXTe7md5SziK3uYtei"
              },
              "campaign": {
                "type": "object",
                "description": "Promotion tier's parent campaign.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                    "description": "Unique ID assigned by Voucherify of the promotion tier's parent campaign."
                  }
                }
              }
            }
          }
        }
      },
      "7_obj_redemption_object_promotion_tier": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "This is an object representing a promotion tier redemption.",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "redemption": {
            "type": "string",
            "description": "Unique redemption ID of the parent redemption if this particular redemption was issued through a stacked redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. promo_NzjTc3ZXTe7md5SziK3uYtei for a promotion tier."
          },
          "voucher": {
            "type": "object",
            "nullable": true
          },
          "promotion_tier": {
            "type": "object",
            "description": "Contains details of the promotion tier and the parent campaign.",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion tier ID assigned by Voucherify.",
                "example": "promo_NzjTc3ZXTe7md5SziK3uYtei"
              },
              "campaign": {
                "type": "object",
                "description": "Promotion tier's parent campaign.",
                "properties": {
                  "id": {
                    "type": "string",
                    "example": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                    "description": "Unique ID assigned by Voucherify of the promotion tier's parent campaign."
                  }
                }
              }
            }
          }
        }
      },
      "7_obj_redemption_object_promotion_tier_extended": {
        "type": "object",
        "title": "Promotion Tier",
        "description": "This is an object representing a promotion tier redemption.",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer that is related to the redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "default": "promotion_tier",
            "enum": [
              "promotion_tier"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. promo_NzjTc3ZXTe7md5SziK3uYtei for a promotion tier."
          },
          "voucher": {
            "type": "object",
            "nullable": true
          },
          "promotion_tier": {
            "description": "Contains details of the promotion tier and the parent campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          }
        }
      },
      "7_obj_redemption_object_stackable_discounts": {
        "type": "object",
        "title": "Stacked Redemption",
        "description": "This is an object representing a stacked redemption.",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object_stacked_redemptions"
              }
            ]
          },
          "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."
              },
              "channel_type": {
                "type": "string",
                "description": "The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API.",
                "enum": [
                  "USER",
                  "API"
                ]
              }
            }
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer making the stacked redemption.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object.",
            "default": "redemption",
            "enum": [
              "redemption"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. r_0c5d07222e08a34ace for a redemption."
          },
          "voucher": {
            "type": "object",
            "nullable": true
          }
        }
      },
      "RedemptionsGetResponseBody": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/RedemptionWithVoucherWithoutStackingRulesTypeCategories"
          },
          {
            "$ref": "#/components/schemas/RedemptionRollback"
          }
        ],
        "title": "Get Redemption Response Body",
        "description": "Response body schema for **GET** `v1/redemptions/{redemptionId}"
      },
      "RedemptionsListResponseBody": {
        "title": "Redemptions List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/redemptions`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about redemptions in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "redemptions",
            "description": "Identifies the name of the attribute that contains the array of redemption objects."
          },
          "redemptions": {
            "type": "array",
            "items": {
              "title": "Redemptions List Response Body Redemptions Item",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RedemptionWithVoucherWithoutStackingRulesTypeCategories"
                },
                {
                  "$ref": "#/components/schemas/RedemptionRollback"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of redemptions."
          }
        },
        "required": [
          "object",
          "data_ref",
          "redemptions",
          "total"
        ]
      },
      "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."
          }
        }
      },
      "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."
          }
        }
      },
      "7_req_redeem_voucher": {
        "title": "Redeem Voucher Request Body",
        "description": "Request body schema for redeeming a voucher using **POST** `v1/vouchers/{code}/redemption`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/7_req_redeem_voucher_discount_code"
          },
          {
            "$ref": "#/components/schemas/7_req_redeem_voucher_gift_card"
          },
          {
            "$ref": "#/components/schemas/7_req_redeem_voucher_loyalty_card"
          }
        ]
      },
      "7_res_redeem_voucher": {
        "title": "Redeem Voucher Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/redemption`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/7_obj_redemption_object_voucher_extended"
          }
        ]
      },
      "7_req_redeem_promotion_tier": {
        "title": "Redeem Promotion Tier",
        "type": "object",
        "description": "Redeem a promotion tier.",
        "properties": {
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against promotion tiers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          }
        }
      },
      "7_req_redeem_voucher_discount_code": {
        "title": "Discount Code",
        "type": "object",
        "description": "Redeem a discount code.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/6_req_session_lock_discount_code"
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "options": {
            "type": "object",
            "description": "Configure parameters returned in the response.",
            "properties": {
              "expand": {
                "type": "array",
                "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. Add `category` as a string in the array to include a `categories` object in the response.",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ],
                  "example": "category"
                }
              }
            }
          }
        }
      },
      "7_req_redeem_voucher_gift_card": {
        "title": "Gift Card",
        "type": "object",
        "description": "Redeem a gift card.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/6_req_session_lock_gift_card"
          },
          "gift": {
            "type": "object",
            "description": "Contains information on the number of gift card credits that the customer wants to apply to the order.",
            "properties": {
              "credits": {
                "type": "integer",
                "description": "The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
              }
            }
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "options": {
            "type": "object",
            "description": "Configure parameters returned in the response.",
            "properties": {
              "expand": {
                "type": "array",
                "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. Add `category` as a string in the array to include a `categories` object in the response.",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ],
                  "example": "category"
                }
              }
            }
          }
        }
      },
      "7_req_redeem_voucher_loyalty_card": {
        "title": "Loyalty Card",
        "type": "object",
        "description": "Redeem a loyalty card.",
        "properties": {
          "session": {
            "$ref": "#/components/schemas/6_req_session_lock_loyalty_card"
          },
          "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.",
            "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."
              },
              "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. If the user gives more points than he/she has on the loyalty card, the application will return an error code in response."
              }
            }
          },
          "customer": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_customer_source_id"
              },
              {
                "$ref": "#/components/schemas/9_req_create_customer"
              }
            ],
            "description": "Customer's information."
          },
          "order": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_id"
              },
              {
                "$ref": "#/components/schemas/6_req_validate_voucher_order_source_id"
              },
              {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              }
            ],
            "description": "Order information."
          },
          "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](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          },
          "options": {
            "type": "object",
            "description": "Configure parameters returned in the response.",
            "properties": {
              "expand": {
                "type": "array",
                "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. Add `category` as a string in the array to include a `categories` object in the response.",
                "items": {
                  "type": "string",
                  "default": "category",
                  "enum": [
                    "category"
                  ],
                  "example": "category"
                }
              }
            }
          }
        }
      },
      "8_obj_loyalty_campaign_object": {
        "title": "Loyalty Campaign Object",
        "description": "This is an object representing a loyalty campaign.\n\nThe loyalty campaign object contains details about the loyalty campaign. You can use dedicated endpoints to list loyalty campaigns, list loyalty card holders, member activities, active rewards, earning rules, loyalty tiers for given loyalty campaign.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_f7fBbQxUuTN7dI7tGOo5XMDA"
          },
          "name": {
            "type": "string",
            "description": "Loyalty campaign name."
          },
          "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/2_obj_campaign_object_voucher_object_LOYALTY_CARD"
          },
          "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": "If this value is set to `true`, customers will be able to join the campaign only once."
          },
          "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."
          },
          "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."
          },
          "description": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the campaign such as a campaign description and details."
          },
          "vouchers_count": {
            "type": "integer",
            "description": "Total number of unique vouchers in campaign."
          },
          "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 voucher was updated. The value is shown in the ISO 8601 format."
          },
          "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 vouchers.",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT"
            ]
          },
          "protected": {
            "type": "boolean",
            "description": "Indicates whether the resource can be deleted."
          },
          "access_settings_assignments": {
            "$ref": "#/components/schemas/AccessSettingsCampaignAssignmentsList"
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID that this campaign belongs to.",
            "example": "cat_0b688929a2476386a7"
          },
          "categories": {
            "$ref": "#/components/schemas/Category"
          },
          "loyalty_tiers_expiration": {
            "type": "object",
            "description": "Defines the expiration mechanism for loyalty tiers.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_balance"
              },
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_points_in_period"
              }
            ]
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          }
        }
      },
      "8_obj_loyalty_campaign_object_no_extended_categories": {
        "title": "Loyalty Campaign Object",
        "description": "This is an object representing a loyalty campaign.  \n\nThe loyalty campaign object contains details about the loyalty campaign. You can use dedicated endpoints to list loyalty campaigns, list loyalty card holders, member activities, active rewards, earning rules, loyalty tiers for given loyalty campaign.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique campaign ID, assigned by Voucherify.",
            "example": "camp_f7fBbQxUuTN7dI7tGOo5XMDA"
          },
          "name": {
            "type": "string",
            "description": "Loyalty 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/2_obj_campaign_object_voucher_object_LOYALTY_CARD"
          },
          "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": "If this value is set to `true`, customers will be able to join the campaign only once."
          },
          "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."
          },
          "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."
          },
          "vouchers_count": {
            "type": "integer",
            "description": "Total number of unique vouchers in campaign."
          },
          "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 voucher was updated. The value is shown in the ISO 8601 format."
          },
          "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 vouchers.",
            "enum": [
              "DONE",
              "IN_PROGRESS",
              "FAILED",
              "DRAFT"
            ]
          },
          "protected": {
            "type": "boolean",
            "description": "Indicates whether the resource can be deleted."
          },
          "category_id": {
            "type": "string",
            "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"
            }
          },
          "loyalty_tiers_expiration": {
            "type": "object",
            "description": "Defines the expiration mechanism for loyalty tiers.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_balance"
              },
              {
                "$ref": "#/components/schemas/2_loyalty_tiers_expiration_points_in_period"
              }
            ]
          },
          "object": {
            "type": "string",
            "default": "campaign",
            "description": "The type of the object represented by JSON. This object stores information about the campaign."
          }
        }
      },
      "8_obj_loyalty_card_object": {
        "title": "Loyalty Card Object",
        "type": "object",
        "description": "This is an object representing a loyalty card.",
        "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 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"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "type": {
            "type": "string",
            "default": "LOYALTY_CARD",
            "enum": [
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "default": null,
            "description": "Object representing discount parameters. Child attributes are present only if `type` is `DISCOUNT_VOUCHER`. Defaults to `null`.",
            "type": "object",
            "nullable": true
          },
          "gift": {
            "type": "object",
            "nullable": true,
            "description": "Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`."
          },
          "loyalty_card": {
            "type": "object",
            "description": "Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`.",
            "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."
              }
            }
          },
          "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",
            "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": {
            "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`."
          },
          "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."
          },
          "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`"
              }
            }
          },
          "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. \n\n\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 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`"
              }
            }
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          }
        }
      },
      "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"
        ]
      },
      "8_obj_loyalty_card_object_non_expanded_categories": {
        "title": "Loyalty Card Object",
        "type": "object",
        "description": "This is an object representing a loyalty card.",
        "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 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."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category ID assigned by Voucherify.",
            "example": "cat_0bb343dee3cdb5ec0c"
          },
          "categories": {
            "type": "array",
            "description": "Contains details about the category.",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "type": {
            "type": "string",
            "default": "LOYALTY_CARD",
            "enum": [
              "LOYALTY_CARD"
            ],
            "description": "Defines the type of the voucher. "
          },
          "discount": {
            "default": null,
            "description": "Object representing discount parameters. Child attributes are present only if `type` is `DISCOUNT_VOUCHER`. Defaults to `null`.",
            "type": "object",
            "nullable": true
          },
          "gift": {
            "type": "object",
            "nullable": true,
            "description": "Object representing gift parameters. Child attributes are present only if `type` is `GIFT_VOUCHER`. Defaults to `null`."
          },
          "loyalty_card": {
            "type": "object",
            "description": "Object representing loyalty card parameters. Child attributes are present only if `type` is `LOYALTY_CARD`.",
            "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."
              }
            }
          },
          "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",
            "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": {
            "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`."
          },
          "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."
          },
          "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`"
              }
            }
          },
          "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. \n\n\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 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`"
              }
            }
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. Default is `voucher`.",
            "default": "voucher"
          }
        }
      },
      "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"
        ]
      },
      "EarningRule": {
        "title": "Earning Rule",
        "allOf": [
          {
            "$ref": "#/components/schemas/EarningRuleBase"
          },
          {
            "type": "object",
            "properties": {
              "validation_rule_id": {
                "type": "string",
                "nullable": true,
                "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",
                "nullable": true,
                "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",
            "nullable": true,
            "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."
          }
        }
      },
      "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",
            "nullable": true,
            "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."
          }
        }
      },
      "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](https://support.voucherify.io/article/111-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."
          }
        }
      },
      "8_obj_earning_rule_object_tier": {
        "description": "This is an object representing an earning rule for tiers.",
        "type": "object",
        "title": "Earning Rule Object for Tiers",
        "properties": {
          "id": {
            "type": "string",
            "example": "ern_P6MWOFGsv63sbTaTZBp0IHGK",
            "description": "Assigned by the Voucherify API, identifies the earning rule object."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format.",
            "example": "2022-02-02T13:18:32.557Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.",
            "example": "2022-02-03T13:09:27.206Z",
            "format": "date-time"
          },
          "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/8_obj_fixed_points"
              },
              {
                "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_customer_metadata"
              }
            ]
          },
          "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."
              },
              "object_id": {
                "type": "string",
                "example": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                "description": "A unique campaign identifier assigned by the Voucherify API."
              },
              "object_type": {
                "type": "string",
                "default": "campaign",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`."
              }
            }
          },
          "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."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "object": {
            "type": "string",
            "default": "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.",
            "example": "auto_4jH1yq9WJS0oJ8suagCrltyb"
          },
          "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`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "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."
          }
        }
      },
      "LoyaltiesEarningRulesUpdateTierChangeRequestBody": {
        "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`\n- `PROPORTIONAL` adds points proportionally based on a pre-defined ratio",
            "oneOf": [
              {
                "$ref": "#/components/schemas/8_obj_fixed_points"
              },
              {
                "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_customer_metadata"
              }
            ]
          },
          "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"
            ]
          },
          "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."
          },
          "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."
          }
        }
      },
      "8_obj_fixed_points": {
        "title": "Define Fixed Amount of Points",
        "type": "object",
        "description": "This is an object representing points calculated based on a fixed value.",
        "properties": {
          "points": {
            "type": "integer",
            "description": "The number of points to be added to the loyalty card.",
            "example": 100
          },
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card. `FIXED` adds a fixed number of `points`.",
            "default": "FIXED",
            "enum": [
              "FIXED"
            ]
          }
        }
      },
      "8_obj_calculate_points_proportionally_order_paid": {
        "title": "Calculate Points Proportionally",
        "description": "This is an object representing points calculated proportionally to another property.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_order_amounts"
          },
          {
            "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_order_total_amount"
          },
          {
            "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_order_metadata"
          },
          {
            "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_item_amount"
          },
          {
            "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_items_subtotal_amount"
          },
          {
            "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_items_quantity"
          },
          {
            "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_customer_metadata"
          }
        ]
      },
      "8_obj_calculate_points_proportionally_order_amounts": {
        "title": "Calculate Points Proportionally to Order Amount",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to another property.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "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",
            "properties": {
              "amount": {
                "type": "object",
                "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."
                  }
                }
              }
            }
          }
        }
      },
      "8_obj_calculate_points_proportionally_order_total_amount": {
        "title": "Calculate Points Proportionally to Total Order Amount",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to another property.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "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",
            "properties": {
              "total_amount": {
                "type": "object",
                "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."
                  }
                }
              }
            }
          }
        }
      },
      "8_obj_calculate_points_proportionally_order_metadata": {
        "title": "Calculate Points Proportionally To an Order Metadata Property",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to an order metadata property.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "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",
            "description": "Defines the formula for calculating points proportionally.",
            "properties": {
              "metadata": {
                "type": "object",
                "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.",
                    "example": 100
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card.",
                    "example": 10
                  },
                  "property": {
                    "type": "string",
                    "example": "number_of_store_visits",
                    "description": "Order metadata property."
                  }
                }
              }
            }
          }
        }
      },
      "8_obj_calculate_points_proportionally_item_amount": {
        "title": "Calculate Points Proportionally to Order Items Amount",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to another property.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "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.amount.object` & `.id` (X points for every Y spent on items excluding discounts)"
          },
          "order_items": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "object",
                "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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource, i.e. `pc_75U0dHlr7u75BJodrW1AE3t6`, `prod_0bae32322150fd0546`, or `sku_0b7d7dfb090be5c619`."
                  }
                }
              }
            }
          }
        }
      },
      "8_obj_calculate_points_proportionally_items_subtotal_amount": {
        "title": "Calculate Points Proportionally to Order Items Subtotal Amount",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to another property.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "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",
            "properties": {
              "subtotal_amount": {
                "type": "object",
                "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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource, i.e. `pc_75U0dHlr7u75BJodrW1AE3t6`, `prod_0bae32322150fd0546`, or `sku_0b7d7dfb090be5c619`."
                  }
                }
              }
            }
          }
        }
      },
      "8_obj_calculate_points_proportionally_items_quantity": {
        "title": "Calculate Points Proportionally to Quantity of Items in the Cart",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to quantity of items in the cart.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "calculation_type": {
            "type": "string",
            "default": "ORDER_ITEMS_QUANTITY",
            "enum": [
              "ORDER_ITEMS_QUANTITY"
            ],
            "description": "`ORDER_ITEMS_QUANTITY`: Quantity of items defined in `order_items.quantity.object` & `.id` (X points for every Y items excluding free items)"
          },
          "order_items": {
            "type": "object",
            "properties": {
              "quantity": {
                "type": "object",
                "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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource, i.e. `pc_75U0dHlr7u75BJodrW1AE3t6`, `prod_0bae32322150fd0546`, or `sku_0b7d7dfb090be5c619`."
                  }
                }
              }
            }
          }
        }
      },
      "8_obj_calculate_points_proportionally_customer_metadata": {
        "title": "Calculate Points Proportionally To a Customer Metadata Property",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to a customer metadata property.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "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",
            "description": "Defines the formula for calculating points proportionally.",
            "properties": {
              "metadata": {
                "type": "object",
                "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.",
                    "example": 100
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card.",
                    "example": 10
                  },
                  "property": {
                    "type": "string",
                    "example": "customer_life_time_value",
                    "description": "Customer metadata property."
                  }
                }
              }
            }
          }
        }
      },
      "8_obj_calculate_points_proportionally_custom_event_metadata": {
        "title": "Calculate Points Proportionally To a Custom Event Metadata Property",
        "type": "object",
        "description": "This is an object representing points calculated proportionally to a custom event metadata property.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Defines how the points will be added to the loyalty card.`PROPORTIONAL` adds points based on a pre-defined ratio.",
            "default": "PROPORTIONAL",
            "enum": [
              "PROPORTIONAL"
            ]
          },
          "calculation_type": {
            "type": "string",
            "default": "CUSTOMER_METADATA",
            "enum": [
              "CUSTOMER_METADATA"
            ],
            "description": "`CUSTOM_EVENT_METADATA`: Custom Event Metadata (X points for every Y in metadata attribute, defined in the `property` key under the `custom_event.metadata` object)"
          },
          "custom_event": {
            "type": "object",
            "description": "Defines the formula for calculating points proportionally.",
            "properties": {
              "metadata": {
                "type": "object",
                "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 custom event metadata property to grant points for.",
                    "example": 100
                  },
                  "points": {
                    "type": "integer",
                    "description": "Number of points to be awarded, i.e. how many points to be added to the loyalty card.",
                    "example": 10
                  },
                  "property": {
                    "type": "string",
                    "example": "volume_number",
                    "description": "Custom event metadata property."
                  }
                }
              }
            }
          }
        }
      },
      "8_res_list_loyalty_campaigns": {
        "title": "List Loyalty Campaigns Response Body",
        "type": "object",
        "description": "Response body schema for listing loyalty campaigns using **GET** `v1/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",
            "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/8_obj_loyalty_campaign_object_no_extended_categories"
            }
          },
          "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"
          }
        ]
      },
      "LoyaltiesGetCampaignResponseBody": {
        "type": "object",
        "title": "Loyalties Get Campaign Response Body",
        "description": "Response body schema for **GET** `/loyalties/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyCampaign"
          }
        ]
      },
      "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."
          }
        }
      },
      "LoyaltiesCreateCampaignResponseBody": {
        "type": "object",
        "title": "Loyalties Create Campaign Response Body",
        "description": "Response body schema for **POST** `/loyalties`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/LoyaltyCampaign"
          }
        ]
      },
      "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"
          }
        ]
      },
      "8_loyalty_tiers_expiration_balance": {
        "title": "Balance",
        "type": "object",
        "description": "Defines the Balance expiration mechanism for loyalty tiers.",
        "properties": {
          "qualification_type": {
            "type": "string",
            "default": "BALANCE",
            "enum": [
              "BALANCE"
            ],
            "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."
          },
          "start_date": {
            "type": "object",
            "description": "Defines the conditions for the start date of the tier.",
            "properties": {
              "type": {
                "type": "string",
                "default": "IMMEDIATE",
                "enum": [
                  "IMMEDIATE"
                ],
                "description": "What triggers the tier to be valid for a customer.    \n`IMMEDIATE`: After reaching the minimum required points."
              }
            }
          },
          "expiration_date": {
            "description": "Defines the conditions for the expiration date of a tier.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/8_loyalty_tiers_expiration_balance_expiration_date_balance_drop"
              },
              {
                "$ref": "#/components/schemas/8_loyalty_tiers_expiration_balance_expiration_date_custom"
              }
            ]
          }
        }
      },
      "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"
        ]
      },
      "8_loyalty_tiers_expiration_balance_expiration_date_balance_drop": {
        "title": "Balance Drop",
        "type": "object",
        "description": "Defines the conditions for the expiration date of a tier based on a pure balance drop.",
        "properties": {
          "type": {
            "type": "string",
            "default": "BALANCE_DROP",
            "enum": [
              "BALANCE_DROP"
            ],
            "description": "What triggers the tier to expire for a customer.    \n`BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier."
          }
        }
      },
      "8_loyalty_tiers_expiration_balance_expiration_date_custom": {
        "title": "Custom",
        "type": "object",
        "description": "Defines the custom conditions for the expiration date of a tier.",
        "properties": {
          "type": {
            "type": "string",
            "default": "CUSTOM",
            "enum": [
              "CUSTOM"
            ],
            "description": "What triggers the tier to expire for a customer.    \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": "Defines the amount of time the tier will remain active in ISO 8601 format. The expiration date counter starts at the moment when the customer reaches the minimum required points that are required to be in the tier. For example, a tier with a duration of P3M will be valid for a duration of 3 months."
          },
          "rounding": {
            "description": "Defines the rounding mechanism for tier expiration.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/8_loyalty_tiers_expiration_expiration_date_rounding_default_options"
              },
              {
                "$ref": "#/components/schemas/8_loyalty_tiers_expiration_expiration_date_rounding_custom"
              }
            ]
          }
        }
      },
      "8_loyalty_tiers_expiration_expiration_date_rounding_default_options": {
        "title": "Calendar Periods",
        "type": "object",
        "description": "Defines the rounding mechanism for tier expiration based on a list of available time periods.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "MONTH",
              "QUARTER",
              "HALF_YEAR",
              "YEAR"
            ],
            "description": "Period to which the expiration will be rounded to.    \n- `MONTH`: The expiration date will be rounded to the end of the month. \n- `QUARTER`: The expiration date will be rounded to the end of the quarter. \n- `HALF_YEAR`: The expiration date will be rounded to the half year. \n- `YEAR`: The expiration date will be rounded to the end of the year."
          }
        }
      },
      "8_loyalty_tiers_expiration_expiration_date_rounding_custom": {
        "title": "Specific Month",
        "type": "object",
        "description": "Defines the custom rounding mechanism for tier expiration.",
        "properties": {
          "type": {
            "type": "string",
            "default": "CUSTOM",
            "enum": [
              "CUSTOM"
            ],
            "description": "This mechanism describes a custom rounding 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"
          }
        }
      },
      "8_loyalty_tiers_expiration_points_in_period": {
        "title": "Points in Period",
        "type": "object",
        "description": "Defines the Points in Period expiration mechanism for loyalty tiers.",
        "properties": {
          "qualification_type": {
            "type": "string",
            "default": "POINTS_IN_PERIOD",
            "enum": [
              "POINTS_IN_PERIOD"
            ],
            "description": "Tier qualification.   \n\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."
              }
            }
          },
          "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"
                ],
                "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."
              },
              "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."
              }
            }
          }
        }
      },
      "8_req_update_loyalty_campaign": {
        "type": "object",
        "title": "Update Loyalty Campaign Request Body",
        "description": "Request body schema for updating a loyalty campaign using **PUT** `v1/loyalties/{campaignId}`.",
        "properties": {
          "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.    \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.",
            "enum": [
              "AUTO_UPDATE",
              "STATIC"
            ]
          },
          "auto_join": {
            "type": "boolean",
            "description": "Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. CONTEXT: `LOYALTY_PROGRAM`."
          },
          "join_once": {
            "type": "boolean",
            "description": "If this value is set to `true`, customers will be able to join the campaign only once."
          },
          "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."
          },
          "loyalty_tiers_expiration": {
            "type": "object",
            "description": "Defines the expiration mechanism for loyalty tiers.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/8_loyalty_tiers_expiration_balance"
              },
              {
                "$ref": "#/components/schemas/8_loyalty_tiers_expiration_points_in_period"
              }
            ]
          },
          "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`."
          },
          "loyalty_card": {
            "description": "Defines the loyalty card details.",
            "type": "object",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Initial loyalty card income in points to be applied to the loyalty card at voucher generation."
              },
              "expiration_rules": {
                "type": "object",
                "description": "Defines point expiration rules.",
                "properties": {
                  "period_type": {
                    "type": "string",
                    "default": "MONTH",
                    "enum": [
                      "MONTH"
                    ],
                    "description": "The expiration period."
                  },
                  "period_value": {
                    "type": "integer",
                    "description": "How many periods should pass before the expiration occurs."
                  },
                  "rounding_type": {
                    "type": "string",
                    "enum": [
                      "END_OF_MONTH",
                      "END_OF_QUARTER",
                      "END_OF_HALF_YEAR",
                      "END_OF_YEAR",
                      "PARTICULAR_MONTH"
                    ],
                    "description": "Round up expiration till the end of the given period type."
                  }
                }
              }
            }
          },
          "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."
          }
        }
      },
      "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"
            }
          ]
        }
      },
      "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."
          }
        }
      },
      "8_req_order_object_redeem_reward": {
        "type": "object",
        "title": "Order object",
        "description": "Request body schema for creating an order, **required** when redeeming a pay with points reward.",
        "properties": {
          "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 an integration between multiple systems. It can be an order ID from a CRM system, database or 3rd-party service."
          },
          "status": {
            "type": "string",
            "description": "The order status.",
            "enum": [
              "CREATED",
              "PAID",
              "CANCELED",
              "FULLFILLED"
            ]
          },
          "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."
          },
          "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."
          },
          "referrer": {
            "$ref": "#/components/schemas/10_req_orders_referrer_object"
          },
          "items": {
            "$ref": "#/components/schemas/10_req_orders_items_array"
          }
        }
      },
      "8_obj_redemption_object_loyalty_card_extended": {
        "type": "object",
        "title": "Loyalty Card Voucher",
        "description": "This is an object representing a redemption.  \n\nRedemption is the key operation in the voucher lifecycle. A customer can redeem a voucher once or multiple times depending on selected limit (`quantity`). Each redemption is recorded in voucher/promotion's history (`redemption_entries`). There is also an option to cancel a redemption. We call such operation a [redemption rollback](rollback-redemption).",
        "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"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "example": "2022-10-03T12:24:58.008Z",
            "description": "Timestamp in ISO 8601 format indicating when the redemption occured."
          },
          "customer_id": {
            "type": "string",
            "example": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
            "description": "Unique customer ID of the redeeming customer."
          },
          "tracking_id": {
            "type": "string",
            "example": "track_fxEMFiLowFHg==",
            "description": "Hashed customer source ID."
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption."
          },
          "amount": {
            "type": "integer",
            "description": "Number of points being redeemed for a reward."
          },
          "result": {
            "type": "string",
            "enum": [
              "SUCCESS",
              "FAILURE"
            ],
            "description": "Redemption result."
          },
          "order": {
            "description": "Defines the details of the order that is related to the redemption.",
            "allOf": [
              {
                "$ref": "#/components/schemas/7_obj_order_object"
              }
            ]
          },
          "customer": {
            "type": "object",
            "description": "Defines the customer redeeming the reward.",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of a customer that is assigned by Voucherify.",
                "example": "cust_eWgXlBBiY6THFRJwX45Iakv4"
              },
              "name": {
                "type": "string",
                "description": "Customer's first and last name."
              },
              "email": {
                "type": "string",
                "description": "Customer's email address."
              },
              "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."
              },
              "metadata": {
                "type": "object",
                "description": "The metadata object stores all custom attributes assigned to the customer. A set of key/value pairs that you can attach to a customer object. It can be useful for storing additional information about the customer in a structured format."
              },
              "object": {
                "type": "string",
                "description": "Type of object represented is `customer`.",
                "default": "customer"
              }
            }
          },
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object, i.e. `voucher`.",
            "default": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, i.e. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          },
          "voucher": {
            "description": "Defines the details of the voucher being redeemed.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "reward": {
            "description": "Defines the reward being redeemed.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_pay_with_points"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_product"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_material_sku"
              },
              {
                "$ref": "#/components/schemas/7_obj_redemption_object_loyalty_card_digital"
              }
            ]
          },
          "loyalty_card": {
            "type": "object",
            "description": "Stores the number of points being subtracted from the loyalty card for the reward redemption.",
            "properties": {
              "points": {
                "type": "integer",
                "description": "Number of points being subtracted from the loyalty card for the reward redemption."
              }
            }
          }
        }
      },
      "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`."
          }
        }
      },
      "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."
                  }
                }
              }
            }
          }
        }
      },
      "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"
          }
        }
      },
      "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."
                  }
                }
              }
            }
          }
        }
      },
      "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"
          }
        }
      },
      "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"
          }
        }
      },
      "8_req_filter_campaign_id": {
        "title": "Filter by campaign ID",
        "type": "object",
        "description": "Filter conditions set on the campaign ID.",
        "properties": {
          "campaign_id": {
            "$ref": "#/components/schemas/8_req_filter_conditions"
          },
          "junction": {
            "type": "string",
            "description": "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"
            ]
          }
        }
      },
      "8_req_filter_voucher_id": {
        "title": "Filter by voucher ID",
        "type": "object",
        "description": "Filter conditions set on the voucher ID.",
        "properties": {
          "voucher_id": {
            "$ref": "#/components/schemas/8_req_filter_conditions"
          },
          "junction": {
            "type": "string",
            "description": "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"
            ]
          }
        }
      },
      "8_req_filter_conditions": {
        "title": "Filter by conditions",
        "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."
              }
            }
          }
        }
      },
      "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."
          }
        }
      },
      "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"
          }
        ]
      },
      "8_req_create_reward_assignment": {
        "title": "Create Reward Assignment Request Body",
        "type": "array",
        "description": "Request body schema for **POST** `v1/loyalties/{campaignId}/rewards`.",
        "items": {
          "type": "object",
          "properties": {
            "reward": {
              "type": "string",
              "example": "rew_2yGflHThU2yJwFECEFKrXBI2",
              "description": "Unique reward ID."
            },
            "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."
                    }
                  }
                }
              }
            }
          }
        }
      },
      "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "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"
        }
      },
      "LoyaltiesRewardsCreateAssignmentItemRequestBody": {
        "title": "Loyalties Rewards Create Assignment Item Request Body",
        "oneOf": [
          {
            "$ref": "#/components/schemas/LoyaltiesRewardsCreateAssignmentItemDigitalOrMaterialRequestBody"
          },
          {
            "$ref": "#/components/schemas/LoyaltiesRewardsCreateAssignmentItemCoinRequestBody"
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
          }
        ]
      },
      "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"
        ]
      },
      "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"
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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": {
                "nullable": true,
                "type": "string",
                "description": "User-defined order identifier."
              }
            },
            "required": [
              "id",
              "source_id"
            ]
          }
        },
        "required": [
          "event",
          "earning_rule",
          "order"
        ]
      },
      "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."
          }
        }
      },
      "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "8_req_customer_id": {
        "title": "Customer ID",
        "description": "You can pass the unique customer ID that was assigned by Voucherify.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of an existing customer."
          }
        }
      },
      "8_req_customer_id_string": {
        "title": "Customer ID",
        "description": "You can pass the unique customer ID that was assigned by Voucherify or the source ID.",
        "type": "string"
      },
      "8_req_customer_source_id": {
        "title": "Customer Source ID",
        "description": "You can send the source ID that you used to create the customer in Voucherify.",
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "A unique identifier of a customer. It can be a customer ID or email from a CRM system, database or 3rd-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored."
          }
        }
      },
      "8_res_get_member_activities": {
        "title": "Get Member Activities",
        "type": "object",
        "description": "Response body schema for retrieving member activities.",
        "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."
          },
          "data_ref": {
            "type": "string",
            "default": "activities",
            "description": "Identifies the name of the attribute that contains the array of event objects."
          },
          "activities": {
            "type": "array",
            "description": "Contains array of event objects.",
            "items": {}
          },
          "total": {
            "type": "integer",
            "description": "Total number of event objects."
          }
        }
      },
      "9_req_create_customer": {
        "type": "object",
        "title": "Customer",
        "description": "This is an object containing information about the customer.",
        "properties": {
          "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. \n\nPlease note that if you would like your data to sync based on the `source_id` of the customer, you need to define the `source_id` upfront. You will not be able to change or update the `source_id` later on."
          },
          "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."
          },
          "address": {
            "type": "object",
            "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."
              }
            }
          },
          "birthdate": {
            "type": "string",
            "description": "Customer's birthdate; format `YYYY-MM-DD`.",
            "format": "date"
          },
          "birthday": {
            "type": "string",
            "description": "`Deprecated`. ~~Customer's birthdate; format `YYYY-MM-DD`~~.",
            "format": "date"
          },
          "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. "
          }
        }
      },
      "CustomersListResponseBody": {
        "title": "Customers List Response Body",
        "description": "Response body schema for **GET** `v1/customers`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about customers in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "customers",
            "description": "Identifies the name of the attribute that contains the array of customer objects."
          },
          "customers": {
            "type": "array",
            "description": "Contains array of customer objects.",
            "items": {
              "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of customers."
          },
          "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 end date filter) to get more records returned in the results."
          }
        },
        "required": [
          "object",
          "data_ref",
          "customers",
          "total"
        ]
      },
      "CustomersGetResponseBody": {
        "title": "Customers Get Response Body",
        "description": "Response body schema for **GET** `v1/customers/{customerId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        ]
      },
      "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": "string",
                "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."
              }
            }
          }
        }
      },
      "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",
            "nullable": true,
            "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",
                "nullable": true,
                "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"
        ]
      },
      "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) voucherss.\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": {
            "nullable": true,
            "type": "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."
          }
        }
      },
      "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",
                "nullable": true,
                "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"
        ]
      },
      "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."
          }
        }
      },
      "CustomersActivitiesListResponseBody": {
        "type": "object",
        "title": "Customers Activities List Response Body",
        "description": "Response body schema for **GET** `v1/customers/{customerId}/activities`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about customer activities in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of customer activity objects."
          },
          "data": {
            "type": "array",
            "description": "Array of customer activity objects.",
            "items": {
              "$ref": "#/components/schemas/CustomerActivity"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of customer activities."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "CustomersActivityListResponseBody": {
        "type": "object",
        "title": "Customers Activity List Response Body",
        "description": "Response body schema for **GET** `v1/customers/{customerId}/activity`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about customer activities in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of customer activity objects."
          },
          "data": {
            "type": "array",
            "description": "Array of customer activity objects.",
            "items": {
              "$ref": "#/components/schemas/CustomerActivity"
            }
          },
          "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"
        ]
      },
      "CustomerActivity": {
        "title": "Customer Activity",
        "type": "object",
        "description": "This is an object representing customer activity.  \n\nThis is a general object which presents moments from customers' activity. There are all types of different events that customers perform during their journey once they participate in Promotions. Events describe moments when customers redeem coupons and earn points or rewards. The list of all types of activities is listed below.\n\nThe details describing the activity are collected in a property named `data`. In this object, software integrators will 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.confirmed",
              "customer.created",
              "customer.updated",
              "customer.deleted",
              "customer.referred",
              "customer.custom_event",
              "customer.segment.entered",
              "customer.segment.left",
              "customer.sms.sent",
              "customer.sms.recovered",
              "customer.sms.failed",
              "customer.email.sent",
              "customer.email.recovered",
              "customer.email.failed",
              "customer.activecampaign.sent",
              "customer.activecampaign.recovered",
              "customer.activecampaign.failed",
              "customer.braze.sent",
              "customer.braze.recovered",
              "customer.braze.failed",
              "customer.mailchimp.sent",
              "customer.mailchimp.recovered",
              "customer.mailchimp.failed",
              "customer.intercom.sent",
              "customer.intercom.recovered",
              "customer.intercom.failed",
              "customer.shopify.sent",
              "customer.shopify.recovered",
              "customer.shopify.failed",
              "customer.klaviyo.sent",
              "customer.klaviyo.recovered",
              "customer.klaviyo.failed",
              "customer.batch.sent",
              "customer.batch.recovered",
              "customer.batch.failed",
              "customer.rewarded",
              "customer.rewarded.loyalty_points",
              "customer.voucher.gift.balance_added",
              "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_activated",
              "customer.voucher.loyalty_card.points_added",
              "customer.voucher.loyalty_card.points_transferred",
              "customer.voucher.loyalty_card.points_expired",
              "customer.voucher.deleted",
              "customer.publication.succeeded",
              "customer.publication.failed",
              "customer.validation.succeeded",
              "customer.validation.failed",
              "customer.redemption.failed",
              "customer.redemption.succeeded",
              "customer.redemption.rollback.failed",
              "customer.redemption.rollback.succeeded",
              "customer.order.canceled",
              "customer.order.created",
              "customer.order.fulfilled",
              "customer.order.paid",
              "customer.order.processing",
              "customer.order.updated",
              "customer.reward_redemptions.created",
              "customer.reward_redemptions.pending",
              "customer.reward_redemptions.completed",
              "customer.reward_redemptions.rolledback",
              "customer.loyalty.updated",
              "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.holder.assignment.created",
              "customer.holder.assignment.deleted"
            ]
          },
          "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/CustomerActivityData"
              },
              "event_source": {
                "$ref": "#/components/schemas/EventSource"
              }
            }
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the customer 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": "v-1f36113948e50fc4ge"
          }
        }
      },
      "CustomerActivityData": {
        "title": "Customer Activity Data",
        "type": "object",
        "description": "Event data object schema.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EventCustomerConfirmed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerCreated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerUpdated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerDeleted"
          },
          {
            "$ref": "#/components/schemas/EventCustomerReferred"
          },
          {
            "$ref": "#/components/schemas/EventCustomerCustomEvent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerSegmentEntered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerSegmentLeft"
          },
          {
            "$ref": "#/components/schemas/EventCustomerSmsSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerSmsRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerSmsFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerEmailSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerEmailRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerEmailFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerActiveCampaignSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerActiveCampaignRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerActiveCampaignFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerBrazeSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerBrazeRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerBrazeFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerMailchimpSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerMailchimpRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerMailchimpFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerIntercomSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerIntercomRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerIntercomFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerShopifySent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerShopifyRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerShopifyFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerKlaviyoSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerKlaviyoRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerKlaviyoFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerBatchSent"
          },
          {
            "$ref": "#/components/schemas/EventCustomerBatchRecovered"
          },
          {
            "$ref": "#/components/schemas/EventCustomerBatchFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewarded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardedLoyaltyPoints"
          },
          {
            "$ref": "#/components/schemas/EventCustomerGiftVoucherBalanceAdded"
          },
          {
            "$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"
          },
          {
            "$ref": "#/components/schemas/EventCustomerVoucherDeleted"
          },
          {
            "$ref": "#/components/schemas/EventCustomerPublicationSucceeded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerPublicationFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerValidationSucceeded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerValidationFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionSucceeded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionRollbackSucceeded"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRedemptionRollbackFailed"
          },
          {
            "$ref": "#/components/schemas/EventCustomerOrderCanceled"
          },
          {
            "$ref": "#/components/schemas/EventCustomerOrderCreated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerOrderFulfilled"
          },
          {
            "$ref": "#/components/schemas/EventCustomerOrderPaid"
          },
          {
            "$ref": "#/components/schemas/EventCustomerOrderProcessing"
          },
          {
            "$ref": "#/components/schemas/EventCustomerOrderUpdated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsCreated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsPending"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsCompleted"
          },
          {
            "$ref": "#/components/schemas/EventCustomerRewardRedemptionsRolledBack"
          },
          {
            "$ref": "#/components/schemas/EventCustomerLoyaltyUpdated"
          },
          {
            "$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/EventCustomerHolderAssignmentCreated"
          },
          {
            "$ref": "#/components/schemas/EventCustomerHolderAssignmentDeleted"
          }
        ]
      },
      "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"
              }
            }
          }
        }
      },
      "EventCustomerSent": {
        "title": "Event Customer Sent",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "distribution": {
            "type": "object"
          },
          "sent_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the distribution was sent in ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "sent_at"
        ]
      },
      "EventCustomerRecovered": {
        "title": "Event Customer Recovered",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "distribution": {
            "type": "object"
          },
          "recovered_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the distribution was recovered in ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "recovered_at"
        ]
      },
      "EventCustomerFailed": {
        "title": "Event Customer Failed",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "distribution": {
            "type": "object"
          },
          "failed_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the distribution failed in ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "failed_at"
        ]
      },
      "EventCustomerConfirmed": {
        "title": "Event Customer Confirmed",
        "description": "Event data object schema for `customer.confirmed`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          },
          "unconfirmed_customer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "example": "ucust_1qa70mVfYkl11Ab0ZxDPdWNa"
              }
            }
          }
        }
      },
      "EventCustomerCreated": {
        "title": "Event Customer Created",
        "description": "Event data object schema for `customer.created`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "EventCustomerUpdated": {
        "title": "Event Customer Updated",
        "description": "Event data object schema for `customer.updated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "EventCustomerDeleted": {
        "title": "Event Customer Deleted",
        "description": "Event data object schema for `customer.deleted`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          }
        }
      },
      "EventCustomerReferred": {
        "title": "Event Customer Referred",
        "description": "Event data object schema for `customer.referred`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "referrer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "custom_event": {
            "$ref": "#/components/schemas/CustomEvent"
          },
          "redemption": {
            "$ref": "#/components/schemas/RedemptionInternal"
          }
        },
        "required": [
          "referrer",
          "campaign",
          "voucher",
          "custom_event"
        ]
      },
      "EventCustomerCustomEvent": {
        "type": "object",
        "title": "Event Customer Custom Event",
        "description": "Event data object schema for `customer.custom_event`.",
        "properties": {
          "event": {
            "$ref": "#/components/schemas/CustomEvent"
          },
          "event_schema": {
            "$ref": "#/components/schemas/SimpleCustomEvent"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "referral": {
            "type": "object",
            "nullable": true,
            "description": "Details about the referral.",
            "properties": {
              "referrer": {
                "description": "Details about the referrer.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SimpleCustomer"
                  }
                ]
              },
              "voucher": {
                "description": "Details about the referral code.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SimpleVoucher"
                  }
                ]
              },
              "campaign": {
                "description": "Details about the referral campaign.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SimpleCampaign"
                  }
                ]
              }
            },
            "required": [
              "referrer",
              "voucher",
              "campaign"
            ]
          },
          "loyalty": {
            "type": "object",
            "nullable": true,
            "description": "Details about the loyalty activity.",
            "properties": {
              "voucher": {
                "description": "Details about the loyalty code.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SimpleVoucher"
                  }
                ]
              },
              "campaign": {
                "description": "Details about the loyalty campaign.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/SimpleCampaign"
                  }
                ]
              }
            },
            "required": [
              "voucher",
              "campaign"
            ]
          }
        },
        "required": [
          "event",
          "event_schema",
          "customer",
          "referral",
          "loyalty"
        ]
      },
      "EventCustomerSegmentEntered": {
        "title": "Event Customer Segment Entered",
        "description": "Event data object schema for `customer.segment.entered`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          },
          "segment": {
            "$ref": "#/components/schemas/SimpleSegment"
          }
        },
        "required": [
          "customer",
          "segment"
        ]
      },
      "EventCustomerSegmentLeft": {
        "title": "Event Customer Segment Left",
        "description": "Event data object schema for `customer.segment.left`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/CustomerWithSummaryLoyaltyReferrals"
          },
          "segment": {
            "$ref": "#/components/schemas/SimpleSegment"
          }
        },
        "required": [
          "customer",
          "segment"
        ]
      },
      "EventCustomerSmsSent": {
        "title": "Event Customer SMS Sent",
        "description": "Event data object schema for `customer.sms.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerSmsRecovered": {
        "title": "Event Customer SMS Recovered",
        "description": "Event data object schema for `customer.sms.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerSmsFailed": {
        "title": "Event Customer SMS Failed",
        "description": "Event data object schema for `customer.sms.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerEmailSent": {
        "title": "Event Customer Email Sent",
        "description": "Event data object schema for `customer.email.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerEmailRecovered": {
        "title": "Event Customer Email Recovered",
        "description": "Event data object schema for `customer.email.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerEmailFailed": {
        "title": "Event Customer Email Failed",
        "description": "Event data object schema for `customer.email.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerActiveCampaignSent": {
        "title": "Event Customer ActiveCampaign Sent",
        "description": "Event data object schema for `customer.activecampaign.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerActiveCampaignRecovered": {
        "title": "Event Customer ActiveCampaign Recovered",
        "description": "Event data object schema for `customer.activecampaign.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerActiveCampaignFailed": {
        "title": "Event Customer ActiveCampaign Failed",
        "description": "Event data object schema for `customer.activecampaign.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerBrazeSent": {
        "title": "Event Customer Braze Sent",
        "description": "Event data object schema for `customer.braze.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerBrazeRecovered": {
        "title": "Event Customer Braze Recovered",
        "description": "Event data object schema for `customer.braze.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerBrazeFailed": {
        "title": "Event Customer Braze Failed",
        "description": "Event data object schema for `customer.braze.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerMailchimpSent": {
        "title": "Event Customer Mailchimp Sent",
        "description": "Event data object schema for `customer.mailchimp.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerMailchimpRecovered": {
        "title": "Event Customer Mailchimp Recovered",
        "description": "Event data object schema for `customer.mailchimp.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerMailchimpFailed": {
        "title": "Event Customer Mailchimp Failed",
        "description": "Event data object schema for `customer.mailchimp.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerIntercomSent": {
        "title": "Event Customer Intercom Sent",
        "description": "Event data object schema for `customer.intercom.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerIntercomRecovered": {
        "title": "Event Customer Intercom Recovered",
        "description": "Event data object schema for `customer.intercom.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerIntercomFailed": {
        "title": "Event Customer Intercom Failed",
        "description": "Event data object schema for `customer.intercom.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerShopifySent": {
        "title": "Event Customer Shopify Sent",
        "description": "Event data object schema for `customer.shopify.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerShopifyRecovered": {
        "title": "Event Customer Shopify Recovered",
        "description": "Event data object schema for `customer.shopify.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerShopifyFailed": {
        "title": "Event Customer Shopify Failed",
        "description": "Event data object schema for `customer.shopify.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerKlaviyoSent": {
        "title": "Event Customer Klaviyo Sent",
        "description": "Event data object schema for `customer.klaviyo.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerKlaviyoRecovered": {
        "title": "Event Customer Klaviyo Recovered",
        "description": "Event data object schema for `customer.klaviyo.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerKlaviyoFailed": {
        "title": "Event Customer Klaviyo Failed",
        "description": "Event data object schema for `customer.klaviyo.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "EventCustomerBatchSent": {
        "title": "Event Customer Batch Sent",
        "description": "Event data object schema for `customer.batch.sent`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerSent"
          }
        ]
      },
      "EventCustomerBatchRecovered": {
        "title": "Event Customer Batch Recovered",
        "description": "Event data object schema for `customer.batch.recovered`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRecovered"
          }
        ]
      },
      "EventCustomerBatchFailed": {
        "title": "Event Customer Batch Failed",
        "description": "Event data object schema for `customer.batch.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerFailed"
          }
        ]
      },
      "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": {
            "nullable": true,
            "type": "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": {
            "nullable": true,
            "type": "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"
          }
        }
      },
      "EventCustomerGiftVoucherBalanceAdded": {
        "title": "Event Customer Gift Voucher Balance Added",
        "description": "Event data object schema for `customer.voucher.gift.balance_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"
                        ]
                      },
                      "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 gift card credits.",
                    "enum": [
                      "CREDITS_ADDITION"
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "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"
                    ]
                  }
                }
              }
            ]
          }
        }
      },
      "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"
          }
        }
      },
      "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"
          }
        }
      },
      "EventCustomerValidationSucceeded": {
        "title": "Event Customer Validation Succeeded",
        "description": "Event data object schema for `customer.validation.succeeded`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "validation": {
            "$ref": "#/components/schemas/ValidationEntity"
          }
        }
      },
      "EventCustomerValidationFailed": {
        "title": "Event Customer Validation Failed",
        "description": "Event data object schema for `customer.validation.failed`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "validation": {
            "$ref": "#/components/schemas/ValidationEntity"
          }
        }
      },
      "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"
          }
        }
      },
      "EventCustomerRedemptionSucceeded": {
        "title": "Event Customer Redemption Succeeded",
        "description": "Event data object schema for `customer.redemption.succeeded`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          }
        ]
      },
      "EventCustomerRedemptionFailed": {
        "title": "Event Customer Redemption Failed",
        "description": "Event data object schema for `customer.redemption.failed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerRedemption"
          }
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "EventCustomerOrder": {
        "title": "Event Customer Order",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "referrer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "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"
                    }
                  }
                }
              }
            ]
          },
          "redemption": {
            "$ref": "#/components/schemas/RedemptionInternal"
          }
        }
      },
      "EventCustomerOrderCanceled": {
        "title": "Event Customer Order Canceled",
        "description": "Event data object schema for `customer.order.canceled`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          }
        ]
      },
      "EventCustomerOrderCreated": {
        "title": "Event Customer Order Created",
        "description": "Event data object schema for `customer.order.created`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          }
        ]
      },
      "EventCustomerOrderFulfilled": {
        "title": "Event Customer Order Fulfilled",
        "description": "Event data object schema for `customer.order.fulfilled`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          }
        ]
      },
      "EventCustomerOrderPaid": {
        "title": "Event Customer Order Paid",
        "description": "Event data object schema for `customer.order.paid`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          }
        ]
      },
      "EventCustomerOrderProcessing": {
        "title": "Event Customer Order Processing",
        "description": "Event data object schema for `customer.order.processing`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          }
        ]
      },
      "EventCustomerOrderUpdated": {
        "title": "Event Customer Order Updated",
        "description": "Event data object schema for `customer.order.updated`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EventCustomerOrder"
          }
        ]
      },
      "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"
          }
        }
      },
      "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"
          }
        ]
      },
      "EventCustomerLoyaltyUpdated": {
        "title": "Event Customer Loyalty Updated",
        "description": "Event data object schema for `customer.loyalty.updated`.",
        "type": "object",
        "properties": {
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "loyalty": {
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-25T13:32:08.734Z",
            "format": "date-time"
          }
        },
        "required": [
          "created_at"
        ]
      },
      "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"
        ]
      },
      "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"
            ]
          }
        ]
      },
      "EventCustomerHolderAssignmentCreated": {
        "title": "Event Customer Holder Assignment Created",
        "description": "Event data object schema for `customer.holder.assignment.created`.",
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/SimpleRedeemableHolder"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          }
        },
        "required": [
          "holder",
          "voucher",
          "campaign",
          "customer"
        ]
      },
      "EventCustomerHolderAssignmentDeleted": {
        "title": "Event Customer Holder Assignment Deleted",
        "description": "Event data object schema for `customer.holder.assignment.deleted`.",
        "properties": {
          "holder": {
            "$ref": "#/components/schemas/SimpleRedeemableHolder"
          },
          "voucher": {
            "$ref": "#/components/schemas/SimpleVoucher"
          },
          "campaign": {
            "$ref": "#/components/schemas/SimpleCampaign"
          },
          "customer": {
            "$ref": "#/components/schemas/SimpleCustomer"
          }
        },
        "required": [
          "holder",
          "voucher",
          "campaign",
          "customer"
        ]
      },
      "CustomersMetadataUpdateInBulkRequestBody": {
        "type": "object",
        "title": "Customers Metadata Update In Bulk Request Body",
        "description": "Request body schema for **POST** `v1/customers/metadata/async`.",
        "properties": {
          "source_ids": {
            "type": "array",
            "description": "An array of customer `source_id`'s.",
            "items": {
              "type": "string"
            }
          },
          "metadata": {
            "type": "object",
            "description": "Metadata key value pairs to be updated. 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."
          }
        },
        "required": [
          "source_ids",
          "metadata"
        ]
      },
      "CustomersUpdateInBulkRequestBody": {
        "title": "Customers Update In Bulk Request Body",
        "description": "Request body schema for **POST** `v1/customers/bulk/async`.",
        "allOf": [
          {
            "title": "CustomerSourceId",
            "type": "object",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "Unique customer source ID."
              }
            },
            "required": [
              "source_id"
            ]
          },
          {
            "$ref": "#/components/schemas/CustomerBase"
          }
        ]
      },
      "OrdersUpdateResponseBody": {
        "type": "object",
        "title": "Orders Update Response Body",
        "description": "Response body schema for **PUT** `v1/orders/{orderId}`.",
        "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"
                }
              }
            }
          }
        ]
      },
      "OrdersCreateResponseBody": {
        "type": "object",
        "title": "Orders Create Response Body",
        "description": "Response body schema for **POST** `v1/orders`.",
        "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"
                }
              }
            }
          }
        ]
      },
      "10_obj_order_object_unstacked_redemptions": {
        "type": "object",
        "title": "Unstacked Redemption",
        "description": "Redemption object representing a single redemption.",
        "properties": {
          "redemption_ID": {
            "type": "object",
            "description": "The property name is the unique redemption ID; i.e. `r_0ba186c4824e4881e1`. This object contains information about the redemption of an incentive.",
            "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"
              },
              "related_object_type": {
                "type": "string",
                "description": "The source of the incentive.",
                "enum": [
                  "voucher",
                  "promotion_tier"
                ]
              },
              "related_object_id": {
                "type": "string",
                "description": "Unique ID of the related object that defines the incentive."
              },
              "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."
              }
            }
          }
        }
      },
      "10_obj_order_object_stacked_redemptions": {
        "type": "object",
        "title": "Stacked Redemption",
        "description": "Redemption object representing a stacked redemption.",
        "properties": {
          "redemption_ID": {
            "type": "object",
            "description": "The property name is the unique parent redemption ID; i.e. `r_0ba186c4824e4881e1`. This object contains information about the redemption of multiple incentives.",
            "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"
              },
              "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"
              },
              "stacked": {
                "type": "array",
                "description": "Contains a list of unique IDs of child redemptions, which belong to the stacked incentives.",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "OrdersListResponseBody": {
        "type": "object",
        "title": "Orders List Response Body",
        "description": "Response body schema representing **GET** `v1/orders`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about orders in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "orders",
            "enum": [
              "orders"
            ],
            "description": "Identifies the name of the attribute that contains the array of order objects."
          },
          "orders": {
            "type": "array",
            "description": "Contains array of order objects.",
            "items": {
              "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"
                      }
                    }
                  }
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of orders."
          }
        },
        "required": [
          "object",
          "data_ref",
          "orders",
          "total"
        ]
      },
      "OrdersCreateRequestBody": {
        "title": "Orders Create Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/orders`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "title": "Order Customer And Referrer Ids Objects",
            "type": "object",
            "description": "Order information.",
            "properties": {
              "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"
              },
              "referrer_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique referrer ID.",
                "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
              },
              "customer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Customer"
                  }
                ]
              },
              "referrer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Referrer"
                  }
                ]
              }
            }
          }
        ]
      },
      "OrdersUpdateRequestBody": {
        "type": "object",
        "title": "Orders Update Request Body",
        "description": "Request body schema for **PUT** `v1/orders/{orderId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBase"
          },
          {
            "title": "Order Customer And Referrer Ids Objects",
            "type": "object",
            "description": "Order information.",
            "properties": {
              "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"
              },
              "referrer_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique referrer ID.",
                "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
              },
              "customer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Customer"
                  }
                ]
              },
              "referrer": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Referrer"
                  }
                ]
              }
            }
          }
        ]
      },
      "10_req_orders_customer_object": {
        "type": "object",
        "title": "Customer",
        "description": "This is an object containing information about the customer.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of an existing customer that will be linked to the order; this is an ID that has been assigned to the customer by Voucherify, i.e. `cust_LMY4ZylSdUYB1J4tzqNcl5VV`."
          },
          "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."
          },
          "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."
          },
          "address": {
            "type": "object",
            "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"
              }
            }
          },
          "birthdate": {
            "type": "string",
            "description": "Customer's birthdate; format `YYYY-MM-DD`.",
            "format": "date"
          },
          "birthday": {
            "type": "string",
            "description": "`Deprecated`. ~~Customer's birthdate; format `YYYY-MM-DD`~~.",
            "format": "date"
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a customer."
          }
        }
      },
      "10_req_orders_referrer_object": {
        "type": "object",
        "title": "Referrer",
        "description": "This is an ojbect containing information about the referrer.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique ID of an existing customer that will be linked to the order as the referrer; this is an ID that has been assigned to the customer by Voucherify, i.e. `cust_LMY4ZylSdUYB1J4tzqNcl5VV`."
          },
          "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": "Referrer's first and last name."
          },
          "description": {
            "type": "string",
            "description": "An arbitrary string that you can attach to a referrer object."
          },
          "email": {
            "type": "string",
            "description": "Referrer's email address."
          },
          "phone": {
            "type": "string",
            "description": "Referrer's phone number."
          },
          "address": {
            "type": "object",
            "description": "Referrer'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"
              }
            }
          },
          "birthdate": {
            "type": "string",
            "description": "Referrer's birthdate; format `YYYY-MM-DD`.",
            "format": "date"
          },
          "birthday": {
            "type": "string",
            "description": "`Deprecated`. ~~Referrer's birthdate; format `YYYY-MM-DD`~~.",
            "format": "date"
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a referrer."
          }
        }
      },
      "10_req_orders_items_array": {
        "type": "array",
        "title": "Items Array",
        "description": "Array of items applied to the order.",
        "items": {
          "$ref": "#/components/schemas/10_req_orders_order_item"
        }
      },
      "10_req_orders_order_item": {
        "type": "object",
        "title": "Order Item",
        "description": "This object represents an order line item.",
        "properties": {
          "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",
            "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.",
            "example": "prod_0a7e62db1fca8322a2"
          },
          "sku_id": {
            "type": "string",
            "description": "Unique identifier of the SKU. It is assigned by Voucherify.",
            "example": "sku_0a41e31c7b41c28358"
          },
          "quantity": {
            "type": "integer",
            "description": "The quantity of the particular item in the cart."
          },
          "price": {
            "type": "integer",
            "description": "The unit price of the item."
          },
          "amount": {
            "type": "integer",
            "description": "The total amount of the order item (`price` * `quantity`)."
          },
          "product": {
            "$ref": "#/components/schemas/10_req_orders_order_item_product"
          },
          "sku": {
            "$ref": "#/components/schemas/10_req_orders_order_item_sku"
          }
        }
      },
      "10_req_orders_order_item_product": {
        "type": "object",
        "title": "Product",
        "description": "An object containing details of the related product.",
        "properties": {
          "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."
          },
          "name": {
            "type": "string",
            "description": "Product name."
          },
          "price": {
            "type": "integer",
            "description": "Product 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 a product. It can be useful for storing additional information about the product in a structured format."
          },
          "override": {
            "type": "boolean",
            "description": "The override set to `true` is used to store the product information in the system. If product does not exist, it will be created with the use of `source_id`; if it does exist, the provided values for the `name`, `price`, and `metadata` will replace those already stored in the system."
          }
        }
      },
      "10_req_orders_order_item_sku": {
        "type": "object",
        "title": "SKU",
        "description": "An object containing details of the related SKU.",
        "properties": {
          "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."
          },
          "sku": {
            "type": "string",
            "description": "The SKU name."
          },
          "price": {
            "type": "integer",
            "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."
          },
          "override": {
            "type": "boolean",
            "description": "The override is used to store the SKU in the system. If the SKU does not exist, it will be created with the use of `source_id`. Additionally, if the SKU does not exist, you are required to set the parent `product_id` that it belongs to. Set the parent `product_id` one level above, i.e. at the item level. If the parent product does not exist in Voucherify, i.e. does not have a unique `product_id`, then define the product object one level above, i.e. at the item level and make sure to also include the override as `true` for the product."
          }
        }
      },
      "ProductsCreateRequestBody": {
        "type": "object",
        "description": "Request schema for **POST** `v1/products`.",
        "title": "Products Create Request Body",
        "properties": {
          "id": {
            "type": "string",
            "example": "prod_5h0wc453_1",
            "description": "A unique identifier that represents the product and is assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "example": "productSourceID16",
            "description": "Unique product source ID."
          },
          "name": {
            "type": "string",
            "description": "Unique user-defined product name.",
            "example": "T-shirt"
          },
          "price": {
            "type": "integer",
            "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."
          },
          "image_url": {
            "type": "string",
            "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"
          }
        }
      },
      "ProductsUpdateRequestBody": {
        "type": "object",
        "description": "Request schema for **PUT** `v1/products`.",
        "title": "Products Update Request Body",
        "properties": {
          "name": {
            "type": "string",
            "description": "Unique user-defined product name.",
            "example": "T-shirt"
          },
          "price": {
            "type": "integer",
            "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."
          },
          "image_url": {
            "type": "string",
            "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"
          }
        }
      },
      "ProductsUpdateInBulkRequestBody": {
        "type": "object",
        "description": "Request schema for **POST** `v1/products/bulk/async`.",
        "title": "Products Update In Bulk Request Body",
        "properties": {
          "source_id": {
            "type": "string",
            "description": "Unique product source ID from your inventory system.",
            "example": "test_prod_id_1"
          },
          "name": {
            "type": "string",
            "description": "Unique user-defined product name.",
            "example": "T-shirt"
          },
          "price": {
            "type": "integer",
            "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"
            }
          },
          "image_url": {
            "type": "string",
            "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"
          },
          "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."
          }
        },
        "required": [
          "source_id"
        ]
      },
      "ProductWithoutSkus": {
        "title": "Product without Skus Object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique product ID assigned by Voucherify.",
            "example": "prod_0b1da8105693710357"
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "example": "productSourceID16",
            "description": "Unique product source ID."
          },
          "name": {
            "type": "string",
            "nullable": true,
            "description": "Unique user-defined product name.",
            "example": "T-shirt"
          },
          "price": {
            "type": "integer",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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"
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "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"
        ]
      },
      "SkusList": {
        "type": "object",
        "description": "Contains information about SKUs.",
        "title": "SKUs List",
        "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"
          },
          "skus": {
            "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",
          "skus",
          "total"
        ]
      },
      "SkuWithProduct": {
        "title": "SKU with parent product.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Sku"
          },
          {
            "type": "object",
            "properties": {
              "product": {
                "$ref": "#/components/schemas/ProductWithoutSkus"
              }
            }
          }
        ]
      },
      "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",
            "nullable": true,
            "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",
            "nullable": true,
            "example": "Large Pink Shirt",
            "description": "Unique user-defined SKU name."
          },
          "price": {
            "type": "integer",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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"
        ]
      },
      "ProductsSkusUpdateRequestBody": {
        "title": "Products Skus Update Request Body",
        "type": "object",
        "description": "Request body schema for **PUT** `v1/products/{productId}/skus/{skuId}`.",
        "properties": {
          "sku": {
            "type": "string",
            "example": "Large Pink Shirt",
            "description": "Unique user-defined SKU name."
          },
          "price": {
            "type": "integer",
            "description": "SKU unit price. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "currency": {
            "type": "string",
            "description": "SKU price currency."
          },
          "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",
            "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."
          }
        }
      },
      "ProductCollectionsProductsList": {
        "type": "object",
        "description": "Response body schema for **GET** /product-collections/{productCollectionID}/products.",
        "title": "List Products in Collection Response Body",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about products and SKUs.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of products and SKUs.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of products and SKUs.",
            "items": {
              "title": "Product Collections Products List Products Item",
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ProductWithoutSkus"
                },
                {
                  "$ref": "#/components/schemas/SkuWithProduct"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of products & SKUs in the product collection."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ProductCollectionsItem": {
        "title": "Product Collection Base",
        "description": "This is an object representing a product collection base. ",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Product collection ID."
          },
          "name": {
            "type": "string",
            "example": "All Products",
            "description": "Unique user-defined product collection name."
          },
          "type": {
            "type": "string",
            "description": "Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products).",
            "enum": [
              "STATIC",
              "AUTO_UPDATE"
            ]
          },
          "filter": {
            "type": "object",
            "description": "Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type.",
            "required": [
              "junction"
            ],
            "properties": {
              "junction": {
                "$ref": "#/components/schemas/Junction"
              }
            },
            "additionalProperties": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/FieldConditions"
                }
              ],
              "description": "Valid keys: `id`, `product_id`, `source_id`, `name`, `price`, `object`, `attributes`, `image_url`, `skus`, `created_at`, `updated_at` and `metadata.*`"
            }
          },
          "products": {
            "description": "Defines a set of products for a `STATIC` product collection type.",
            "type": "array",
            "items": {
              "title": "Product Collections Item Products Item",
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "prod_0a41bcf807c5fcaaf6",
                  "description": "The product ID."
                },
                "product_id": {
                  "type": "string",
                  "description": "Product ID for SKUs."
                },
                "object": {
                  "type": "string",
                  "enum": [
                    "sku",
                    "product"
                  ],
                  "description": "Denotes the type of the object represented by the ID."
                }
              },
              "required": [
                "id",
                "object"
              ]
            }
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-09T12:51:29.898Z",
            "description": "Timestamp representing the date and time when the product collection was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the static product collection.",
            "default": "products_collection",
            "enum": [
              "products_collection"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "created_at",
          "object"
        ]
      },
      "ProductCollectionsList": {
        "type": "object",
        "title": "List Product Collections",
        "description": "Schema representing list of product collections",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about product collections.",
            "default": "list",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the JSON property that contains the array of product collections.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "description": "A dictionary that contains an array of product collections and their details.",
            "type": "array",
            "items": {
              "title": "Product Collections List Data Item",
              "allOf": [
                {
                  "$ref": "#/components/schemas/ProductCollectionsItem"
                }
              ]
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of product collections."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ValidationRuleBundleRules": {
        "title": "Validation Rule Bundle Rules",
        "type": "object",
        "description": "Contains all the definitions for the bundle rules. It is a set of key value pairs representing the rules and logic between them. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.\n\nWhile updating with the PUT method, you can pass `\"bundle_rules\": null` to delete the configuration; in the response, an empty object is then returned.",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Defines how many bundles can be identified in the order and the maximum multiplier of the discount per identified bundle. For example, if the order meets 3 bundles, but `limit: 2`, the discount will be multiplied by 2.",
            "nullable": true,
            "minimum": 1,
            "maximum": 100,
            "default": 1
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the bundle rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific bundle rule name. Currently, it is only `order.items.any`.",
              "enum": [
                "order.items.any"
              ]
            },
            "conditions": {
              "type": "object",
              "description": "Defines the conditions of the bundle rule. The order items in the customer's cart must meet the conditions. Because the rule concerns order items, the only permissible condition is `$is`.",
              "properties": {
                "$is": {
                  "type": "array",
                  "maxItems": 1,
                  "items": {
                    "type": "object",
                    "description": "",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Unique identifier of the product, SKU, or collection assigned by Voucherify."
                      },
                      "type": {
                        "type": "string",
                        "description": "Type of the order item. It can be a `product_or_sku` or `products_collection`",
                        "enum": [
                          "product_or_sku",
                          "products_collection"
                        ]
                      },
                      "object": {
                        "type": "string",
                        "description": "Object used in the bundle rule. It can be a `products_collection`, `product`, or `sku`.",
                        "enum": [
                          "products_collection",
                          "product",
                          "sku"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "object"
                    ]
                  }
                }
              }
            },
            "rules": {
              "properties": {
                "logic": {
                  "type": "string",
                  "example": "1",
                  "description": "Defines the logic between the sub-rules."
                }
              },
              "additionalProperties": {
                "type": "object",
                "description": "Contains the name of the validation sub-rule.",
                "maxProperties": 1,
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Voucherify's specific sub-rule name. Currently, it is only `order.items.aggregated_quantity`.",
                    "enum": [
                      "order.items.aggregated_quantity"
                    ]
                  },
                  "conditions": {
                    "type": "object",
                    "description": "Defines the conditions of the bundle rule. The quantity of order items in the customer's cart must meet the conditions.",
                    "properties": {
                      "$is": {
                        "type": "array",
                        "maxItems": 1,
                        "items": {
                          "type": "number",
                          "minimum": 1,
                          "description": "The quantity of units in the customer's order must be equal or higher than the defined number."
                        }
                      }
                    }
                  },
                  "rules": {
                    "type": "object",
                    "description": "An empty object."
                  }
                }
              }
            },
            "error": {
              "type": "object",
              "description": "**CURRENTLY UNSUPPORTED**. Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "$ref": "#/components/schemas/ValidationRuleRules01"
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules01": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "$ref": "#/components/schemas/ValidationRuleRules02"
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules02": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "$ref": "#/components/schemas/ValidationRuleRules03"
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleRules03": {
        "title": "Validation Rule Rules",
        "type": "object",
        "description": "Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions.",
        "properties": {
          "logic": {
            "type": "string",
            "example": "(1 and 2) and (3)",
            "description": "Defines the logic between the rules."
          }
        },
        "additionalProperties": {
          "type": "object",
          "description": "Contains the name of the validation rule.",
          "properties": {
            "name": {
              "type": "string",
              "description": "Voucherify's specific rule name.  The list of available names is provided below.  \n\n|**Type**|**Name** |\n---- | -----------|\n|**Customer** | customer.segment<br>customer.metadata* |\n|**Order** |order.amount<br>order.initial_amount<br>order.items.count<br>order.items.price_any<br>order.items.price_each<br>order.items.metadata_any<br>order.items.metadata_each<br>order.metadata* |\n| **Campaign** | campaign.orders.amount_discounted<br>campaign.orders.amount<br>campaign.redemptions.count<br>campaign.redemptions.count.daily<br>campaign.redemptions.count.monthly<br>campaign.redemptions.customers_count<br>campaign.redemptions.customers_count.daily<br>campaign.redemptions.customers_count.monthly |\n| **Redemption** |redemption.gift.amount<br>redemption.count.daily<br>redemption.count.monthly<br>redemption.count.per_customer<br>redemption.count.per_customer.daily<br>redemption.count.per_customer.monthly<br>redemption.api_key<br>redemption.count.per_api_key<br>redemption.user.login<br>redemption.count.per_user<br>redemption.metadata<br>redemption.reward.pay_with_points.points_used |\n| **Product** | product.id<br>product.price<br>product.quantity<br>product.discount_applicable<br>product.metadata*<br>product.metadata.aggregated_quantity<br>product.metadata.aggregated_amount<br>product.metadata.discount_applicable<br>product.metadata.match_all |\n| **SKU** | sku.id<br>sku.price<br>sku.quantity<br>sku.discount_applicable |\n| **Publication** | publication.redeemable_by_linked_customer |\n| **Custom Event** | custom_event.metadata* |\n| **Order items** | order.items.every<br>order.items.any<br>order.items.none<br>order.items.cheapest<br>order.items.most_expensive | order.items.quantity<br>order.items.aggregated_quantity<br>order.items.price<br>order.items.aggregated_amount<br>order.items.metadata* |  \n\n\n\n*Requires the `property` field to be defined."
            },
            "property": {
              "type": "string",
              "nullable": true,
              "description": "Custom name for a metadata property associated with the condition to be satisfied. **Required** if the property `name` is any of the following: \n customer_metadata<br>custom_event_metadata<br>order_items_metadata<br>order_metadata<br>product_metadata<br>redemption_metadata"
            },
            "conditions": {
              "$ref": "#/components/schemas/ValidationRuleConditions"
            },
            "rules": {
              "type": "object",
              "description": "Another set of validation rules. If you need to create complex rules with more nested rules, use the validation rule builder in the dashboard."
            },
            "error": {
              "type": "object",
              "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rule.",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rule."
                }
              }
            }
          }
        }
      },
      "ValidationRuleConditions": {
        "title": "Validation Rule Conditions",
        "type": "object",
        "description": "A set of key value pairs representing the condition name and value. The list of available conditions is provided below: \n\n| **Condition (key)** | **Definition**                                                | \n|---------------------|---------------------------------------------------------------|\n| `$is`                 | A property is a predefined value.                             |                           \n| `$is_not`             | A property is not a predefined value.                         |                           \n| `$in`                 | A property is one value of the values in a predefined list of values.   |                          \n|`$not_in`                 | A property is not one of the values in a predefined list of values.   |                          \n| `$less_than`          | A property is less than a predefined value. Can be also used with datetime.                  |                     \n| `$less_than_or_equal` | A property is less than or equal to a predefined value. Can be also used with datetime.       | \n| `$more_than`          | A property is more than a predefined value. Can be also used with datetime.                  | \n| `$more_than_or_equal` | A property is more than or equal to a predefined value. Can be also used with datetime.      | \n| `$starts_with`        | A property starts with the predefined sequence of characters. | \n| `$ends_with `         | A property ends with the predefined sequence of characters.   | \n| `$contains`           | A property contains the predefined sequence of characters.    | \n| `$timeframe`          | A property occurs within the time frame, i.e. every 1 day for 1 hour, e.g. `$timeframe: [\"2024-11-12T14:59:23.019Z;P1D;PT1H\"]`                                                       | \n| `$timeframe_absolute` | A property occurs between two dates and times, e.g. `2024-11-14T16:02:00.000Z;2024-11-28T16:02:00.000Z`                                                        | \n| `$timeframe_daily_hours` | A property occurs between selected hours on selected days of the week, e.g. `18:00;20:01;2,3`, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday.                                                       | \n| `$dow`                | A property occurs within given days of the week, where `0` equals Sunday, `1` equals Monday, `2` equals Tuesday, `3` equals Wednesday, `4` equals Thursday, `5` equals Friday, and `6` equals Saturday.                                                        | \n| `$count`              | For array metadata; the property must have exactly the defined number of elements.                                                        | \n| `$count_more`         | For array metadata; the property must have more elements than the defined number.                                                        | \n| `$count_less`         | For array metadata; the property must have less elements than the defined number.                                                        | \n| `$from`               | The property must belong to the predefined value. Related to product collections and best used together with the `$is` condition.                                                        | \n | `$after`               | The value is after the date.                                                        | \n| `$before`               | The value is before the date.                                                        | \n| `$more_than_ago`               | The date is more than the defined value ago expressed in number of days, relative to today, e.g. more than 3 days ago.                                                        | \n| `$less_than_ago`               | The date is less than the defined value ago expressed in number of days, relative to today, less than 3 days ago.                                                        | \n| `is_days_ago`               | The date is exactly the defined value ago expressed in number of days, relative to today, e.g. exactly 3 days ago.                                                        | \n| `$more_than_future`               | The date is more than the defined value in the future expressed in number of days, relative to today, e.g. more than 3 days in the future.                                                        | \n| `$less_than_ago`               | The date is less than the defined value in the future expressed in number of days, relative to today, e.g. less than 3 days in the future.                                                        | \n| `$is_days_in_future`               | The date is exactly the defined value in the future expressed in number of days, relative to today, e.g. exactly 3 days in the future.                                                        | \n",
        "properties": {
          "$is": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$is_not": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$in": {
            "$ref": "#/components/schemas/Any"
          },
          "$not_in": {
            "$ref": "#/components/schemas/Any"
          },
          "$less_than": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$less_than_or_equal": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$more_than": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$more_than_or_equal": {
            "$ref": "#/components/schemas/AnyOne"
          },
          "$starts_with": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$ends_with": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$contains": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$timeframe": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$timeframe_absolute": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$timeframe_daily_hours": {
            "$ref": "#/components/schemas/AnyString"
          },
          "$dow": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "$count": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$count_more": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$count_less": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$not_differ": {
            "$ref": "#/components/schemas/Any"
          },
          "$not_intersect": {
            "$ref": "#/components/schemas/Any"
          },
          "$from": {
            "$ref": "#/components/schemas/Any"
          },
          "$after": {
            "$ref": "#/components/schemas/AnyDateDateTime"
          },
          "$before": {
            "$ref": "#/components/schemas/AnyDateDateTime"
          },
          "$more_than_ago": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$less_than_ago": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$is_days_ago": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$more_than_future": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$less_than_future": {
            "$ref": "#/components/schemas/AnyNumber"
          },
          "$is_days_in_future": {
            "$ref": "#/components/schemas/AnyNumber"
          }
        }
      },
      "ValidationRule": {
        "title": "Validation Rule",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRuleBase"
          },
          {
            "title": "Validation Rule",
            "type": "object",
            "description": "This is an object representing a response validation rule.",
            "properties": {
              "id": {
                "type": "string",
                "example": "val_eR1c41hu0vUU",
                "description": "Unique validation rule ID."
              },
              "created_at": {
                "type": "string",
                "example": "2022-03-23T07:44:00.444Z",
                "description": "Timestamp representing the date and time when the validation rule was created. The value is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "example": "2022-04-26T08:35:54.960Z",
                "description": "Timestamp representing the date and time when the validation rule was updated. The value is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "assignments_count": {
                "description": "The number of instances the validation rule has been assigned to different types of redeemables.",
                "type": "integer"
              },
              "object": {
                "type": "string",
                "default": "validation_rules",
                "description": "The type of the object represented by JSON. This object stores information about the validation rule."
              }
            },
            "required": [
              "id",
              "name",
              "rules",
              "applicable_to",
              "created_at",
              "type",
              "context_type",
              "object"
            ]
          }
        ]
      },
      "ValidationRuleBase": {
        "title": "Validation Rule Base",
        "type": "object",
        "description": "This is an object representing a request validation rule.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Custom, unique name for set of validation rules.",
            "example": "Business Validation Rule"
          },
          "rules": {
            "$ref": "#/components/schemas/ValidationRuleRules"
          },
          "bundle_rules": {
            "$ref": "#/components/schemas/ValidationRuleBundleRules"
          },
          "error": {
            "type": "object",
            "description": "Contains the error message returned from API when validation / redemption fails to meet requirements of defined rules.",
            "properties": {
              "message": {
                "type": "string",
                "description": "The error message returned from API when validation / redemption fails to meet requirements of defined rules."
              }
            }
          },
          "applicable_to": {
            "type": "object",
            "properties": {
              "excluded": {
                "type": "array",
                "description": "Defines which items are excluded from a discount.",
                "items": {
                  "$ref": "#/components/schemas/ApplicableTo"
                }
              },
              "included": {
                "type": "array",
                "description": "Defines which items are included in a discount.",
                "items": {
                  "$ref": "#/components/schemas/ApplicableTo"
                }
              },
              "included_all": {
                "type": "boolean",
                "description": "Indicates whether all items are included in the discount."
              }
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "expression",
              "basic",
              "advanced",
              "complex"
            ],
            "default": "expression",
            "description": "Type of validation rule."
          },
          "context_type": {
            "type": "string",
            "default": "global",
            "enum": [
              "earning_rule.order.paid",
              "earning_rule.custom_event",
              "earning_rule.customer.segment.entered",
              "earning_rule.customer.tier.joined",
              "earning_rule.customer.tier.left",
              "earning_rule.customer.tier.upgraded",
              "earning_rule.customer.tier.downgraded",
              "earning_rule.customer.tier.prolonged",
              "campaign.discount_coupons",
              "campaign.discount_coupons.discount.apply_to_order",
              "campaign.discount_coupons.discount.apply_to_items",
              "campaign.discount_coupons.discount.apply_to_items_proportionally",
              "campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity",
              "campaign.discount_coupons.discount.apply_to_items_by_quantity",
              "campaign.discount_coupons.discount.fixed.apply_to_items",
              "campaign.discount_coupons.discount.percent.apply_to_items",
              "campaign.gift_vouchers",
              "campaign.gift_vouchers.gift.apply_to_order",
              "campaign.gift_vouchers.gift.apply_to_items",
              "campaign.referral_program",
              "campaign.referral_program.discount.apply_to_order",
              "campaign.referral_program.discount.apply_to_items",
              "campaign.referral_program.discount.apply_to_items_proportionally",
              "campaign.referral_program.discount.apply_to_items_proportionally_by_quantity",
              "campaign.referral_program.discount.apply_to_items_by_quantity",
              "campaign.referral_program.discount.fixed.apply_to_items",
              "campaign.referral_program.discount.percent.apply_to_items",
              "campaign.promotion",
              "campaign.promotion.discount.apply_to_order",
              "campaign.promotion.discount.apply_to_items",
              "campaign.promotion.discount.apply_to_items_proportionally",
              "campaign.promotion.discount.apply_to_items_proportionally_by_quantity",
              "campaign.promotion.discount.apply_to_items_by_quantity",
              "campaign.promotion.discount.fixed.apply_to_items",
              "campaign.promotion.discount.percent.apply_to_items",
              "campaign.loyalty_program",
              "voucher.discount_voucher",
              "voucher.discount_voucher.discount.apply_to_order",
              "voucher.discount_voucher.discount.apply_to_items",
              "voucher.discount_voucher.discount.apply_to_items_proportionally",
              "voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity",
              "voucher.discount_voucher.discount.apply_to_items_by_quantity",
              "voucher.discount_voucher.discount.fixed.apply_to_items",
              "voucher.discount_voucher.discount.percent.apply_to_items",
              "voucher.gift_voucher",
              "voucher.gift_voucher.gift.apply_to_order",
              "voucher.gift_voucher.gift.apply_to_items",
              "voucher.loyalty_card",
              "distribution.custom_event",
              "distribution.order.paid",
              "distribution.order.created",
              "distribution.order.canceled",
              "distribution.order.updated",
              "reward_assignment.pay_with_points",
              "global"
            ],
            "description": "Validation rule context type.  \n\n| **Context Type** | **Definition** |\n|:---|:---|\n| earning_rule.order.paid |  |\n| earning_rule.custom_event |  |\n| earning_rule.customer.segment.entered |  |\n| campaign.discount_coupons |  |\n| campaign.discount_coupons.discount.apply_to_order |  |\n| campaign.discount_coupons.discount.apply_to_items |  |\n| campaign.discount_coupons.discount.apply_to_items_proportionally |  |\n| campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity |  |\n| campaign.discount_coupons.discount.fixed.apply_to_items |  |\n| campaign.gift_vouchers |  |\n| campaign.gift_vouchers.gift.apply_to_order |  |\n| campaign.gift_vouchers.gift.apply_to_items |  |\n| campaign.referral_program |  |\n| campaign.referral_program.discount.apply_to_order |  |\n| campaign.referral_program.discount.apply_to_items |  |\n| campaign.referral_program.discount.apply_to_items_proportionally |  |\n| campaign.referral_program.discount.apply_to_items_proportionally_by_quantity |  |\n| campaign.referral_program.discount.fixed.apply_to_items |  |\n| campaign.promotion |  |\n| campaign.promotion.discount.apply_to_order |  |\n| campaign.promotion.discount.apply_to_items |  |\n| campaign.promotion.discount.apply_to_items_proportionally |  |\n| campaign.promotion.discount.apply_to_items_proportionally_by_quantity |  |\n| campaign.promotion.discount.fixed.apply_to_items |  |\n| campaign.loyalty_program |  |\n| voucher.discount_voucher |  |\n| voucher.discount_voucher.discount.apply_to_order |  |\n| voucher.discount_voucher.discount.apply_to_items |  |\n| voucher.discount_voucher.discount.apply_to_items_proportionally |  |\n| voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity |  |\n| voucher.discount_voucher.discount.fixed.apply_to_items |  |\n| voucher.gift_voucher |  |\n| voucher.gift_voucher.gift.apply_to_order |  |\n| voucher.gift_voucher.gift.apply_to_items |  |\n| voucher.loyalty_card |  |\n| distribution.custom_event |  |\n| reward_assignment.pay_with_points |  |\n| global |  |"
          }
        }
      },
      "ValidationRulesCreateResponseBody": {
        "type": "object",
        "title": "Validation Rules Create Response Body",
        "description": "Response body schema for **POST** `v1/validation-rules`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRule"
          }
        ]
      },
      "ValidationRulesGetResponseBody": {
        "type": "object",
        "title": "Validation Rules Get Response Body",
        "description": "Response body schema for **GET** `v1/validation-rules/{validationRuleId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRule"
          }
        ]
      },
      "ValidationRulesUpdateResponseBody": {
        "type": "object",
        "title": "Validation Rules Update Response Body",
        "description": "Response body schema for **PUT** `v1/validation-rules/{validationRuleId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRule"
          }
        ]
      },
      "ValidationRulesCreateRequestBody": {
        "title": "Validation Rules Create Request Body",
        "description": "Request body schema for **POST** `v1/validation-rules`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRuleBase"
          },
          {
            "type": "object",
            "required": [
              "name"
            ]
          }
        ]
      },
      "ValidationRulesUpdateRequestBody": {
        "title": "Validation Rules Update Request Body",
        "description": "Response body schema for **PUT** `v1/validation-rules/{validationRuleId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRuleBase"
          }
        ]
      },
      "ValidationRulesListResponseBody": {
        "description": "Response body schema for **GET** `v1/validation-rules`.",
        "type": "object",
        "title": "Validation Rules List Response Body",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about validation rules.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of validation rules.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "An array of validation rules.",
            "items": {
              "$ref": "#/components/schemas/ValidationRule"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of validation rules in the project."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ValidationRulesAssignmentsCreateResponseBody": {
        "type": "object",
        "title": "Validation Rules Assignments Create Response Body",
        "description": "Response body for **POST** `v1/validation-rules/{validationRuleId}/assignments`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRuleAssignment"
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "ValidationRulesAssignmentsListResponseBody": {
        "type": "object",
        "title": "Validation Rules Assignments List Response Body",
        "description": "Response body for **GET** `v1/validation-rules-assignments` and **GET** `v1/validation-rules/{validationRuleId}/assignments`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationRuleAssignmentsList"
          }
        ]
      },
      "ValidationRulesAssignmentsCreateRequestBody": {
        "type": "object",
        "description": "Request body schema for **POST** `v1/validation-rules/{validationRuleId}/assignments`.",
        "title": "Create Validation Rule Assignments Request Body",
        "properties": {
          "related_object_type": {
            "type": "string",
            "description": "Defines the related object, e.g. `voucher`.",
            "default": "voucher",
            "enum": [
              "voucher",
              "promotion_tier",
              "campaign",
              "earning_rule",
              "distribution",
              "reward_assignment"
            ]
          },
          "related_object_id": {
            "type": "string",
            "description": "Unique related object ID assigned by Voucherify, e.g. `v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno` for a voucher."
          }
        }
      },
      "Segment": {
        "title": "Segment",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "seg_1wc52c5z6r1kQ81brO8j9Hk2",
            "description": "Unique segment ID."
          },
          "name": {
            "type": "string",
            "description": "Segment name."
          },
          "created_at": {
            "type": "string",
            "example": "2022-05-12T13:01:56.896Z",
            "description": "Timestamp representing the date and time when the segment was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "enum": [
              "auto-update",
              "static"
            ],
            "description": "Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers)."
          },
          "filter": {
            "type": "object",
            "nullable": true,
            "description": "Defines a set of criteria for an `auto-update` segment type.  "
          },
          "initial_sync_status": {
            "type": "string",
            "enum": [
              "IN_PROGRESS",
              "DONE"
            ]
          },
          "object": {
            "type": "string",
            "default": "segment",
            "description": "The type of the object represented by JSON. This object stores information about the customer segment.",
            "enum": [
              "segment"
            ]
          }
        },
        "description": "This is an object representing a customer segment."
      },
      "SegmentsGetResponseBody": {
        "title": "Create Customer Segment Response Body",
        "description": "Response body schema for **GET** `v1/v1/segments/{segmentId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Segment"
          }
        ]
      },
      "SegmentsCreateResponseBody": {
        "title": "Create Customer Segment Response Body",
        "description": "Response body schema for **POST** `v1/segments`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Segment"
          }
        ]
      },
      "SegmentsCreateRequestBody": {
        "title": "Create Customer Segment Request Body",
        "description": "Request body schema for **POST** `v1/segments`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SegmentsCreateRequestBodyStatic"
          },
          {
            "$ref": "#/components/schemas/SegmentsCreateRequestBodyDynamic"
          }
        ]
      },
      "SegmentsCreateRequestBodyStatic": {
        "title": "Static Customer Segment",
        "type": "object",
        "description": "Request body schema for creating a static customer segment in **POST** `v1/segments`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Segment name."
          },
          "type": {
            "type": "string",
            "description": "Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers).",
            "default": "static",
            "enum": [
              "static"
            ]
          },
          "customers": {
            "type": "array",
            "description": "Array of customer IDs.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SegmentsCreateRequestBodyDynamic": {
        "title": "Dynamic Customer Segment",
        "type": "object",
        "description": "Request body schema for creating a dynamic customer segment in **POST** `v1/segments`.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Segment name."
          },
          "type": {
            "type": "string",
            "description": "Describes whether the segment is dynamic (customers come in and leave based on set criteria) or static (manually selected customers).",
            "default": "auto-update",
            "enum": [
              "auto-update"
            ]
          },
          "filter": {
            "type": "object",
            "description": "Defines a set of criteria for an `auto-update` segment type."
          }
        }
      },
      "CustomerSegmentsList": {
        "type": "object",
        "title": "Customer Segments List",
        "description": "List of customer's segments",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about customer segments.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of segment IDs.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of segment IDs and names.",
            "items": {
              "$ref": "#/components/schemas/SimpleSegment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of segments the customer belongs to."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "CustomerRedeemablesList": {
        "type": "object",
        "title": "Customer Redeemables List",
        "description": "List of customer's redeemables",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about customer redeemables.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of redeemables.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of redeemables.",
            "items": {
              "$ref": "#/components/schemas/CustomerRedeemable"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of results returned."
          },
          "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 ID in the `starting_after_id` query parameter to display another page of the results occuring after the field with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total",
          "has_more"
        ]
      },
      "RedeemableHoldersList": {
        "type": "object",
        "title": "Redeemable Holders List",
        "description": "List of Holder's Redeemables",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about redeemables holders",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of holders.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "A dictionary that contains an array of holders.",
            "items": {
              "$ref": "#/components/schemas/RedeemableHolder"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of holders assigned to the redeemable."
          },
          "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 ID in the `starting_after_id` query parameter to display another page of the results occuring after the field with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total",
          "has_more"
        ]
      },
      "CustomerRedeemable": {
        "type": "object",
        "title": "Customer Redeemable",
        "description": "Single customer's redeemable",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique redeemable holder identifier.",
            "example": "rh_0e7b8db4700106a852"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the redeemable was assigned. The value is shown in the ISO 8601 format.",
            "example": "2024-03-22T17:48:25.910Z"
          },
          "redeemable_id": {
            "type": "string",
            "description": "Identifier of the redeemable item.",
            "example": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1"
          },
          "redeemable_object": {
            "type": "string",
            "description": "Type of the redeemable.",
            "example": "voucher"
          },
          "customer_id": {
            "type": "string",
            "description": "Identifier of the customer.",
            "example": "cust_p1ufreYbVbwZ1x70nFkH9rF9"
          },
          "holder_role": {
            "type": "string",
            "description": "Role of the holder.",
            "enum": [
              "OWNER",
              "REFERRER",
              "REFEREE"
            ],
            "default": "OWNER",
            "example": "OWNER"
          },
          "campaign_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique campaign identifier, assigned by Voucherify.",
            "example": "camp_weer1c3p5ZgktqfW56RfoNaG"
          },
          "campaign_type": {
            "type": "string",
            "nullable": true,
            "description": "Defines the type of the campaign.",
            "enum": [
              "LOYALTY_PROGRAM",
              "GIFT_VOUCHERS",
              "DISCOUNT_COUPONS",
              "PROMOTION",
              "REFERRAL_PROGRAM"
            ],
            "example": "DISCOUNT_COUPONS",
            "default": "DISCOUNT_COUPONS"
          },
          "voucher_type": {
            "type": "string",
            "description": "Defines the type of the voucher.",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "default": "DISCOUNT_VOUCHER",
            "example": "DISCOUNT_VOUCHER"
          },
          "redeemable": {
            "type": "object",
            "description": "Detailed information about the customer's redeemable item",
            "properties": {
              "type": {
                "type": "string",
                "description": "Type of the redeemable.",
                "example": "voucher"
              },
              "voucher": {
                "description": "Defines the details of the voucher.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RedeemableVoucher"
                  }
                ]
              },
              "status": {
                "type": "string",
                "description": "Status of the redeemable.",
                "enum": [
                  "ACTIVE",
                  "USED",
                  "DISABLED",
                  "NOT_ACTIVE_YET",
                  "EXPIRED",
                  "NO_BALANCE"
                ],
                "default": "ACTIVE",
                "example": "ACTIVE"
              }
            },
            "required": [
              "type",
              "voucher",
              "status"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "redeemable_id",
          "redeemable_object",
          "customer_id",
          "holder_role",
          "campaign_id",
          "campaign_type",
          "voucher_type",
          "redeemable"
        ]
      },
      "RedeemableHolder": {
        "type": "object",
        "title": "Customer Redeemable",
        "description": "Single customer's redeemable",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the redeemable holder.",
            "example": "rh_0e7b8db4700106a852"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the redeemable was assigned. The value is shown in the ISO 8601 format.",
            "example": "2024-03-22T17:48:25.910Z"
          },
          "redeemable_id": {
            "type": "string",
            "description": "Identifier of the redeemable item.",
            "example": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1"
          },
          "redeemable_object": {
            "type": "string",
            "description": "Type of the redeemable.",
            "example": "voucher"
          },
          "customer_id": {
            "type": "string",
            "description": "Unique identifier of the customer.",
            "example": "cust_p1ufreYbVbwZ1x70nFkH9rF9"
          },
          "holder_role": {
            "type": "string",
            "description": "Role of the holder.",
            "enum": [
              "OWNER",
              "REFERRER",
              "REFEREE"
            ],
            "example": "OWNER"
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the campaign as assigned by Voucherify.",
            "example": "camp_weer1c3p5ZgktqfW56RfoNaG"
          },
          "campaign_type": {
            "type": "string",
            "description": "Defines the type of the campaign.",
            "default": "REFERRAL_PROGRAM",
            "enum": [
              "REFERRAL_PROGRAM"
            ],
            "example": "REFERRAL_PROGRAM"
          },
          "voucher_type": {
            "type": "string",
            "description": "Defines the type of the voucher.",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "example": "DISCOUNT_VOUCHER"
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to a redeemable holder. The metadata object stores all custom attributes assigned to the `redeemable_holder` object."
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "redeemable_holder",
            "enum": [
              "redeemable_holder"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "redeemable_id",
          "redeemable_object",
          "customer_id",
          "holder_role",
          "campaign_id",
          "campaign_type",
          "voucher_type",
          "object"
        ]
      },
      "SimpleRedeemableHolder": {
        "type": "object",
        "title": "Redeemable Holder",
        "description": "Details about the holder of the redeemable.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the redeemable holder.",
            "example": "rh_0e7b8db4700106a852"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the redeemable was assigned. The value is shown in the ISO 8601 format.",
            "example": "2024-03-22T17:48:25.910Z"
          },
          "redeemable_id": {
            "type": "string",
            "description": "Identifier of the redeemable item.",
            "example": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1"
          },
          "redeemable_object": {
            "type": "string",
            "description": "Type of the redeemable.",
            "example": "voucher",
            "enum": [
              "voucher"
            ]
          },
          "campaign_id": {
            "type": "string",
            "description": "Unique identifier of the campaign as assigned by Voucherify.",
            "example": "camp_weer1c3p5ZgktqfW56RfoNaG"
          },
          "campaign_type": {
            "type": "string",
            "description": "Defines the type of the campaign.",
            "enum": [
              "REFERRAL_PROGRAM"
            ],
            "example": "REFERRAL_PROGRAM"
          },
          "voucher_type": {
            "type": "string",
            "description": "Defines the type of the voucher.",
            "enum": [
              "GIFT_VOUCHER",
              "DISCOUNT_VOUCHER",
              "LOYALTY_CARD"
            ],
            "example": "DISCOUNT_VOUCHER"
          },
          "publication_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier of the publication."
          },
          "customer_id": {
            "type": "string",
            "description": "Unique identifier of the customer.",
            "example": "cust_p1ufreYbVbwZ1x70nFkH9rF9"
          },
          "holder_role": {
            "type": "string",
            "description": "Role of the holder.",
            "enum": [
              "OWNER",
              "REFERRER",
              "REFEREE"
            ],
            "example": "REFERRER"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "redeemable_holder"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "redeemable_id",
          "redeemable_object",
          "campaign_id",
          "campaign_type",
          "voucher_type",
          "publication_id",
          "customer_id",
          "holder_role",
          "object"
        ]
      },
      "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"
          }
        }
      },
      "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"
        ]
      },
      "RedemptionRewardResult": {
        "title": "Redemption Reward Result",
        "type": "object",
        "properties": {
          "customer": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/SimpleCustomer"
              }
            ]
          },
          "assignment_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique reward assignment ID assigned by Voucherify."
          },
          "voucher": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Voucher"
              }
            ]
          },
          "product": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Product"
              }
            ]
          },
          "sku": {
            "nullable": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/Sku"
              }
            ]
          },
          "loyalty_tier_id": {
            "type": "string",
            "nullable": true,
            "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": "integer",
                    "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"
        ]
      },
      "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",
            "nullable": true,
            "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."
          }
        }
      },
      "ValidationEntity": {
        "title": "Validation Entity",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique validation id."
          },
          "session_id": {
            "type": "string",
            "description": "Unique session id."
          },
          "status": {
            "type": "string",
            "description": "The validation status",
            "enum": [
              "VALID",
              "INVALID"
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-22T10:13:06.487Z",
            "description": "Timestamp representing the date and time when the validation was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "customer_id": {
            "type": "string",
            "description": "Unique customer identifier of the customer making the purchase. The ID is assigned by Voucherify.",
            "example": "cust_7iUa6ICKyU6gH40dBU25kQU1"
          },
          "redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable.",
            "items": {
              "type": "object",
              "description": "Determines the redeemables",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the redeemable, assigned by Voucherify."
                },
                "type": {
                  "type": "string",
                  "description": "Type of the redeemable.",
                  "enum": [
                    "voucher",
                    "promotion_tier"
                  ]
                }
              }
            }
          },
          "skipped_redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable.",
            "items": {
              "type": "object",
              "description": "Determines the redeemables",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the redeemable, assigned by Voucherify."
                },
                "type": {
                  "type": "string",
                  "description": "Type of the redeemable.",
                  "enum": [
                    "voucher",
                    "promotion_tier"
                  ]
                }
              }
            }
          },
          "inapplicable_redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable.",
            "items": {
              "type": "object",
              "description": "Determines the redeemables",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the redeemable, assigned by Voucherify."
                },
                "type": {
                  "type": "string",
                  "description": "Type of the redeemable.",
                  "enum": [
                    "voucher",
                    "promotion_tier"
                  ]
                }
              }
            }
          }
        }
      },
      "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."
          }
        }
      },
      "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."
          }
        }
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "16_obj_export_order": {
        "description": "List of available fields and filters that can be exported with an order along with the sorting order of the returned data.",
        "title": "order",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "-created_at",
              "created_at",
              "updated_at",
              "-updated_at",
              "status",
              "-status"
            ]
          },
          "fields": {
            "type": "array",
            "enum": [
              "id",
              "source_id",
              "created_at",
              "updated_at",
              "status",
              "amount",
              "discount_amount",
              "items_discount_amount",
              "total_discount_amount",
              "total_amount",
              "customer_id",
              "referrer_id",
              "metadata"
            ],
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique order ID. | ord_A69RIxEdRsPuC6i8gFGVHUft |\n| source_id | Unique order source ID. | 8638 |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the order was created. | 2022-03-09T09:16:32.521Z |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the order was last updated. | 2022-03-09T09:16:33.331Z |\n| status | Order status. | `PAID`, `CREATED`, `FULFILLED`, `CANCELED` |\n| amount | Total amount of order items. | 7700 |\n| discount_amount | Represents total amount of the discount applied to whole cart. | 500 |\n| items_discount_amount | Represents total amount of the discount applied to order line items. | 100 |\n| total_discount_amount | All discounts applied to the order including discounts applied to particular order line items and discounts applied to the whole cart. | 600 |\n| total_amount | Total order amount after applying all discounts. | 7100 |\n| customer_id | Customer unique ID. | cust_2G4fUQdCXUqp35nXNleav7bO |\n| referrer_id | Referrer unique ID. | cust_IkrTR674vvQvr9a4rDMiqglY |\n| metadata | Returns all order metadata. | Response will include all order metadata. |\n| metadata.X | Where X is the name of a particular order metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Order. [Read more here](https://support.voucherify.io/article/99-schema-validation-metadata). |",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/16_obj_filter_order_status"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_order_source_id"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_order_amount"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_order_total_amount"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_order_discount_amount"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_order_total_discount_amount"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_order_items_discount_amount"
              }
            ]
          }
        }
      },
      "16_obj_export_voucher": {
        "description": "List of available fields and filters that can be exported with a voucher along with the sorting order of the returned data.",
        "title": "voucher",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "created_at",
              "-created_at",
              "updated_at",
              "-updated_at",
              "code",
              "-code"
            ]
          },
          "fields": {
            "type": "array",
            "enum": [
              "code",
              "voucher_type",
              "value",
              "discount_type",
              "campaign",
              "category",
              "start_date",
              "expiration_date",
              "gift_balance",
              "loyalty_balance",
              "redemption_quantity",
              "redemption_count",
              "active",
              "qr_code",
              "bar_code",
              "id",
              "is_referral_code",
              "created_at",
              "updated_at",
              "validity_timeframe_interval",
              "validity_timeframe_duration",
              "validity_day_of_week",
              "discount_amount_limit",
              "campaign_id",
              "additional_info",
              "customer_id",
              "discount_effect",
              "discount_unit_type",
              "discount_unit_effect",
              "validation_rules_id",
              "customer_source_id",
              "metadata"
            ],
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique voucher ID. | v_HSnGD2vNIHYighTQxwcB4dtVAv8VOmZD |\n| code | Unique voucher code. | WELCOME100 |\n| voucher_type | Type of voucher. | `DISCOUNT_VOUCHER`, `GIFT_VOUCHER`, `LOYALTY_CARD` |\n| value | Value of voucher. | `DISCOUNT_VOUCHER` : amount, percent, unit<br>`GIFT_VOUCHER`: amount left to spend<br>`LOYALTY_CARD`: available usable points |\n| discount_type | The type of discount for a `DISCOUNT_VOUCHER`. | `AMOUNT`, `PERCENT`, `UNIT`, `FIXED` |\n| campaign | Unique campaign name. | Summer Discounts 20% off |\n| category | Tag defining the category that this voucher belongs to. |  |\n| start_date | Start date defines when the code starts to be active. Activation timestamp is presented in the ISO 8601 format. Voucher is _inactive_ before this date. | 2020-12-10T23:00:00.000Z |\n| expiration_date | Expiration date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format. Voucher is _inactive_ after this date. | 2023-12-31T23:00:00.000Z |\n| gift_balance | Amount left to spend. | 1000 |\n| loyalty_balance | Available usable points. | 2000 |\n| redemption_quantity | Maximum number of times a voucher can be redeemed. | 2 |\n| redemption_count | Total redemptions. | 59 |\n| active | Boolean indicating whether the voucher is available for use. | `true`, `false` |\n| qr_code | URL to QR representation of encrypted code. |  |\n| bar_code | URL to barcode representation of encrypted code. |  |\n| is_referral_code | Boolean indicating whether the voucher is a referral code. | `true`, `false` |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the voucher was created. | 2022-04-14T09:55:46.814Z |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the voucher was last updated. | 2022-04-14T10:02:18.036Z |\n| validity_timeframe_interval | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of `P2D` will be active every other day. | P2D |\n| validity_timeframe_duration | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of `PT1H` will be valid for a duration of one hour. | PT1H |\n| validity_day_of_week | Array corresponding to the particular days of the week in which the voucher is valid. | \"1,2,3,4,5\" |\n| discount_amount_limit | For `PERCENT` discount type, this is the maximum threshold allowed to be deducted. | 50 |\n| campaign_id | Parent campaign ID. | camp_7s3uXI44aKfIk5IhmeOPr6ic |\n| additional_info | An optional field to keep any extra textual information about the code such as a code description and details. |  |\n| customer_id | Unique customer ID of the assigned owner to whom the voucher was published. | cust_7iUa6ICKyU6gH40dBU25kQU1 |\n| discount_unit_type | For `UNIT` discount type, either a shipping or product ID for a `UNIT` discount with one product. | prod_5h1pp1ng, prod_0a9f9aeddb019a42db |\n| discount_unit_effect | `UNIT` discount effect. | `ADD_MANY_ITEMS`, `ADD_MISSING_ITEMS`,`ADD_NEW_ITEMS` |\n| customer_source_id | Unique customer source id of the assigned owner to whom the voucher was published. | name.lastname@email.com |\n| metadata | Returns all voucher metadata. | Response will include all voucher metadata. |\n| metadata.X | Where X is the name of a particular voucher metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Voucher. [Read more here](https://support.voucherify.io/article/99-schema-validation-metadata). |\n",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "object",
            "description": "Data filters used to narrow down the data records to be returned in the export. You can filter the following parameters: \n\n - `categories`\n\n - `vouchers`\n\n - `type`\n\n - `holder_id`\n\n - `is_referral_code`\n\n - `published_for_customer_id`\n\n - `validity_timeframe`\n\n - `category_ids`"
          }
        }
      },
      "16_obj_export_publication": {
        "description": "List of available fields and filters that can be exported with a publication along with the sorting order of the returned data.",
        "title": "publication",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "id",
              "-id",
              "voucher_code",
              "-voucher_code",
              "tracking_id",
              "-tracking_id",
              "customer_id",
              "-customer_id",
              "created_at",
              "-created_at",
              "channel",
              "-channel"
            ]
          },
          "fields": {
            "type": "array",
            "enum": [
              "voucher_code",
              "customer_id",
              "customer_source_id",
              "date",
              "channel",
              "campaign",
              "is_winner",
              "metadata"
            ],
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| voucher_code | Unique voucher code. | WELCOME100 |\n| customer_id | Customer unique ID. | cust_7iUa6ICKyU6gH40dBU25kQU1 |\n| customer_source_id | Unique customer source id of the assigned owner to whom the voucher was published. | name.lastname@email.com |\n| date | Timestamp in ISO 8601 format representing the date and time when the voucher was published. | 2022-04-28T10:19:30.792Z |\n| channel | Publication channel. | voucherify-website |\n| campaign | Unique campaign name. | Summer Discounts 20% off |\n| is_winner |  |  |\n| metadata | Returns all publication metadata. | Response will include all publication metadata. |\n| metadata.X | Where X is the name of a particular publication metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Publication. [Read more here](https://support.voucherify.io/article/99-schema-validation-metadata) |",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "description": "Data filters used to narrow down the data records to be returned in the export. You can filter the following parameters: \n\n - `failure_code`\n\n - `result`\n\n - `customer_id`\n\n - `campaign_name`\n\n - `voucher_type`\n\n - `is_referral_code`\n\n - `parent_object_id`\n\n - `related_object_id`\n\n - `source_id`",
            "oneOf": [
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_failure_code"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_result"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_customer_id"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_campaign_name"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_voucher_type"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_is_referral_code"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_parent_object_id"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_related_object_id"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_publication_source_id"
              }
            ]
          }
        }
      },
      "16_obj_export_redemption": {
        "description": "List of available fields and filters that can be exported with a redemption along with the sorting order of the returned data.",
        "title": "redemption",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "id",
              "-id",
              "voucher_code",
              "-voucher_code",
              "tracking_id",
              "-tracking_id",
              "customer_id",
              "-customer_id",
              "created_at",
              "-created_at"
            ]
          },
          "fields": {
            "type": "array",
            "enum": [
              "id",
              "object",
              "date",
              "voucher_code",
              "campaign",
              "promotion_tier_id",
              "customer_id",
              "customer_source_id",
              "customer_name",
              "tracking_id",
              "order_amount",
              "gift_amount",
              "loyalty_points",
              "result",
              "failure_code",
              "failure_message",
              "metadata"
            ],
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique redemption ID. | r_0acf3a6dae00e679c8, rf_0acf3a495740e679b8 |\n| object | Object being exported; by default `redemption`. | redemption |\n| date | Timestamp in ISO 8601 format representing the date and time when the voucher was redeemed. | 2022-03-23T08:52:24.867Z |\n| voucher_code | Unique voucher code redeemed. | WELCOME100 |\n| campaign | Parent campaign name of voucher if applicable. | Summer Discounts 20% off |\n| promotion_tier_id |  | promo_Mwy9XpA0TLctSGriM5kum0qp |\n| customer_id | Unique customer ID of redeeming customer. | cust_nk0N1uNQ1YnupAoJGOgvsODC |\n| customer_source_id | Unique source ID of redeeming customer. | name.lastname@email.com |\n| customer_name | Customer name. | John Smith |\n| tracking_id |  | track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy |\n| order_amount | Total order amount before applying all discounts. | 1000 |\n| gift_amount | Gift credits used for redemption. | 10 |\n| loyalty_points |  | 12 |\n| result | Tells you whether the redemption succeeded. | `SUCCESS`, `FAILURE` |\n| failure_code | Internal Voucherify code for reason why redemption failed. | invalid_customer |\n| failure_message | A human-readable message providing a short description explaining why the redemption failed. | Customer must be a holder of a loyalty card. |\n| metadata | Returns all redemption metadata. | Response will include all redemption metadata. |\n| metadata.X | Where X is the name of a particular redemption metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Redemption. [Read more here](https://support.voucherify.io/article/99-schema-validation-metadata) |",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "object",
            "description": "Data filters used to narrow down the data records to be returned in the export. You can filter the following parameters: \n\n - `voucher_code`\n\n - `related_object_id`\n\n - `related_object_parent_id`\n\n - `parent_redemption_id`\n\n - `failure_code`\n\n - `result`\n\n - `object`\n\n - `customer_id`\n\n - `campaign_name`\n\n - `user_login`"
          }
        }
      },
      "16_obj_export_customer": {
        "description": "List of available fields and filters that can be exported with a customer along with the sorting order of the returned data.",
        "title": "customer",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "name",
              "-name",
              "id",
              "-id",
              "email",
              "-email",
              "source_id",
              "-source_id",
              "created_at",
              "-created_at",
              "updated_at",
              "-updated_at"
            ]
          },
          "fields": {
            "type": "array",
            "enum": [
              "name",
              "id",
              "description",
              "email",
              "source_id",
              "created_at",
              "address_city",
              "address_state",
              "address_line_1",
              "address_line_2",
              "address_country",
              "address_postal_code",
              "redemptions_total_redeemed",
              "redemptions_total_failed",
              "redemptions_total_succeeded",
              "redemptions_total_rolled_back",
              "redemptions_total_rollback_failed",
              "redemptions_total_rollback_succeeded",
              "orders_total_amount",
              "orders_total_count",
              "orders_average_amount",
              "orders_last_order_amount",
              "orders_last_order_date",
              "loyalty_points",
              "loyalty_referred_customers",
              "updated_at",
              "phone",
              "birthday",
              "metadata",
              "birthdate"
            ],
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| name | Customer name. | John Smith |\n| id | Unique customer ID. | cust_J1CDUdbqn5Exva8ASWk1Fq0j |\n| description | An arbitrary string that you can attach to a customer object. | Customer requesting to be added to VIP tier. |\n| email | Customer's email. | name.lastname@email.com |\n| source_id | Unique custom customer identifier. | name.lastname@email.com |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the customer was created. | 2022-02-03T13:10:11.928Z |\n| address_city | City | Houston |\n| address_state | State | TX |\n| address_line_1 | First line of customer's address. | 72738 Main St |\n| address_line_2 | Second line of customer's address. | Bld 2, Apt 4 |\n| address_country | Country | United States of America |\n| address_postal_code | Postal code (ZIP code) | 77042-4143 |\n| redemptions_total_redeemed | Total customer redemptions. | 5 |\n| redemptions_total_failed | Total customer failed redemptions. | 2 |\n| redemptions_total_succeeded | Total customer succeeded redemptions. | 3 |\n| redemptions_total_rolled_back | Total customer redemptions that were rolled back. | 3 |\n| redemptions_total_rollback_failed | Total customer redemptions that were unsuccessfully rolled back. | 2 |\n| redemptions_total_rollback_succeeded | Total customer redemptions that were successfully rolled back. | 1 |\n| orders_total_amount | Total sum of order amounts over customer lifetime. Value is multiplied by 100 to precisely represent 2 decimal places. | 10000 (represents $100) |\n| orders_total_count | Total number of customer orders. Value is multiplied by 100 to precisely represent 2 decimal places. | 2 |\n| orders_average_amount | Average amount spent on orders. Value is multiplied by 100 to precisely represent 2 decimal places. | 50 |\n| orders_last_order_amount | How much did the customer spend on their last order. Value is multiplied by 100 to precisely represent 2 decimal places. | 50 |\n| orders_last_order_date | When was the last customer order; timestamp in ISO 8601 format representing the date and time. | 2022-02-03T13:17:30.630Z |\n| loyalty_points | Sum of customer's loyalty points to go across all loyalty cards. |  |\n| loyalty_referred_customers | How many customers were referred by this customer. |  |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the customer was updated. | 2022-02-14T14:10:14.305Z |\n| phone | Customer's phone number. | +1 (294) 752-1846 |\n| birthday | `Deprecated`. ~~Customer's birthday~~. | 2022-01-01 |\n| birthdate | Customer's birthdate. | 2022-04-29 |\n| metadata | Returns all customer metadata. | Response will include all customer metadata. |\n| metadata.X | Where X is the name of a particular customer metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Customer. [Read more here](https://support.voucherify.io/article/99-schema-validation-metadata) |",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "type": "object",
            "description": "Data filters used to narrow down the data records to be returned in the export. You can filter the following parameters: \n\n - `name` (string)\n\n - `email` (string)\n\n - `phone` (string)\n\n - `metadata` (json)\n\n - `metadata.X` (?)\n\n - `address` (json)\n\n - `address.state` (string)\n\n - `address.country` (string)\n\n - `address.postal_code` (string)\n\n - `birthday` (`Deprecated`. string - date-time)\n\n - `birthdate` (string date-time)\n\n - `created_at` (date)\n\n - `source_id` (string)\n\n - `system.metadata` (json)\n\n - `system.metadata.source` (string)\n\n - `system.metadata.consents.unsubscribed` (boolean)\n\n - `loyalty_points` (json)\n\n - `loyalty` (json)\n\n - `summary.orders.total_amount` (json)\n\n - `summary.orders.last_order_date` (date)\n\n - `summary.orders.last_order_amount` (json)\n\n - `summary.redemptions.gift.redeemed_amount` (integer)\n\n - `summary.redemptions.total_succeeded` (integer)\n\n - `events.cart_abandoned.last_occurred` (integer)\n\n - `events.newsletter_subscribed.count` (integer)\n\n - `events.sign_up.last_occurred` (integer)"
          }
        }
      },
      "16_obj_export_points_expiration": {
        "description": "List of available fields and filters that can be exported with points expirations along with the sorting order of the returned data.",
        "title": "points expiration",
        "type": "object",
        "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",
            "enum": [
              "id",
              "campaign_id",
              "voucher_id",
              "status",
              "expires_at",
              "points"
            ],
            "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"
            }
          },
          "filters": {
            "description": "Data filters used to narrow down the data records to be returned in the export. You can filter the following parameters: \n\n - `campaign_id`\n\n - `voucher_id`",
            "oneOf": [
              {
                "$ref": "#/components/schemas/16_obj_filter_points_expiration_campaign_id"
              },
              {
                "$ref": "#/components/schemas/16_obj_filter_points_expiration_voucher_id"
              }
            ]
          }
        }
      },
      "VoucherTransactionsFilters": {
        "description": "List of available fields and filters that can be exported with gift card or loyalty card transactions along with the sorting order of the returned data.",
        "title": "Voucher Transactions",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "-created_at",
              "created_at"
            ]
          },
          "fields": {
            "type": "array",
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `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. | 8638 |\n| reason | Contains the reason for the transaction if one was included originally. |  |\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. | 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 |\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 |",
            "items": {
              "type": "string",
              "enum": [
                "id",
                "type",
                "source_id",
                "reason",
                "balance",
                "amount",
                "created_at",
                "voucher_id",
                "campaign_id",
                "source",
                "details",
                "related_transaction_id"
              ]
            }
          },
          "filters": {
            "$ref": "#/components/schemas/VoucherTransactionsExportFilterConditions"
          }
        },
        "required": [
          "filters"
        ]
      },
      "16_obj_export_loyalty_card_transactions": {
        "description": "List of available fields and filters that can be exported with loyalty card transactions along with the sorting order of the returned data.",
        "title": "loyalty card transactions",
        "type": "object",
        "properties": {
          "order": {
            "type": "string",
            "description": "How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "enum": [
              "-created_at",
              "created_at"
            ]
          },
          "fields": {
            "type": "array",
            "enum": [
              "id",
              "type",
              "source_id",
              "reason",
              "balance",
              "amount",
              "created_at",
              "voucher_id",
              "campaign_id",
              "details",
              "related_transaction_id"
            ],
            "description": "Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\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 |",
            "items": {
              "type": "string"
            }
          },
          "filters": {
            "$ref": "#/components/schemas/16_obj_filter_loyalty_card_transactions_voucher_id"
          }
        }
      },
      "16_obj_filter_publication_failure_code": {
        "description": "Filter conditions set on the publication `failure_code`. Available options are:\n\n - `not_found`,\n\n - `no_voucher_suitable_for_publication`\n\n - `voucher_already_published`\n\n - `duplicate_source_id`\n\n - `too_many_vouchers_requested`",
        "title": "Filter by failure code",
        "type": "object",
        "properties": {
          "failure_code": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_result": {
        "description": "Filter conditions set on the publication `result`. Available options are:\n\n - `SUCCESS`\n\n - `FAILURE`",
        "title": "Filter by result",
        "type": "object",
        "properties": {
          "result": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_customer_id": {
        "description": "Filter conditions set on the publication `customer_id`.",
        "title": "Filter by customer ID",
        "type": "object",
        "properties": {
          "customer_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_campaign_name": {
        "description": "Filter conditions set on the publication `campaign_name`.",
        "title": "Filter by campaign name",
        "type": "object",
        "properties": {
          "campaign_name": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_voucher_type": {
        "description": "Filter conditions set on the publication `voucher_type`.",
        "title": "Filter by voucher type",
        "type": "object",
        "properties": {
          "voucher_type": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_is_referral_code": {
        "description": "Filter conditions set on the publication `is_referral_code`.",
        "title": "Filter if the code is a referral code",
        "type": "object",
        "properties": {
          "is_referral_code": {
            "$ref": "#/components/schemas/16_filter_conditions_boolean"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_parent_object_id": {
        "description": "Filter conditions set on the publication `parent_object_id`, which is the parent campaigns unique ID assigned by Voucherify.",
        "title": "Filter by parent object ID",
        "type": "object",
        "properties": {
          "parent_object_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_related_object_id": {
        "description": "Filter conditions set on the publication `related_object_id`.",
        "title": "Filter by related object ID",
        "type": "object",
        "properties": {
          "related_object_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_publication_source_id": {
        "description": "Filter conditions set on the publication `source_id`.",
        "title": "Filter by publication source ID",
        "type": "object",
        "properties": {
          "source_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_order_status": {
        "description": "Filter conditions set on the order `status`.",
        "title": "Filter by status",
        "type": "object",
        "properties": {
          "status": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_order_source_id": {
        "description": "Filter conditions set on the order `source_id`.",
        "title": "Filter by order source ID",
        "type": "object",
        "properties": {
          "source_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_order_amount": {
        "description": "Filter conditions set on the order `amount`.",
        "title": "Filter by order amount",
        "type": "object",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/16_filter_conditions_number"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_order_total_amount": {
        "description": "Filter conditions set on the order `total_amount`.",
        "title": "Filter by order total amount",
        "type": "object",
        "properties": {
          "total_amount": {
            "$ref": "#/components/schemas/16_filter_conditions_number"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_order_discount_amount": {
        "description": "Filter conditions set on the order `discount_amount`.",
        "title": "Filter by order discount amount",
        "type": "object",
        "properties": {
          "discount_amount": {
            "$ref": "#/components/schemas/16_filter_conditions_number"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_order_total_discount_amount": {
        "description": "Filter conditions set on the order `total_discount_amount`.",
        "title": "Filter by order total discount amount",
        "type": "object",
        "properties": {
          "total_discount_amount": {
            "$ref": "#/components/schemas/16_filter_conditions_number"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_order_items_discount_amount": {
        "description": "Filter conditions set on the order `items_discount_amount`.",
        "title": "Filter by order items discount amount",
        "type": "object",
        "properties": {
          "items_discount_amount": {
            "$ref": "#/components/schemas/16_filter_conditions_number"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_points_expiration_campaign_id": {
        "description": "Filter conditions set on`the `campaign_id`.",
        "title": "Filter by campaign ID",
        "type": "object",
        "properties": {
          "campaign_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_obj_filter_points_expiration_voucher_id": {
        "description": "Filter conditions set on the `voucher_id`.",
        "title": "Filter by voucher ID",
        "type": "object",
        "properties": {
          "voucher_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "VoucherTransactionsExportFilterConditions": {
        "description": "Filter condition.",
        "title": "Filter by voucher ID",
        "type": "object",
        "required": [
          "voucher_id"
        ],
        "properties": {
          "voucher_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
                    }
                  }
                }
              }
            }
          }
        }
      },
      "16_obj_filter_loyalty_card_transactions_voucher_id": {
        "description": "Filter conditions set on the `voucher_id`.",
        "title": "Filter by voucher ID",
        "type": "object",
        "properties": {
          "voucher_id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          },
          "junction": {
            "$ref": "#/components/schemas/Junction"
          }
        }
      },
      "16_filter_conditions_string": {
        "title": "Filter by conditions",
        "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 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 not 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."
              }
            }
          }
        }
      },
      "16_filter_conditions_number": {
        "title": "Filter by conditions",
        "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 resource values that should be included in the results (multiple values).",
                "items": {
                  "type": "integer"
                }
              },
              "$not_in": {
                "type": "array",
                "description": "Array of resource values that should be included in the results (multiple values).",
                "items": {
                  "type": "integer"
                }
              },
              "$is": {
                "type": "integer",
                "description": "Value is exactly this value (single value)."
              },
              "$is_not": {
                "type": "integer",
                "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."
              },
              "$more_than": {
                "type": "integer",
                "description": "Value is more than the specified number."
              },
              "$more_than_equal": {
                "type": "integer",
                "description": "Value is more than or equal to the specified number."
              },
              "$less_than": {
                "type": "integer",
                "description": "Value is less than the specified number."
              },
              "$less_than_equal": {
                "type": "integer",
                "description": "Value is less than or equal to the specified number."
              }
            }
          }
        }
      },
      "16_filter_conditions_boolean": {
        "title": "Filter by conditions",
        "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": {
              "$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."
              }
            }
          }
        }
      },
      "16_filter_conditions_date_time": {
        "title": "Filter by conditions",
        "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": {
              "$after": {
                "type": "string",
                "description": "Value is after this date. The value for this parameter is in the ISO 8601 format.",
                "format": "date-time"
              },
              "$before": {
                "type": "string",
                "description": "Value is before this date. The value for this parameter is in the ISO 8601 format.",
                "format": "date-time"
              },
              "$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."
              }
            }
          }
        }
      },
      "AsyncActionGetResponseBody": {
        "title": "Async Action Get Response Body",
        "description": "Response body schema for **GET** `v1/async-actions/{asyncActionId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncAction"
          }
        ]
      },
      "AsyncActionBase": {
        "title": "Async Action Base",
        "type": "object",
        "description": "This is an object representing an asynchronous action.",
        "properties": {
          "id": {
            "type": "string",
            "example": "aa_0adad13d6f057f088e",
            "description": "Async action unique ID."
          },
          "type": {
            "type": "string",
            "description": "Type of async action.",
            "enum": [
              "CAMPAIGN.VOUCHERS_IMPORT",
              "CAMPAIGN.VOUCHERS_IMPORT_CSV",
              "CAMPAIGN.VOUCHERS_UPDATE",
              "CAMPAIGN.VOUCHERS_DELETE",
              "CAMPAIGN.VOUCHERS_GENERATE",
              "CAMPAIGNS.METADATA_KEY_PURGE",
              "CUSTOMERS.IMPORT_CSV",
              "CUSTOMERS.BULK_UPDATE",
              "CUSTOMERS.METADATA_UPDATE",
              "CUSTOMERS.METADATA_KEY_PURGE",
              "PRODUCTS.BULK_UPDATE",
              "PRODUCTS.METADATA_UPDATE",
              "PRODUCTS.METADATA_KEY_PURGE",
              "PRODUCTS.IMPORT_CSV",
              "SKUS.IMPORT_CSV",
              "VOUCHERS.IMPORT",
              "VOUCHERS.IMPORT_CSV",
              "VOUCHERS.BULK_UPDATE",
              "VOUCHERS.METADATA_UPDATE",
              "VOUCHERS.METADATA_KEY_PURGE",
              "ORDERS.IMPORT",
              "ORDERS.METADATA_KEY_PURGE"
            ]
          },
          "status": {
            "type": "string",
            "description": "Status of the async action. Informs you whether the async action has already been completed.",
            "enum": [
              "DONE",
              "ENQUEUED",
              "FAILED",
              "IN_PROGRESS"
            ]
          },
          "operation_status": {
            "type": "string",
            "description": "Status of async action processing. Informs about the async action status, whether it failed, succeeded, or the status is unknown.",
            "enum": [
              "FAILED",
              "SUCCESS",
              "UNKNOWN"
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the async action was scheduled in ISO 8601 format.",
            "example": "2022-06-23T11:21:45.578Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2022-06-23T11:21:46.795Z",
            "description": "Timestamp representing the date and time when the async action was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "request_id": {
            "type": "string",
            "example": "v-0b45cee140c3c9b5ca",
            "description": "Unique request ID."
          },
          "processing_time": {
            "type": "integer",
            "example": 1217,
            "description": "The length of time it took to process the request in milliseconds."
          },
          "progress": {
            "type": "integer",
            "description": "% progress to completion of the asynchronous action.",
            "minimum": 0,
            "maximum": 100
          },
          "object": {
            "type": "string",
            "default": "async_action",
            "description": "The type of the object represented by JSON. This object stores information about the `async_action`.",
            "enum": [
              "async_action"
            ]
          }
        }
      },
      "AsyncAction": {
        "title": "Async Action",
        "description": "This is an object representing an asynchronous action.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActionBase"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_campaign_vouchers_import"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_campaign_vouchers_import_csv"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_campaign_vouchers_update"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_campaign_vouchers_delete"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_campaign_vouchers_generate"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_campaign_metadata_key_purge"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_customers_import_csv"
                  },
                  {
                    "$ref": "#/components/schemas/AsyncActionResultCustomersBulkUpdateResponseBody"
                  },
                  {
                    "$ref": "#/components/schemas/AsyncActionResultCustomersMetadataUpdateResponseBody"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_customers_metadata_key_purge"
                  },
                  {
                    "$ref": "#/components/schemas/AsyncActionResultProductsBulkUpdateResponseBody"
                  },
                  {
                    "$ref": "#/components/schemas/AsyncActionResultProductsMetadataUpdateResponseBody"
                  },
                  {
                    "$ref": "#/components/schemas/AsyncActionResultProductsImportCSV"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_skus_import_csv"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_products_metadata_key_purge"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_vouchers_import"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_vouchers_import_csv"
                  },
                  {
                    "$ref": "#/components/schemas/AsyncActionResultVouchersBulkUpdateResponseBody"
                  },
                  {
                    "$ref": "#/components/schemas/AsyncActionResultVouchersMetadataUpdateResponseBody"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_vouchers_metadata_key_purge"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_orders_import"
                  },
                  {
                    "$ref": "#/components/schemas/17_res_obj_get_async_action_result_orders_metadata_key_purge"
                  }
                ]
              }
            }
          }
        ]
      },
      "AsyncActionsListResponseBody": {
        "description": "Response body schema for **GET** `v1/async-actions`.",
        "type": "object",
        "title": "Async Actions List Response Body",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about asynchronous actions.",
            "default": "list",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "async_actions",
            "description": "Identifies the name of the JSON property that contains the array of asynchronous actions.",
            "enum": [
              "async_actions"
            ]
          },
          "async_actions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AsyncActionBase"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "As query results are always limited by parameters, the `has_more` flag indicates if there are more records available. This lets you know if you can run another request to get more records returned in the results."
          }
        }
      },
      "17_res_obj_get_async_action_result_campaign_vouchers_import": {
        "title": "CAMPAIGN.VOUCHERS_IMPORT",
        "type": "object",
        "description": "Result schema for a `CAMPAIGN.VOUCHERS_IMPORT` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "failed": {
            "type": "array",
            "description": "If any records failed during the process, this array shows the failure details.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Unique voucher code."
                },
                "reason": {
                  "type": "string",
                  "description": "Detailed failure cause for the voucher code import."
                }
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "17_res_obj_get_async_action_result_campaign_vouchers_import_csv": {
        "title": "CAMPAIGN.VOUCHERS_IMPORT_CSV",
        "type": "object",
        "description": "Result schema for a `CAMPAIGN.VOUCHERS_IMPORT_CSV` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "failed": {
            "type": "array",
            "description": "If any records failed during the process, this array shows the failure details.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Unique voucher code."
                },
                "row": {
                  "type": "integer",
                  "description": "The CSV file row number where the code definition is recorded. The row counter excludes the file headers row."
                },
                "reason": {
                  "type": "string",
                  "description": "Detailed failure cause for the voucher code import."
                }
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "8_obj_earning_rule_object_entered_segment": {
        "description": "This is an object representing an earning rule for entering a customer segment.",
        "type": "object",
        "title": "Earning Rule Object for Entered Segment",
        "properties": {
          "id": {
            "type": "string",
            "example": "ern_P6MWOFGsv63sbTaTZBp0IHGK",
            "description": "Assigned by the Voucherify API, identifies the earning rule object."
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was created. The value is shown in the ISO 8601 format.",
            "example": "2022-02-02T13:18:32.557Z",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format.",
            "example": "2022-02-03T13:09:27.206Z",
            "format": "date-time"
          },
          "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/8_obj_fixed_points"
              },
              {
                "$ref": "#/components/schemas/8_obj_calculate_points_proportionally_customer_metadata"
              }
            ]
          },
          "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."
              },
              "object_id": {
                "type": "string",
                "example": "camp_Pfja7X91b1GoyH5wnpzCwlP3",
                "description": "A unique campaign identifier assigned by the Voucherify API."
              },
              "object_type": {
                "type": "string",
                "default": "campaign",
                "description": "Defines the object associated with the earning rule. Defaults to `campaign`."
              }
            }
          },
          "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."
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/ValidityTimeframe"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/ValidityDayOfWeek"
          },
          "validity_hours": {
            "$ref": "#/components/schemas/ValidityHours"
          },
          "object": {
            "type": "string",
            "default": "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.",
            "example": "auto_4jH1yq9WJS0oJ8suagCrltyb"
          },
          "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."
          }
        }
      },
      "17_res_obj_get_async_action_result_campaign_vouchers_update": {
        "title": "CAMPAIGN.VOUCHERS_UPDATE",
        "type": "object",
        "description": "Result schema for a `CAMPAIGN.VOUCHERS_UPDATE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          }
        }
      },
      "17_res_obj_get_async_action_result_campaign_vouchers_delete": {
        "title": "CAMPAIGN.VOUCHERS_DELETE",
        "type": "object",
        "description": "Result schema for a `CAMPAIGN.VOUCHERS_DELETE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          }
        }
      },
      "17_res_obj_get_async_action_result_campaign_vouchers_generate": {
        "title": "CAMPAIGN.VOUCHERS_GENERATE",
        "type": "object",
        "description": "Result schema for a `CAMPAIGN.VOUCHERS_GENERATE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          }
        }
      },
      "17_res_obj_get_async_action_result_campaign_metadata_key_purge": {
        "title": "CAMPAIGNS.METADATA_KEY_PURGE",
        "type": "object",
        "description": "Result schema for a `CAMPAIGNS.METADATA_KEY_PURGE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          }
        }
      },
      "17_res_obj_get_async_action_result_customers_import_csv": {
        "title": "CUSTOMERS.IMPORT_CSV",
        "type": "object",
        "description": "Result schema for a `CUSTOMERS.IMPORT_CSV` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "failed": {
            "type": "array",
            "description": "If any records failed during the process, this array shows the failure details.",
            "items": {
              "type": "object",
              "properties": {
                "source_id": {
                  "type": "string",
                  "description": "Unique customer ID from your inventory system as indicated in the CSV file."
                },
                "row": {
                  "type": "integer",
                  "description": "The CSV file row number where the customer is recorded. The row counter excludes the file headers row."
                },
                "reason": {
                  "type": "string",
                  "description": "Detailed failure cause for the customer import."
                }
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "AsyncActionResultCustomersBulkUpdateResponseBody": {
        "title": "CUSTOMERS.BULK_UPDATE",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActionsVoucherCustomerProductBulkUpdateResult"
          },
          {
            "description": "Result schema for a `CUSTOMERS.BULK_UPDATE` async action type."
          },
          {
            "type": "object",
            "properties": {
              "errors": {
                "type": "array",
                "description": "List of errors encountered during processing.",
                "items": {
                  "type": "object",
                  "properties": {
                    "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."
                    },
                    "key": {
                      "type": "string",
                      "description": "Short string describing the kind of error which occurred."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "Source identifier of the customer for which the error occurred."
                    }
                  },
                  "required": [
                    "message",
                    "details",
                    "key",
                    "source_id"
                  ]
                }
              }
            },
            "required": [
              "errors"
            ]
          }
        ]
      },
      "AsyncActionResultCustomersMetadataUpdateResponseBody": {
        "title": "CUSTOMERS.METADATA_UPDATE",
        "description": "Result schema for a `CUSTOMERS.METADATA_UPDATE` async action type.",
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "description": "List of errors encountered during processing.",
            "items": {
              "type": "object",
              "properties": {
                "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."
                },
                "key": {
                  "type": "string",
                  "description": "Short string describing the kind of error which occurred."
                }
              },
              "required": [
                "message",
                "details",
                "key"
              ]
            }
          }
        },
        "required": [
          "errors"
        ]
      },
      "17_res_obj_get_async_action_result_customers_metadata_key_purge": {
        "title": "CUSTOMERS.METADATA_KEY_PURGE",
        "type": "object",
        "description": "Result schema for a `CUSTOMERS.METADATA_KEY_PURGE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          }
        }
      },
      "AsyncActionResultProductsBulkUpdateResponseBody": {
        "title": "PRODUCTS.BULK_UPDATE",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActionsVoucherCustomerProductBulkUpdateResult"
          },
          {
            "description": "`Result schema for a PRODUCTS.BULK_UPDATE` async action type."
          },
          {
            "type": "object",
            "properties": {
              "errors": {
                "type": "array",
                "description": "List of errors encountered during processing.",
                "items": {
                  "type": "object",
                  "properties": {
                    "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."
                    },
                    "key": {
                      "type": "string",
                      "description": "Short string describing the kind of error which occurred."
                    },
                    "source_id": {
                      "type": "string",
                      "description": "Source identifier of the product for which the error occurred."
                    }
                  },
                  "required": [
                    "message",
                    "details",
                    "key",
                    "source_id"
                  ]
                }
              }
            },
            "required": [
              "errors"
            ]
          }
        ]
      },
      "AsyncActionResultProductsMetadataUpdateResponseBody": {
        "title": "PRODUCTS.METADATA_UPDATE",
        "description": "Result schema for a `PRODUCTS.METADATA_UPDATE` async action type.",
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "description": "List of errors encountered during processing.",
            "items": {
              "type": "object",
              "properties": {
                "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."
                },
                "key": {
                  "type": "string",
                  "description": "Short string describing the kind of error which occurred."
                }
              },
              "required": [
                "message",
                "details",
                "key"
              ]
            }
          }
        },
        "required": [
          "errors"
        ]
      },
      "17_res_obj_get_async_action_result_products_metadata_key_purge": {
        "title": "PRODUCTS.METADATA_KEY_PURGE",
        "type": "object",
        "description": "Result schema for a `PRODUCTS.METADATA_KEY_PURGE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources updated successfully."
          }
        }
      },
      "AsyncActionResultProductsImportCSV": {
        "title": "PRODUCTS.IMPORT_CSV",
        "type": "object",
        "description": "Result schema for a `PRODUCTS.IMPORT_CSV` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "failed": {
            "type": "array",
            "description": "If any records failed during the process, this array shows the failure details.",
            "items": {
              "type": "object",
              "description": "Contains the details regarding a CSV file line item failed import.",
              "properties": {
                "row": {
                  "type": "integer",
                  "description": "The CSV file row number where the product definition is recorded. The row counter excludes the file headers row."
                },
                "source_id": {
                  "type": "string",
                  "description": "The source identifier of the product that caused the error."
                },
                "reason": {
                  "type": "string",
                  "description": "Detailed failure cause for the product import."
                }
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "17_res_obj_get_async_action_result_skus_import_csv": {
        "title": "SKUS.IMPORT_CSV",
        "type": "object",
        "description": "Result schema for a `SKUS.IMPORT_CSV` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result.",
            "example": "2 sku(s) imported successfully, 6 failed."
          },
          "failed": {
            "type": "array",
            "description": "If any records failed during the process, this array shows the failure details.",
            "items": {
              "type": "object",
              "description": "Contains the details regarding a CSV file line item failed import.",
              "properties": {
                "row": {
                  "type": "integer",
                  "description": "The CSV file row number where the SKU definition is recorded. The row counter excludes the file headers row.",
                  "example": 2
                },
                "reason": {
                  "type": "string",
                  "description": "Detailed failure cause for the SKU import.",
                  "example": "Resource sku with id size-small is in use by products with ids [prod_0b0e3441c2462eff2c]"
                }
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "17_res_obj_get_async_action_result_vouchers_import": {
        "title": "VOUCHERS.IMPORT",
        "type": "object",
        "description": "Result schema for a `VOUCHERS.IMPORT` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "failed": {
            "description": "If any records failed during the process, this array shows the failure details.",
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "reason": {
                "type": "string",
                "description": "Detailed failure cause for the voucher code import."
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "17_res_obj_get_async_action_result_vouchers_import_csv": {
        "title": "VOUCHERS.IMPORT_CSV",
        "type": "object",
        "description": "Result schema for a `VOUCHERS.IMPORT_CSV` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "failed": {
            "type": "array",
            "description": "If any records failed during the process, this array shows the failure details.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Unique voucher code."
                },
                "row": {
                  "type": "integer",
                  "description": "The CSV file row number where the code definition is recorded. The row counter excludes the file headers row."
                },
                "reason": {
                  "type": "string",
                  "description": "Detailed failure cause for the voucher code import."
                }
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "AsyncActionResultVouchersBulkUpdateResponseBody": {
        "title": "VOUCHERS.BULK_UPDATE",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActionsVoucherCustomerProductBulkUpdateResult"
          },
          {
            "description": "Result schema for a `VOUCHERS.BULK_UPDATE` async action type."
          },
          {
            "type": "object",
            "properties": {
              "errors": {
                "type": "array",
                "description": "List of errors encountered during processing.",
                "items": {
                  "type": "object",
                  "properties": {
                    "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."
                    },
                    "key": {
                      "type": "string",
                      "description": "Short string describing the kind of error which occurred."
                    },
                    "code": {
                      "type": "string",
                      "description": "Code of the voucher for which the error occurred."
                    }
                  },
                  "required": [
                    "message",
                    "details",
                    "key",
                    "code"
                  ]
                }
              }
            },
            "required": [
              "errors"
            ]
          }
        ]
      },
      "AsyncActionResultVouchersMetadataUpdateResponseBody": {
        "title": "VOUCHERS.METADATA_UPDATE",
        "description": "Result schema for a `VOUCHERS.METADATA_UPDATE` async action type.",
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "description": "List of errors encountered during processing.",
            "items": {
              "type": "object",
              "properties": {
                "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."
                },
                "key": {
                  "type": "string",
                  "description": "Short string describing the kind of error which occurred."
                }
              },
              "required": [
                "message",
                "details",
                "key"
              ]
            }
          }
        },
        "required": [
          "errors"
        ]
      },
      "17_res_obj_get_async_action_result_vouchers_metadata_key_purge": {
        "title": "VOUCHERS.METADATA_KEY_PURGE",
        "type": "object",
        "description": "Result schema for a `VOUCHERS.METADATA_KEY_PURGE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          }
        }
      },
      "17_res_obj_get_async_action_result_orders_import": {
        "title": "ORDERS.IMPORT",
        "type": "object",
        "description": "Result schema for a `ORDERS.IMPORT` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "failed": {
            "description": "If any records failed during the process, this array shows the failure details.",
            "type": "object",
            "properties": {
              "source_id": {
                "type": "string",
                "description": "Unique order source ID."
              },
              "reason": {
                "type": "string",
                "description": "Detailed failure cause for the voucher code import."
              }
            }
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of resources failed to process."
          }
        }
      },
      "17_res_obj_get_async_action_result_orders_metadata_key_purge": {
        "title": "ORDERS.METADATA_KEY_PURGE",
        "type": "object",
        "description": "Result schema for a `ORDERS.METADATA_KEY_PURGE` async action type.",
        "properties": {
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description about the result."
          },
          "done_count": {
            "type": "integer",
            "description": "Number of resources processed successfully."
          }
        }
      },
      "AsyncActionsVoucherCustomerProductBulkUpdateResult": {
        "type": "object",
        "title": "Async Action Voucher Customer Product Bulk Update Result",
        "description": "Result details of the async action.",
        "properties": {
          "done_count": {
            "type": "integer",
            "description": "Number of items successfully processed."
          },
          "failed_count": {
            "type": "integer",
            "description": "Number of items that failed to be processed."
          },
          "reports": {
            "type": "array",
            "description": "List of URLs to report files.",
            "items": {
              "type": "string",
              "description": "URL to the report file."
            }
          },
          "reports_available_till": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp until the reports are available."
          }
        },
        "required": [
          "done_count",
          "failed_count",
          "reports",
          "reports_available_till"
        ]
      },
      "21_obj_metadata_schema_object": {
        "type": "object",
        "title": "Metadata Schema Object",
        "description": "This is an object representing a metadata schema.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique metadata schema ID.",
            "example": "ms_OF36L2rk4EqhdxvZs56IW9iE"
          },
          "related_object": {
            "type": "string",
            "description": "The resource type. There is an infinite number of possibilities for the resource type because you can define custom metadata schemas. Some examples are included here to show you the standard metadata schema resource types.",
            "enum": [
              "campaign",
              "customer",
              "earning_rule",
              "loyalty_tier",
              "order",
              "order_item",
              "product",
              "promotion_tier",
              "publication",
              "redemption",
              "reward",
              "voucher"
            ]
          },
          "properties": {
            "type": "object",
            "description": "Contains the metadata definitions. There can be many properties within this object.",
            "properties": {
              "custom_property_name": {
                "type": "object",
                "description": "Custom property name. This is defined in **Project Settings** > **Metadata Schema** in the Dashboard.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "string",
                      "number",
                      "object",
                      "date",
                      "datetime",
                      "geopoint",
                      "boolean",
                      "image_url"
                    ]
                  },
                  "array": {
                    "type": "boolean",
                    "description": "Indicates whether the definition is an array."
                  },
                  "optional": {
                    "type": "boolean",
                    "description": "Indicates whether this definition is optional or not optional for the resource."
                  },
                  "objectType": {
                    "type": "string",
                    "nullable": true,
                    "description": "Returns the name of the custom resource if the resource was previously defined in the Dashboard as a custom (non-standard) Nested object."
                  },
                  "eq": {
                    "type": "array",
                    "description": "Array of possible values when the setting for `is equal to any of` in the Dashboard is defined explicitly.",
                    "items": {}
                  },
                  "ne": {
                    "type": "array",
                    "description": "Array of values that are not allowed when the setting for `is not equal to any of` in the Dashboard is defined explicitly.",
                    "items": {}
                  },
                  "lt": {
                    "type": "integer",
                    "description": "A property of `number` type must have `less than` this value."
                  },
                  "lte": {
                    "type": "integer",
                    "description": "A property of `number` type must be `less than or equal` to this value."
                  },
                  "gt": {
                    "type": "integer",
                    "description": "A property of `number` type must be `greater than` this value."
                  },
                  "gte": {
                    "type": "integer",
                    "description": "A property of `number` type must be `greater than or equal` to this value."
                  },
                  "deleted": {
                    "type": "boolean",
                    "description": "Indicates whether the definition was deleted from the schema."
                  },
                  "maxLength": {
                    "type": "integer",
                    "description": "Value for maximum length when the setting for `has maximum length of` in the Dashboard is defined explicitly."
                  },
                  "minLength": {
                    "type": "integer",
                    "description": "Value indicating minimum length when the setting for `has minimum length of` in the Dashboard is defined explicitly."
                  },
                  "exactLength": {
                    "type": "integer",
                    "description": "Value indicating exact length when the setting for `has exact length of` in the Dashboard is defined explicitly."
                  }
                }
              }
            }
          },
          "allow_defined_only": {
            "type": "boolean",
            "description": "Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values.\t"
          },
          "created_at": {
            "type": "string",
            "example": "2021-12-03T13:33:44.556Z",
            "description": "Timestamp representing the date and time when the metadata schema was created. The value is shown in the ISO 8601 format.\t",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2022-08-11T08:05:30.695Z",
            "description": "Timestamp representing the date and time when the metadata schema was updated. The value is shown in the ISO 8601 format.\t",
            "format": "date-time"
          },
          "object": {
            "type": "string",
            "default": "metadata_schema",
            "description": "The type of the object represented by the JSON. This object stores information about the metadata schema."
          }
        }
      },
      "21_res_list_metadata_shemas": {
        "title": "List Metadata Schemas Response Body",
        "type": "object",
        "description": "Response schema for listing metadata schemas using **GET** `v1/metadata-schemas`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about metadata schemas in a dictionary.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of metadata schema objects.",
            "default": "schemas"
          },
          "schemas": {
            "type": "array",
            "description": "Array of metadata schema objects.",
            "items": {
              "$ref": "#/components/schemas/21_obj_metadata_schema_object"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of metadata schemas."
          }
        }
      },
      "LocationsGetResponseBody": {
        "title": "Locations Get Response Body",
        "description": "Response schema for listing locations using **GET** `/v1/locations/{locationId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Location"
          }
        ]
      },
      "LocationsListResponseBody": {
        "title": "List Locations Response Body",
        "type": "object",
        "description": "Response schema for listing locations using **GET** `v1/locations`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about locations in a dictionary.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of metadata schema objects.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "description": "Array of location objects.",
            "items": {
              "$ref": "#/components/schemas/Location"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of locations."
          },
          "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 end date filter) to get more records returned in the results."
          }
        }
      },
      "Location": {
        "title": "Location object",
        "type": "object",
        "description": "This is an object representing a location.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique location ID, assigned by the Voucherify API.",
            "example": "loc_NoMGXmHO9OUs7iz9mGWpamma"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about a `location`.",
            "default": "location",
            "enum": [
              "location"
            ]
          },
          "name": {
            "type": "string",
            "description": "Location name."
          },
          "shape": {
            "type": "object",
            "description": "Defines the shape and boundaries of the location.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/LocationShapeCircle"
              },
              {
                "$ref": "#/components/schemas/LocationShapePolygon"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "example": "2022-02-14T15:12:06.817Z",
            "description": "Timestamp representing the date and time when the location was created. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "example": "2022-03-14T15:12:06.817Z",
            "nullable": true,
            "description": "Timestamp representing the date and time when the location was updated. The value is shown in the ISO 8601 format.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "object",
          "name",
          "shape",
          "created_at",
          "updated_at"
        ]
      },
      "LocationShapeCircle": {
        "title": "Circle",
        "type": "object",
        "description": "This is an object representing a circular shape.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of shape being defined is a `circle`.",
            "enum": [
              "circle"
            ]
          },
          "format": {
            "type": "string",
            "description": "The location is defined in terms of a `distance` object.",
            "enum": [
              "distance"
            ]
          },
          "distance": {
            "type": "object",
            "title": "Distance",
            "description": "Defines the parameters for the circle.",
            "properties": {
              "center": {
                "type": "string",
                "description": "Center of the circle identified by GPS coordinates in decimal degrees.",
                "example": "geo:40.79372699823857,-74.15092132694554"
              },
              "radius": {
                "type": "string",
                "description": "Defines the radius of the circle."
              }
            }
          }
        },
        "required": [
          "type",
          "format",
          "distance"
        ]
      },
      "LocationShapePolygon": {
        "title": "Polygon",
        "type": "object",
        "description": "This is an object representing a polygon.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of shape being defined is a `polygon`.",
            "enum": [
              "polygon"
            ]
          },
          "format": {
            "type": "string",
            "description": "The location is defined in terms of a `geojson` object.",
            "enum": [
              "geojson"
            ]
          },
          "geojson": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/GeojsonPolygon"
              },
              {
                "$ref": "#/components/schemas/GeojsonMultiPolygon"
              }
            ]
          }
        },
        "required": [
          "type",
          "format",
          "geojson"
        ]
      },
      "GeojsonMultiPolygon": {
        "type": "object",
        "title": "Geojson Multi Polygon",
        "description": "Defines the parameters for the polygon.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of geojson coordinates, i.e. `MultiPolygon`.",
            "enum": [
              "MultiPolygon"
            ]
          },
          "coordinates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolygonCoordinates"
            }
          }
        },
        "required": [
          "type",
          "coordinates"
        ]
      },
      "GeojsonPolygon": {
        "type": "object",
        "title": "Geojson Polygon",
        "description": "Defines the parameters for the polygon.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of geojson coordinates, i.e. `Polygon`.",
            "enum": [
              "Polygon"
            ]
          },
          "coordinates": {
            "$ref": "#/components/schemas/PolygonCoordinates"
          }
        },
        "required": [
          "type",
          "coordinates"
        ]
      },
      "PolygonCoordinates": {
        "title": "PolygonCoordinates",
        "type": "array",
        "items": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      },
      "22_geojson_array": {
        "title": "GeoJSON coordinate array.",
        "type": "array",
        "description": "GeoJSON coordinate array.",
        "items": {
          "$ref": "#/components/schemas/22_geojson_coordinates"
        }
      },
      "22_geojson_coordinates": {
        "title": "GeoJSON coordinate.",
        "type": "array",
        "description": "GeoJSON coordinate.",
        "items": {
          "type": "integer"
        }
      },
      "22_filter_updated_at": {
        "type": "object",
        "title": "Updated at",
        "properties": {
          "updated_at": {
            "$ref": "#/components/schemas/16_filter_conditions_date_time"
          }
        },
        "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`"
      },
      "22_filter_created_at": {
        "type": "object",
        "title": "Created at",
        "properties": {
          "created_at": {
            "$ref": "#/components/schemas/16_filter_conditions_date_time"
          }
        },
        "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`"
      },
      "22_filter_name": {
        "type": "object",
        "title": "Name",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          }
        },
        "description": "A filter on the list based on the name field."
      },
      "22_filter_id": {
        "type": "object",
        "title": "ID",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/16_filter_conditions_string"
          }
        },
        "description": "A filter on the list based on the ID of the location."
      },
      "QualificationsCheckEligibilityResponseBody": {
        "title": "Qualifications Check Eligibility Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `v1/qualifications`.",
        "properties": {
          "redeemables": {
            "$ref": "#/components/schemas/QualificationsRedeemables"
          },
          "tracking_id": {
            "type": "string",
            "description": "This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID."
          },
          "order": {
            "type": "object",
            "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"
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "stacking_rules": {
            "$ref": "#/components/schemas/StackingRules"
          }
        }
      },
      "StackingRules": {
        "type": "object",
        "title": "Stacking Rules",
        "description": "Defines stacking rules for redeemables. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).",
        "properties": {
          "redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be sent in one request. Note: more redeemables means more processing time.",
            "default": 30,
            "maximum": 30,
            "minimum": 1
          },
          "applicable_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be applied in one request. The number must be less than or equal to `redeemables_limit`. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 5,
            "maximum": 30,
            "minimum": 1
          },
          "applicable_redeemables_per_category_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with the same category can be applied in one request. The number must be less than or equal to `applicable_redeemables_limit`. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 1,
            "maximum": 30,
            "minimum": 1
          },
          "applicable_exclusive_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 1,
            "maximum": 5,
            "minimum": 1
          },
          "applicable_exclusive_redeemables_per_category_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with an exclusive category per category in stacking rules can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "default": 1,
            "maximum": 5,
            "minimum": 1
          },
          "exclusive_categories": {
            "type": "array",
            "description": "Lists the IDs of exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.",
            "items": {
              "type": "string"
            }
          },
          "joint_categories": {
            "type": "array",
            "description": "Lists the IDs of the joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_application_mode": {
            "type": "string",
            "description": "Defines the application mode for redeemables.\n`\"ALL\"` means that all redeemables must be validated for the redemption to be successful.\n`\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.",
            "enum": [
              "ALL",
              "PARTIAL"
            ]
          },
          "redeemables_sorting_rule": {
            "type": "string",
            "description": "Defines redeemables sorting rule. `CATEGORY_HIERARCHY` means that redeemables are applied oaccording to the category priority. `REQUESTED_ORDER` means that redeemables are applied in the sequence provided in the request.",
            "enum": [
              "CATEGORY_HIERARCHY",
              "REQUESTED_ORDER"
            ],
            "default": "REQUESTED_ORDER"
          },
          "redeemables_products_application_mode": {
            "type": "string",
            "description": "Defines redeemables products application mode. `STACK` means that multiple discounts can be applied to a product. `ONCE` means that only one discount can be applied to the same product.",
            "enum": [
              "STACK",
              "ONCE"
            ]
          },
          "redeemables_no_effect_rule": {
            "type": "string",
            "description": "Defines redeemables no effect rule. `REDEEM_ANYWAY` means that the redeemable will be redeemed regardless of any restrictions or conditions in place. `SKIP` means that the redeemable will be processed only when an applicable effect is calculated.",
            "enum": [
              "REDEEM_ANYWAY",
              "SKIP"
            ]
          },
          "no_effect_skip_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are skipped even if the `redeemables_no_effect_rule` is set to `REDEEM_ANYWAY`. Category IDs can't overlap with the IDs in `no_effect_redeem_anyway_categories`.",
            "items": {
              "type": "string"
            }
          },
          "no_effect_redeem_anyway_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are redeemed anyway even if the `redeemables_no_effect_rule` is set to `SKIP`. Category IDs can't overlap with the IDs in `no_effect_skip_categories`.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_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.",
            "enum": [
              "WITH_ORDER",
              "WITHOUT_ORDER"
            ]
          }
        },
        "required": [
          "redeemables_limit",
          "applicable_redeemables_limit",
          "applicable_exclusive_redeemables_limit",
          "applicable_redeemables_per_category_limit",
          "exclusive_categories",
          "joint_categories",
          "redeemables_application_mode",
          "redeemables_sorting_rule",
          "redeemables_no_effect_rule",
          "no_effect_skip_categories",
          "no_effect_redeem_anyway_categories",
          "redeemables_products_application_mode",
          "redeemables_rollback_order_mode"
        ]
      },
      "QualificationsOption": {
        "type": "object",
        "description": "Configure parameters returned in the response.",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5",
            "maximum": 50
          },
          "starting_after": {
            "type": "string",
            "nullable": true,
            "example": "2021-09-08T13:52:18.227Z",
            "format": "date-time",
            "description": "Cursor used for paging."
          },
          "filters": {
            "type": "object",
            "description": "A set of filters to return only a specific category or type of redeemable.",
            "properties": {
              "junction": {
                "$ref": "#/components/schemas/Junction"
              },
              "category_id": {
                "$ref": "#/components/schemas/QualificationsFieldConditions"
              },
              "campaign_id": {
                "$ref": "#/components/schemas/QualificationsFieldConditions"
              },
              "campaign_type": {
                "title": "Qualifications Campaign Type Conditions",
                "type": "object",
                "description": "Returns both campaigns and their vouchers or promotion tiers. Use other filters, e.g. `resource_type`, to narrow down the results.",
                "properties": {
                  "conditions": {
                    "description": "Data filters used to narrow down the data records to be returned in the result.",
                    "type": "object",
                    "properties": {
                      "$is": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ParameterCampaignType"
                        }
                      },
                      "$is_not": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ParameterCampaignType"
                        }
                      },
                      "$in": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ParameterCampaignType"
                        }
                      },
                      "$not_in": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ParameterCampaignType"
                        }
                      }
                    }
                  }
                }
              },
              "resource_id": {
                "$ref": "#/components/schemas/QualificationsFieldConditions"
              },
              "resource_type": {
                "type": "object",
                "properties": {
                  "conditions": {
                    "description": "Data filters used to narrow down the data records to be returned in the result.\n- `campaign` refers to campaigns;\n- `voucher` refers to generic (standalone) vouchers or published vouchers;\n- `promotion_tier` refers to promotion tiers.",
                    "type": "object",
                    "properties": {
                      "$is": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ResourceTypes"
                        }
                      },
                      "$is_not": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ResourceTypes"
                        }
                      },
                      "$in": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ResourceTypes"
                        }
                      },
                      "$not_in": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/ResourceTypes"
                        }
                      }
                    }
                  }
                }
              },
              "voucher_type": {
                "$ref": "#/components/schemas/QualificationsFieldConditions"
              },
              "code": {
                "$ref": "#/components/schemas/QualificationsFieldConditions"
              },
              "holder_role": {
                "title": "Holder Role Field Conditions",
                "type": "object",
                "properties": {
                  "conditions": {
                    "description": "Data filters used to narrow down the data records to be returned in the result.",
                    "type": "object",
                    "properties": {
                      "$is": {
                        "type": "array",
                        "description": "Will return records only for the first value in the array.",
                        "items": {
                          "enum": [
                            "OWNER",
                            "REFERRER",
                            "REFEREE"
                          ]
                        }
                      },
                      "$is_not": {
                        "type": "array",
                        "description": "Will return records only for the first value in the array.",
                        "items": {
                          "enum": [
                            "OWNER",
                            "REFERRER",
                            "REFEREE"
                          ]
                        }
                      },
                      "$in": {
                        "type": "array",
                        "description": "Will return records for the values in the array.",
                        "items": {
                          "enum": [
                            "OWNER",
                            "REFERRER",
                            "REFEREE"
                          ]
                        }
                      },
                      "$not_in": {
                        "type": "array",
                        "description": "Will return records for the values in the array.",
                        "items": {
                          "enum": [
                            "OWNER",
                            "REFERRER",
                            "REFEREE"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "expand": {
            "type": "array",
            "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. \n\n| **Expand Option** | **Response Body** |\n|:---|:---|\n| [`\"redeemable\"`] | Returns the redeemables':<br>- metadata<br>- redeemable name,<br>- campaign name,<br>- campaign ID|\n| [`\"category\"`] | - Returns an expanded `categories` object, showing details about the category. |\n| [`\"validation_rules\"`] | - Returns an expanded `validation_rules` object, showing details about the validation rules. |",
            "items": {
              "type": "string",
              "enum": [
                "redeemable",
                "category",
                "validation_rules"
              ]
            }
          },
          "sorting_rule": {
            "type": "string",
            "description": "Is used to determine the order in which data is displayed in the result array. \n\n - `DEFAULT` - Sorting descending by `created_at` \n - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` \n - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount`",
            "enum": [
              "BEST_DEAL",
              "LEAST_DEAL",
              "DEFAULT"
            ]
          }
        }
      },
      "QualificationsCheckEligibilityRequestBody": {
        "type": "object",
        "title": "Qualifications Check Eligibility Request Body",
        "description": "Request body schema for **POST** `v1/qualifications`.",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "description": "Order information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Order"
              }
            ]
          },
          "tracking_id": {
            "description": "Is correspondent to Customer's source_id",
            "type": "string"
          },
          "scenario": {
            "type": "string",
            "description": "Defines the scenario Voucherify should consider during the qualification process.\n\n- `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected.\n- `CUSTOMER_WALLET` - returns vouchers applicable to the customer's cart based on the vouchers assigned to the customer's profile.\n- `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only.\n- `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule).\n- `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s).\n- `PROMOTION_STACKS` - returns the applicable promotion stacks.\n- `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule).\n- `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s).",
            "enum": [
              "ALL",
              "CUSTOMER_WALLET",
              "AUDIENCE_ONLY",
              "PRODUCTS",
              "PRODUCTS_DISCOUNT",
              "PROMOTION_STACKS",
              "PRODUCTS_BY_CUSTOMER",
              "PRODUCTS_DISCOUNT_BY_CUSTOMER"
            ]
          },
          "options": {
            "allOf": [
              {
                "$ref": "#/components/schemas/QualificationsOption"
              }
            ]
          },
          "session": {
            "type": "object",
            "description": "Parameter to return details about `locked_credits` on a gift card which has locked credits under a validation session.",
            "properties": {
              "type": {
                "type": "string",
                "description": "Parameter required to return the details about the `locked_credits`.",
                "enum": [
                  "LOCK"
                ]
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          }
        }
      },
      "QualificationsFieldConditions": {
        "title": "Qualifications 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/QualificationsFiltersCondition"
              }
            ]
          }
        }
      },
      "QualificationsFiltersCondition": {
        "title": "Qualifications Filters Condition",
        "type": "object",
        "properties": {
          "$is": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "$is_not": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "$has_value": {
            "$ref": "#/components/schemas/Any"
          },
          "$is_unknown": {
            "$ref": "#/components/schemas/Any"
          },
          "$in": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "$not_in": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "QualificationsRedeemables": {
        "title": "Redeemables",
        "type": "object",
        "description": "List of redeemables for examine qualification.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. Default is `list`.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of qualified redeemables.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of qualified redeemables.",
            "items": {
              "$ref": "#/components/schemas/QualificationsRedeemable"
            }
          },
          "total": {
            "type": "integer",
            "example": 5,
            "description": "The number of redeemables returned in the API request."
          },
          "has_more": {
            "type": "boolean",
            "description": "As results are always limited, the `has_more` flag indicates if there are more records for given parameters. This lets you know if you can run another request (with different options) to get more records returned in the results."
          },
          "more_starting_after": {
            "type": "string",
            "description": "Timestamp representing the date and time to use in `starting_after` cursor to get more redeemables.",
            "format": "date-time",
            "example": "2023-10-31T12:13:16.374Z"
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total",
          "has_more"
        ]
      },
      "QualificationsRedeemableBase": {
        "title": "Single redeemable",
        "description": "Data of single redeemable which was properly qualified.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the redeemable."
          },
          "object": {
            "type": "string",
            "description": "Object type of the redeemable.",
            "enum": [
              "campaign",
              "promotion_tier",
              "promotion_stack",
              "voucher"
            ]
          },
          "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"
          },
          "result": {
            "$ref": "#/components/schemas/RedeemableResult"
          },
          "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": {
                      "allOf": [
                        {
                          "$ref": "#/components/schemas/OrderCalculatedItem"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "application_details": {
                              "$ref": "#/components/schemas/ApplicationDetails"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "validation_rule_id": {
            "type": "string",
            "description": "A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance."
          },
          "applicable_to": {
            "description": "Contains list of items that qualify in the scope of the discount. These are definitions of included products, SKUs, and product collections. These can be discounted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApplicableToResultList"
              }
            ]
          },
          "inapplicable_to": {
            "description": "Contains list of items that do not qualify in the scope of the discount. These are definitions of excluded products, SKUs, and product collections. These CANNOT be discounted.",
            "allOf": [
              {
                "$ref": "#/components/schemas/InapplicableToResultList"
              }
            ]
          },
          "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."
          },
          "categories": {
            "type": "array",
            "description": "List of category information.",
            "items": {
              "$ref": "#/components/schemas/CategoryWithStackingRulesType"
            }
          },
          "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."
          },
          "name": {
            "type": "string",
            "example": "promotion_tier_get_points",
            "description": "Name of the redeemable."
          },
          "campaign_name": {
            "type": "string",
            "example": "PromotionCampaign",
            "description": "Name of the campaign associated to the redeemable. This field is available only if object is not `campaign`"
          },
          "campaign_id": {
            "type": "string",
            "example": "camp_Mow7u4gSxagLlZ2oDQ01ZS5N",
            "description": "Id of the campaign associated to the redeemable. This field is available only if object is not `campaign`"
          },
          "validation_rules_assignments": {
            "$ref": "#/components/schemas/ValidationRulesAssignmentsList"
          }
        }
      },
      "QualificationsRedeemable": {
        "title": "Combined response of redeemable object and multiple redeemables within",
        "allOf": [
          {
            "$ref": "#/components/schemas/QualificationsRedeemableBase"
          },
          {
            "type": "object",
            "title": "",
            "properties": {
              "redeemables": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/QualificationsRedeemableBase"
                }
              }
            }
          }
        ]
      },
      "ResourceTypes": {
        "title": "Resource Types",
        "description": "Types of usable resources.",
        "type": "string",
        "enum": [
          "campaign",
          "voucher",
          "promotion_tier"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "RedeemableResult": {
        "title": "Redeemable Result",
        "description": "Information about redeemable result.",
        "properties": {
          "discount": {
            "$ref": "#/components/schemas/Discount"
          },
          "bundle": {
            "$ref": "#/components/schemas/Bundle"
          },
          "gift": {
            "$ref": "#/components/schemas/RedeemableGift"
          },
          "loyalty_card": {
            "description": "Loyalty Card object response",
            "allOf": [
              {
                "$ref": "#/components/schemas/RedeemableLoyaltyCard"
              }
            ]
          },
          "error": {
            "description": "Error in result",
            "allOf": [
              {
                "$ref": "#/components/schemas/Error"
              }
            ]
          }
        }
      },
      "RedeemableLoyaltyCard": {
        "type": "object",
        "title": "Redeemable Loyalty Card",
        "description": "Redeemable loyalty card object response",
        "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`."
          },
          "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."
          },
          "transfers": {
            "title": "Loyalties Transfer",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoyaltiesTransferPoints"
            }
          }
        }
      },
      "PromotionStacksListRequestQuery": {
        "title": "Promotion Stacks List Request Query",
        "type": "object",
        "properties": {
          "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."
          },
          "page": {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterPage"
            },
            "description": "Which page of results to return. The lowest value is `1`."
          },
          "order": {
            "type": "string",
            "enum": [
              "created_at",
              "-created_at",
              "updated_at",
              "-updated_at",
              "name",
              "-name"
            ],
            "description": "Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."
          },
          "created_at": {
            "type": "object",
            "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",
            "properties": {
              "before": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time before the voucher was created. The value is shown in the ISO 8601 format."
              },
              "after": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time after the voucher was created. The value is shown in the ISO 8601 format."
              }
            }
          },
          "updated_at": {
            "type": "object",
            "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",
            "properties": {
              "before": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time before the voucher was updated. The value is shown in the ISO 8601 format."
              },
              "after": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time after the voucher was updated. The value is shown in the ISO 8601 format."
              }
            }
          }
        }
      },
      "PromotionStackBase": {
        "title": "Promotion Stack Base",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Promotion stack name."
          },
          "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"
                ]
              }
            }
          }
        },
        "required": [
          "name",
          "tiers"
        ]
      },
      "PromotionStack": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionStackBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion stack ID."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format."
              },
              "campaign_id": {
                "type": "string",
                "description": "Promotion stack's parent campaign's unique ID."
              },
              "object": {
                "type": "string",
                "default": "promotion_stack",
                "enum": [
                  "promotion_stack"
                ],
                "description": "The type of the object represented by JSON. "
              },
              "category_id": {
                "type": "string",
                "nullable": true,
                "description": "Promotion stack category ID."
              },
              "categories": {
                "type": "array",
                "description": "Details about the category assigned to the promotion stack.",
                "items": {
                  "$ref": "#/components/schemas/Category"
                }
              }
            },
            "required": [
              "id",
              "created_at",
              "campaign_id",
              "object",
              "category_id",
              "categories"
            ]
          }
        ]
      },
      "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"
                ]
              }
            }
          }
        }
      },
      "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "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",
                "nullable": true,
                "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",
                "nullable": true,
                "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"
            ]
          }
        ]
      },
      "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"
      },
      "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."
          }
        },
        "required": [
          "type",
          "points"
        ]
      },
      "EarningRuleProportionalOrder": {
        "title": "Define amount of points proportional to the order",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderTotalAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderMetadata"
          }
        ]
      },
      "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."
                  }
                }
              }
            }
          }
        },
        "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."
                  }
                }
              }
            }
          }
        },
        "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."
                  },
                  "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 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",
                  "object",
                  "id"
                ],
                "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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619."
                  }
                }
              }
            }
          }
        },
        "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.amount.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",
                  "object",
                  "id"
                ],
                "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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619."
                  }
                }
              }
            }
          }
        },
        "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",
                  "object",
                  "id"
                ],
                "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."
                  },
                  "object": {
                    "type": "string",
                    "description": "Type of object taken under consideration.",
                    "enum": [
                      "products_collection",
                      "product",
                      "sku"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "order_items"
        ]
      },
      "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."
                  },
                  "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."
                  },
                  "property": {
                    "type": "string",
                    "description": "\nCustom event metadata property."
                  }
                }
              }
            }
          }
        },
        "required": [
          "type",
          "calculation_type",
          "custom_event"
        ]
      },
      "EarningRuleProportional": {
        "title": "Calculate points proportionally",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrder"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItems"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomerMetadata"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalCustomEvent"
          }
        ]
      },
      "EarningRuleProportionalOrderItems": {
        "title": "Define amount of points proportional to order items",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsQuantity"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsAmount"
          },
          {
            "$ref": "#/components/schemas/EarningRuleProportionalOrderItemsSubtotalAmount"
          }
        ]
      },
      "LoyaltiesListMemberRewardsRequestQuery": {
        "title": "Loyalties List Member Rewards Request Query",
        "type": "object",
        "properties": {
          "affordable_only": {
            "type": "string"
          },
          "limit": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          }
        }
      },
      "LoyaltiesGetPointsExpirationRequestQuery": {
        "title": "Loyalties Get Points Expiration Request Query",
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "multipleOf": 100
          },
          "page": {
            "type": "integer"
          }
        }
      },
      "LoyaltiesListCardTransactionsRequestQuery": {
        "title": "Loyalties List Card Transactions Request Query",
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "multipleOf": 100
          },
          "page": {
            "type": "integer"
          }
        }
      },
      "GiftVoucherTransactionsType": {
        "title": "Gift Card Transactions Type",
        "type": "string",
        "description": "Transaction types concerning gift card credits.",
        "enum": [
          "CREDITS_REDEMPTION",
          "CREDITS_REFUND",
          "CREDITS_ADDITION",
          "CREDITS_REMOVAL"
        ]
      },
      "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"
        ]
      },
      "VoucherTransactionBase": {
        "title": "Voucher Transaction Base",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique transaction ID."
          },
          "source_id": {
            "type": "string",
            "nullable": true,
            "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",
            "nullable": true,
            "description": "The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null."
          },
          "reason": {
            "type": "string",
            "nullable": true,
            "description": "Reason why the transaction occurred. In case of a redemption, this value is null."
          },
          "related_transaction_id": {
            "type": "string",
            "nullable": true,
            "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"
            ]
          },
          "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"
        ]
      },
      "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"
                  }
                ]
              }
            }
          }
        ]
      },
      "GiftVoucherTransaction": {
        "title": "Gift 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.",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "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"
                    ]
                  },
                  "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/GiftVoucherTransactionsType"
              }
            }
          }
        ]
      },
      "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"
              }
            }
          }
        ]
      },
      "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 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"
        ]
      },
      "LoyaltyCardTransactionsFields": {
        "type": "string",
        "enum": [
          "id",
          "campaign_id",
          "voucher_id",
          "type",
          "source_id",
          "reason",
          "source",
          "balance",
          "amount",
          "related_transaction_id",
          "created_at",
          "details"
        ]
      },
      "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",
            "nullable": true,
            "description": "Configurable for **material rewards**. The number of units of the product that you want to share as reward."
          },
          "redeemed": {
            "type": "integer",
            "nullable": true,
            "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",
            "nullable": true,
            "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"
        ]
      },
      "RewardType": {
        "title": "Reward type",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RewardTypeCampaign"
          },
          {
            "$ref": "#/components/schemas/RewardTypeCoin"
          },
          {
            "$ref": "#/components/schemas/RewardTypeMaterial"
          }
        ]
      },
      "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",
                "nullable": true,
                "example": "sku_0b7d7dfb090be5c619",
                "description": "Unique SKU ID, assigned by Voucherify, of the SKU given as a reward."
              }
            }
          }
        },
        "required": [
          "product"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "PointsExpirationTypes": {
        "title": "Points Expiration Types",
        "type": "string",
        "enum": [
          "PROGRAM_RULES",
          "CUSTOM_DATE",
          "NON_EXPIRING"
        ]
      },
      "ExportsCreateRequestBody": {
        "description": "Request body schema for **POST** `v1/exports`.",
        "title": "Exports Create Request Body",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ExportVoucherBase"
          },
          {
            "$ref": "#/components/schemas/ExportRedemptionBase"
          },
          {
            "$ref": "#/components/schemas/ExportCustomerBase"
          },
          {
            "$ref": "#/components/schemas/ExportPublicationBase"
          },
          {
            "$ref": "#/components/schemas/ExportOrderBase"
          },
          {
            "$ref": "#/components/schemas/ExportPointsExpirationBase"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherTransactionsBase"
          }
        ],
        "type": "object"
      },
      "ExportBase": {
        "title": "Export 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": {
            "enum": [
              "SCHEDULED",
              "IN_PROGRESS",
              "DONE",
              "ERROR"
            ],
            "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."
          },
          "channel": {
            "type": "string",
            "description": "The channel through which the export was triggered."
          },
          "result": {
            "type": "object",
            "nullable": true,
            "description": "Contains the URL of the CSV file.",
            "properties": {
              "url": {
                "type": "string",
                "description": "URL of the CSV file location. It contains the token used for authorization in the Download export method."
              }
            },
            "required": [
              "url"
            ]
          },
          "user_id": {
            "type": "string",
            "nullable": true,
            "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"
        ]
      },
      "Export": {
        "title": "Export",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ExportVoucher"
          },
          {
            "$ref": "#/components/schemas/ExportRedemption"
          },
          {
            "$ref": "#/components/schemas/ExportCustomer"
          },
          {
            "$ref": "#/components/schemas/ExportPublication"
          },
          {
            "$ref": "#/components/schemas/ExportOrder"
          },
          {
            "$ref": "#/components/schemas/ExportPointsExpiration"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherTransactions"
          }
        ]
      },
      "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"
        ]
      },
      "ExportsCreateResponseBody": {
        "title": "Exports Create Response Body",
        "description": "Response body schema for **POST** `v1/exports`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ExportVoucherScheduled"
          },
          {
            "$ref": "#/components/schemas/ExportRedemptionScheduled"
          },
          {
            "$ref": "#/components/schemas/ExportCustomerScheduled"
          },
          {
            "$ref": "#/components/schemas/ExportPublicationScheduled"
          },
          {
            "$ref": "#/components/schemas/ExportOrderScheduled"
          },
          {
            "$ref": "#/components/schemas/ExportPointsExpirationScheduled"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherTransactionsScheduled"
          }
        ]
      },
      "ExportVoucherBase": {
        "title": "Export Vouchers",
        "type": "object",
        "properties": {
          "exported_object": {
            "type": "string",
            "default": "voucher",
            "enum": [
              "voucher"
            ],
            "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/ExportVoucherOrder"
                  }
                ]
              },
              "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/ExportVoucherFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportVoucherFilters"
                  }
                ]
              }
            }
          }
        },
        "required": [
          "exported_object"
        ]
      },
      "ExportVoucherScheduled": {
        "title": "Export Vouchers Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherBase"
          }
        ]
      },
      "ExportVoucher": {
        "title": "Export Voucher",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportBase"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherBase"
          }
        ]
      },
      "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"
              }
            ]
          }
        }
      },
      "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"
          }
        }
      },
      "ExportVoucherFilters": {
        "title": "Export Voucher Filters",
        "description": "Allowed additional properties must start with \"metadata.\" or \"redemption.\"",
        "type": "object",
        "properties": {
          "junction": {
            "description": "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.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Junction"
              }
            ]
          },
          "created_at": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "updated_at": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "created_date": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "active": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "redemption_status": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "start_date": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "expiration_date": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "validity_day_of_week": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "code": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "categories": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "vouchers": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "holder_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "is_referral_code": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "published_for_customer_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "validity_timeframe": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "category_ids": {
            "$ref": "#/components/schemas/FieldConditions"
          }
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/FieldConditions"
        }
      },
      "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"
      },
      "ExportRedemptionBase": {
        "title": "Export Redemptions",
        "type": "object",
        "properties": {
          "exported_object": {
            "type": "string",
            "default": "redemption",
            "enum": [
              "redemption"
            ],
            "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/ExportRedemptionOrder"
                  }
                ]
              },
              "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/ExportRedemptionFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportRedemptionFilters"
                  }
                ]
              }
            },
            "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"
        ]
      },
      "ExportRedemptionScheduled": {
        "title": "Export Redemptions Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportRedemptionBase"
          }
        ]
      },
      "ExportRedemption": {
        "title": "Export Redemption",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportBase"
          },
          {
            "$ref": "#/components/schemas/ExportRedemptionBase"
          }
        ]
      },
      "ExportRedemptionFilters": {
        "title": "Export Redemption Filters",
        "description": "Allowed additional properties must start with \"metadata.\"",
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "created_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$after": {
                    "$ref": "#/components/schemas/Any"
                  },
                  "$before": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "campaign": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$is": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$is": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "voucher": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$is": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "related_object": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$in": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "voucher_code": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "related_object_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "related_object_parent_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "parent_redemption_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "failure_code": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "result": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "object": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "customer_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "campaign_name": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "user_login": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "status": {
            "$ref": "#/components/schemas/FieldConditions"
          }
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/FieldConditions"
        }
      },
      "ExportCustomerBase": {
        "title": "Export Customers",
        "type": "object",
        "properties": {
          "exported_object": {
            "type": "string",
            "default": "customer",
            "enum": [
              "customer"
            ],
            "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/ExportCustomerOrder"
                  }
                ]
              },
              "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/ExportCustomerFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportCustomerFilters"
                  }
                ]
              }
            },
            "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"
        ]
      },
      "ExportCustomerScheduled": {
        "title": "Export Customers Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportCustomerBase"
          }
        ]
      },
      "ExportCustomer": {
        "title": "Export Customers",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportBase"
          },
          {
            "$ref": "#/components/schemas/ExportCustomerBase"
          }
        ]
      },
      "ExportCustomerFilters": {
        "title": "Export Customer Filters",
        "description": "Allowed additional properties must start with \"metadata.\" or \"address.\" or \"summary.\" or \"loyalty.\" or \"loyalty_tier.\" or \"loyalty_points.\" or \"system_metadata.\"",
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "created_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$after": {
                    "$ref": "#/components/schemas/Any"
                  },
                  "$before": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "updated_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$after": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date",
                      "example": "2020-12-28T12:49:16.272Z"
                    }
                  },
                  "$before": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date",
                      "example": "2020-12-28T12:49:16.272Z"
                    }
                  },
                  "$is": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date",
                      "example": "2020-12-28T12:49:16.272Z"
                    }
                  }
                }
              }
            }
          },
          "email": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "name": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "city": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$is": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "phone": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "birthday": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "source_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "publications.created_at": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "publications.related_object_id": {
            "$ref": "#/components/schemas/FieldConditions"
          }
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/FieldConditions"
        }
      },
      "ExportPublicationBase": {
        "title": "Export Publications",
        "type": "object",
        "properties": {
          "exported_object": {
            "type": "string",
            "default": "publication",
            "enum": [
              "publication"
            ],
            "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/ExportPublicationOrder"
                  }
                ]
              },
              "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/ExportPublicationFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportPublicationFilters"
                  }
                ]
              }
            },
            "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"
        ]
      },
      "ExportPublicationScheduled": {
        "title": "Export Publications Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportPublicationBase"
          }
        ]
      },
      "ExportPublication": {
        "title": "Export Publication",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportBase"
          },
          {
            "$ref": "#/components/schemas/ExportPublicationBase"
          }
        ]
      },
      "ExportPublicationFilters": {
        "title": "Export Publication Filters",
        "description": "Allowed additional properties must start with \"metadata.\"",
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "created_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$after": {
                    "$ref": "#/components/schemas/Any"
                  },
                  "$before": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "campaign": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$is": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "customer": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$is": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "voucher": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$is": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "failure_code": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "result": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "customer_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "campaign_name": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "voucher_type": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "is_referral_code": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "parent_object_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "related_object_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "source_id": {
            "$ref": "#/components/schemas/FieldConditions"
          }
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/FieldConditions"
        }
      },
      "ExportOrderBase": {
        "title": "Export Orders",
        "type": "object",
        "properties": {
          "exported_object": {
            "type": "string",
            "default": "order",
            "enum": [
              "order"
            ],
            "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/ExportOrderOrder"
                  }
                ]
              },
              "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/ExportOrderFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportOrderFilters"
                  }
                ]
              }
            },
            "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"
        ]
      },
      "ExportOrderScheduled": {
        "title": "Export Orders Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportOrderBase"
          }
        ]
      },
      "ExportOrder": {
        "title": "Export Orders",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportBase"
          },
          {
            "$ref": "#/components/schemas/ExportOrderBase"
          }
        ]
      },
      "ExportOrderFilters": {
        "title": "Export Order Filters",
        "description": "Allowed additional properties must start with \"metadata.\"",
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "created_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$after": {
                    "$ref": "#/components/schemas/Any"
                  },
                  "$before": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "updated_at": {
            "type": "object",
            "properties": {
              "conditions": {
                "title": "Filters Condition",
                "type": "object",
                "properties": {
                  "$after": {
                    "$ref": "#/components/schemas/Any"
                  },
                  "$before": {
                    "$ref": "#/components/schemas/Any"
                  }
                }
              }
            }
          },
          "status": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "source_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "amount": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "total_amount": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "discount_amount": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "total_discount_amount": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "items_discount_amount": {
            "$ref": "#/components/schemas/FieldConditions"
          }
        },
        "additionalProperties": {
          "$ref": "#/components/schemas/FieldConditions"
        }
      },
      "ExportPointsExpirationBase": {
        "title": "Export Points Expirations",
        "type": "object",
        "properties": {
          "exported_object": {
            "type": "string",
            "default": "points_expiration",
            "enum": [
              "points_expiration"
            ],
            "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/ExportPointsExpirationOrder"
                  }
                ]
              },
              "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/ExportPointsExpirationFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportPointsExpirationFilters"
                  }
                ]
              }
            },
            "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"
        ]
      },
      "ExportPointsExpirationScheduled": {
        "title": "Export Points Expiration Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportPointsExpirationBase"
          }
        ]
      },
      "ExportPointsExpiration": {
        "title": "Export Points Expiration",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportBase"
          },
          {
            "$ref": "#/components/schemas/ExportPointsExpirationBase"
          }
        ]
      },
      "ExportPointsExpirationFilters": {
        "title": "Export Points Expiration Filters",
        "type": "object",
        "properties": {
          "junction": {
            "$ref": "#/components/schemas/Junction"
          },
          "campaign_id": {
            "$ref": "#/components/schemas/FieldConditions"
          },
          "voucher_id": {
            "$ref": "#/components/schemas/FieldConditions"
          }
        }
      },
      "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"
        ]
      },
      "ExportVoucherTransactionsScheduled": {
        "title": "Export Vouchers Transactions Scheduled",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherTransactionsBase"
          }
        ]
      },
      "ExportVoucherTransactions": {
        "title": "Export Vouchers Transactions",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportBase"
          },
          {
            "$ref": "#/components/schemas/ExportVoucherTransactionsBase"
          }
        ]
      },
      "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"
          }
        }
      },
      "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": {
            "$ref": "#/components/schemas/FilterConditionsDateTime"
          },
          "voucher_id": {
            "$ref": "#/components/schemas/FilterConditionsString"
          }
        }
      },
      "ExportsGetResponseBody": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/Export"
          }
        ],
        "description": "Response body schema for **GET** `v1/exports/{exportId}`.",
        "title": "Exports Get Response Body"
      },
      "ExportsListResponseBody": {
        "title": "Exports List Response Body",
        "description": "Response body schema for **GET** `v1/exports`.",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about exports."
          },
          "data_ref": {
            "type": "string",
            "default": "exports",
            "enum": [
              "exports"
            ],
            "description": "Identifies the name of the attribute that contains the array of exports."
          },
          "exports": {
            "type": "array",
            "description": "An array of export objects.",
            "items": {
              "$ref": "#/components/schemas/Export"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of exports."
          }
        },
        "required": [
          "object",
          "data_ref",
          "exports",
          "total"
        ]
      },
      "ExportCustomerFields": {
        "type": "string",
        "enum": [
          "name",
          "id",
          "description",
          "email",
          "source_id",
          "created_at",
          "address_city",
          "address_state",
          "address_line_1",
          "address_line_2",
          "address_country",
          "address_postal_code",
          "redemptions_total_redeemed",
          "redemptions_total_failed",
          "redemptions_total_succeeded",
          "redemptions_total_rolled_back",
          "redemptions_total_rollback_failed",
          "redemptions_total_rollback_succeeded",
          "orders_total_amount",
          "orders_total_count",
          "orders_average_amount",
          "orders_last_order_amount",
          "orders_last_order_date",
          "loyalty_points",
          "loyalty_referred_customers",
          "updated_at",
          "phone",
          "birthday",
          "metadata",
          "birthdate"
        ],
        "title": "Export Customer Fields"
      },
      "ExportCustomerOrder": {
        "title": "Export Customer Order",
        "type": "string",
        "enum": [
          "-name",
          "name",
          "-id",
          "id",
          "-email",
          "email",
          "-source_id",
          "source_id",
          "-created_at",
          "created_at",
          "-updated_at",
          "updated_at"
        ]
      },
      "ExportPublicationFields": {
        "title": "Export Publication Fields",
        "type": "string",
        "enum": [
          "voucher_code",
          "customer_id",
          "customer_source_id",
          "date",
          "channel",
          "campaign",
          "is_winner",
          "metadata"
        ]
      },
      "ExportPublicationOrder": {
        "title": "Export Publication Order",
        "type": "string",
        "enum": [
          "-id",
          "id",
          "-voucher_code",
          "voucher_code",
          "-tracking_id",
          "tracking_id",
          "-customer_id",
          "customer_id",
          "-created_at",
          "created_at",
          "-channel",
          "channel"
        ]
      },
      "ExportRedemptionFields": {
        "title": "Export Redemption Fields",
        "type": "string",
        "enum": [
          "id",
          "object",
          "date",
          "voucher_code",
          "campaign",
          "promotion_tier_id",
          "customer_id",
          "customer_source_id",
          "customer_name",
          "tracking_id",
          "order_id",
          "order_amount",
          "gift_amount",
          "loyalty_points",
          "result",
          "failure_code",
          "failure_message",
          "metadata"
        ]
      },
      "ExportRedemptionOrder": {
        "title": "Export Redemption Order",
        "type": "string",
        "enum": [
          "-id",
          "id",
          "-voucher_code",
          "voucher_code",
          "-tracking_id",
          "tracking_id",
          "-customer_id",
          "customer_id",
          "-created_at",
          "created_at"
        ]
      },
      "ExportVoucherFields": {
        "title": "Export Voucher Fields",
        "type": "string",
        "enum": [
          "code",
          "voucher_type",
          "value",
          "formula",
          "discount_type",
          "campaign",
          "category",
          "start_date",
          "expiration_date",
          "gift_balance",
          "loyalty_balance",
          "redemption_quantity",
          "redemption_count",
          "active",
          "qr_code",
          "bar_code",
          "metadata",
          "id",
          "is_referral_code",
          "created_at",
          "updated_at",
          "validity_timeframe_interval",
          "validity_timeframe_duration",
          "validity_day_of_week",
          "discount_amount_limit",
          "campaign_id",
          "additional_info",
          "customer_id",
          "discount_effect",
          "discount_unit_type",
          "discount_unit_effect",
          "validation_rules_id",
          "customer_source_id"
        ]
      },
      "ExportVoucherOrder": {
        "title": "Export Voucher Order",
        "type": "string",
        "enum": [
          "-created_at",
          "created_at",
          "-updated_at",
          "updated_at",
          "-code",
          "code"
        ]
      },
      "ExportOrderFields": {
        "title": "Export Order Fields",
        "type": "string",
        "enum": [
          "id",
          "source_id",
          "created_at",
          "updated_at",
          "status",
          "amount",
          "discount_amount",
          "items_discount_amount",
          "total_discount_amount",
          "total_amount",
          "customer_id",
          "referrer_id",
          "metadata"
        ]
      },
      "ExportOrderOrder": {
        "title": "Export Order Order",
        "type": "string",
        "enum": [
          "-created_at",
          "created_at",
          "-updated_at",
          "updated_at",
          "-status",
          "status"
        ]
      },
      "ExportPointsExpirationFields": {
        "title": "Export Points Expiration Fields",
        "type": "string",
        "enum": [
          "id",
          "campaign_id",
          "voucher_id",
          "points",
          "status",
          "expires_at"
        ]
      },
      "ExportPointsExpirationOrder": {
        "title": "Export Points Expiration Order",
        "type": "string",
        "enum": [
          "-expires_at",
          "expires_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"
        ]
      },
      "ExportVoucherTransactionsOrder": {
        "title": "Export Voucher Transactions Order",
        "type": "string",
        "enum": [
          "-created_at",
          "created_at"
        ]
      },
      "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"
            }
          ]
        }
      },
      "AnyOne": {
        "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"
            }
          ]
        },
        "maxItems": 1
      },
      "AnyNumber": {
        "title": "Any Number",
        "type": "array",
        "items": {
          "type": "number",
          "minimum": 0
        },
        "maxItems": 1
      },
      "AnyString": {
        "title": "Any String",
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "AnyDateDateTime": {
        "title": "Any Date and Date-Time",
        "type": "array",
        "items": {
          "oneOf": [
            {
              "type": "string",
              "title": "Date",
              "format": "date"
            },
            {
              "type": "string",
              "title": "Date-time",
              "format": "date-time"
            }
          ]
        },
        "maxItems": 1
      },
      "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"
                }
              }
            }
          ]
        }
      },
      "LoyaltiesTiersCreateInBulkResponseBody": {
        "title": "Loyalties Tiers Create Response Body",
        "type": "array",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/tiers`.",
        "items": {
          "$ref": "#/components/schemas/LoyaltyTier"
        }
      },
      "LoyaltiesListTiersRequestQuery": {
        "title": "Loyalties List Tiers Request Query",
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "multipleOf": 100,
            "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items."
          },
          "page": {
            "type": "integer",
            "description": "Which page of results to return. The lowest value is `1`.",
            "minimum": 1
          },
          "order": {
            "type": "string",
            "enum": [
              "created_at",
              "-created_at",
              "updated_at",
              "-updated_at"
            ],
            "description": "Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order."
          }
        }
      },
      "LoyaltiesListLoyaltyTierEarningRulesRequestQuery": {
        "title": "LoyaltiesListLoyaltyTierEarningRulesRequestQuery",
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "multipleOf": 100,
            "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items."
          },
          "page": {
            "type": "integer",
            "description": "Which page of results to return. The lowest value is `1`.",
            "minimum": 1
          }
        }
      },
      "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}`."
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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",
                "nullable": true,
                "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",
                "nullable": true,
                "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"
            ]
          }
        ]
      },
      "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."
          }
        }
      },
      "MappingPoints": {
        "title": "MappingPoints",
        "type": "object",
        "oneOf": [
          {
            "$ref": "#/components/schemas/MappingMultiply"
          },
          {
            "$ref": "#/components/schemas/MappingFixed"
          }
        ]
      },
      "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"
        ]
      },
      "CategoryWithStackingRulesType": {
        "type": "object",
        "title": "Category with Stacking Rules Type",
        "description": "Category object with `stacking_rules_type`",
        "allOf": [
          {
            "$ref": "#/components/schemas/Category"
          },
          {
            "type": "object",
            "properties": {
              "stacking_rules_type": {
                "type": "string",
                "description": "The type of the stacking rule eligibility.",
                "enum": [
                  "JOINT",
                  "EXCLUSIVE"
                ]
              }
            }
          }
        ]
      },
      "CategoriesListResponseBody": {
        "title": "Categories List Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `v1/categories`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about categories in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of category objects."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of categories."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "CategoriesCreateRequestBody": {
        "title": "Categories Create Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/categories`.",
        "properties": {
          "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
          }
        },
        "required": [
          "name",
          "hierarchy"
        ]
      },
      "CategoriesCreateResponseBody": {
        "title": "Categories Create Response Body",
        "description": "Response body schema for **POST** `v1/categories`.",
        "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"
            ]
          },
          "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"
          }
        },
        "required": [
          "id",
          "name",
          "hierarchy",
          "created_at",
          "object"
        ]
      },
      "CategoriesGetResponseBody": {
        "type": "object",
        "title": "Categories Get Response Body",
        "description": "Response body schema for **GET** `v1/categories/{categoryId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Category"
          }
        ]
      },
      "CategoriesUpdateRequestBody": {
        "title": "Categories Update Request Body",
        "description": "Request body schema for **PUT** `v1/categories/{categoryId}`.",
        "type": "object",
        "properties": {
          "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
          }
        },
        "required": [
          "name",
          "hierarchy"
        ]
      },
      "CategoriesUpdateResponseBody": {
        "title": "Categories Update Response Body",
        "description": "Response body schema for **PUT** `v1/categories/{categoryId}`.",
        "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"
            ]
          },
          "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",
          "updated_at"
        ]
      },
      "ImportCSVRequestBody": {
        "type": "object",
        "title": "Import CSV file",
        "description": "Request body schema for importing data using a CSV file.",
        "format": "binary",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "File path."
          }
        },
        "required": [
          "file"
        ]
      },
      "VouchersImportCSVRequestBody": {
        "type": "object",
        "title": "Vouchers Import CSV Request Body",
        "description": "Request body schema for **POST** `v1/vouchers/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ImportCSVRequestBody"
          },
          {
            "type": "object",
            "properties": {
              "webhooks_enable": {
                "type": "boolean",
                "description": "Triggers a webhook sendout for new and updated vouchers if the voucher created and voucher updated webhooks are configured in Project settings."
              }
            }
          }
        ]
      },
      "CampaignsVouchersImportCSVRequestBody": {
        "type": "object",
        "title": "Campaigns Vouchers Import CSV Request Body",
        "description": "Request body schema for **POST** `v1/campaigns/{campaignId}/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ImportCSVRequestBody"
          }
        ]
      },
      "CustomersImportCSVRequestBody": {
        "type": "object",
        "title": "Customers Import CSV Request Body",
        "description": "Response body schema for **POST** `v1/customers/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ImportCSVRequestBody"
          }
        ]
      },
      "ProductsImportCSVRequestBody": {
        "type": "object",
        "title": "Products Import CSV Request Body",
        "description": "Response body schema for **POST** `v1/products/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ImportCSVRequestBody"
          }
        ]
      },
      "SkusImportCSVRequestBody": {
        "type": "object",
        "title": "Skus Import Csv Request Body",
        "description": "Response body schema for **POST** `v1/skus/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ImportCSVRequestBody"
          }
        ]
      },
      "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"
        ]
      },
      "e_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."
          },
          "error": {
            "type": "object",
            "description": "Contains custom user-defined error message translation.",
            "properties": {
              "message": {
                "type": "string",
                "description": "Error message translation defined in Dashboard &rarr; Project Settings &rarr; Error Messages"
              }
            }
          }
        }
      },
      "e_error_expanded": {
        "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": "redemption"
          },
          "error": {
            "type": "object",
            "description": "Contains custom user-defined error message translation.",
            "properties": {
              "message": {
                "type": "string",
                "description": "Error message translation defined in Dashboard &rarr; Project Settings &rarr; Error Messages"
              }
            }
          }
        }
      },
      "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 additional information about the error.",
            "properties": {
              "message": {
                "type": "string",
                "description": "The message configured by the user in a validation rule."
              }
            }
          }
        },
        "required": [
          "code",
          "message"
        ]
      },
      "ErrorPaymentRequired": {
        "title": "Payment Required Error",
        "type": "object",
        "description": "Error: Payment required - the current plan does not include the feature.",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "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."
          },
          "key": {
            "type": "string",
            "description": "Short string describing the kind of error which occurred."
          }
        },
        "required": [
          "code",
          "message",
          "details",
          "key"
        ]
      },
      "ResourceInUseError": {
        "title": "Resource in Use Error Object",
        "type": "object",
        "description": "Error: Bad Request - Resource in use",
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "properties": {
              "related_object_ids": {
                "type": "array",
                "description": "Name or ID of the resources that are related.",
                "items": {
                  "type": "string",
                  "example": "rewa_5WV7H3y2lT3GGl03Xjw29IEc"
                }
              },
              "related_object_type": {
                "type": "string",
                "description": "Specifies the type of resource that is related."
              },
              "related_object_total": {
                "type": "integer",
                "description": "Specifies the total resource that are related."
              }
            }
          }
        ]
      },
      "ProjectBoundError": {
        "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-0a96c19b1a41c03999",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by Voucherify support team."
          }
        }
      },
      "BadRequest": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "error": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing more details about the error."
          }
        }
      },
      "e_integration_key": {
        "title": "Error Object",
        "type": "object",
        "description": "Error details",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code."
          },
          "message": {
            "type": "string",
            "description": "A human-readable message providing a short description of the error."
          },
          "key": {
            "type": "string",
            "description": "Short string describing the kind of error which occurred."
          }
        }
      },
      "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."
          }
        }
      },
      "e_400_invalid_payload": {
        "title": "Invalid Payload",
        "type": "object",
        "description": "Error: Bad Request &rarr; Invalid Payload",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "invalid_payload",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Invalid payload",
            "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-0a884c6be8c3756f42",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "e_400_invalid_balance": {
        "title": "Invalid Balance",
        "type": "object",
        "description": "Error: Bad Request &rarr; Invalid Balance",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "invalid_balance",
            "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-0a884c6be8c3756f42",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "e_400_invalid_export_fields": {
        "title": "Invalid Export Fields",
        "type": "object",
        "description": "Error: Bad Request &rarr; Invalid Export Fields",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "invalid_export_fields",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Invalid Export",
            "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-0a884c6be8c3756f42",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "e_400_invalid_voucher": {
        "title": "Invalid Voucher",
        "type": "object",
        "description": "Error: Bad Request &rarr; Invalid Voucher",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "invalid_voucher",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Invalid Voucher",
            "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-0a884c6be8c3756f42",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "e_400_invalid_validation_rules": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's HTTP status code.",
            "default": 400
          },
          "key": {
            "type": "string",
            "default": "invalid_validation_rules",
            "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."
          }
        },
        "title": "Invalid Validation Rules",
        "description": "Error: Bad Request &rarr; Invalid Validation Rules"
      },
      "e_400_not_enough_codes": {
        "title": "Not Enough Codes",
        "type": "object",
        "description": "Error: Bad Request &rarr; Not enough codes",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "not_enough_codes",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Not enough codes",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "example": "Specify at least 1 code in codes.",
            "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."
          }
        }
      },
      "e_400_metadata_validation_failed": {
        "title": "Metadata Validation Failed",
        "type": "object",
        "description": "Error: Bad Request &rarr; Metadata validation failed",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "metadata_validation_failed",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Metadata validation failed",
            "description": "A human-readable message providing a short description of the error."
          },
          "details": {
            "type": "string",
            "example": "Ranking: must be a number (actual value is 'true')",
            "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."
          }
        }
      },
      "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"
              }
            }
          }
        }
      },
      "e_400_duplicate_key": {
        "title": "Duplicated Key",
        "type": "object",
        "description": "Error: Conflict &rarr; Duplicated key found",
        "properties": {
          "code": {
            "type": "integer",
            "default": 400,
            "description": "Error's HTTP status code."
          },
          "key": {
            "type": "string",
            "default": "duplicate_key",
            "description": "Short string describing the kind of error which occurred."
          },
          "message": {
            "type": "string",
            "default": "Duplicate codes",
            "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-0aa36e570e44cb3bdd",
            "description": "This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team."
          }
        }
      },
      "ProductCollectionsCreateRequestBody": {
        "title": "Product Collections Create Request Body",
        "description": "Response body schema for **POST** `v1/product-collections`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/ProductCollectionsCreateStaticRequestBody"
          },
          {
            "$ref": "#/components/schemas/ProductCollectionsCreateDynamicRequestBody"
          }
        ]
      },
      "ProductCollectionsCreateStaticRequestBody": {
        "title": "Product Collections Create Static Request Body",
        "description": "Response body schema for **POST** `v1/product-collections`.",
        "type": "object",
        "properties": {
          "type": {
            "description": "Show that the product collection is static (manually selected products).",
            "default": "STATIC",
            "enum": [
              "STATIC"
            ]
          },
          "name": {
            "type": "string",
            "description": "Unique user-defined product collection name."
          },
          "products": {
            "type": "array",
            "description": "Defines a set of products for a `STATIC` product collection type.",
            "items": {
              "title": "Product Collections Create Dynamic Request Body Products Item",
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "prod_0a41bcf807c5fcaaf6",
                  "description": "The product ID."
                },
                "product_id": {
                  "type": "string",
                  "description": "Product ID for SKUs."
                },
                "object": {
                  "description": "Denotes the type of the object represented by the ID.",
                  "enum": [
                    "sku",
                    "product"
                  ]
                }
              },
              "required": [
                "id",
                "object"
              ]
            }
          }
        },
        "required": [
          "type",
          "name"
        ]
      },
      "ProductCollectionsCreateDynamicRequestBody": {
        "title": "Product Collections Create Dynamic (Auto Update) Request Body",
        "description": "Response body schema for **POST** `v1/product-collections`.",
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Show that the product collection is dynamic (products come in and leave based on set criteria).",
            "default": "AUTO_UPDATE",
            "enum": [
              "AUTO_UPDATE"
            ]
          },
          "name": {
            "description": "Unique user-defined product collection name.",
            "type": "string"
          },
          "filter": {
            "type": "object",
            "description": "Defines a set of criteria and boundary conditions for an `AUTO_UPDATE` product collection type.",
            "required": [
              "junction"
            ],
            "properties": {
              "junction": {
                "$ref": "#/components/schemas/Junction"
              }
            },
            "additionalProperties": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/FieldConditions"
                }
              ],
              "description": "Valid keys: `id`, `product_id`, `source_id`, `name`, `price`, `object`, `attributes`, `image_url`, `skus`, `created_at`, `updated_at` and `metadata.*`"
            }
          }
        },
        "required": [
          "type",
          "name",
          "filter"
        ]
      },
      "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"
        ]
      },
      "InapplicableToResultList": {
        "title": "Inapplicable To Result List",
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "Contains array of items to which the discount cannot apply.",
            "items": {
              "$ref": "#/components/schemas/InapplicableTo"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of objects defining included products, SKUs, or product collections."
          },
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON."
          },
          "data_ref": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "data",
            "enum": [
              "data"
            ]
          }
        },
        "required": [
          "data",
          "total",
          "object",
          "data_ref"
        ]
      },
      "ApplicableToResultList": {
        "title": "Applicable To Result List",
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "Contains array of items to which the discount can apply.",
            "items": {
              "$ref": "#/components/schemas/ApplicableTo"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of objects defining included products, SKUs, or product collections."
          },
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON."
          },
          "data_ref": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "data",
            "enum": [
              "data"
            ]
          }
        },
        "required": [
          "data",
          "total",
          "object",
          "data_ref"
        ]
      },
      "InapplicableTo": {
        "title": "Inapplicable To",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ApplicableTo"
          }
        ]
      },
      "ApplicableTo": {
        "title": "Applicable To",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "product",
              "sku",
              "products_collection"
            ],
            "description": "This object stores information about the resource to which the discount is applicable."
          },
          "id": {
            "type": "string",
            "description": "Unique product collection, product, or SKU identifier assigned by Voucherify."
          },
          "source_id": {
            "type": "string",
            "description": "The source identifier from your inventory system."
          },
          "product_id": {
            "type": "string",
            "description": "Parent product's unique ID assigned by Voucherify."
          },
          "product_source_id": {
            "type": "string",
            "description": "Parent product's source ID from your inventory system."
          },
          "price": {
            "type": "number",
            "description": "New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price."
          },
          "price_formula": {
            "type": "number",
            "description": "Formula used to calculate the discounted price of an item."
          },
          "effect": {
            "description": "Defines how the discount is applied to the customer's order.",
            "allOf": [
              {
                "$ref": "#/components/schemas/ApplicableToEffect"
              }
            ]
          },
          "quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted per order line item."
          },
          "aggregated_quantity_limit": {
            "type": "integer",
            "description": "The maximum number of units allowed to be discounted combined across all matched order line items."
          },
          "amount_limit": {
            "type": "integer",
            "description": "Upper limit allowed to be applied as a discount per order line item. 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. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects:\n- `APPLY_TO_ITEMS` (each item subtotal is discounted equally)\n- `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)"
          },
          "order_item_indices": {
            "type": "array",
            "description": "Lists which order lines are (not) covered by the discount. The order in the array is determined by the sequence of applied discounts, while the numbers correspond to the order lines sent in the `order` object in the request. The first order line is assigned `0`, the second order line is assigned `1`, and so on.",
            "items": {
              "type": "integer"
            }
          },
          "order_item_units": {
            "type": "array",
            "description": "Lists which units within order lines are covered by the discount. The order line items are listed according to sequence of applied discounts while the `index` corresponds to the order line sent in the `order` object in the request.",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "description": "Number assigned to the order line item in accordance with the order sent in the request.",
                  "minimum": 0
                },
                "units": {
                  "type": "array",
                  "description": "Numbers of units in the order line covered by the discount; e.g. `2, 5, 8` for 10 units with the setting `\"skip_initially\": 1`, `\"repeat\": 3`. The counting of units starts from `1`. The maximum quantity of all handled units is 1000. If the quantity of all order items exceeds 1000, this array is not returned, but `units_limit_exceeded: true`. However, the discount is calculated properly for all relevant units.",
                  "items": {
                    "type": "integer"
                  }
                },
                "units_limit_exceeded": {
                  "type": "boolean",
                  "description": "Returned as `true` only when the sum total of `quantity` of all order items exceeds 1000."
                }
              }
            }
          },
          "repeat": {
            "type": "integer",
            "description": "Determines the recurrence of the discount, e.g. `\"repeat\": 3` means that the discount is applied to every third item."
          },
          "skip_initially": {
            "type": "integer",
            "description": "Determines how many items are skipped before the discount is applied."
          },
          "target": {
            "type": "string",
            "description": "Determines to which kinds of objects the discount is applicable. `ITEM` includes products and SKUs. `UNIT` means particular units within an order line.",
            "enum": [
              "ITEM",
              "UNIT"
            ]
          }
        },
        "required": [
          "object",
          "id",
          "effect"
        ]
      },
      "ApplicableToEffect": {
        "title": "Applicable To Effect",
        "type": "string",
        "enum": [
          "APPLY_TO_EVERY",
          "APPLY_TO_CHEAPEST",
          "APPLY_FROM_CHEAPEST",
          "APPLY_TO_MOST_EXPENSIVE",
          "APPLY_FROM_MOST_EXPENSIVE"
        ]
      },
      "VouchersValidateResponseBody": {
        "title": "Vouchers Validate Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/validate`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VouchersValidateValidResponseBody"
          },
          {
            "$ref": "#/components/schemas/VouchersValidateInvalidResponseBody"
          }
        ]
      },
      "CampaignsGetResponseBody": {
        "type": "object",
        "title": "Campaigns Get Response Body",
        "description": "Response body schema for **GET** `v1/campaigns/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Campaign"
          }
        ]
      },
      "CampaignsTransactionsListResponseBody": {
        "type": "object",
        "title": "Campaigns Transactions List Response Body",
        "description": "Response body schema for **GET** `v1/campaigns/{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/VoucherTransaction"
            },
            "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"
        ]
      },
      "CampaignsSummaryGetResponseBody": {
        "title": "Campaigns Summary Get Response Body",
        "type": "object",
        "description": "Response body schema for **GET** `/v1/campaigns/{campaignId}/summary`.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/CampaignsSummaryDiscountCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryPromotionCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryGiftCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryLoyaltyCampaign"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryReferralCampaign"
          }
        ]
      },
      "CampaignsSummaryDiscountCampaign": {
        "type": "object",
        "title": "Campaigns Summary - Discount Campaign details",
        "description": "Campaign summary data for discount campaigns.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsSummaryCampaignBase"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryVouchersPublications"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryDiscounts"
          }
        ]
      },
      "CampaignsSummaryGiftCampaign": {
        "type": "object",
        "title": "Campaigns Summary - Gift Campaign details",
        "description": "Campaign summary data for gift campaigns.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsSummaryCampaignBase"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryVouchersPublications"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryGift"
          }
        ]
      },
      "CampaignsSummaryLoyaltyCampaign": {
        "type": "object",
        "title": "Campaigns Summary - Loyalty Campaign details",
        "description": "Campaign summary data for loyalty campaigns.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsSummaryCampaignBase"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryVouchersPublications"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryLoyalty"
          }
        ]
      },
      "CampaignsSummaryPromotionCampaign": {
        "type": "object",
        "title": "Campaigns Summary - Promotion Campaign details",
        "description": "Campaign summary data for promotion campaigns.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsSummaryCampaignBase"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryDiscounts"
          }
        ]
      },
      "CampaignsSummaryReferralCampaign": {
        "type": "object",
        "title": "Campaigns Summary - Referral Campaign details",
        "description": "Campaign summary data for referral campaigns.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsSummaryCampaignBase"
          },
          {
            "$ref": "#/components/schemas/CampaignsSummaryVouchersPublications"
          },
          {
            "type": "object",
            "properties": {
              "referred_customers": {
                "type": "integer",
                "description": "Total number of all referred customers."
              }
            },
            "required": [
              "referred_customers"
            ]
          }
        ]
      },
      "CampaignsSummaryCampaignBase": {
        "type": "object",
        "description": "Contains the basic information about any type of campaign.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object, which is `campaign_summary`.",
            "default": "campaign_summary",
            "enum": [
              "campaign_summary"
            ]
          },
          "campaign": {
            "$ref": "#/components/schemas/CampaignBase"
          },
          "redemptions": {
            "type": "integer",
            "description": "Total number of redemptions, which includes successful and failed redemptions."
          },
          "redemptions_succeeded": {
            "type": "integer",
            "description": "Total number of successful redemptions."
          },
          "redemptions_failed": {
            "type": "integer",
            "description": "Total number of failed redemptions."
          },
          "rollbacks": {
            "type": "integer",
            "description": "Total number of rollbacks, which includes successful and failed rollbacks."
          },
          "rollbacks_succeeded": {
            "type": "integer",
            "description": "Total number of successful rollbacks."
          },
          "rollbacks_failed": {
            "type": "integer",
            "description": "Total number of failed rollbacks."
          },
          "validations": {
            "type": "integer",
            "description": "Total number of validations, which includes successful and failed validations."
          },
          "validations_succeeded": {
            "type": "integer",
            "description": "Total number of successful validations."
          },
          "validations_failed": {
            "type": "integer",
            "description": "Total number of failed validations."
          },
          "orders_amount": {
            "type": "integer",
            "description": "Total amount of orders related to the campaign. This amount is not reduced by `orders_rolledback_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          },
          "orders_rolledback_amount": {
            "type": "integer",
            "description": "Total amount of orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          }
        },
        "required": [
          "object",
          "campaign",
          "redemptions",
          "redemptions_succeeded",
          "redemptions_failed",
          "rollbacks",
          "rollbacks_succeeded",
          "rollbacks_failed",
          "validations",
          "validations_succeeded",
          "validations_failed",
          "orders_amount",
          "orders_rolledback_amount"
        ]
      },
      "CampaignsSummaryVouchersPublications": {
        "type": "object",
        "properties": {
          "vouchers_created": {
            "type": "integer",
            "description": "Total number of vouchers created within the campaign. Includes vouchers generated when the campaign was created, vouchers added manually, or vouchers generated automatically when a new customer joined the campaign."
          },
          "vouchers_deleted": {
            "type": "integer",
            "description": "Total number of vouchers deleted within the campaign. Includes vouchers moved to the bin and vouchers deleted permanently. Vouchers moved to the bin and then deleted permanently are counted once."
          },
          "publications": {
            "type": "integer",
            "description": "Total number of publications, which includes successful and failed publications."
          },
          "publications_succeeded": {
            "type": "integer",
            "description": "Total number of successful publications."
          },
          "publications_failed": {
            "type": "integer",
            "description": "Total number of failed publications."
          }
        },
        "required": [
          "vouchers_created",
          "vouchers_deleted",
          "publications",
          "publications_succeeded",
          "publications_failed"
        ]
      },
      "CampaignsSummaryDiscounts": {
        "type": "object",
        "properties": {
          "discounted_amount": {
            "type": "integer",
            "description": "Total amount of discounts related to the campaign. This amount is not reduced by the `rolledback_discounted_amount`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          },
          "rolledback_discounted_amount": {
            "type": "integer",
            "description": "Total amount of discounts orders that were rolled back and are related to the campaign. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          }
        },
        "required": [
          "discounted_amount",
          "rolledback_discounted_amount"
        ]
      },
      "CampaignsSummaryGift": {
        "type": "object",
        "description": "",
        "properties": {
          "created_vouchers_amount": {
            "type": "integer",
            "description": "The total credit amount for all created gift cards. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          },
          "amount_added": {
            "type": "integer",
            "description": "The total credit amount that was added. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          },
          "amount_deleted": {
            "type": "integer",
            "description": "The total credit amount that was deleted by deleting gift cards. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          },
          "amount_redeemed": {
            "type": "integer",
            "description": "The total credit amount that was redeemed. This amount is not reduced by the `amount_rolledback`. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          },
          "amount_rolledback": {
            "type": "integer",
            "description": "The total credit amount that was rolled back. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          },
          "amount_subtracted": {
            "type": "integer",
            "description": "The total credit amount that was subtracted. The value is multiplied by `100` to precisely represent 2 decimal places. For example, `$10` is represented as `1000`."
          }
        },
        "required": [
          "created_vouchers_amount",
          "amount_added",
          "amount_deleted",
          "amount_redeemed",
          "amount_rolledback",
          "amount_subtracted"
        ]
      },
      "CampaignsSummaryLoyalty": {
        "type": "object",
        "properties": {
          "created_vouchers_points": {
            "type": "integer",
            "description": "Total number of points added to newly created loyalty cards. This also counts points added for the loyalty cards which are created by importing a CSV file to a campaign."
          },
          "points_deleted": {
            "type": "integer",
            "description": "Total number of points that were deleted."
          },
          "points_subtracted": {
            "type": "integer",
            "description": "Total number of points that were subtracted."
          },
          "points_added": {
            "type": "integer",
            "description": "Total number of points that were added. This includes points added manually or automatically by redeeming a reward that adds loyalty points to cards in this campaign."
          },
          "points_rewarded": {
            "type": "integer",
            "description": "Total number of points that were rewarded to loyalty cards through earning rules. This includes pending points that were activated."
          },
          "points_redeemed": {
            "type": "integer",
            "description": "Total number of points that were redeemed for rewards."
          },
          "points_rolledback": {
            "type": "integer",
            "description": "Total number of points that were rolled back for reward redemptions."
          },
          "points_expired": {
            "type": "integer",
            "description": "Total number of points that have expired."
          },
          "points_transferred_out": {
            "type": "integer",
            "description": "Total number of points transferred out of loyalty cards covered by the campaign."
          },
          "points_transferred_in": {
            "type": "integer",
            "description": "Total number of points transferred into loyalty cards covered by the campaign."
          },
          "pending_points_added": {
            "type": "integer",
            "description": "Total number of pending points that were added either as part of earning rules or added manually to an existing pending point bucket. Pending points that were activated manually or automatically or that were canceled do not affect this number."
          },
          "pending_points_subtracted": {
            "type": "integer",
            "description": "Total number of pending points that were subtracted from existing pending point buckets."
          },
          "pending_points_activated": {
            "type": "integer",
            "description": "Total number of pending points that were activated manually or automatically."
          },
          "pending_points_canceled": {
            "type": "integer",
            "description": "Total number of pending points that were canceled."
          }
        },
        "required": [
          "created_vouchers_points",
          "points_deleted",
          "points_subtracted",
          "points_added",
          "points_rewarded",
          "points_redeemed",
          "points_rolledback",
          "points_expired",
          "points_transferred_out",
          "points_transferred_in",
          "orders_amount",
          "orders_rolledback_amount",
          "pending_points_added",
          "pending_points_subtracted",
          "pending_points_activated",
          "pending_points_canceled"
        ]
      },
      "CampaignsTransactionsExportCreateRequestBody": {
        "title": "Campaign Transactions Export Create Request Body",
        "description": "Request body schema for **POST** `v1/campaigns/{campaignId}/transactions/export`.",
        "type": "object",
        "properties": {
          "parameters": {
            "description": "List of available parameters containing fields and filters that can be exported for transactions in a gift card or 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"
                  }
                }
              }
            ]
          }
        }
      },
      "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"
              ]
            }
          }
        }
      },
      "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"
          }
        ]
      },
      "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",
            "nullable": true,
            "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](ref:download-export) method."
              }
            }
          },
          "user_id": {
            "type": "string",
            "nullable": true,
            "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"
        ]
      },
      "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
                    }
                  }
                }
              }
            }
          }
        }
      },
      "CampaignsCreateResponseBody": {
        "type": "object",
        "title": "Campaigns Create Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Campaign"
          }
        ]
      },
      "CampaignsUpdateResponseBody": {
        "type": "object",
        "title": "Campaigns Update Response Body",
        "description": "Response body schema for **PUT** `v1/campaigns/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Campaign"
          }
        ]
      },
      "CampaignsDeleteResponseBody": {
        "type": "object",
        "title": "Campaigns Delete Response Body",
        "description": "Response body schema for **DELETE** `/campaigns/{campaignId}`.",
        "properties": {
          "async_action_id": {
            "type": "string",
            "example": "aa_0a875d56c805df6601",
            "description": "The ID of the scheduled asynchronous action."
          }
        }
      },
      "CampaignsEnableResponseBody": {
        "type": "object",
        "title": "Campaigns Enable Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}/enable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EmptyJson"
          }
        ]
      },
      "CampaignsDisableResponseBody": {
        "type": "object",
        "title": "Campaigns Disable Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}/disable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/EmptyJson"
          }
        ]
      },
      "LoyaltiesDeleteResponseBody": {
        "type": "object",
        "title": "LoyaltiesDeleteResponseBody",
        "description": "Response body schema for **DELETE** `/loyalties/{campaignId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "CustomersMetadataUpdateInBulkResponseBody": {
        "type": "object",
        "title": "Customers Metadata Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/customers/metadata/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "CustomersUpdateInBulkResponseBody": {
        "type": "object",
        "title": "Customers Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/customers/bulk/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "CustomersSegmentsListResponseBody": {
        "type": "object",
        "title": "Customers Segments List Response Body",
        "description": "Response body schema for **GET** `v1/customers/{customerId}/segments`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerSegmentsList"
          }
        ]
      },
      "CustomersRedeemablesListResponseBody": {
        "type": "object",
        "title": "Customers Redeemables List Response Body",
        "description": "Response body schema for **GET** `v1/customers/{customerId}/redeemables`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CustomerRedeemablesList"
          }
        ]
      },
      "ReferralsMembersHoldersListResponseBody": {
        "type": "object",
        "title": "Referrals Redeemable Holders List Response Body",
        "description": "Response body schema for **GET** `v1/referrals/{campaignId}/members/{memberId}/holders` and for **GET** `v1/referrals/members/{memberId}/holders`",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedeemableHoldersList"
          }
        ]
      },
      "ReferralsMembersHoldersCreateInBulkRequestBody": {
        "type": "object",
        "title": "Add Referral Card Holders",
        "description": "Request body schema for **POST** `v1/referrals/{campaignId}/members/{memberId}/holders` and **POST** `v1/referrals/members/{memberId}/holders`.",
        "properties": {
          "holders": {
            "type": "array",
            "title": "Holder Array",
            "description": "Array of holders to be added to a referral card as referees. You have to send at least one object in the array up to a maximum of 100 objects. You can send either a `source_id` or `id`, or both; however, at least one of them is required. If both are sent, Voucherify checks `id` to upsert that customer's data.",
            "items": {
              "$ref": "#/components/schemas/Customer"
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of custom key/value pairs that you can attach to the redeemable holders sent in the array. The value can be a string, number, boolean, date, datetime, image URL, or object. The metadata must meet the metadata schema for publications. The metadata object stores all custom attributes assigned to the redeemable holder."
          }
        },
        "required": [
          "holders"
        ]
      },
      "ReferralsMembersHoldersCreateInBulkResponseBody": {
        "type": "object",
        "title": "Add Referral Code Holder Response Body",
        "description": "Response body schema for **POST** `v1/referrals/{campaignId}/members/{memberId}/holders` and **POST** `v1/referrals/members/{memberId}/holders`.",
        "properties": {
          "holders": {
            "type": "array",
            "description": "Contains an array of referral card holders who are the customers sent in the request.",
            "items": {
              "$ref": "#/components/schemas/RedeemableHolder"
            }
          }
        },
        "required": [
          "holders"
        ]
      },
      "ProductsListResponseBody": {
        "type": "object",
        "title": "Products List Response Body",
        "description": "Response body schema for **GET** `v1/products`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about products in a dictionary.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of product objects.",
            "default": "products"
          },
          "products": {
            "type": "array",
            "description": "Contains array of product objects.",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of product objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "products",
          "total"
        ]
      },
      "ProductsGetResponseBody": {
        "type": "object",
        "title": "Products Get Response Body",
        "description": "Response body schema for **GET** `v1/products/{productId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Product"
          }
        ]
      },
      "ProductsCreateResponseBody": {
        "type": "object",
        "title": "Products Create Response Body",
        "description": "Response body schema for **POST** `v1/products`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Product"
          }
        ]
      },
      "ProductsUpdateResponseBody": {
        "type": "object",
        "title": "Products Update Response Body",
        "description": "Response body schema for **PUT** `v1/products/{productId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Product"
          }
        ]
      },
      "ProductsUpdateInBulkResponseBody": {
        "type": "object",
        "title": "Products Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/products/bulk/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "SkusGetResponseBody": {
        "type": "object",
        "title": "Skus Get Response Body",
        "description": "Response body schema for **GET** `v1/skus/{skuId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Sku"
          }
        ]
      },
      "ProductsSkusListResponseBody": {
        "type": "object",
        "title": "Products Skus List Response Body",
        "description": "Response body schema for **GET** `v1/products/{productId}/skus`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/SkusList"
          }
        ]
      },
      "ProductCollectionsListResponseBody": {
        "type": "object",
        "title": "Product Collections List Response Body",
        "description": "Response body schema for **GET** `v1/product-collections`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductCollectionsList"
          }
        ]
      },
      "ProductCollectionsGetResponseBody": {
        "type": "object",
        "title": "Product Collections Get Response Body",
        "description": "Response body schema for **GET** `v1/product-collections/{productCollectionId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductCollectionsItem"
          }
        ]
      },
      "ProductCollectionsCreateResponseBody": {
        "type": "object",
        "title": "Product Collections Create Response Body",
        "description": "Response body schema for **POST** `v1/product-collections`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductCollectionsItem"
          }
        ]
      },
      "ProductCollectionsProductsListResponseBody": {
        "type": "object",
        "title": "Product Collections Products List Response Body",
        "description": "Response body schema for **GET** `v1/product-collections/{productCollectionId}/products`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductCollectionsProductsList"
          }
        ]
      },
      "VouchersBalanceUpdateResponseBody": {
        "description": "Response body schema for `vouchers/{code}/balance.`",
        "type": "object",
        "title": "Vouchers Balance Update Response Body",
        "required": [
          "amount",
          "total",
          "balance",
          "type",
          "object",
          "related_object",
          "operation_type"
        ],
        "properties": {
          "amount": {
            "type": "integer",
            "description": "The incremental amount added (positive integer) or subtracted (negative integer) to the current balance on the gift card or loyalty card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "total": {
            "type": "integer",
            "description": "Total income incurred over the lifespan of the gift card or loyalty card."
          },
          "balance": {
            "type": "integer",
            "description": "The balance after adding or subtracting a specified amount. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "type": {
            "type": "string",
            "description": "The type of voucher being modified.",
            "enum": [
              "gift_voucher",
              "loyalty_card"
            ]
          },
          "operation_type": {
            "type": "string",
            "description": "The type of the operation being performed.",
            "enum": [
              "MANUAL"
            ]
          },
          "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 with the values that are returned in the balance object.",
            "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 ID that was assigned by the Voucherify API.",
                "example": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
              }
            }
          }
        }
      },
      "VouchersTransactionsExportCreateResponseBody": {
        "type": "object",
        "title": "Vouchers Transactions Export Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/{code}/transactions/export`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/VoucherTransactionsExport"
          }
        ]
      },
      "VouchersImportCreateResponseBody": {
        "title": "Vouchers Import Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/import`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "VouchersImportCsvCreateResponseBody": {
        "type": "object",
        "title": "Vouchers Import Csv Create Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "VouchersUpdateInBulkResponseBody": {
        "title": "Vouchers Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/bulk/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "VouchersMetadataUpdateInBulkResponseBody": {
        "title": "Vouchers Metadata Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/vouchers/metadata/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "CampaignsVouchersCreateResponseBody": {
        "type": "object",
        "title": "Campaigns Vouchers Create Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}/vouchers/{code}` and **POST** `v1/campaigns/{campaignId}/vouchers`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Voucher"
          }
        ]
      },
      "CampaignsVouchersCreateInBulkResponseBody": {
        "type": "object",
        "title": "Campaigns Vouchers Create In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}/vouchers/{code}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "CampaignsImportCreateResponseBody": {
        "type": "object",
        "title": "Campaigns Import Create Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}/import`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "CampaignsImportCsvCreateResponseBody": {
        "type": "object",
        "title": "Campaigns Import Csv Create Response Body",
        "description": "Response body schema for **POST** `v1/campaigns/{campaignId}/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "PromotionsTiersListResponseBody": {
        "type": "object",
        "title": "Promotions Tiers List Response Body",
        "description": "Response body schema for **GET** `v1/promotions/{campaignId}/tiers` and **GET** `v1/promotions/tiers`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTiersList"
          }
        ]
      },
      "ClientPromotionsTiersListResponseBody": {
        "type": "object",
        "title": "Promotions Tiers List Response Body",
        "description": "Response body schema for **GET** `v1/client/v1/promotions/tiers`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTiersList"
          }
        ]
      },
      "PromotionsTiersGetResponseBody": {
        "type": "object",
        "title": "Promotions Tiers Get Response Body",
        "description": "Response body schema for **GET** `v1/promotions/tiers/{promotionTierId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTier"
          }
        ]
      },
      "PromotionsTiersEnableResponseBody": {
        "type": "object",
        "title": "Promotions Tiers Enable Response Body",
        "description": "Response body schema for **POST** `v1/promotions/tiers/{promotionTierId}/enable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTier"
          }
        ]
      },
      "PromotionsTiersDisableResponseBody": {
        "type": "object",
        "title": "Promotions Tiers Disable Response Body",
        "description": "Response body schema for **POST** `v1/promotions/tiers/{promotionTierId}/disable`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionTier"
          }
        ]
      },
      "PromotionsStacksListResponseBody": {
        "title": "Promotions Stacks List Response Body",
        "description": "Response body schema for **GET** `v1/promotions/stacks` and for **GET** `v1/promotions/{campaignId}/stacks`.",
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "enum": [
              "list"
            ],
            "description": "The type of the object represented by JSON. This object stores information about promotion stacks in a dictionary."
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "enum": [
              "data"
            ],
            "description": "Identifies the name of the attribute that contains the array of promotion stack objects."
          },
          "data": {
            "type": "array",
            "description": "Contains array of promotion stack objects.",
            "items": {
              "$ref": "#/components/schemas/PromotionStack"
            }
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "description": "Total number of promotion stacks."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "PromotionsStacksCreateResponseBody": {
        "title": "Promotions Stacks Create Response Body",
        "description": "Response body schema for **POST** `v1/promotions/{campaignId}/stacks`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionStackBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion stack ID."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format."
              },
              "campaign_id": {
                "type": "string",
                "description": "Promotion stack's parent campaign's unique ID."
              },
              "object": {
                "type": "string",
                "default": "promotion_stack",
                "enum": [
                  "promotion_stack"
                ],
                "description": "The type of the object represented by JSON."
              },
              "category_id": {
                "type": "string",
                "nullable": true,
                "description": "Promotion stack category ID."
              },
              "categories": {
                "type": "array",
                "description": "Details about the category assigned to the promotion stack.",
                "items": {
                  "$ref": "#/components/schemas/PromotionStackBase"
                }
              }
            },
            "required": [
              "id",
              "created_at",
              "campaign_id",
              "object",
              "category_id",
              "categories"
            ]
          }
        ]
      },
      "PromotionsStacksGetResponseBody": {
        "type": "object",
        "title": "Promotions Stacks Get Response Body",
        "description": "Response body schema for **GET** `v1/promotions/{campaignId}/stacks/{stackId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionStack"
          }
        ]
      },
      "PromotionsStacksUpdateResponseBody": {
        "title": "Promotions Stacks Update Response Body",
        "description": "Response body schema for **PUT** `v1/promotions/{campaignId}/stacks/{stackId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionStackBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique promotion stack ID."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the promotion stack was created. The value is shown in the ISO 8601 format."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the promotion stack was updated. The value is shown in the ISO 8601 format."
              },
              "campaign_id": {
                "type": "string",
                "description": "Promotion stack's parent campaign's unique ID."
              },
              "object": {
                "type": "string",
                "default": "promotion_stack",
                "enum": [
                  "promotion_stack"
                ],
                "description": "The type of the object represented by JSON. "
              },
              "category_id": {
                "type": "string",
                "nullable": true,
                "description": "Promotion stack category ID."
              },
              "categories": {
                "type": "array",
                "description": "Details about the category assigned to the promotion stack.",
                "items": {
                  "$ref": "#/components/schemas/PromotionStackBase"
                }
              }
            },
            "required": [
              "id",
              "created_at",
              "updated_at",
              "campaign_id",
              "object",
              "category_id",
              "categories"
            ]
          }
        ]
      },
      "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
          ]
        }
      },
      "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"
          }
        }
      },
      "RewardsAssignmentsListResponseBody": {
        "type": "object",
        "description": "Response body schema for **GET** `v1/rewards/{rewardID}/assignments`.",
        "title": "Rewards Assignments List Response Body",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about reward assignments in a dictionary.",
            "default": "list"
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the attribute that contains the array of reward assignments.",
            "default": "data"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RewardAssignment"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of reward assignments."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "RewardsAssignmentsCreateResponseBody": {
        "type": "object",
        "title": "Rewards Assignments Create Response Body",
        "description": "Response body schema for **POST** `v1/rewards/{rewardId}/assignments/`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignment"
          }
        ]
      },
      "RewardsAssignmentsUpdateResponseBody": {
        "type": "object",
        "title": "Rewards Assignments Update Response Body",
        "description": "Response body schema for **PUT** `v1/rewards/{rewardId}/assignments/{assignmentId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignment"
          }
        ]
      },
      "RewardsAssignmentsGetResponseBody": {
        "type": "object",
        "title": "Rewards Assignments Get Response Body",
        "description": "Response body schema for **GET** `v1/rewards/{rewardId}/assignments/{assignmentId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RewardAssignment"
          }
        ]
      },
      "VouchersRedemptionGetResponseBody": {
        "type": "object",
        "title": "Vouchers Redemption Get Response Body",
        "description": "Response body schema for **GET** `v1/vouchers/{code}/redemption`.",
        "properties": {
          "quantity": {
            "type": "integer",
            "nullable": true,
            "description": "The maximum number of times a voucher can be redeemed."
          },
          "redeemed_quantity": {
            "type": "integer",
            "description": "The number of times the voucher was redeemed successfully."
          },
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about redemptions in a dictionary."
          },
          "url": {
            "type": "string",
            "example": "/v1/vouchers/PROMO-CODE2/redemptions?page=1&limit=10",
            "description": "URL"
          },
          "data_ref": {
            "type": "string",
            "default": "redemption_entries",
            "description": "Identifies the name of the attribute that contains the array of `redemption_entries`."
          },
          "total": {
            "type": "integer",
            "description": "Total number of redemption objects."
          },
          "redemption_entries": {
            "description": "Contains the array of successful and failed redemption objects.",
            "items": {
              "title": "Vouchers Redemption Get Response Body Redemption Entries Item",
              "allOf": [
                {
                  "$ref": "#/components/schemas/RedemptionEntry"
                }
              ]
            }
          }
        },
        "required": [
          "quantity",
          "redeemed_quantity",
          "object",
          "url",
          "data_ref",
          "total",
          "redemption_entries"
        ]
      },
      "RedemptionEntry": {
        "title": "Redemption Entry",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RedemptionWithVoucherWithoutStackingRulesTypeCategories"
          },
          {
            "$ref": "#/components/schemas/RedemptionRollback"
          }
        ]
      },
      "RedemptionsRollbackCreateResponseBody": {
        "title": "Redemptions Rollback Create Response Body",
        "description": "Response body schema for **POST** `v1/redemptions/{redemptionId}/rollback`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/RedemptionRollback"
          }
        ]
      },
      "ClientRedemptionsRedeemResponseBody": {
        "description": "Response body schema for **POST** `v1/redemptions`.",
        "type": "object",
        "title": "Client Redemptions Redeem Response Body",
        "properties": {
          "redemptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Redemption"
            }
          },
          "parent_redemption": {
            "$ref": "#/components/schemas/Redemption"
          },
          "order": {
            "description": "Contains the order details associated with the redemption.",
            "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"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "inapplicable_redeemables": {
            "type": "array",
            "description": "Lists validation results of each inapplicable redeemable.",
            "items": {
              "$ref": "#/components/schemas/ValidationsRedeemableInapplicable"
            }
          },
          "skipped_redeemables": {
            "type": "array",
            "description": "Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`.",
            "items": {
              "$ref": "#/components/schemas/ValidationsRedeemableSkipped"
            }
          }
        }
      },
      "ClientValidationsValidateResponseBody": {
        "description": "Response body schema for **POST** `/validations`.",
        "title": "Client Validations Validate Response Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/ValidationsValidateResponseBody"
          }
        ]
      },
      "RedemptionsRollbacksCreateResponseBody": {
        "title": "Redemptions Rollbacks Create Response Body",
        "description": "Response body schema for **POST** `/redemptions/{parentRedemptionID}/rollbacks`.",
        "type": "object",
        "properties": {
          "rollbacks": {
            "type": "array",
            "description": "Contains the rollback redemption objects of the particular incentives.",
            "items": {
              "$ref": "#/components/schemas/RedemptionRollback"
            }
          },
          "parent_rollback": {
            "$ref": "#/components/schemas/RedemptionRollback"
          },
          "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"
                    }
                  }
                }
              }
            ]
          }
        }
      },
      "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"
        ]
      },
      "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",
            "nullable": true,
            "description": "Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint."
          },
          "category_id": {
            "type": "string",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
            "nullable": true,
            "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",
                "nullable": true,
                "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",
            "nullable": true,
            "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"
        ]
      },
      "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"
                  }
                }
              }
            ]
          }
        }
      },
      "LoyaltiesTransactionsExportCreateResponseBody": {
        "type": "object",
        "title": "Loyalties Transactions Export Create Response Body",
        "description": "Response body schema for **POST** `v1/loyalties/{campaignId}/transactions/export`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsTransactionsExport"
          }
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
        ]
      },
      "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"
          }
        ]
      },
      "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"
            ]
          }
        ]
      },
      "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"
        ]
      },
      "CustomersPermanentDeletionCreateResponseBody": {
        "type": "object",
        "title": "Customers Permanent Deletion Create Response Body",
        "description": "Response body schema for **POST** `v1/customers/{customerId}/permanent-deletion`.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique permanent deletion object ID.",
            "example": "del_mgzqZNwUnwnt1Ddw6phEG90Q"
          },
          "created_at": {
            "type": "string",
            "example": "2022-09-02T17:55:47.865Z",
            "description": "Timestamp representing the date and time when the customer was requested to be deleted in ISO 8601 format.",
            "format": "date-time"
          },
          "related_object_id": {
            "type": "string",
            "example": "cust_m557pDDl4IGXexkU6KOQ2Dwi",
            "description": "Unique customer ID that is being deleted."
          },
          "related_object": {
            "type": "string",
            "description": "Object being deleted.",
            "default": "customer"
          },
          "status": {
            "type": "string",
            "description": "Deletion status.",
            "default": "DONE"
          },
          "data_json": {
            "type": "object",
            "description": "Statistics summarizing the number of related information that was deleted.",
            "required": [
              "events",
              "customer_events",
              "daily_events",
              "segments",
              "orders",
              "order_events",
              "customer"
            ],
            "properties": {
              "events": {
                "type": "integer",
                "description": "Number of events deleted."
              },
              "customer_events": {
                "type": "integer",
                "description": "Number of customer events deleted."
              },
              "daily_events": {
                "type": "integer",
                "description": "Number of daily events deleted."
              },
              "segments": {
                "type": "integer",
                "description": "Number of segments deleted."
              },
              "orders": {
                "type": "integer",
                "description": "Number of orders deleted."
              },
              "order_events": {
                "type": "integer",
                "description": "Number of order events deleted."
              },
              "customer": {
                "type": "integer",
                "description": "Number of customers deleted.",
                "default": 1
              }
            }
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "default": "pernament_deletion"
          }
        },
        "required": [
          "id",
          "created_at",
          "related_object_id",
          "related_object",
          "status",
          "data_json",
          "object"
        ]
      },
      "CustomersImportCsvCreateResponseBody": {
        "type": "object",
        "title": "Customers Import Csv Create Response Body",
        "description": "Response body schema for **POST** `v1/customers/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "OrdersImportCreateResponseBody": {
        "type": "object",
        "title": "Orders Import Create Response Body",
        "description": "Response body schema for **POST** `v1/orders/import`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "OrdersExportCreateResponseBody": {
        "title": "Orders Export Create Response Body",
        "description": "Response body schema for **POST** `v1/orders/export`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ExportScheduledBase"
          },
          {
            "$ref": "#/components/schemas/ExportOrderBase"
          }
        ]
      },
      "ProductsMetadataUpdateInBulkResponseBody": {
        "type": "object",
        "title": "Products Metadata Update In Bulk Response Body",
        "description": "Response body schema for **POST** `v1/products/metadata/async`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "ProductsSkusCreateResponseBody": {
        "type": "object",
        "title": "Products Skus Create Response Body",
        "description": "Response body schema for **PUT** `v1/products/{productId}/skus`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Sku"
          }
        ]
      },
      "ProductsSkusUpdateResponseBody": {
        "type": "object",
        "title": "Products Skus Update Response Body",
        "description": "Response body schema for **PUT** `v1/products/{productId}/skus/{skuId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Sku"
          }
        ]
      },
      "ProductsImportCsvCreateResponseBody": {
        "type": "object",
        "title": "Products Import Csv Create Response Body",
        "description": "Response body schema for **POST** `v1/products/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "SkusImportCsvCreateResponseBody": {
        "type": "object",
        "title": "Skus Import Csv Create Response Body",
        "description": "Response body schema for **POST** `v1/skus/importCSV`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/AsyncActions"
          }
        ]
      },
      "EventsCreateResponseBody": {
        "title": "Events Create Response Body",
        "type": "object",
        "description": "Response body schema for **POST** `v1/events`.",
        "properties": {
          "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": "null",
            "description": "A `null` referral object."
          },
          "loyalty": {
            "type": "null",
            "description": "A `null` loyalty object."
          },
          "metadata": {
            "type": "object"
          }
        },
        "required": [
          "object",
          "type",
          "customer",
          "referral",
          "loyalty",
          "metadata"
        ]
      },
      "ClientEventsCreateResponseBody": {
        "description": "Response body schema for **POST** `v1/events`.",
        "title": "Client Events Create Response Body",
        "type": "object",
        "properties": {
          "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": "null",
            "description": "A `null` referral object."
          },
          "loyalty": {
            "type": "null",
            "description": "A `null` loyalty object."
          },
          "metadata": {
            "type": "object"
          }
        },
        "required": [
          "object",
          "type",
          "customer",
          "referral",
          "loyalty",
          "metadata"
        ]
      },
      "ClientQualificationsCheckEligibilityResponseBody": {
        "description": "Response body schema for **POST** `v1/qualifications`.",
        "title": "Client Qualifications Check Eligibility Response Body",
        "type": "object",
        "properties": {
          "redeemables": {
            "$ref": "#/components/schemas/QualificationsRedeemables"
          },
          "tracking_id": {
            "type": "string",
            "description": "This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID."
          },
          "order": {
            "type": "object",
            "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"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            ]
          },
          "stacking_rules": {
            "$ref": "#/components/schemas/StackingRules"
          }
        }
      },
      "VouchersBalanceUpdateRequestBody": {
        "title": "Vouchers Balance Update Request Body",
        "type": "object",
        "description": "Request body schema for `vouchers/{code}/balance`.",
        "properties": {
          "amount": {
            "type": "integer",
            "description": "The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000."
          },
          "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."
          },
          "reason": {
            "type": "string",
            "description": "Reason why the transaction occurred."
          }
        },
        "required": [
          "amount"
        ]
      },
      "VouchersTransactionsExportCreateRequestBody": {
        "description": "Request body schema for **POST** `v1/vouchers/transactions/export`.",
        "type": "object",
        "title": "Vouchers Transactions Export Create Request Body",
        "properties": {
          "parameters": {
            "description": "Contains the parameters that define the data to be exported.",
            "allOf": [
              {
                "$ref": "#/components/schemas/VoucherTransactionsExportParameters"
              }
            ]
          }
        }
      },
      "CampaignsVouchersCreateBaseRequestBody": {
        "type": "object",
        "title": "Campaigns Vouchers Create Base Request Body",
        "properties": {
          "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 voucher. 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."
          },
          "redemption": {
            "type": "object",
            "description": "Stores the quantity of redemptions that can be applied to the voucher.",
            "properties": {
              "quantity": {
                "type": "integer",
                "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
              }
            }
          },
          "additional_info": {
            "type": "string",
            "description": "An optional field to keep any extra textual information about the code such as a code description and details."
          },
          "start_date": {
            "type": "string",
            "format": "date-time",
            "description": "Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher 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 voucher expires in ISO 8601 format.  Voucher is *inactive after* this date.",
            "example": "2022-09-30T00:00:00.000Z"
          }
        }
      },
      "CampaignsVouchersCreateInBulkRequestBody": {
        "type": "object",
        "title": "Campaigns Vouchers Create In Bulk Request Body",
        "description": "Request body schema for **POST** `v1/campaigns/{campaignId}/vouchers`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Unique voucher code."
              },
              "code_config": {
                "$ref": "#/components/schemas/CodeConfig"
              }
            }
          },
          {
            "$ref": "#/components/schemas/CampaignsVouchersCreateBaseRequestBody"
          }
        ]
      },
      "CampaignsVouchersCreateRequestBody": {
        "type": "object",
        "title": "Campaigns Vouchers Create Request Body",
        "description": "Request body schema for **POST** `v1/campaigns/{campaignId}/vouchers/{code}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsVouchersCreateBaseRequestBody"
          }
        ]
      },
      "CampaignsImportCreateRequestBody": {
        "type": "array",
        "title": "Campaigns Import Create Request Body",
        "description": "Request body schema for **POST** `v1/campaigns/{campaignId}/import`.",
        "items": {
          "$ref": "#/components/schemas/CampaignsImportVoucherItem"
        }
      },
      "CampaignsImportVoucherItem": {
        "title": "Campaigns Import Voucher Item",
        "oneOf": [
          {
            "$ref": "#/components/schemas/VoucherImportLoyaltyCard"
          },
          {
            "$ref": "#/components/schemas/VoucherImportGift"
          },
          {
            "$ref": "#/components/schemas/VoucherImportDiscount"
          }
        ]
      },
      "PromotionsStacksCreateRequestBody": {
        "title": "Promotions Stacks Create Request Body",
        "description": "Request body schema for **POST** `v1/promotions/{campaignId}/stacks`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/PromotionStackBase"
          },
          {
            "type": "object",
            "properties": {
              "category_id": {
                "type": "string",
                "description": "Promotion stack category ID."
              }
            }
          }
        ]
      },
      "PromotionsStacksUpdateRequestBody": {
        "description": "Request Body schema for **PUT** `v1/promotions/{campaignId}/stacks/{stackId}`.",
        "title": "Promotions Stacks Update Request Body",
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Promotion stack name."
          },
          "tiers": {
            "type": "object",
            "description": "Contains the tier configuration. A promotion stack can include up to 30 tiers.",
            "properties": {
              "ids": {
                "type": "array",
                "description": "Contains the list of tiers in a pre-defined sequence.",
                "items": {
                  "type": "string"
                }
              },
              "hierarchy_mode": {
                "type": "string",
                "default": "MANUAL",
                "enum": [
                  "MANUAL"
                ],
                "description": "Category hierarchy. Categories with lower hierarchy are processed before categories with higher hierarchy value."
              }
            }
          },
          "category_id": {
            "type": "string",
            "description": "Promotion stack category ID."
          }
        }
      },
      "RewardsAssignmentsCreateRequestBody": {
        "description": "Request body schema for **POST** `v1/rewards/{rewardID}/assignments`.",
        "title": "Rewards Assignments Create Request Body",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RewardsAssignmentsCreateDigitalOrMaterialRewardRequestBody"
          },
          {
            "$ref": "#/components/schemas/RewardsAssignmentsCreateCoinRewardRequestBody"
          }
        ]
      },
      "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",
                    "nullable": true,
                    "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`."
                  }
                }
              }
            }
          }
        }
      },
      "RedemptionsRollbackCreateRequestBody": {
        "title": "Redemptions Rollback Create Request Body",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for the rollback."
          },
          "tracking_id": {
            "type": "string",
            "description": "Customer's `source_id`."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to update **redemption** metadata."
          }
        },
        "description": "Request body schema for **POST** `v1/redemptions/{redemptionId}/rollback`."
      },
      "ClientRedemptionsRedeemRequestBody": {
        "description": "Response body schema for **POST** `v1/redemptions`.",
        "type": "object",
        "title": "Client Redemptions Redeem Request Body",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "options": {
                "type": "object",
                "description": "Configure parameters returned in the response.",
                "properties": {
                  "expand": {
                    "type": "array",
                    "description": "Expand array lets you configure params included in the response. Depending on the strings included in the array, the response will contain different details. \n\n| **Expand Option** | **Response Body** |\n|:---|:---|\n| [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. |\n| [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. |\n| [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. |\n| [\"redeemable\", \"redemption\", \"category\"] | - Returns each discount type's `metadata` in each child redemption object.<br>- Returns redemption object `metadata`.<br>- Returns an expanded `categories` object, showing details about the category. |",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "redemption",
                        "redeemable",
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/StackableValidateRedeemBase"
          }
        ]
      },
      "ClientValidationsValidateRequestBody": {
        "description": "Response body schema for **POST** `v1/validations`.",
        "title": "Client Validations Validate Request Body",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "options": {
                "type": "object",
                "description": "Configure parameters returned in the response.",
                "properties": {
                  "expand": {
                    "type": "array",
                    "description": "The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. \n\n| **Expand Option** | **Response Body** |\n|:---|:---|\n| [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. |\n| [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. |\n| [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. |\n| [\"category\"] | - Returns an expanded `categories` object, showing details about the category. |",
                    "items": {
                      "type": "string",
                      "enum": [
                        "order",
                        "redemption",
                        "redeemable",
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/StackableValidateRedeemBase"
          }
        ]
      },
      "RedemptionsRollbacksCreateRequestBody": {
        "title": "Redemptions Rollbacks Create Request Body",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "description": "Reason for the rollback."
          },
          "tracking_id": {
            "type": "string",
            "description": "Customer's `source_id`."
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "order": {
            "$ref": "#/components/schemas/Order"
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to update **redemption** metadata."
          }
        },
        "description": "Request body schema for **POST** `v1/redemptions/{parentRedemptionId}/rollbacks`."
      },
      "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"
        ]
      },
      "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"
        }
      },
      "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."
          }
        }
      },
      "LoyaltiesRewardsUpdateRequestBody": {
        "title": "Loyalties Rewards Update Request Body",
        "type": "object",
        "description": "Request body schema for **PUT** `v1/loyalties/{campaignId}/rewards/{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."
                  }
                }
              }
            }
          }
        }
      },
      "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](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          }
        }
      },
      "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"
          }
        }
      },
      "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"
          }
        ]
      },
      "OrdersImportCreateRequestBody": {
        "type": "array",
        "title": "Orders Import Create Request Body",
        "description": "Request body schema for **POST** `/orders/import`.",
        "items": {
          "title": "Orders Import Create Request Body Item",
          "type": "object",
          "allOf": [
            {
              "$ref": "#/components/schemas/Order"
            },
            {
              "title": "Order Customer And Referrer Ids Objects",
              "type": "object",
              "description": "Order information.",
              "properties": {
                "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"
                },
                "referrer_id": {
                  "type": "string",
                  "nullable": true,
                  "description": "Unique referrer ID.",
                  "example": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
                },
                "customer": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Customer"
                    }
                  ]
                },
                "referrer": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Referrer"
                    }
                  ]
                }
              }
            }
          ]
        }
      },
      "OrdersExportCreateRequestBody": {
        "title": "Orders Export Create Request Body",
        "description": "Request body schema for **POST** `v1/orders/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/ExportOrderOrder"
                  }
                ]
              },
              "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/ExportOrderFields"
                }
              },
              "filters": {
                "description": "Filter conditions.",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ExportOrderFilters"
                  }
                ]
              }
            },
            "description": "List of available fields and filters that can be exported with an order along with the sorting order of the returned data."
          }
        }
      },
      "ProductsMetadataUpdateInBulkRequestBody": {
        "type": "object",
        "title": "Products Metadata Update In Bulk Request Body",
        "description": "Request schema for **POST** `v1/products/metadata/async`.",
        "properties": {
          "source_ids": {
            "type": "array",
            "description": "Array of unique product source IDs.",
            "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."
          }
        },
        "required": [
          "source_ids",
          "metadata"
        ]
      },
      "ProductsSkusCreateRequestBody": {
        "title": "Products Skus Create Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/products/{productId}/skus",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique SKU ID.",
            "example": "sku_0c0c0012a9029bccef"
          },
          "source_id": {
            "type": "string",
            "example": "sku_source_id_4",
            "description": "A unique SKU identifier from your inventory system."
          },
          "sku": {
            "type": "string",
            "example": "Large Pink Shirt",
            "description": "Unique user-defined SKU name."
          },
          "price": {
            "type": "integer",
            "description": "SKU unit price. The value is multiplied by 100 to represent 2 decimal places. For example `10000 cents` for `$100.00`."
          },
          "currency": {
            "type": "string",
            "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",
            "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."
          }
        }
      },
      "EventsCreateRequestBody": {
        "title": "Events Create Request Body",
        "type": "object",
        "description": "Request body schema for **POST** `v1/events`.",
        "properties": {
          "event": {
            "type": "string",
            "description": "Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**.",
            "minLength": 1,
            "maxLength": 300
          },
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "referral": {
            "type": "object",
            "description": "If a **conversion event** for a referral program is set to a custom event, then you need to send the referral code in the payload to make a record of the conversion event. ",
            "properties": {
              "code": {
                "type": "string",
                "description": "A code through which a new visitor has been referred to a service."
              },
              "referrer_id": {
                "type": "string",
                "description": "Unique ID of the referring person - it is optional and not required if the referral **code** is provided.",
                "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
              }
            },
            "required": [
              "code"
            ]
          },
          "loyalty": {
            "type": "object",
            "description": "If an earning rule in a loyalty program is based on a custom event. This objects let's you specify the loyalty card to which the custom event should be attributed to.",
            "properties": {
              "code": {
                "type": "string",
                "description": "Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code.",
                "example": "L-CARD-BUHuH6g"
              }
            },
            "required": [
              "code"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**."
          }
        },
        "required": [
          "event",
          "customer"
        ]
      },
      "ClientEventsCreateRequestBody": {
        "description": "Request body schema for **POST** `v1/events`.",
        "title": "Client Events Create Request Body",
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "description": "Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**.",
            "minLength": 1,
            "maxLength": 300
          },
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "referral": {
            "type": "object",
            "description": "If a **conversion event** for a referral program is set to a custom event, then you need to send the referral code in the payload to make a record of the conversion event. ",
            "properties": {
              "code": {
                "type": "string",
                "description": "A code through which a new visitor has been referred to a service."
              },
              "referrer_id": {
                "type": "string",
                "description": "Unique ID of the referring person - it is optional and not required if the referral **code** is provided.",
                "example": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
              }
            },
            "required": [
              "code"
            ]
          },
          "loyalty": {
            "type": "object",
            "description": "If an earning rule in a loyalty program is based on a custom event. This objects let's you specify the loyalty card to which the custom event should be attributed to.",
            "properties": {
              "code": {
                "type": "string",
                "description": "Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code.",
                "example": "L-CARD-BUHuH6g"
              }
            },
            "required": [
              "code"
            ]
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**."
          }
        },
        "required": [
          "event",
          "customer"
        ]
      },
      "ClientQualificationsCheckEligibilityRequestBody": {
        "description": "Request body schema for **POST** `v1/qualifications`.",
        "type": "object",
        "title": "Client Qualifications Check Eligibility Request Body",
        "properties": {
          "customer": {
            "description": "Customer's information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Customer"
              }
            ]
          },
          "order": {
            "description": "Order information.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Order"
              }
            ]
          },
          "tracking_id": {
            "description": "Is correspondent to Customer's source_id",
            "type": "string"
          },
          "scenario": {
            "type": "string",
            "description": "Defines the scenario Voucherify should consider during the qualification process.\n\n- `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected.\n- `CUSTOMER_WALLET` - returns vouchers applicable to the customer's cart based on the vouchers assigned to the customer's profile.\n- `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only.\n- `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule).\n- `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s).\n- `PROMOTION_STACKS` - returns the applicable promotion stacks.\n- `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule).\n- `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s).",
            "enum": [
              "ALL",
              "CUSTOMER_WALLET",
              "AUDIENCE_ONLY",
              "PRODUCTS",
              "PRODUCTS_DISCOUNT",
              "PROMOTION_STACKS",
              "PRODUCTS_BY_CUSTOMER",
              "PRODUCTS_DISCOUNT_BY_CUSTOMER"
            ]
          },
          "options": {
            "allOf": [
              {
                "$ref": "#/components/schemas/QualificationsOption"
              }
            ]
          },
          "session": {
            "type": "object",
            "description": "Parameter to return details about `locked_credits` on a gift card which has locked credits under a validation session.",
            "properties": {
              "type": {
                "type": "string",
                "description": "Parameter required to return the details about the `locked_credits`.",
                "enum": [
                  "LOCK"
                ]
              }
            }
          },
          "metadata": {
            "type": "object",
            "description": "A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the [Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ &rarr; _Advanced_ &rarr; _Redemption metadata satisfy_ or _Basic Builder_ &rarr; _Attributes match_ &rarr; _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule)."
          }
        }
      },
      "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"
          }
        ]
      },
      "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"
          }
        ]
      },
      "ManagementProjectBase": {
        "type": "object",
        "title": "Management Project Base",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the project."
          },
          "description": {
            "type": "string",
            "description": "A user-defined description of the project, e.g. its purpose, scope, region."
          },
          "timezone": {
            "type": "string",
            "description": "The time zone in which the project is established. It can be in the GMT format or in accordance with IANA time zone database."
          },
          "currency": {
            "type": "string",
            "description": "The currency used in the project. It is equal to a 3-letter ISO 4217 code."
          },
          "dial_code": {
            "type": "string",
            "nullable": true,
            "description": "The country dial code for the project. It is equal to an ITU country code."
          },
          "webhook_version": {
            "type": "string",
            "description": "The webhook version used in the project.",
            "default": "v2024-01-01",
            "enum": [
              "v2024-01-01"
            ]
          },
          "client_trusted_domains": {
            "type": "array",
            "description": "An array of URL addresses that allow client requests.",
            "items": {
              "type": "string"
            }
          },
          "client_redeem_enabled": {
            "type": "boolean",
            "description": "Enables client-side redemption."
          },
          "client_publish_enabled": {
            "type": "boolean",
            "description": "Enables client-side publication."
          },
          "client_list_vouchers_enabled": {
            "type": "boolean",
            "description": "Enables client-side listing of vouchers."
          },
          "client_create_customer_enabled": {
            "type": "boolean",
            "description": "Enables client-side creation of customers."
          },
          "client_loyalty_events_enabled": {
            "type": "boolean",
            "description": "Enables client-side events for loyalty and referral programs."
          },
          "client_set_voucher_expiration_date_enabled": {
            "type": "boolean",
            "description": "Enables client-side setting of voucher expiration date."
          },
          "webhooks_callout_notifications": {
            "type": "object",
            "title": "Webhook callout notification details",
            "description": "Determines the notification settings for webhook callouts configured in Distributions and Project settings.",
            "properties": {
              "distributions": {
                "type": "object",
                "description": "Determines the notification settings for webhooks sent through Distributions.",
                "properties": {
                  "email": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "in_app": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "emails": {
                    "type": "array",
                    "description": "An array of email addresses which will receive the notification.",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "email",
                  "in_app",
                  "emails"
                ]
              },
              "webhooks": {
                "type": "object",
                "description": "Determines the notification settings for webhooks sent as set out in the Project settings.",
                "properties": {
                  "email": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "in_app": {
                    "type": "boolean",
                    "description": "Enables the notification through an email."
                  },
                  "emails": {
                    "type": "array",
                    "description": "An array of email addresses which will receive the notification.",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "email",
                  "in_app",
                  "emails"
                ]
              }
            },
            "required": [
              "distributions",
              "webhooks"
            ]
          }
        }
      },
      "ManagementProjectBaseWithConfig": {
        "type": "object",
        "description": "Object representing a project.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the project."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectBase"
          },
          {
            "type": "object",
            "properties": {
              "api_usage_notifications": {
                "type": "object",
                "title": "API Usage Notifications",
                "description": "Determines the notification settings.",
                "properties": {
                  "redemptions": {
                    "type": "object",
                    "description": "Determines the notification settings for redemptions. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "messages": {
                    "type": "object",
                    "description": "Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "bulk_api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "webhook_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "cycle_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  }
                },
                "required": [
                  "redemptions",
                  "messages",
                  "api_calls",
                  "bulk_api_calls",
                  "webhook_calls",
                  "cycle_calls"
                ]
              },
              "cluster_id": {
                "type": "string",
                "description": "The identifier of the cluster where the project will be created."
              },
              "case_sensitive_codes": {
                "type": "boolean",
                "description": "Determines if the vouchers in the project will be:\n- case sensitive - if `true`, `C0dE-cfV` is **not** equal to `c0de-cfv`),\n- case insensitive - if `false`, `C0dE-cfV` is equal to `c0de-cfv`."
              },
              "api_version": {
                "type": "string",
                "description": "The API version used in the project. Currently, the default and only value is `v2018-08-01`.",
                "default": "v2018-08-01",
                "enum": [
                  "v2018-08-01"
                ]
              },
              "is_sandbox": {
                "type": "boolean",
                "description": "Determines if the project is a sandbox project."
              },
              "webhook_token": {
                "type": "string",
                "description": "Webhook token used for authentication."
              }
            }
          }
        ],
        "required": [
          "id",
          "name",
          "description",
          "currency",
          "timezone",
          "cluster_id",
          "api_version",
          "case_sensitive_codes",
          "client_trusted_domains",
          "client_redeem_enabled",
          "client_publish_enabled",
          "client_list_vouchers_enabled",
          "client_create_customer_enabled",
          "client_loyalty_events_enabled",
          "client_set_voucher_expiration_date_enabled",
          "api_usage_notifications",
          "webhooks_callout_notifications",
          "is_sandbox",
          "webhook_version",
          "webhook_token"
        ]
      },
      "ManagementProjectsListResponseBody": {
        "type": "object",
        "title": "Management Projects List Response Body",
        "description": "Schema model for **GET** `managment/v1/projects`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the projects in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of project objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of project objects.",
            "items": {
              "$ref": "#/components/schemas/ManagementProject"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of projects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsCreateRequestBody": {
        "type": "object",
        "title": "Management Project Create Request Body",
        "description": "Request body schema for **POST** `/management/v1/projects`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "case_sensitive_codes": {
                "type": "boolean",
                "description": "Determines if the vouchers in the project will be case sensitive (if `true`, `C0dE-cfV` is not equal to `c0de-cfv`) or case insensitive (if false, `C0dE-cfV` is equal to `c0de-cfv`)."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectBase"
          },
          {
            "type": "object",
            "properties": {
              "api_usage_notifications": {
                "type": "object",
                "title": "API Usage Notifications",
                "description": "Determines the notification settings.",
                "properties": {
                  "messages": {
                    "type": "object",
                    "description": "Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "bulk_api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "webhook_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "cycle_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  }
                },
                "required": [
                  "redemptions",
                  "messages",
                  "api_calls",
                  "bulk_api_calls",
                  "webhook_calls",
                  "cycle_calls"
                ]
              },
              "cluster_id": {
                "type": "string",
                "description": "The identifier of the cluster where the project will be created. The default cluster is `eu1` unless otherwise configured."
              },
              "api_version": {
                "type": "string",
                "description": "The API version used in the project. Currently, the default and only value is `v2018-08-01`.",
                "default": "v2018-08-01",
                "enum": [
                  "v2018-08-01"
                ]
              },
              "users": {
                "type": "array",
                "description": "The users (their identifiers, logins, and roles) who will be assigned to the project. You can assign only existing Voucherify users.\n\nIt must be used either in the following combinations:\n- `id` and `role`, or\n- `login` and `role`.",
                "items": {
                  "title": "Create Project Users",
                  "type": "object",
                  "description": "Contains details about the users who will be assigned to the project.\nOnly the `id` and `role` or `login` and `role` should be provided in the request.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string.\n\nDo **not** use with the `login` string."
                    },
                    "login": {
                      "type": "string",
                      "description": "The login data of the user who will be assigned to the project. **Required** with the `role` string.\n\nDo **not** use with the `id` string."
                    },
                    "role": {
                      "type": "string",
                      "description": "The role of the user to be added. It can be one of the following predefined roles:\n`ADMIN`, `USER`, `VIEWER`, `MERCHANT`\nor an ID of a custom role."
                    }
                  },
                  "required": [
                    "role"
                  ]
                }
              }
            }
          }
        ],
        "required": [
          "name",
          "case_sensitive_codes",
          "timezone",
          "currency"
        ]
      },
      "ManagementProjectsCreateResponseBody": {
        "type": "object",
        "title": "Management Project Create Response Body",
        "description": "Response body schema for **POST** `management/v1/projects`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectBaseWithConfig"
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsAPIKeys"
          }
        ]
      },
      "ManagementProjectsUpdateRequestBody": {
        "type": "object",
        "title": "Management Project Update Request Body",
        "description": "Request body schema for **PUT** `/management/v1/projects/{projectId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectBase"
          },
          {
            "type": "object",
            "properties": {
              "api_usage_notifications": {
                "type": "object",
                "title": "API Usage Notifications",
                "description": "Determines the notification settings.",
                "properties": {
                  "messages": {
                    "type": "object",
                    "description": "Determines the notification settings for distributed messages according to the day and month limit. The notification can be used as a warning that a limit will be reached soon.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "bulk_api_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for bulk API calls made for the hourly limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per hour.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "webhook_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for webhook calls made for the daily limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum four times a day.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  },
                  "cycle_calls": {
                    "type": "object",
                    "description": "Determines the notification settings for API calls made for the billing cycle limit. The notification can be used as a warning that a limit will be reached soon. It is sent maximum once per the billing cycle.",
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/UsageNotifications"
                      }
                    ]
                  }
                },
                "required": [
                  "redemptions",
                  "messages",
                  "api_calls",
                  "bulk_api_calls",
                  "webhook_calls",
                  "cycle_calls"
                ]
              },
              "default_code_config": {
                "type": "object",
                "title": "Default Code Configuration",
                "description": "Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.",
                "properties": {
                  "charset": {
                    "type": "string",
                    "nullable": true,
                    "description": "Lists all characters that are used as default for vouchers"
                  }
                }
              }
            }
          }
        ]
      },
      "ManagementProject": {
        "title": "Management Project",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectBaseWithConfig"
          },
          {
            "type": "object",
            "properties": {
              "default_code_config": {
                "type": "object",
                "description": "Determines the character set that is used as default for vouchers. It is affected by the `\"case_sensitive_codes\"` setting.",
                "properties": {
                  "charset": {
                    "type": "string",
                    "description": "Lists all characters that are used as default for vouchers"
                  }
                },
                "required": [
                  "charset"
                ]
              },
              "limits": {
                "type": "object",
                "description": "Determines additional limits set on a given project, e.g. the Sandbox project. If no limits are returned, the limits set for the whole organization apply.",
                "properties": {
                  "api_calls": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "description": "Determines the limit of API calls per given unit time.",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "Determines the maximum number of API calls per time set in `\"duration\"`."
                        },
                        "duration": {
                          "type": "string",
                          "description": "Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour."
                        }
                      }
                    }
                  },
                  "bulk_api_calls": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "description": "",
                      "properties": {
                        "value": {
                          "type": "integer",
                          "description": "Determines the maximum number of API calls per time set in `\"duration\"`."
                        },
                        "duration": {
                          "type": "string",
                          "description": "Determines the amount of time during which the calls up to the number specified in the `value` can be made. The duration is presented in the ISO 8601 format, e.g. `PT1H` means one hour."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "ManagementProjectsGetResponseBody": {
        "type": "object",
        "title": "Management Project Get Response Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProject"
          }
        ]
      },
      "ManagementProjectsUpdateResponseBody": {
        "type": "object",
        "title": "Management Project Update Response Body",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProject"
          }
        ]
      },
      "ManagementProjectsAPIKeys": {
        "type": "object",
        "title": "Project and Side Keys",
        "description": "Returns `app_id` and `app_token` for the server-side and client-side authentication.",
        "properties": {
          "server_side_key": {
            "type": "object",
            "title": "Server-side key",
            "description": "Contains the `app_id` and `app_token` to authenticate server-side requests.",
            "properties": {
              "app_id": {
                "type": "string",
                "title": "Application ID",
                "description": "Application ID to be used as `X-App-Id` header in every HTTP request."
              },
              "app_token": {
                "type": "string",
                "title": "Application token",
                "description": "Application token to be used as `X-App-Token` header in every HTTP request.\n\nThe application token (secret key) for the server-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place."
              }
            }
          },
          "client_side_key": {
            "type": "object",
            "title": "Client-side key",
            "description": "Contains the `app_id` and `app_token` to authenticate client-side requests.",
            "properties": {
              "app_id": {
                "type": "string",
                "title": "Application ID",
                "description": "Application ID to be used as `X-App-Id` header in every HTTP request."
              },
              "app_token": {
                "type": "string",
                "title": "Application token",
                "description": "Application token to be used as `X-App-Token` header in every HTTP request.\n\nThe application token (secret key) for the client-side authentication is visible in the Project Settings for 14 days when it is first generated in a newly-created project. Write your application token down and keep it in a safe place."
              }
            }
          }
        }
      },
      "ManagementProjectsUsersAssignRequestBody": {
        "type": "object",
        "title": "Management Projects User Assign Request Body",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. **Required** with the `role` string.\n\nDo **not** use with the `login` string."
          },
          "login": {
            "type": "string",
            "description": "The login data of the user who will be assigned to the project. **Required** with the `role` string.\n\nDo **not** use with the `id` string."
          },
          "role": {
            "type": "string",
            "description": "The role of the user to be added. It can be one of the following predefined roles:\n`ADMIN`, `USER`, `VIEWER`, `MERCHANT`,\nor an ID of a custom role."
          }
        },
        "required": [
          "role"
        ]
      },
      "ManagementProjectsUsersGetUserResponseBody": {
        "type": "object",
        "title": "Management Projects Users Get User Response Body",
        "description": "Details about the user assigned to the project.",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          }
        ]
      },
      "ManagementProjectsUsersUpdateRoleResponseBody": {
        "type": "object",
        "title": "Management Projects Users Create Response Body",
        "description": "Details about the user assigned to the project.",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          }
        ]
      },
      "ManagementProjectsUsersAssignResponseBody": {
        "type": "object",
        "title": "Management Projects Users Create Response Body",
        "description": "Details about the user assigned to the project.",
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          }
        ]
      },
      "ManagementProjectsUsersUpdateRoleRequestBody": {
        "type": "object",
        "title": "Management Projects User Update Role Request Body",
        "properties": {
          "role": {
            "type": "string",
            "description": "The role of the user to be added. It can be a custom role or one of following predefined roles:\n`ADMIN`, `USER`, `VIEWER`, `MERCHANT`\nor an ID of a custom role.."
          }
        },
        "required": [
          "role"
        ]
      },
      "ManagementProjectsUsersListResponseBody": {
        "type": "object",
        "title": "Management Projects User List Response Body",
        "description": "Object containing a list of users assigned to the project.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the users in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of user objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of user objects.",
            "items": {
              "$ref": "#/components/schemas/User"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of users."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "User": {
        "type": "object",
        "title": "User",
        "description": "Details about the user.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique identifier of the user who has been assigned to the project."
          },
          "login": {
            "type": "string",
            "description": "The login data of the user who has been assigned to the project."
          },
          "email": {
            "type": "string",
            "description": "The email address of the user who has been assigned to the project."
          },
          "first_name": {
            "type": "string",
            "description": "The first name of the user who has been assigned to the project."
          },
          "last_name": {
            "type": "string",
            "description": "The last name of the user who has been assigned to the project."
          },
          "projects": {
            "type": "object",
            "description": "Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature).",
            "additionalProperties": {
              "type": "string",
              "description": "Returns the role the user has in the project."
            }
          },
          "is_owner": {
            "type": "boolean",
            "description": "Determines if the user is the owner for the organization in Voucherify."
          }
        },
        "required": [
          "id",
          "login",
          "email",
          "first_name",
          "last_name",
          "projects",
          "role",
          "is_owner"
        ]
      },
      "ManagementProjectsUsersInviteCreateRequestBody": {
        "type": "object",
        "description": "Request body schema for **POST** `/management/v1/projects/users/invite`.",
        "properties": {
          "email": {
            "type": "string",
            "description": "Email address to which the invitation will be sent. Must be a valid email address.",
            "example": "alex.doe@your-domain-name.com"
          },
          "first_name": {
            "type": "string",
            "description": "First name of the person who will receive the invitation. The name will be used in the user profile.",
            "example": "Alex"
          },
          "last_name": {
            "type": "string",
            "description": "Last name of the person who will receive the invitation. The name will be used in the user profile.",
            "example": "Doe"
          },
          "projects": {
            "type": "object",
            "title": "Project and Role",
            "description": "In the key, provide the project ID to which the new user will be assigned. In the value, provide the role which the user will have in the project. The predefined Voucherify roles are: `ADMIN`, `USER`, `VIEWER`, `MERCHANT`, `USER_RESTRICTED` (for the Areas and Stores, an Enterprise feature). Send a custom role ID (Enterprise feature) to assign a custom role. To find the custom role ID: If you are an admin, go to Voucherify Dashboard, Team settings, and Roles tab. Click on a custom role. The custom role ID is in the URL in the format `role_XyZ7aB9cD2eF4gH1iJ0kL5mN6oP8qR3s`.",
            "additionalProperties": {
              "type": "string",
              "title": "project_id",
              "description": "Defines the project to which the user will be assigned and the role in the project."
            },
            "example": {
              "proj_ExPr0jID": "USER",
              "proj_ExPr0jId": "role_XyZ7aB9cD2eF4gH1iJ0kL5mN6oP8qR3s"
            }
          }
        },
        "required": [
          "email",
          "first_name",
          "last_name",
          "projects"
        ]
      },
      "ManagementProjectsTemplatesCampaignsCopyCreateRequestBody": {
        "type": "object",
        "title": "Management Templates Campaign Copy Template Request Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/TemplatesCampaignsNameDescription"
          },
          {
            "type": "object",
            "properties": {
              "destination_project_id": {
                "type": "string",
                "description": "Unique identifier of the project to which the campaign template will be copied."
              }
            }
          }
        ],
        "required": [
          "name",
          "destination_project_id"
        ]
      },
      "ManagementProjectsTemplatesCampaignsCopyCreateResponseBody": {
        "type": "object",
        "title": "Management Templates Campaign Template Copy Response Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignTemplateBase"
          }
        ]
      },
      "ManagementProjectsTemplatesCampaignsListResponseBody": {
        "type": "object",
        "title": "Management Templates Campaign Template List Response Body",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/templates/campaigns`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about campaign templates.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of campaign templates.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Dictionary that contains an array of campaign templates.",
            "items": {
              "$ref": "#/components/schemas/CampaignTemplate"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`."
          },
          "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 template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "campaign_template",
          "has_more"
        ]
      },
      "ManagementProjectsStackingRulesUpdateRequestBody": {
        "type": "object",
        "description": "Request body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRulesBase"
          }
        ]
      },
      "ManagementProjectsStackingRulesCreateRequestBody": {
        "type": "object",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRulesBase"
          }
        ]
      },
      "ManagementProjectsStackingRulesGetResponseBody": {
        "type": "object",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRules"
          }
        ],
        "required": [
          "id",
          "created_at"
        ]
      },
      "ManagementProjectsStackingRulesUpdateResponseBody": {
        "type": "object",
        "description": "Response body schema for **PUT** `/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRules"
          }
        ],
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "ManagementProjectsStackingRulesCreateResponseBody": {
        "type": "object",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/stacking-rules`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRules"
          }
        ],
        "required": [
          "id",
          "created_at"
        ]
      },
      "ManagementProjectsStackingRulesListResponseBody": {
        "type": "object",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/stacking-rules`.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the stacking rules in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of stacking rule objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of only one stacking rule object.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsStackingRules"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of stacking rule objects. It is always 1."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsStackingRules": {
        "type": "object",
        "description": "Object representing the details of the stacking rules.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique identifier of the stacking rules."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsStackingRulesBase"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the stacking rules were created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-01-02T08:31:46.562Z"
              },
              "updated_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the stacking rules were updated. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              }
            }
          }
        ],
        "required": [
          "exclusive_categories",
          "joint_categories",
          "redeemables_limit",
          "applicable_redeemables_limit",
          "applicable_redeemables_per_category_limit",
          "applicable_exclusive_redeemables_limit",
          "applicable_exclusive_redeemables_per_category_limit",
          "discount_calculation_mode",
          "initial_amount_mode_categories",
          "discounted_amount_mode_categories",
          "redeemables_application_mode",
          "redeemables_sorting_rule",
          "redeemables_products_application_mode",
          "redeemables_no_effect_rule",
          "no_effect_skip_categories",
          "no_effect_redeem_anyway_categories",
          "redeemables_rollback_order_mode"
        ]
      },
      "ManagementProjectsMetadataSchemasCreateRequestBody": {
        "type": "object",
        "description": "",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "related_object": {
                "type": "string",
                "description": "The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type, or you can use standard resource types: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`."
              },
              "allow_defined_only": {
                "type": "boolean",
                "default": false,
                "description": "Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values.\t"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Contains metadata definitions. There can be many properties within this object.\n\nOnly the properties sent in the request will be created.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemaDefinition"
                }
              }
            },
            "required": [
              "properties"
            ]
          }
        ],
        "required": [
          "related_object",
          "properties"
        ]
      },
      "MetadataSchemasGetResponseBody": {
        "type": "object",
        "title": "Metadata Schemas Get Response Body",
        "description": "Response body schema for **GET** `/v1/metadata-schemas/{resource}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/MetadataSchemaDeprecated"
          }
        ]
      },
      "ManagementProjectsMetadataSchemasGetResponseBody": {
        "type": "object",
        "title": "Management Projects Metadata Schemas Get Response Body",
        "description": "Response body schema for **GET** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
          }
        ]
      },
      "ManagementProjectsMetadataSchemasCreateResponseBody": {
        "type": "object",
        "title": "Management Projects Metadata Schemas Update Response Body",
        "description": "Response body schema for **POST** `management/v1/projects/{projectId}/metadata-schemas`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
          }
        ]
      },
      "ManagementProjectsMetadataSchemasUpdateResponseBody": {
        "type": "object",
        "title": "Management Projects Metadata Schemas Update Response Body",
        "description": "Response body schema for **PUT** `management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
          }
        ]
      },
      "ManagementProjectsMetadataSchemasUpdateRequestBody": {
        "type": "object",
        "description": "",
        "properties": {
          "allow_defined_only": {
            "type": "boolean",
            "description": "Restricts the creation of metadata fields when set to `true`. In other words, it indicates whether or not you are allowed to create new metadata definitions; for example, in the campaign manager or publication manager. If it is set to true, then only the defined fields will be available for assigning values.\t"
          },
          "properties": {
            "type": "object",
            "description": "Contains metadata definitions. There can be many properties within this object.\n\nOnly the properties sent in the request will be updated. However, if you send a property, all its key-value pairs must be provided - otherwise, they will be overwritten to new values.\n\nYou cannot change the `\"type\"` property. However, it is required, so you need to add it to the request.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ManagementProjectsMetadataSchemaDefinition"
            }
          }
        },
        "required": [
          "properties"
        ]
      },
      "MetadataSchemaDeprecated": {
        "type": "object",
        "description": "Object representing a metadata schema.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the metadata schema."
              },
              "related_object": {
                "type": "string",
                "description": "The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Contains metadata definitions.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/MetadataSchemaDefinitionDeprecated"
                }
              }
            },
            "required": [
              "properties"
            ]
          },
          {
            "type": "object",
            "properties": {
              "allow_defined_only": {
                "type": "boolean",
                "nullable": true,
                "description": "Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values."
              },
              "created_at": {
                "type": "string",
                "example": "2021-12-03T13:33:44.556Z",
                "description": "Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "nullable": true,
                "example": "2022-08-11T08:05:30.695Z",
                "description": "Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "object": {
                "type": "string",
                "default": "metadata_schema",
                "description": "The type of the object represented by the JSON. This object stores information about the metadata schema."
              }
            }
          }
        ],
        "required": [
          "id",
          "related_object",
          "properties",
          "allow_defined_only",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "MetadataSchema": {
        "type": "object",
        "description": "Object representing a metadata schema.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the metadata schema."
              },
              "related_object": {
                "type": "string",
                "description": "The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Contains metadata definitions.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/MetadataSchemaDefinition"
                }
              }
            },
            "required": [
              "properties"
            ]
          },
          {
            "type": "object",
            "properties": {
              "allow_defined_only": {
                "type": "boolean",
                "nullable": true,
                "description": "Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values."
              },
              "created_at": {
                "type": "string",
                "example": "2021-12-03T13:33:44.556Z",
                "description": "Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "nullable": true,
                "example": "2022-08-11T08:05:30.695Z",
                "description": "Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "object": {
                "type": "string",
                "default": "metadata_schema",
                "description": "The type of the object represented by the JSON. This object stores information about the metadata schema."
              }
            }
          }
        ],
        "required": [
          "id",
          "related_object",
          "properties",
          "allow_defined_only",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "ManagementProjectsMetadataSchema": {
        "type": "object",
        "description": "Object representing a metadata schema.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the metadata schema."
              },
              "related_object": {
                "type": "string",
                "description": "The resource type. You can define custom metadata schemas, which have a custom `\"related_object\"` resource type. The standard metadata schemas are: `\"campaign\"`, `\"customer\"`, `\"earning_rule\"`, `\"loyalty_tier\"`, `\"order\"`, `\"order_item\"`, `\"product\"`, `\"promotion_tier\"`, `\"publication\"`, `\"redemption\"`, `\"reward\"`, `\"voucher\"`."
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Contains metadata definitions.",
                "additionalProperties": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemaDefinition"
                }
              }
            },
            "required": [
              "properties"
            ]
          },
          {
            "type": "object",
            "properties": {
              "allow_defined_only": {
                "type": "boolean",
                "nullable": true,
                "description": "Restricts the creation of metadata fields when set to `true`. It indicates whether or not you can create new metadata definitions, e.g. in the campaign or publication manager. If set to `true`, then only the defined fields are available for assigning values."
              },
              "created_at": {
                "type": "string",
                "example": "2021-12-03T13:33:44.556Z",
                "description": "Timestamp representing the date and time when the metadata schema was created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "nullable": true,
                "example": "2022-08-11T08:05:30.695Z",
                "description": "Timestamp representing the date and time when the metadata schema was updated. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time"
              },
              "object": {
                "type": "string",
                "default": "metadata_schema",
                "description": "The type of the object represented by the JSON. This object stores information about the metadata schema."
              }
            }
          }
        ],
        "required": [
          "id",
          "related_object",
          "properties",
          "allow_defined_only",
          "created_at",
          "updated_at",
          "object"
        ]
      },
      "ManagementProjectsMetadataSchemasListResponseBody": {
        "type": "object",
        "description": "Object containing a list of metadata schemas.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of metadata schema objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of metadata schema objects. The metadata schemas are listed by related object properties.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsMetadataSchema"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of metadata schema objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "MetadataSchemasListResponseBody": {
        "type": "object",
        "description": "Object containing a list of metadata schemas.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the metadata schemas in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of metadata schema objects.",
            "enum": [
              "schemas"
            ]
          },
          "schemas": {
            "type": "array",
            "description": "Array of metadata schema objects. The metadata schemas are listed by related object properties.",
            "items": {
              "$ref": "#/components/schemas/MetadataSchemaDeprecated"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of metadata schema objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsCustomEventSchemasCreateRequestBody": {
        "type": "object",
        "title": "Create Custom Event Schema Request",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "title": "Custom Event Name",
                "description": "User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemaBase"
          }
        ],
        "required": [
          "name",
          "schema"
        ]
      },
      "ManagementProjectsCustomEventSchemasGetResponseBody": {
        "type": "object",
        "title": "Get Custom Event Schema Response",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
          }
        ]
      },
      "ManagementProjectsCustomEventSchemasUpdateRequestBody": {
        "type": "object",
        "title": "Update Custom Event Schema Request Body",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemaBase"
          }
        ]
      },
      "ManagementProjectsCustomEventSchemasUpdateResponseBody": {
        "type": "object",
        "title": "Update Custom Event Schema Response Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema/{customEventSchemaId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
          }
        ]
      },
      "ManagementProjectsCustomEventSchemasCreateResponseBody": {
        "type": "object",
        "title": "Create Custom Event Schema Response",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/custom-event-schema`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
          }
        ]
      },
      "ManagementProjectsCustomEventSchema": {
        "type": "object",
        "title": "Management Projects Custom Event Schema",
        "description": "Object containing the response to creating a custom event schema.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the custom event schema.",
                "example": "ms_oA8CawM07Q8i05Cx62U6euTK"
              },
              "name": {
                "type": "string",
                "title": "Custom Event Name",
                "description": "User-defined name of the custom event. This is also shown in **Project Settings** > **Event Schema** in the Voucherify Dashboard."
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemaBase"
          },
          {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the custom event schema was created. The value is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-03-27T08:00:09.472Z"
              },
              "updated_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the custom event schema was updated. The value is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-03-27T08:00:09.472Z"
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "example": "custom-event-schema",
                "default": "custom-event-schema",
                "enum": [
                  "custom-event-schema"
                ]
              }
            }
          }
        ],
        "required": [
          "id",
          "name",
          "schema",
          "created_at",
          "object"
        ]
      },
      "ManagementProjectsCustomEventSchemasListResponseBody": {
        "type": "object",
        "description": "Object containing a list of custom event schemas.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the custom event schemas in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of custom event schema objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of custom event schema objects.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsCustomEventSchema"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of custom event schema objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsWebhooksUpdateResponseBody": {
        "type": "object",
        "title": "Management Webhook Update Response Response",
        "description": "Response body schema for **PUT** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhook"
          }
        ]
      },
      "ManagementProjectsWebhooksGetResponseBody": {
        "type": "object",
        "title": "Management Webhook Get Response Response",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhook"
          }
        ]
      },
      "ManagementProjectsWebhooksCreateResponseBody": {
        "type": "object",
        "title": "Management Webhook Create Request Response",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/webhooks`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhook"
          }
        ]
      },
      "ManagementProjectsWebhooksUpdateRequestBody": {
        "type": "object",
        "title": "Management Webhook Update Request Body",
        "description": "Request body schema for **PUT** `/management/v1/projects/{projectId}/webhooks`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhookBase"
          }
        ],
        "required": [
          "target_url",
          "events"
        ]
      },
      "ManagementProjectsWebhooksCreateRequestBody": {
        "type": "object",
        "title": "Management Webhook Create Request Body",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/webhooks/{webhookId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhookBase"
          }
        ],
        "required": [
          "target_url",
          "events"
        ]
      },
      "ManagementProjectsWebhook": {
        "type": "object",
        "title": "Management Projects Webhook",
        "description": "Response body schema for webhook endpoints.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Unique identifier of the webhook.",
                "example": "wh_i45Uez36Uz8XNW6PXC0eyGmb"
              },
              "object": {
                "type": "string",
                "description": "The type of the object represented by JSON.",
                "default": "webhook",
                "enum": [
                  "webhook"
                ]
              },
              "created_at": {
                "type": "string",
                "description": "Timestamp representing the date and time when the webhook configuration was created. The value for this parameter is shown in the ISO 8601 format.",
                "format": "date-time",
                "example": "2024-01-02T08:31:46.562Z"
              }
            }
          },
          {
            "$ref": "#/components/schemas/ManagementProjectsWebhookBase"
          }
        ],
        "required": [
          "id",
          "object",
          "created_at",
          "target_url",
          "events",
          "active"
        ]
      },
      "ManagementProjectsWebhooksListResponseBody": {
        "type": "object",
        "description": "Object containing a list of webhook configurations.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the webhook configurations in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of webhook objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of webhook objects.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsWebhook"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of webhook objects."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsStackingRulesBase": {
        "type": "object",
        "description": "Object representing basic stacking rule parameters.",
        "properties": {
          "exclusive_categories": {
            "type": "array",
            "description": "Lists the IDs of exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint.",
            "items": {
              "type": "string"
            }
          },
          "joint_categories": {
            "type": "array",
            "description": "Lists the IDs of the joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be sent in one request. Note: more redeemables means more processing time.",
            "minimum": 1,
            "maximum": 30
          },
          "applicable_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables can be applied in one request. The number must be less than or equal to `redeemables_limit`. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "minimum": 1,
            "maximum": 30
          },
          "applicable_redeemables_per_category_limit": {
            "type": "integer",
            "nullable": true,
            "description": "Defines how many redeemables with the same category can be applied in one request. The number must be less than or equal to `applicable_redeemables_limit`. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "minimum": 1,
            "maximum": 30
          },
          "applicable_exclusive_redeemables_limit": {
            "type": "integer",
            "description": "Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`.",
            "minimum": 1,
            "maximum": 5
          },
          "applicable_exclusive_redeemables_per_category_limit": {
            "type": "integer",
            "nullable": true,
            "description": "Defines how many redeemables with an assigned exclusive category can be applied in one request. The ones above the limit will be `SKIPPED` according to the `redeemables_sorting_rule`. The number must be less than or equal to `applicable_exclusive_redeemables_limit`.",
            "minimum": 1,
            "maximum": 30
          },
          "discount_calculation_mode": {
            "type": "string",
            "description": "Defines if the discounts are applied by taking into account the initial order amount or the discounted order amount.",
            "enum": [
              "INITIAL_AMOUNT",
              "DISCOUNTED_AMOUNT"
            ]
          },
          "initial_amount_mode_categories": {
            "type": "array",
            "description": "Lists the IDs of the categories that apply a discount based on the initial amount.",
            "items": {
              "type": "string"
            }
          },
          "discounted_amount_mode_categories": {
            "type": "array",
            "description": "Lists the IDs of the categories that apply a discount based on the discounted amount.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_application_mode": {
            "type": "string",
            "description": "Defines the application mode for redeemables.\n`\"ALL\"` means that all redeemables must be validated for the redemption to be successful.\n`\"PARTIAL\"` means that only those redeemables that can be validated will be redeemed. The redeemables that fail validaton will be skipped.",
            "enum": [
              "ALL",
              "PARTIAL"
            ]
          },
          "redeemables_sorting_rule": {
            "type": "string",
            "description": "Defines redeemables sorting rule. `CATEGORY_HIERARCHY` means that redeemables are applied oaccording to the category priority. `REQUESTED_ORDER` means that redeemables are applied in the sequence provided in the request.",
            "enum": [
              "CATEGORY_HIERARCHY",
              "REQUESTED_ORDER"
            ]
          },
          "redeemables_products_application_mode": {
            "type": "string",
            "description": "Defines redeemables products application mode. `STACK` means that multiple discounts can be applied to a product. `ONCE` means that only one discount can be applied to the same product.",
            "enum": [
              "STACK",
              "ONCE"
            ]
          },
          "redeemables_no_effect_rule": {
            "type": "string",
            "description": "Defines redeemables no effect rule. `REDEEM_ANYWAY` means that the redeemable will be redeemed regardless of any restrictions or conditions in place. `SKIP` means that the redeemable will be processed only when an applicable effect is calculated.",
            "enum": [
              "REDEEM_ANYWAY",
              "SKIP"
            ]
          },
          "no_effect_skip_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are skipped even if the `redeemables_no_effect_rule` is set to `REDEEM_ANYWAY`. Category IDs can't overlap with the IDs in `no_effect_redeem_anyway_categories`.",
            "items": {
              "type": "string"
            }
          },
          "no_effect_redeem_anyway_categories": {
            "type": "array",
            "description": "Lists category IDs. Redeemables with a given category are redeemed anyway even if the `redeemables_no_effect_rule` is set to `SKIP`. Category IDs can't overlap with the IDs in `no_effect_skip_categories`.",
            "items": {
              "type": "string"
            }
          },
          "redeemables_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.",
            "enum": [
              "WITH_ORDER",
              "WITHOUT_ORDER"
            ]
          }
        }
      },
      "MetadataSchemaDefinitionDeprecated": {
        "type": "object",
        "title": "Metadata Definitions",
        "description": "Custom definition name. This is also shown in **Project Settings** > **Metadata Schema** in the Voucherify Dashboard.",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "string",
              "number",
              "object",
              "date",
              "datetime",
              "geopoint",
              "boolean",
              "image_url"
            ]
          },
          "array": {
            "type": "boolean",
            "description": "Indicates whether the definition is an array."
          },
          "optional": {
            "type": "boolean",
            "description": "Indicates whether this definition is optional or not optional for the resource."
          },
          "objectType": {
            "type": "string",
            "nullable": true,
            "description": "Returns the name of the custom resource if the resource was previously defined in the Dashboard as a custom (non-standard) Nested object."
          },
          "eq": {
            "type": "array",
            "description": "Array of possible values when the setting for `is equal to any of` in the Dashboard is defined explicitly.",
            "items": {}
          },
          "ne": {
            "type": "array",
            "description": "Array of values that are not allowed when the setting for `is not equal to any of` in the Dashboard is defined explicitly.",
            "items": {}
          },
          "lt": {
            "type": "integer",
            "description": "A property of `number` type must have `less than` this value."
          },
          "lte": {
            "type": "integer",
            "description": "A property of `number` type must be `less than or equal` to this value."
          },
          "gt": {
            "type": "integer",
            "description": "A property of `number` type must be `greater than` this value."
          },
          "gte": {
            "type": "integer",
            "description": "A property of `number` type must be `greater than or equal` to this value."
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates whether the definition was deleted from the schema."
          },
          "maxLength": {
            "type": "integer",
            "description": "Value for maximum length when the setting for `has maximum length of` in the Dashboard is defined explicitly."
          },
          "minLength": {
            "type": "integer",
            "description": "Value indicating minimum length when the setting for `has minimum length of` in the Dashboard is defined explicitly."
          },
          "exactLength": {
            "type": "integer",
            "description": "Value indicating exact length when the setting for `has exact length of` in the Dashboard is defined explicitly."
          }
        },
        "required": [
          "type",
          "optional",
          "array"
        ]
      },
      "MetadataSchemaDefinition": {
        "type": "object",
        "title": "Metadata Definitions",
        "description": "Custom definition name. This is also shown in **Project Settings** > **Metadata Schema** in the Voucherify Dashboard.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Indicates the type of metadata. Note that `\"geopoint\"` type is a paid feature.",
            "enum": [
              "string",
              "number",
              "object",
              "date",
              "datetime",
              "geopoint",
              "boolean",
              "image_url"
            ]
          },
          "optional": {
            "type": "boolean",
            "description": "Indicates if this definition is optional or not for the resource."
          },
          "array": {
            "type": "boolean",
            "description": "Indicates if the definition is an array."
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates if the definition has been deleted from the schema."
          },
          "object_type": {
            "type": "string",
            "nullable": true,
            "description": "The name of the custom resource (i.e. a nested object) if the resource has been previously defined. Otherwise, it is `null` for other types."
          },
          "min_length": {
            "type": "integer",
            "description": "Value indicating the minimum length. Available only for the `string` type."
          },
          "max_length": {
            "type": "integer",
            "description": "Value indicating the maximum length. Available only for the `string` type."
          },
          "exact_length": {
            "type": "integer",
            "description": "Value indicating the exact length. Available only for the `string` type."
          },
          "eq": {
            "type": "array",
            "description": "Array of values that are allowed. Available only for the `string` and `number` types.",
            "items": {
              "oneOf": [
                {
                  "title": "Add number",
                  "description": "Adds numbers to the array. The value should be up to two decimal places.",
                  "type": "number"
                },
                {
                  "title": "Add string",
                  "description": "Adds strings to the array.",
                  "type": "string"
                }
              ]
            }
          },
          "ne": {
            "type": "array",
            "description": "Array of values that are not allowed. Available only for the `number` type.",
            "items": {
              "description": "Adds number to the array. The value should be up to two decimal places.",
              "type": "number"
            }
          },
          "lt": {
            "type": "number",
            "description": "A property of the `number` type must have `less than` this value. The value should be up to two decimal places."
          },
          "lte": {
            "type": "number",
            "description": "A property of the `number` type must be `less than or equal` to this value. The value should be up to two decimal places."
          },
          "gt": {
            "type": "number",
            "description": "A property of `number` type must be `greater than` this value. The value should be up to two decimal places."
          },
          "gte": {
            "type": "number",
            "description": "A property of `number` type must be `greater than or equal` to this value. The value should be up to two decimal places."
          }
        },
        "required": [
          "type",
          "optional",
          "array"
        ]
      },
      "ManagementProjectsMetadataSchemaDefinition": {
        "type": "object",
        "title": "Metadata Definitions",
        "description": "Custom definition name. This is also shown in **Project Settings** > **Metadata Schema** in the Voucherify Dashboard.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Indicates the type of metadata. Note that `\"geopoint\"` type is a paid feature.",
            "enum": [
              "string",
              "number",
              "object",
              "date",
              "datetime",
              "geopoint",
              "boolean",
              "image_url"
            ]
          },
          "optional": {
            "type": "boolean",
            "description": "Indicates if this definition is optional or not for the resource."
          },
          "array": {
            "type": "boolean",
            "description": "Indicates if the definition is an array."
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates if the definition has been deleted from the schema."
          },
          "object_type": {
            "type": "string",
            "nullable": true,
            "description": "The name of the custom resource (i.e. a nested object) if the resource has been previously defined. Otherwise, it is `null` for other types."
          },
          "min_length": {
            "type": "integer",
            "description": "Value indicating the minimum length. Available only for the `string` type."
          },
          "max_length": {
            "type": "integer",
            "description": "Value indicating the maximum length. Available only for the `string` type."
          },
          "exact_length": {
            "type": "integer",
            "description": "Value indicating the exact length. Available only for the `string` type."
          },
          "eq": {
            "type": "array",
            "description": "Array of values that are allowed. Available only for the `string` and `number` types.",
            "items": {
              "oneOf": [
                {
                  "title": "Add number",
                  "description": "Adds numbers to the array. The value should be up to two decimal places.",
                  "type": "number"
                },
                {
                  "title": "Add string",
                  "description": "Adds strings to the array.",
                  "type": "string"
                }
              ]
            }
          },
          "ne": {
            "type": "array",
            "description": "Array of values that are not allowed. Available only for the `number` type.",
            "items": {
              "description": "Adds number to the array. The value should be up to two decimal places.",
              "type": "number"
            }
          },
          "lt": {
            "type": "number",
            "description": "A property of the `number` type must have `less than` this value. The value should be up to two decimal places."
          },
          "lte": {
            "type": "number",
            "description": "A property of the `number` type must be `less than or equal` to this value. The value should be up to two decimal places."
          },
          "gt": {
            "type": "number",
            "description": "A property of `number` type must be `greater than` this value. The value should be up to two decimal places."
          },
          "gte": {
            "type": "number",
            "description": "A property of `number` type must be `greater than or equal` to this value. The value should be up to two decimal places."
          }
        },
        "required": [
          "type",
          "optional",
          "array"
        ]
      },
      "ManagementProjectsCustomEventSchemaBase": {
        "type": "object",
        "title": "Custom Event Schema",
        "description": "Object representing a custom event schema.",
        "properties": {
          "schema": {
            "type": "object",
            "description": "Object containing custom event schema and its custom attributes (metadata).",
            "properties": {
              "properties": {
                "type": "object",
                "description": "Defines custom event custom attributes (metadata).",
                "additionalProperties": {
                  "type": "object",
                  "title": "Custom Event Properties",
                  "description": "Custom event metadata name.",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Indicates the type of the custom event.",
                      "enum": [
                        "string",
                        "number",
                        "date",
                        "datetime",
                        "boolean"
                      ]
                    },
                    "optional": {
                      "type": "boolean",
                      "description": "Indicates if this property is optional or not for the resource."
                    },
                    "deleted": {
                      "type": "boolean",
                      "description": "Indicates if the property has been deleted from the schema. A deleted schema is inactive, but it can be restored."
                    }
                  },
                  "required": [
                    "type",
                    "optional"
                  ]
                }
              }
            },
            "required": [
              "properties"
            ]
          }
        }
      },
      "ManagementProjectsWebhookBase": {
        "type": "object",
        "description": "",
        "properties": {
          "target_url": {
            "type": "string",
            "description": "URL address that receives webhooks."
          },
          "events": {
            "type": "array",
            "description": "Lists the events that trigger webhook sendout.",
            "items": {
              "type": "string",
              "enum": [
                "business_validation_rule.assignment.created",
                "business_validation_rule.assignment.deleted",
                "business_validation_rule.created",
                "business_validation_rule.deleted",
                "business_validation_rule.updated",
                "campaign.created",
                "campaign.deleted",
                "campaign.disabled",
                "campaign.enabled",
                "campaign.earning_rule.assigned",
                "campaign.earning_rule.deleted",
                "campaign.earning_rule.disabled",
                "campaign.earning_rule.enabled",
                "campaign.earning_rule.updated",
                "campaign.loyalty_tier.created",
                "campaign.loyalty_tier.deleted",
                "campaign.loyalty_tier.updated",
                "campaign.promotion_stack.created",
                "campaign.promotion_stack.updated",
                "campaign.promotion_tier.created",
                "campaign.promotion_tier.deleted",
                "campaign.promotion_tier.disabled",
                "campaign.promotion_tier.enabled",
                "campaign.promotion_tier.updated",
                "campaign.referral_tier.created",
                "campaign.referral_tier.deleted",
                "campaign.referral_tier.updated",
                "campaign.reward.assignment.created",
                "campaign.reward.assignment.deleted",
                "campaign.reward.assignment.updated",
                "campaign.updated",
                "campaign.vouchers.aded",
                "campaign.vouchers.generation.completed",
                "campaign.vouchers.generation.failed",
                "campaign.vouchers.generation.started",
                "customer.confirmed",
                "customer.created",
                "customer.deleted",
                "customer.rewarded",
                "customer.rewarded.loyalty_points",
                "publication.succeeded",
                "redemption.failed",
                "redemption.rollback.failed",
                "redemption.rollback.succeeded",
                "redemption.succeeded",
                "voucher.created",
                "voucher.deleted",
                "voucher.disabled",
                "voucher.enabled",
                "voucher.gift.balance_aded",
                "voucher.gift.transaction.created",
                "voucher.loyalty_card.pending_points.activated",
                "voucher.loyalty_card.pending_points.aded",
                "voucher.loyalty_card.pending_points.canceled",
                "voucher.loyalty_card.pending_points.updated",
                "voucher.loyalty_card.points_aded",
                "voucher.loyalty_card.points_expired",
                "voucher.loyalty_card.transaction.created",
                "voucher.published",
                "voucher.updated"
              ]
            }
          },
          "active": {
            "type": "boolean",
            "description": "Determines if the webhook configuration is active.",
            "default": true
          }
        }
      },
      "ManagementProjectsBrandingCreateRequestBody": {
        "type": "object",
        "title": "Create Brand Request",
        "description": "Request body schema for **POST** `/management/v1/projects/{projectId}/branding`.",
        "properties": {
          "brand": {
            "type": "object",
            "title": "Brand",
            "description": "Defines basic brand details.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Defines brand name."
              },
              "privacy_policy_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's privacy policy. It must be a valid URL format."
              },
              "terms_of_use_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's terms of use.  It must be a valid URL format."
              },
              "permission_reminder": {
                "type": "string",
                "nullable": true,
                "default": "You are receiving this email because you opted in at our website.",
                "description": "Defines the message that is displayed to customers who opted in an email newsletter."
              },
              "website_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's website. It must be a valid URL format."
              }
            },
            "required": [
              "name"
            ]
          },
          "address": {
            "type": "object",
            "title": "Address",
            "description": "Defines the address details.",
            "properties": {
              "street": {
                "type": "string",
                "description": "Defines the brand's street."
              },
              "city": {
                "type": "string",
                "description": "Defines the brand's city."
              },
              "postal": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's postal code."
              },
              "state": {
                "type": "string",
                "description": "Defines the brand's state or similar administrative area."
              },
              "country": {
                "type": "string",
                "description": "Defines the brand's country."
              }
            },
            "required": [
              "street",
              "city",
              "postal",
              "country"
            ]
          },
          "contact": {
            "type": "object",
            "title": "Contact",
            "description": "Defines contact details.",
            "properties": {
              "email": {
                "type": "string",
                "description": "Defines the brand's email address. It must be a valid email format."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's phone number."
              }
            },
            "required": [
              "email"
            ]
          },
          "cockpits": {
            "type": "object",
            "title": "Cockpit",
            "description": "Defines customer cockpit details.",
            "properties": {
              "campaigns_overview_enabled": {
                "type": "boolean",
                "default": false,
                "nullable": true,
                "description": "Enables the campaign overview for customers."
              },
              "loyalty_enabled": {
                "type": "boolean",
                "default": true,
                "nullable": true,
                "description": "Enables the loyalty campaign overview for customers."
              },
              "gift_cards_enabled": {
                "type": "boolean",
                "default": true,
                "nullable": true,
                "description": "Enables the gift card overview for customers."
              },
              "coupons_enabled": {
                "type": "boolean",
                "default": true,
                "nullable": true,
                "description": "Enables the discount coupon overview for customers."
              },
              "referrals_enabled": {
                "type": "boolean",
                "default": true,
                "nullable": true,
                "description": "Enables the referral campaign overview for customers."
              },
              "theme": {
                "type": "string",
                "default": "default",
                "description": "Determines the color scheme of the customer cockpit.",
                "enum": [
                  "blue",
                  "dark-green",
                  "default",
                  "green",
                  "grey",
                  "orange",
                  "purple",
                  "red"
                ]
              },
              "use_custom_double_opt_in_redirect_url": {
                "type": "boolean",
                "default": false,
                "nullable": true,
                "description": "Enables the double opt-in option. It must be a valid URL format."
              },
              "custom_double_opt_in_redirect_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL for the double opt-in consent. It must be a valid URL format."
              }
            }
          }
        },
        "required": [
          "brand",
          "address",
          "contact"
        ]
      },
      "ManagementProjectsBrandingCreateResponseBody": {
        "type": "object",
        "title": "Management Projects Branding Create Response Body",
        "description": "Response body schema for **POST** `/management/v1/projects/{projectId}/branding`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsBranding"
          }
        ]
      },
      "ManagementProjectsBrandingUpdateResponseBody": {
        "type": "object",
        "title": "Management Projects Branding Update Response Body",
        "description": "Response body schema for **PUT** `/management/v1/projects/{projectId}/branding/{brandingId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsBranding"
          }
        ]
      },
      "ManagementProjectsBrandingGetResponseBody": {
        "type": "object",
        "title": "Management Projects Branding Get Response Body",
        "description": "Response body schema for **GET** `/management/v1/projects/{projectId}/branding/{brandingId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/ManagementProjectsBranding"
          }
        ]
      },
      "ManagementProjectsBranding": {
        "type": "object",
        "title": "Brand Response",
        "description": "Response brand schema.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the brand configuration."
          },
          "brand": {
            "type": "object",
            "title": "Brand",
            "description": "Defines basic brand details.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Defines brand name."
              },
              "privacy_policy_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's privacy policy. It must be a valid URL format."
              },
              "terms_of_use_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's terms of use.  It must be a valid URL format."
              },
              "permission_reminder": {
                "type": "string",
                "description": "Defines the message that is displayed to customers who opted in an email newsletter."
              },
              "website_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's website. It must be a valid URL format."
              }
            },
            "required": [
              "name",
              "privacy_policy_url",
              "terms_of_use_url",
              "permission_reminder",
              "website_url"
            ]
          },
          "address": {
            "type": "object",
            "title": "Address",
            "description": "Defines the address details.",
            "properties": {
              "street": {
                "type": "string",
                "description": "Defines the brand's street."
              },
              "city": {
                "type": "string",
                "description": "Defines the brand's city."
              },
              "postal": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's postal code."
              },
              "state": {
                "type": "string",
                "description": "Defines the brand's state or similar administrative area."
              },
              "country": {
                "type": "string",
                "description": "Defines the brand's country."
              }
            },
            "required": [
              "street",
              "city",
              "postal",
              "state",
              "country"
            ]
          },
          "contact": {
            "type": "object",
            "title": "Contact",
            "description": "Defines contact details.",
            "properties": {
              "email": {
                "type": "string",
                "description": "Defines the brand's email address. It must be a valid email format."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's phone number."
              }
            },
            "required": [
              "email",
              "phone"
            ]
          },
          "cockpits": {
            "type": "object",
            "title": "Cockpit",
            "description": "Defines customer cockpit details.",
            "properties": {
              "campaigns_overview_enabled": {
                "type": "boolean",
                "description": "Enables the campaign overview for customers."
              },
              "loyalty_enabled": {
                "type": "boolean",
                "description": "Enables the loyalty campaign overview for customers."
              },
              "gift_cards_enabled": {
                "type": "boolean",
                "description": "Enables the gift card overview for customers."
              },
              "coupons_enabled": {
                "type": "boolean",
                "description": "Enables the discount coupon overview for customers."
              },
              "referrals_enabled": {
                "type": "boolean",
                "description": "Enables the referral campaign overview for customers."
              },
              "theme": {
                "type": "string",
                "description": "Determines the color scheme of the customer cockpit.",
                "enum": [
                  "blue",
                  "dark-green",
                  "default",
                  "green",
                  "grey",
                  "orange",
                  "purple",
                  "red"
                ]
              },
              "use_custom_double_opt_in_redirect_url": {
                "type": "boolean",
                "description": "Enables the double opt-in option. It must be a valid URL format."
              },
              "custom_double_opt_in_redirect_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL for the double opt-in consent. It must be a valid URL format."
              }
            },
            "required": [
              "campaigns_overview_enabled",
              "loyalty_enabled",
              "gift_cards_enabled",
              "coupons_enabled",
              "referrals_enabled",
              "theme",
              "use_custom_double_opt_in_redirect_url",
              "custom_double_opt_in_redirect_url"
            ]
          }
        },
        "required": [
          "id",
          "brand",
          "address",
          "contact",
          "cockpits"
        ]
      },
      "ManagementProjectsBrandingListResponseBody": {
        "type": "object",
        "description": "Object containing a list of brand configurations. It always contains one item.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the brand in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of brand objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of brand objects. It contains only one object.",
            "items": {
              "$ref": "#/components/schemas/ManagementProjectsBranding"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of brand objects. It is always `1`."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total"
        ]
      },
      "ManagementProjectsBrandingUpdateRequestBody": {
        "type": "object",
        "title": "Brand",
        "properties": {
          "brand": {
            "type": "object",
            "title": "Brand",
            "description": "Defines basic brand details.",
            "properties": {
              "name": {
                "type": "string",
                "description": "Defines brand name."
              },
              "privacy_policy_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's privacy policy."
              },
              "terms_of_use_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's terms of use."
              },
              "permission_reminder": {
                "type": "string",
                "description": "Defines the message that is displayed to customers who opted in an email newsletter."
              },
              "website_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL to the brand's website."
              }
            }
          },
          "address": {
            "type": "object",
            "title": "Address",
            "description": "Defines the address details.",
            "properties": {
              "street": {
                "type": "string",
                "description": "Defines the brand's street."
              },
              "city": {
                "type": "string",
                "description": "Defines the brand's city."
              },
              "postal": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's postal code"
              },
              "state": {
                "type": "string",
                "description": "Defines the brand's state or similar administrative area."
              },
              "country": {
                "type": "string",
                "description": "Defines the brand's country."
              }
            }
          },
          "contact": {
            "type": "object",
            "title": "Contact",
            "description": "Defines contact details.",
            "properties": {
              "email": {
                "type": "string",
                "description": "Defines the brand's email address. It must be a valid email format."
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "Defines the brand's phone number."
              }
            }
          },
          "cockpits": {
            "type": "object",
            "title": "Cockpit",
            "description": "Defines customer cockpit details.",
            "properties": {
              "campaigns_overview_enabled": {
                "type": "boolean",
                "description": "Indicates if the campaign overview is turned on for customers."
              },
              "loyalty_enabled": {
                "type": "boolean",
                "description": "Indicates if the loyalty campaign overview is turned on for customers."
              },
              "gift_cards_enabled": {
                "type": "boolean",
                "description": "Indicates if the gift card overview is turned on for customers."
              },
              "coupons_enabled": {
                "type": "boolean",
                "description": "Indicates if the discount coupon overview is turned on for customers."
              },
              "referrals_enabled": {
                "type": "boolean",
                "description": "Indicates if the referral campaign overview is turned on for customers."
              },
              "theme": {
                "type": "string",
                "description": "Determines the color scheme of the customer cockpit.",
                "enum": [
                  "orange",
                  "green",
                  "dark-green",
                  "blue",
                  "purple",
                  "red",
                  "grey"
                ]
              },
              "use_custom_double_opt_in_redirect_url": {
                "type": "boolean",
                "description": "Indicates if the double opt-in option is turned on."
              },
              "custom_double_opt_in_redirect_url": {
                "type": "string",
                "nullable": true,
                "description": "Defines the URL for the double opt-in consent."
              }
            }
          }
        }
      },
      "UsageNotifications": {
        "type": "object",
        "title": "Usage notification details",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Enables the notification."
          },
          "value": {
            "type": "integer",
            "minimum": 10,
            "maximum": 90,
            "description": "The percent value of the limit which, when reached, triggers the notification."
          },
          "in_app": {
            "type": "boolean",
            "description": "Enables the notification in the application."
          },
          "emails": {
            "type": "array",
            "title": "Email address",
            "description": "An array of email addresses which will receive the notification.",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "enabled",
          "value",
          "emails",
          "in_app"
        ]
      },
      "TemplatesCampaignsCreateRequestBody": {
        "type": "object",
        "title": "Templates Campaigns Template Create Request Body",
        "description": "Request body schema for **POST** `/templates/campaign`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "campaign_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique identifier of the campaign that will create a template. It must be an ID of an existing discount or gift card campaign. It cannot be passed when `promotion_tier_id` has value. Required when the `promotion_tier_id` is not passed or it is `null`."
              },
              "promotion_tier_id": {
                "type": "string",
                "nullable": true,
                "description": "Unique identifier of the promotion tier that will create a template. It cannot be passed when `campaign_id` has value. Required when the `campaign_id` is not passed or it is `null`."
              }
            }
          },
          {
            "$ref": "#/components/schemas/TemplatesCampaignsNameDescription"
          }
        ],
        "required": [
          "name"
        ]
      },
      "TemplatesCampaignsUpdateRequestBody": {
        "type": "object",
        "title": "Templates Campaigns Template Update Request Body",
        "description": "Request body schema for **PUT** `/templates/campaign/{campaignTemplateId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/TemplatesCampaignsNameDescription"
          }
        ]
      },
      "TemplatesCampaignsUpdateResponseBody": {
        "type": "object",
        "title": "Templates Campaigns Template Update Response Body",
        "description": "Request body schema for **PUT** `/templates/campaign/{campaignTemplateId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignTemplate"
          }
        ]
      },
      "TemplatesCampaignsNameDescription": {
        "type": "object",
        "title": "Update Campaign Template Request",
        "description": "Request body for updating a campaign template.",
        "properties": {
          "name": {
            "type": "string",
            "description": "User-defined name of the campaign template. It must be unique."
          },
          "description": {
            "type": "string",
            "nullable": true,
            "description": "User-defined description of the campaign template."
          }
        }
      },
      "TemplatesCampaignsGetResponseBody": {
        "type": "object",
        "title": "Templates Campaign Template Get Response Body",
        "description": "Response body schema for **GET** `/v1/templates/campaign/{campaignTemplateId}`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignTemplate"
          }
        ]
      },
      "TemplatesCampaignsListResponseBody": {
        "type": "object",
        "title": "Templates Campaign Template List Response Body",
        "description": "Response body schema for **GET** `/v1/templates/campaign`.",
        "properties": {
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about campaign templates.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "description": "Identifies the name of the JSON property that contains the array of campaign templates.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Dictionary that contains an array of campaign templates.",
            "items": {
              "$ref": "#/components/schemas/CampaignTemplate"
            }
          },
          "total": {
            "type": "integer",
            "description": "Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`."
          },
          "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 template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "campaign_template",
          "has_more"
        ]
      },
      "TemplatesCampaignsCampaignSetupCreateRequestBody": {
        "type": "object",
        "title": "Templates Campaign Template Create Campaign Request Body",
        "description": "Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/campaign-setup`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignsCreateBase"
          },
          {
            "type": "object",
            "properties": {
              "voucher": {
                "type": "object",
                "description": "",
                "properties": {
                  "code_config": {
                    "$ref": "#/components/schemas/CodeConfig"
                  },
                  "redemption": {
                    "type": "object",
                    "description": "Stores the quantity of redemptions that can be applied to the voucher.",
                    "properties": {
                      "quantity": {
                        "type": "integer",
                        "description": "How many times a voucher can be redeemed. A `null` value means unlimited."
                      }
                    }
                  }
                }
              }
            }
          }
        ],
        "required": [
          "name"
        ]
      },
      "TemplatesCampaignsTierSetupCreateRequestBody": {
        "type": "object",
        "title": "Templates Campaign Template Add Tier Request Body",
        "description": "Request body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.",
        "allOf": [
          {
            "type": "object",
            "properties": {
              "campaign_id": {
                "type": "string",
                "description": "Unique campaign identifier, assigned by Voucherify. Defines the promotion campaign to which the promotion tier will be added."
              }
            }
          },
          {
            "$ref": "#/components/schemas/PromotionTierCreateBase"
          }
        ],
        "required": [
          "campaign_id",
          "name"
        ]
      },
      "TemplatesCampaignsCampaignSetupCreateResponseBody": {
        "type": "object",
        "title": "Templates Campaigns Create Campaign From Template Response Body",
        "description": "Response body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/campaign-setup`.",
        "properties": {
          "created_resources": {
            "type": "array",
            "description": "Contains a list of resources that have been added to the project when the campaign has been created out of the template.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier assigned to the created resource. It is assigned by Voucherify."
                },
                "object": {
                  "type": "string",
                  "description": "The type of the created resource.",
                  "enum": [
                    "validation_rules",
                    "product",
                    "sku",
                    "products_collection",
                    "segments",
                    "location"
                  ]
                }
              }
            },
            "required": [
              "id",
              "object"
            ]
          },
          "campaign": {
            "description": "Details of the created campaign.",
            "allOf": [
              {
                "$ref": "#/components/schemas/Campaign"
              }
            ]
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template.",
            "enum": [
              "campaign_setup"
            ]
          }
        },
        "required": [
          "created_resources",
          "campaign",
          "object"
        ]
      },
      "TemplatesCampaignsTierSetupCreateResponseBody": {
        "type": "object",
        "title": "Templates Campaigns Add Tier From Template Response Body",
        "description": "Response body schema for **POST** `/v1/templates/campaigns/{campaignTemplateId}/tier-setup`.",
        "properties": {
          "created_resources": {
            "type": "array",
            "description": "Contains a list of resources that have been added to the project when the promotion tier has been created out of the template.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier assigned to the created resource. It is assigned by Voucherify."
                },
                "object": {
                  "type": "string",
                  "description": "The type of the created resource.",
                  "enum": [
                    "validation_rules",
                    "product",
                    "sku",
                    "products_collection",
                    "segments",
                    "location"
                  ]
                }
              }
            },
            "required": [
              "id",
              "object"
            ]
          },
          "promotion_tier": {
            "description": "Details of the added promotion tier.",
            "allOf": [
              {
                "$ref": "#/components/schemas/PromotionTier"
              }
            ]
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. This object stores information about the campaign created out of the campaign template.",
            "enum": [
              "promotion_tier_setup"
            ]
          }
        },
        "required": [
          "created_resources",
          "campaign",
          "object"
        ]
      },
      "TemplatesCampaignsCreateTemplateResponseBody": {
        "type": "object",
        "title": "Templates Campaign Template Create Response Body",
        "description": "Response body schema for **POST** `/v1/templates/campaigns`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignTemplateBase"
          }
        ]
      },
      "CampaignTemplateBase": {
        "type": "object",
        "title": "Campaign Template Base",
        "description": "Stores details about a campaign template.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the campaign template. It is assigned by Voucherify.",
            "example": "camp_tpl_eR9NsNJ5gqJRN2TG3fqCvbVl"
          },
          "name": {
            "type": "string",
            "description": "User-defined name of the campaign template."
          },
          "description": {
            "type": "string",
            "description": "User-defined description of the campaign template."
          },
          "campaign_type": {
            "type": "string",
            "description": "Type of the campaign used to create the campaign template. Templates created from a promotion tier are converted to `DISCOUNT_COUPONS`.",
            "enum": [
              "DISCOUNT_COUPONS",
              "GIFT_VOUCHERS"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp representing the date and time when the campaign template was created. The value is shown in the ISO 8601 format.",
            "example": "2024-07-16T09:05:53.175Z"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON.",
            "enum": [
              "campaign_template"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "campaign_type",
          "created_at",
          "object"
        ]
      },
      "CampaignTemplate": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CampaignTemplateBase"
          },
          {
            "type": "object",
            "properties": {
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp representing the date and time when the campaign template was last updated. The value is shown in the ISO 8601 format.",
                "example": "2024-07-17T06:25:21.500Z"
              }
            }
          }
        ]
      },
      "TrashBinListResponseBody": {
        "type": "object",
        "title": "List Bin Entities",
        "description": "Retrieves a list of the resources moved the bin.",
        "properties": {
          "object": {
            "type": "string",
            "default": "list",
            "description": "The type of the object represented by JSON. This object stores information about the bin entries in a dictionary.",
            "enum": [
              "list"
            ]
          },
          "data_ref": {
            "type": "string",
            "default": "data",
            "description": "Identifies the name of the attribute that contains the array of bin entry objects.",
            "enum": [
              "data"
            ]
          },
          "data": {
            "type": "array",
            "description": "Array of bin entry objects.",
            "items": {
              "$ref": "#/components/schemas/TrashBinItem"
            }
          },
          "total": {
            "type": "integer",
            "description": "The total number of bin entries. This is the number of the entries returned in the array, not the number of all matching results or all resources currently moved to the bin."
          },
          "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": "If `has_more` is `true`, it returns an ID that can be used to return another page of results. Use the ID in the `starting_after_id` query parameter to display another page of the results occuring after the field with that ID."
          }
        },
        "required": [
          "object",
          "data_ref",
          "data",
          "total",
          "has_more"
        ]
      },
      "TrashBinItem": {
        "type": "object",
        "title": "Trash Bin Item",
        "description": "Resource moved to the bin, i.e. a campaign, product, SKU, or voucher.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the trash bin entry. It should not be confused with the ID of the resource moved to the bin.",
            "example": "tbe_0e8213a0a78020ec64"
          },
          "created_at": {
            "type": "string",
            "description": "Timestamp representing the date and time when the resource was moved to the bin. The value for this parameter is shown in the ISO 8601 format.",
            "example": "2024-03-27T19:24:26.142Z",
            "format": "date-time"
          },
          "deleted_by_user_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier of the user who moved the resource to the bin. It returns a user ID if the resource was moved to the bin through an action in the website. It returns a `null` if the resource was deleted through the API.",
            "example": "user_lNTg47u7Ip0Smgcm1k3ShHuUdH4qToNc"
          },
          "resource_id": {
            "type": "string",
            "description": "Unique identifier of the resource moved to the bin, i.e. an ID of a campaign, product, SKU, or voucher.",
            "example": "v_ZUFwkglCEWaEfXqkJYd3uogTEEHEEU8S"
          },
          "resource_type": {
            "type": "string",
            "description": "Type of the resource moved to the bin.",
            "enum": [
              "campaign",
              "product",
              "sku",
              "voucher"
            ],
            "example": "voucher"
          },
          "resource_name": {
            "type": "string",
            "description": "Name of the resouce moved to the bin. It is the name of the campaign, product or SKU, or the voucher code.",
            "example": "BLCKFRIDAY_2024"
          },
          "resource_parent_id": {
            "type": "string",
            "nullable": true,
            "description": "Unique identifier of the parent resource. For a voucher, it is a campaign ID, except for generic (standalone) voucherss. For an SKU, it is the product ID. It returns `null` for campaigns and base products.",
            "example": "camp_snn0eQL0PYWl5b6lY6HQNPfb"
          },
          "object": {
            "type": "string",
            "description": "The type of the object represented by JSON. It is equal to the `resource_type`.",
            "example": "voucher",
            "enum": [
              "campaign",
              "product",
              "sku",
              "voucher"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "deleted_by_user_id",
          "resource_id",
          "resource_type",
          "resource_name",
          "resource_parent_id",
          "object"
        ]
      },
      "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"
        ]
      },
      "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 reccuring period(s) when the resource is active. The periods should not overlap.",
            "items": {
              "type": "object",
              "description": "Defines the reccuring 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"
                }
              }
            }
          }
        }
      }
    },
    "examples": {
      "req_vouchers_metadata_1": {
        "value": {
          "codes": [
            "PROMO-CODE810",
            "PROMO-CODE726"
          ],
          "metadata": {
            "lang": "en",
            "authorized_internally": true
          }
        }
      },
      "req_vouchers_metadata_2": {
        "value": {
          "codes": [
            "PROMO-CODE810",
            "PROMO-CODE726",
            "PROMO-CODE888"
          ],
          "metadata": {
            "lang": "en",
            "authorized_internally": true
          }
        }
      },
      "res_async_actions": {
        "value": {
          "async_action_id": "aa_0ab2df092385be5ca5"
        }
      }
    }
  },
  "paths": {
    "/v1/publications/create": {
      "get": {
        "operationId": "create-publication-1",
        "tags": [
          "Publications"
        ],
        "summary": "Create Publication",
        "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet.\n> ❗️ Limited access\n>\n> Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** &rarr; **Project Settings** &rarr; **General** &rarr; **Integration Keys** to set up a pair of API keys and use them to send the request.  \n\n\n> ❗️ Required  \n>\n> Query param `voucher` OR `campaign` MUST be filled out. If you provide both, `campaign` param will be skipped.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "join_once",
            "description": "Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCode"
            },
            "in": "query",
            "name": "voucher",
            "description": "Code of voucher being published."
          },
          {
            "name": "campaign",
            "in": "query",
            "description": "Create publication with campaign.",
            "style": "deepObject",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/CreatePublicationCampaign"
            }
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "source_id",
            "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."
          },
          {
            "name": "customer",
            "in": "query",
            "required": true,
            "description": "Contains information about the customer to whom the publication was directed.",
            "style": "deepObject",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/Customer"
            }
          },
          {
            "name": "metadata",
            "in": "query",
            "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.",
            "style": "deepObject",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/ParameterObject"
            }
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "publications"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a publication object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicationsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "pub_ocaXCa023ayJ3WL1ARxUeKgIvg3JcEGh",
                      "object": "publication",
                      "created_at": "2022-09-30T16:30:32.924Z",
                      "customer_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                      "tracking_id": "pub_source_customer_5",
                      "metadata": {
                        "year": 2022
                      },
                      "channel": "myown",
                      "source_id": "publication_source_ID_10",
                      "result": "SUCCESS",
                      "customer": {
                        "id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                        "name": "Bob Jones",
                        "email": "bob.smith@email.com",
                        "source_id": "pub_source_customer_5",
                        "metadata": {
                          "lang": "en",
                          "test": true
                        },
                        "object": "customer"
                      },
                      "voucher": {
                        "id": "v_6Hy5FdNlu3dP65fJu5BgXma31Sl3rgkf",
                        "code": "cEsMn0uA",
                        "campaign": "Test - Discount Effect - Amount - Items",
                        "campaign_id": "camp_dphuwqH7BOVkgh4JmpDtS32l",
                        "category": null,
                        "category_id": null,
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 300,
                          "effect": "APPLY_TO_ITEMS"
                        },
                        "gift": null,
                        "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": "U2FsdGVkX188XVmOotyCyR2j3G8sJR8HzS3DQ+6J1OElPWSmjlEnthuJc7rkc7WIVxjT4pTl1JVVkHEuGXNXdzRik11H8S18HQeQFJFiuwLZ2mzEC2zZitEinyUxtZwhnEHoi0eGAgYCG7iVMNuOQA==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX18wDd9CcLM0Ef7aBfUSXZUoCQpuNpk4CHGOipbn+wFkfzcIZGBtUlxrI2KsXciCqF+c93AKzsymq5Yw8eEAFF/FK5f94z4/sgzaLDvyBmPCXHuS11Ew9S4ZEMjdTkUJftER2IlxWaCARA==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-30T16:30:32.956Z",
                        "updated_at": null,
                        "holder_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0,
                          "object": "list",
                          "url": "/v1/vouchers/cEsMn0uA/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/cEsMn0uA/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "vouchers_id": [
                        "v_6Hy5FdNlu3dP65fJu5BgXma31Sl3rgkf"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the query parameters are incomplete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing customer": {
                    "value": {
                      "code": 400,
                      "key": "invalid_query_params",
                      "message": "Invalid query params",
                      "details": "Query should have required property 'customer'",
                      "request_id": "v-0c8b6423f3c80ed3e4"
                    }
                  },
                  "Missing vouchers": {
                    "value": {
                      "code": 400,
                      "key": "missing_vouchers",
                      "message": "Missing vouchers",
                      "details": "Either Campaign or Voucher is required"
                    }
                  },
                  "Voucher cannot be published": {
                    "value": {
                      "code": 400,
                      "key": "voucher_cannot_be_published",
                      "message": "Voucher cannot be published",
                      "details": "Voucher cannot be published. Customer already joined program.",
                      "request_id": "v-0c8b763544080efed2"
                    }
                  },
                  "Voucher already published": {
                    "value": {
                      "code": 400,
                      "key": "voucher_already_published",
                      "message": "Voucher already published",
                      "details": "Voucher 'v_vM7vQZmgV86k0wuz05cFAOfarj4s8BQE' has already been published",
                      "request_id": "v-0c8baebc67c80e97a0"
                    }
                  },
                  "Duplicate source ID": {
                    "value": {
                      "code": 400,
                      "key": "duplicate_source_id",
                      "message": "Duplicate source_id",
                      "details": "Publication with source_id: 'test_publication_source_id_test_voucher' already exists",
                      "request_id": "v-0c8b7e8f78c80e94a2"
                    }
                  },
                  "Too many vouchers requested": {
                    "value": {
                      "code": 400,
                      "key": "too_many_vouchers_requested",
                      "message": "Too many vouchers requested",
                      "details": "Only up to 1 can be published",
                      "request_id": "v-0c8bac9a25c80e912d"
                    }
                  },
                  "Metadata validation failed": {
                    "value": {
                      "code": 400,
                      "key": "metadata_validation_failed",
                      "message": "Metadata validation failed",
                      "details": "ImageURL: must be a URL pointing to JPG/JPEG or PNG resource (actual value is 'http.com')",
                      "request_id": "v-0c8bcbd742080ee807"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if you don't have a specific credentials set up. Navigate to the **Dashboard** &rarr; **Project Settings** &rarr; **General** &rarr; **Integration Keys** to set up a pair of API keys and use them to send the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_integration_key"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "message": "Forbidden",
                      "key": "integration_api_key_required"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cust_xqA7DGj5eYPHg6PHVKwYRWiA",
                      "request_id": "v-0c8b6b35294af6f192",
                      "resource_id": "cust_xqA7DGj5eYPHg6PHVKwYRWiA",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/qualifications": {
      "post": {
        "operationId": "check-eligibility",
        "tags": [
          "Qualifications"
        ],
        "summary": "Check Eligibility",
        "description": "\n> 🚧 The Qualifications endpoint ignores the rules checking:\n> \n> - Limit of total redeemed discount amount per campaign\n> - Limit of total redemptions count per campaign\n> - Redemptions per customer\n> - Redemptions per customer in a campaign \n\nGenerate a list of redeemables that are applicable in the context of the customer and order.\n\nThe new qualifications method is an improved version of [Campaign Qualifications](ref:examine-campaigns-qualification), [Voucher Qualifications](ref:examine-vouchers-qualification), and [Promotions Validation](ref:validate-promotions) API requests. The new qualification method introduces the following improvements:\n\n- Qualification results are returned faster\n- No limit on the number of returned redeemables\n- Introduces new qualification scenarios, not available in the previous version\n\n> 👍 Scenario Guide\n>\n> Read [the dedicated guide](doc:checking-eligibility) to learn about some use cases this endpoint can cover.\n\n## Paging \n\nThe Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the `starting_after` cursor.\n\nTo process of paging the redeemables works in the following manner:\n\n- You send the first API request for Qualifications without the `starting_after` parameter.\n- The response will contain a parameter named `has_more`. If the parameter's value is set to `true`, then more redeemables are available.\n- Get the value of the `created_at` parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables.\n- Send another API request for Qualification with the `starting_after` parameter set to the value taken from the `created_at` parameter from the last returned redeemable.\n- Voucherify will return the next page of redeemables.\n- If the `has_more` parameter is set to `true`, apply steps 3-5 to get the next page of redeemables.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "qualifications"
            ]
          }
        ],
        "requestBody": {
          "description": "Define order and customer context.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QualificationsCheckEligibilityRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a qualifications object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QualificationsCheckEligibilityResponseBody"
                },
                "examples": {
                  "Qualification for bundles": {
                    "value": {
                      "redeemables": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "BUNDLE-PROD-1c",
                            "object": "voucher",
                            "created_at": "2025-03-26T11:00:17.987Z",
                            "result": {
                              "discount": {
                                "type": "AMOUNT",
                                "effect": "APPLY_TO_ITEMS",
                                "amount_off": 900,
                                "aggregated_amount_limit": 9000,
                                "is_dynamic": false
                              },
                              "bundle": {
                                "quantity": 0,
                                "identified": [
                                  {
                                    "id": "prod_0fc35dfe978defeb6b",
                                    "object": "product",
                                    "item_index": 0,
                                    "item_quantity": 1
                                  },
                                  {
                                    "id": "prod_0fc35dfeaa0defeb73",
                                    "object": "product",
                                    "item_index": 1,
                                    "item_quantity": 1
                                  },
                                  {
                                    "id": "prod_0fc35dfeabcdefeb80",
                                    "object": "product",
                                    "item_index": 2,
                                    "item_quantity": 2
                                  }
                                ],
                                "missing": [
                                  {
                                    "id": "prod_0fc35dfe978defeb6b",
                                    "object": "product",
                                    "item_quantity": 1
                                  },
                                  {
                                    "id": "pc_pWu3TzRFhJ99Xak7Z7QlynNa",
                                    "object": "products_collection",
                                    "item_quantity": 2
                                  }
                                ]
                              }
                            },
                            "order": {
                              "amount": 5496,
                              "total_amount": 5496,
                              "items": [
                                {
                                  "object": "order_item",
                                  "id": "ordli_105e1f56dc0bc19187",
                                  "quantity": 1,
                                  "initial_quantity": 1,
                                  "amount": 2499,
                                  "initial_amount": 2499,
                                  "price": 2499,
                                  "subtotal_amount": 2499,
                                  "product": {
                                    "id": "prod_0fc35dfe978defeb6b",
                                    "source_id": "star-th-bottle",
                                    "name": "Star Thermal Bottle",
                                    "metadata": {
                                      "brand": "Star"
                                    },
                                    "price": 2499
                                  }
                                },
                                {
                                  "object": "order_item",
                                  "id": "ordli_105e1f56dc0bc19188",
                                  "quantity": 1,
                                  "initial_quantity": 1,
                                  "amount": 1999,
                                  "initial_amount": 1999,
                                  "price": 1999,
                                  "subtotal_amount": 1999,
                                  "product": {
                                    "id": "prod_0fc35dfeaa0defeb73",
                                    "source_id": "adv-tshirt",
                                    "name": "Adventure T-shirt",
                                    "metadata": {
                                      "brand": "Adventure"
                                    },
                                    "price": 1999
                                  }
                                },
                                {
                                  "object": "order_item",
                                  "id": "ordli_105e1f56dc0bc19189",
                                  "quantity": 2,
                                  "initial_quantity": 2,
                                  "amount": 998,
                                  "initial_amount": 998,
                                  "price": 499,
                                  "subtotal_amount": 998,
                                  "product": {
                                    "id": "prod_0fc35dfeabcdefeb80",
                                    "source_id": "adv-scks",
                                    "name": "Adventure Socks",
                                    "metadata": {
                                      "brand": "Adventure"
                                    },
                                    "price": 499
                                  }
                                }
                              ],
                              "customer_id": null,
                              "referrer_id": null,
                              "object": "order"
                            },
                            "applicable_to": {
                              "data": [
                                {
                                  "object": "products_collection",
                                  "id": "pc_nw1xRgXB8cBzDJSrSbdSqJP4",
                                  "effect": "APPLY_TO_EVERY",
                                  "skip_initially": 0,
                                  "repeat": 1,
                                  "target": "ITEM"
                                }
                              ],
                              "total": 1,
                              "data_ref": "data",
                              "object": "list"
                            },
                            "inapplicable_to": {
                              "data": [],
                              "total": 0,
                              "data_ref": "data",
                              "object": "list"
                            },
                            "metadata": {},
                            "campaign_id": "camp_vzuF8JZdh1tdQqw3R6rS63ci",
                            "campaign_name": "Bundle-Product-Discount",
                            "validation_rules_assignments": {
                              "object": "list",
                              "data_ref": "data",
                              "data": [
                                {
                                  "id": "asgm_e9RsrtXBMCJ5ti1S",
                                  "rule_id": "val_g1rAIcaPuxAd",
                                  "related_object_id": "v_XXSJVTBFFKLPiy585UqtTPiYJMF1bnBW",
                                  "related_object_type": "voucher",
                                  "object": "validation_rules_assignment",
                                  "validation_status": "VALID"
                                }
                              ],
                              "total": 1
                            }
                          }
                        ],
                        "total": 1,
                        "has_more": true,
                        "more_starting_after": "2025-03-26T11:00:17.987Z"
                      },
                      "tracking_id": "track_C7TLT9aBmso=",
                      "order": {
                        "items": [
                          {
                            "object": "order_item",
                            "id": "ordli_105e1f56dc0bc19187",
                            "quantity": 1,
                            "product": {
                              "id": "prod_0fc35dfe978defeb6b",
                              "source_id": "star-th-bottle",
                              "name": "Star Thermal Bottle",
                              "metadata": {
                                "brand": "Star"
                              },
                              "price": 2499
                            }
                          },
                          {
                            "object": "order_item",
                            "id": "ordli_105e1f56dc0bc19188",
                            "quantity": 1,
                            "product": {
                              "id": "prod_0fc35dfeaa0defeb73",
                              "source_id": "adv-tshirt",
                              "name": "Adventure T-shirt",
                              "metadata": {
                                "brand": "Adventure"
                              },
                              "price": 1999
                            }
                          },
                          {
                            "object": "order_item",
                            "id": "ordli_105e1f56dc0bc19189",
                            "quantity": 2,
                            "product": {
                              "id": "prod_0fc35dfeabcdefeb80",
                              "source_id": "adv-scks",
                              "name": "Adventure Socks",
                              "metadata": {
                                "brand": "Adventure"
                              },
                              "price": 499
                            }
                          }
                        ],
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "stacking_rules": {
                        "redeemables_limit": 30,
                        "applicable_redeemables_limit": 5,
                        "applicable_exclusive_redeemables_limit": 1,
                        "exclusive_categories": [],
                        "joint_categories": [],
                        "redeemables_application_mode": "PARTIAL",
                        "redeemables_sorting_rule": "REQUESTED_ORDER",
                        "redeemables_no_effect_rule": "REDEEM_ANYWAY",
                        "redeemables_products_application_mode": "STACK",
                        "redeemables_rollback_order_mode": "WITH_ORDER"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/validations": {
      "post": {
        "operationId": "validate-stacked-discounts",
        "tags": [
          "Validations"
        ],
        "summary": "Validate Stackable Discounts",
        "description": "Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validations"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationsValidateRequestBody"
              },
              "examples": {
                "Sandbox onboarding validation": {
                  "value": {
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "BLCKFRDY"
                      }
                    ],
                    "order": {
                      "amount": 5500
                    }
                  }
                },
                "1 Redeemable": {
                  "value": {
                    "customer": {
                      "source_id": "sample_customer",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "voucher-code"
                      }
                    ],
                    "session": {
                      "type": "LOCK"
                    },
                    "order": {
                      "amount": 55000,
                      "status": "PAID",
                      "items": [
                        {
                          "quantity": 2,
                          "price": 20000,
                          "source_id": "sample product1",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        },
                        {
                          "quantity": 1,
                          "price": 15000,
                          "source_id": "sample product2",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ],
                      "metadata": {
                        "key": "value"
                      }
                    }
                  }
                },
                "5 Redeemables": {
                  "value": {
                    "customer": {
                      "source_id": "36_bob"
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "GNcuPKGe"
                      },
                      {
                        "object": "voucher",
                        "id": "AnsvocvP",
                        "reward": {
                          "id": "rew_EPx1hCTpqzF0HW1z9NKckZH4"
                        }
                      },
                      {
                        "object": "voucher",
                        "id": "M3X8IwW8",
                        "gift": {
                          "credits": 100
                        }
                      },
                      {
                        "object": "promotion_tier",
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W"
                      },
                      {
                        "object": "promotion_tier",
                        "id": "promo_NDHgTg4VnOLYNjk9r7WOmQxf"
                      }
                    ],
                    "session": {
                      "type": "LOCK"
                    },
                    "order": {
                      "items": [
                        {
                          "sku_id": "sku_0a3efc90375d1217e2",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0bc3bd8a4e072c5275",
                          "quantity": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationsValidateResponseBody"
                },
                "examples": {
                  "False": {
                    "value": {
                      "id": "valid_101740aa2869354c6d",
                      "valid": false,
                      "redeemables": [
                        {
                          "status": "INAPPLICABLE",
                          "id": "eee33463",
                          "object": "voucher",
                          "result": {
                            "error": {
                              "code": 404,
                              "key": "not_found",
                              "message": "Resource not found",
                              "details": "Cannot find voucher with id eee33463",
                              "request_id": "v-0c6c6e20dc42940f0b",
                              "resource_id": "eee33463",
                              "resource_type": "voucher"
                            }
                          }
                        },
                        {
                          "status": "SKIPPED",
                          "id": "promo_Mwy9XpA0TLctSGriM5kum0qp",
                          "object": "promotion_tier",
                          "result": {}
                        }
                      ],
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw=="
                    }
                  },
                  "True - 5 Redeemables": {
                    "value": {
                      "valid": true,
                      "redeemables": [
                        {
                          "status": "APPLICABLE",
                          "id": "GNcuPKGe",
                          "object": "voucher",
                          "order": {
                            "amount": 2700,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 1700,
                            "total_amount": 1000,
                            "items_applied_discount_amount": 1700,
                            "total_applied_discount_amount": 1700,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "applied_discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "applied_discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [
                              {
                                "object": "products_collection",
                                "id": "pc_a11pr0dUc75",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "sku",
                                "id": "sku_0a3efc90375d1217e2",
                                "source_id": "test_standard_ultra_hd",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "product_source_id": "test_prod_id_2",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0bc3bd8a4e072c5275",
                                "source_id": "prod_0bc3bd8a4e072c5275",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 3,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "discount": {
                              "type": "AMOUNT",
                              "effect": "APPLY_TO_ITEMS",
                              "amount_off": 1000,
                              "is_dynamic": false
                            }
                          },
                          "metadata": {},
                          "categories": []
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "AnsvocvP",
                          "object": "voucher",
                          "order": {
                            "amount": 2700,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 1700,
                            "total_amount": 1000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "loyalty_card": {
                              "points": 4
                            }
                          },
                          "metadata": {},
                          "categories": [
                            {
                              "id": "cat_0bb81a481615a37b5e",
                              "name": "Second",
                              "hierarchy": 2,
                              "created_at": "2022-09-20T05:58:01.561Z",
                              "object": "category"
                            }
                          ]
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "M3X8IwW8",
                          "object": "voucher",
                          "order": {
                            "amount": 2700,
                            "discount_amount": 100,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 1800,
                            "total_amount": 900,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "gift": {
                              "credits": 100
                            }
                          },
                          "metadata": {},
                          "categories": []
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                          "object": "promotion_tier",
                          "order": {
                            "amount": 2700,
                            "discount_amount": 460,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 2160,
                            "total_amount": 540,
                            "applied_discount_amount": 360,
                            "total_applied_discount_amount": 360,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [
                              {
                                "object": "sku",
                                "id": "sku_0a3efc90375d1217e2",
                                "source_id": "test_standard_ultra_hd",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "product_source_id": "test_prod_id_2",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0bc3bd8a4e072c5275",
                                "source_id": "prod_0bc3bd8a4e072c5275",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 2,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [
                              {
                                "object": "product",
                                "id": "prod_0b2c2ddf35150b83bb",
                                "source_id": "97",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 1,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "discount": {
                              "type": "PERCENT",
                              "effect": "APPLY_TO_ORDER",
                              "percent_off": 40,
                              "is_dynamic": false
                            }
                          },
                          "metadata": {}
                        },
                        {
                          "status": "APPLICABLE",
                          "id": "promo_NDHgTg4VnOLYNjk9r7WOmQxf",
                          "object": "promotion_tier",
                          "order": {
                            "amount": 2700,
                            "discount_amount": 490,
                            "items_discount_amount": 1700,
                            "total_discount_amount": 2190,
                            "total_amount": 510,
                            "applied_discount_amount": 30,
                            "total_applied_discount_amount": 30,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "sku_id": "sku_0a3efc90375d1217e2",
                                "quantity": 1,
                                "amount": 2000,
                                "discount_amount": 1000,
                                "price": 2000,
                                "subtotal_amount": 1000,
                                "product": {
                                  "id": "prod_s3C0nDpr0DuC7",
                                  "source_id": "test_prod_id_2",
                                  "name": "Watchflix"
                                },
                                "sku": {
                                  "id": "sku_0a3efc90375d1217e2",
                                  "source_id": "test_standard_ultra_hd",
                                  "sku": "Premium",
                                  "price": 2000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bc3bd8a4e072c5275",
                                "quantity": 1,
                                "amount": 700,
                                "discount_amount": 700,
                                "price": 700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bc3bd8a4e072c5275",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 700
                                }
                              }
                            ],
                            "metadata": {},
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "applicable_to": {
                            "data": [
                              {
                                "object": "sku",
                                "id": "sku_0a3efc90375d1217e2",
                                "source_id": "test_standard_ultra_hd",
                                "product_id": "prod_s3C0nDpr0DuC7",
                                "product_source_id": "test_prod_id_2",
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0bc3bd8a4e072c5275",
                                "source_id": "prod_0bc3bd8a4e072c5275",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 2,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [
                              {
                                "object": "product",
                                "id": "prod_0b2c2ddf35150b83bb",
                                "source_id": "97",
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 1,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "result": {
                            "discount": {
                              "type": "AMOUNT",
                              "effect": "APPLY_TO_ORDER",
                              "amount_off": 30,
                              "is_dynamic": false
                            }
                          },
                          "metadata": {}
                        }
                      ],
                      "order": {
                        "amount": 2700,
                        "discount_amount": 490,
                        "items_discount_amount": 1700,
                        "total_discount_amount": 2190,
                        "total_amount": 510,
                        "applied_discount_amount": 490,
                        "items_applied_discount_amount": 1700,
                        "total_applied_discount_amount": 2190,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_s3C0nDpr0DuC7",
                            "sku_id": "sku_0a3efc90375d1217e2",
                            "quantity": 1,
                            "amount": 2000,
                            "discount_amount": 1000,
                            "applied_discount_amount": 1000,
                            "price": 2000,
                            "subtotal_amount": 1000,
                            "product": {
                              "id": "prod_s3C0nDpr0DuC7",
                              "source_id": "test_prod_id_2",
                              "name": "Watchflix"
                            },
                            "sku": {
                              "id": "sku_0a3efc90375d1217e2",
                              "source_id": "test_standard_ultra_hd",
                              "sku": "Premium",
                              "price": 2000
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 1,
                            "amount": 700,
                            "discount_amount": 700,
                            "applied_discount_amount": 700,
                            "price": 700,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0bc3bd8a4e072c5275",
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "session": {
                        "key": "ssn_pkJfPcWAgp9WyHpA62Eky8X8SzxpKub2",
                        "type": "LOCK",
                        "ttl": 7,
                        "ttl_unit": "DAYS"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is missing an `\"object\"` or `\"id\"` property in the redeemables array, if you add more than one promotion stack or attempt to join stacks with vouchers/promotion tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .redeemables[1] should have required property 'id'",
                      "request_id": "v-0b4ff38ab8c8164573"
                    }
                  },
                  "Duplicated Redeemables": {
                    "value": {
                      "code": 400,
                      "key": "duplicated_redeemables",
                      "message": "Duplicated redeemables detected",
                      "details": "Duplicated redeemables detected in one redemption",
                      "request_id": "v-0b4ffecfb408165300"
                    }
                  },
                  "Invalid Redeemables": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redeemables",
                      "message": "Invalid redeemables",
                      "details": "Promotion Stack cannot be use with other redeemables",
                      "request_id": "v-0b5007812f48165d6b"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/redemptions": {
      "get": {
        "operationId": "list-redemptions",
        "tags": [
          "Redemptions"
        ],
        "summary": "List Redemptions",
        "description": "Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. \n\n## Filtering results\nThe result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date:\n`https://api.voucherify.io/v1/redemptions?limit=3&[created_at][before]=2017-09-08T13:52:18.227Z`. A filter based on the object `created_at` field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: `[created_at][after]`, `[created_at][before]`. 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`.\n\n## Failed Redemptions\n\nA redemption may fail for various reasons. You can figure out an exact reason from the `failure_code`:\n- `resource_not_found` - voucher with given code does not exist\n- `voucher_not_active` - voucher is not active yet (before start date)\n- `voucher_expired` - voucher has already expired (after expiration date)\n- `voucher_disabled` -  voucher has been disabled (`active: false`)\n- `quantity_exceeded` - voucher's redemptions limit has been exceeded\n- `gift_amount_exceeded` - gift amount has been exceeded\n- `customer_rules_violated` - customer did not match the segment\n- `order_rules_violated` - order did not match validation rules\n- `invalid_order` - order was specified incorrectly\n- `invalid_amount` - order amount was specified incorrectly\n- `missing_amount` - order amount was not specified\n- `missing_order_items` - order items were not specified\n- `missing_customer` - customer was not specified",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterPage99"
            },
            "description": "Which page of results to return. The lowest value is `1`, the highest value is `99`."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "result",
            "description": "A filter on the list based on the redemption result. Available options are: `SUCCESS`, `FAILURE`. You can provide multiple values by repeating the param."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "campaign",
            "description": "A filter by the campaign **name** that the redemption resources originate from."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCustomerId"
            },
            "in": "query",
            "name": "customer",
            "description": "Return redemptions performed by the customer with given `id` or `source_id`."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListRedemptions"
            },
            "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."
          },
          {
            "$ref": "#/components/parameters/created_at"
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListRedemptions"
            },
            "description": "Filters for listing responses.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of redemption objects. Each entry in the array is a separate redemption object. If no more redemptions are available, the resulting array will be empty. If you provide a non-existent customer ID, this call returns an empty object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "redemptions",
                      "redemptions": [
                        {
                          "id": "r_0c0469eaf705889d99",
                          "object": "redemption",
                          "date": "2022-11-18T12:30:32.622Z",
                          "customer_id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                          "tracking_id": "track_5DQxXbK0C0pvAaHk7mnulhyMBo7VratI",
                          "metadata": {
                            "store_names": "Store 2 - Florida - Miami"
                          },
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_ndw5rQJt12zvZ4upF72a3ljh",
                            "source_id": null,
                            "created_at": "2022-11-18T12:30:31.338Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 9680000,
                            "items_discount_amount": 9450000,
                            "total_discount_amount": 9450000,
                            "total_amount": 230000,
                            "items_applied_discount_amount": 9450000,
                            "total_applied_discount_amount": 9450000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae2dc5a090fd0184",
                                "sku_id": "sku_0bae3b28f610fd0da1",
                                "quantity": 45,
                                "discount_quantity": 45,
                                "initial_quantity": 0,
                                "amount": 9450000,
                                "discount_amount": 9450000,
                                "initial_amount": 0,
                                "applied_discount_amount": 9450000,
                                "price": 210000,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bae2dc5a090fd0184",
                                  "source_id": "first_product",
                                  "name": "Samsung Phone 1",
                                  "price": 220000
                                },
                                "sku": {
                                  "id": "sku_0bae3b28f610fd0da1",
                                  "source_id": "first_product_sku_1",
                                  "sku": "Samsung phone 256GB",
                                  "price": 210000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                              "object": "customer"
                            },
                            "customer_id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0c0469eaf705889d99": {
                                "date": "2022-11-18T12:30:31.388Z",
                                "related_object_type": "promotion_tier",
                                "related_object_id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                                "related_object_parent_id": "camp_40LC42P5NFbkkD4RWoJ4btks"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_qBwHpagDOFu71Z3F22UzR80X",
                            "name": "Bob Jones",
                            "email": "bob.smith@email.com",
                            "source_id": "pub_source_customer_5_a",
                            "metadata": {
                              "lang": "en",
                              "test": true
                            },
                            "object": "customer"
                          },
                          "related_object_type": "promotion_tier",
                          "related_object_id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                          "voucher": null,
                          "promotion_tier": {
                            "id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                            "campaign": {
                              "id": "camp_40LC42P5NFbkkD4RWoJ4btks"
                            }
                          }
                        },
                        {
                          "id": "r_0bf9cf0a8b12dc5ba6",
                          "object": "redemption",
                          "date": "2022-11-10T06:49:03.835Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "amount": 200,
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_jAifScsbOqxgb12hLu7hXrLU",
                            "source_id": null,
                            "created_at": "2022-11-10T06:49:02.703Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 4500,
                            "discount_amount": 4000,
                            "total_discount_amount": 4000,
                            "total_amount": 500,
                            "applied_discount_amount": 4000,
                            "total_applied_discount_amount": 4000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 3,
                                "amount": 4500,
                                "price": 1500,
                                "subtotal_amount": 4500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "object": "customer"
                            },
                            "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bf9cf0a8b12dc5ba6": {
                                "date": "2022-11-10T06:49:02.764Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                                "related_object_parent_id": "camp_fkZ28pe7DUAEmmabofkxHI8N"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bobby McDonald",
                            "email": "bobby.mcdonald@email.com",
                            "source_id": "bobby.mcdonald@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook",
                              "customer_life_time_value": 100
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                          "voucher": {
                            "id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                            "code": "LT1-wMPnRhxb",
                            "campaign": "Loyalty Campaign - Tiers - 1",
                            "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N"
                          },
                          "reward": {
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "name": "Bobby McDonald",
                              "email": "bobby.mcdonald@email.com",
                              "source_id": "bobby.mcdonald@email.com",
                              "metadata": {
                                "acquisition_channel": "Facebook",
                                "customer_life_time_value": 100
                              },
                              "object": "customer"
                            },
                            "assignment_id": "rewa_nMXB59qGTNYawMT8eP8M4oUp",
                            "id": "rew_MVXA2kV7lZ1zC057WUaTrvNz",
                            "object": "reward",
                            "name": "100 Points = $20",
                            "created_at": "2022-09-09T06:41:54.496Z",
                            "updated_at": null,
                            "parameters": {
                              "coin": {
                                "exchange_ratio": 20,
                                "points_ratio": 100
                              }
                            },
                            "type": "COIN"
                          },
                          "loyalty_card": {
                            "points": 200
                          }
                        },
                        {
                          "id": "rf_0bf9caf744d2dc593a",
                          "object": "redemption",
                          "date": "2022-11-10T06:31:15.477Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "result": "FAILURE",
                          "failure_code": "loyalty_card_points_exceeded",
                          "failure_message": "loyalty card points exceeded",
                          "order": null,
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bobby McDonald",
                            "email": "bobby.mcdonald@email.com",
                            "source_id": "bobby.mcdonald@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook",
                              "customer_life_time_value": 100
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                          "voucher": {
                            "id": "v_Xak3ViMbxCH8Lb4ZG0lWwC0goMRBXWB4",
                            "code": "LT1-wMPnRhxb",
                            "campaign": "Loyalty Campaign - Tiers - 1",
                            "campaign_id": "camp_fkZ28pe7DUAEmmabofkxHI8N"
                          }
                        },
                        {
                          "id": "rf_0bf8c023eb4d4aa4ad",
                          "object": "redemption",
                          "date": "2022-11-09T11:05:28.074Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "result": "FAILURE",
                          "failure_code": "customer_rules_violated",
                          "failure_message": "customer does not match validation rules",
                          "order": null,
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bob Smith",
                            "email": "bob.smith@email.com",
                            "source_id": "bob.smith@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook"
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                          "voucher": {
                            "id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                            "code": "3rqWOTAh",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0ba9fa02fcd28ed8f1",
                          "object": "redemption",
                          "date": "2022-09-09T06:38:20.085Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "amount": 300,
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_G9LBb5SOPa36pHdwxUvzkw4P",
                            "source_id": null,
                            "created_at": "2022-09-09T06:38:17.984Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 4600,
                            "items_discount_amount": 300,
                            "total_discount_amount": 300,
                            "total_amount": 4300,
                            "items_applied_discount_amount": 300,
                            "total_applied_discount_amount": 300,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1600,
                                "price": 1600,
                                "subtotal_amount": 1600,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 1600
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1600
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a65b3ff8592d7a5b5",
                                "quantity": 1,
                                "amount": 3000,
                                "discount_amount": 300,
                                "applied_discount_amount": 300,
                                "price": 3000,
                                "subtotal_amount": 2700,
                                "product": {
                                  "id": "prod_0a65b3ff8592d7a5b5",
                                  "name": "Koffee Cup",
                                  "price": 3000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "object": "customer"
                            },
                            "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0ba9fa02fcd28ed8f1": {
                                "date": "2022-09-09T06:38:18.099Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40",
                                "related_object_parent_id": "camp_hC2GdqYtOmTT45zfhib62cK1"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Bob Smith",
                            "email": "bob.smith@email.com",
                            "source_id": "bob.smith@email.com",
                            "metadata": {},
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40",
                          "voucher": {
                            "id": "v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40",
                            "code": "vTcguVLE",
                            "campaign": "SL-Gift",
                            "campaign_id": "camp_hC2GdqYtOmTT45zfhib62cK1"
                          },
                          "gift": {
                            "amount": 300
                          }
                        },
                        {
                          "id": "rf_0bf8bfe0808d4aa473",
                          "object": "redemption",
                          "date": "2022-11-09T11:04:19.062Z",
                          "customer_id": null,
                          "tracking_id": null,
                          "metadata": {},
                          "result": "FAILURE",
                          "failure_code": "missing_customer",
                          "failure_message": "Missing customer",
                          "order": null,
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": null,
                          "related_object_type": "voucher",
                          "related_object_id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                          "voucher": {
                            "id": "v_FGQjOjqasEbbdpnySdCpUoalJio3OHWK",
                            "code": "3rqWOTAh",
                            "campaign_id": null
                          }
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "redeem-stacked-discounts",
        "tags": [
          "Redemptions"
        ],
        "summary": "Redeem Stackable Discounts",
        "description": "## How API returns calculated discounts and order amounts in the response\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts |\n| discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts |\n| total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts |\n| applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n\n> 📘 Also available on client-side\n>\n> This method is also accessible through public keys which you can use in client-side​ apps: mobile and web browser apps. Go to the dedicated [endpoint](ref:redeem-stacked-discounts-client-side) to learn more.\n> - Use `X-Client-Application-Id` as the application ID header.\n> - Use `X-Client-Token` as the appliction secret key header.\n> - Use client-side base URL.\n> - Use an `origin` header for your custom domain.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedemptionsRedeemRequestBody"
              },
              "examples": {
                "Sandbox onboarding redemption": {
                  "value": {
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "BLCKFRDY"
                      }
                    ],
                    "order": {
                      "amount": 5500
                    }
                  }
                },
                "General example": {
                  "value": {
                    "customer": {
                      "source_id": "sample_customer",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "voucher-code"
                      }
                    ],
                    "session": {
                      "type": "LOCK",
                      "key": "session_key"
                    },
                    "order": {
                      "amount": 55000,
                      "status": "PAID",
                      "items": [
                        {
                          "quantity": 2,
                          "price": 20000,
                          "source_id": "sample product1",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        },
                        {
                          "quantity": 1,
                          "price": 15000,
                          "source_id": "sample product2",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ],
                      "metadata": {
                        "key": "value"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid redemption. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsRedeemResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers": {
      "get": {
        "operationId": "list-vouchers",
        "tags": [
          "Vouchers"
        ],
        "summary": "List Vouchers",
        "description": "Returns a list of vouchers. By default, the vouchers are returned sorted by creation date, with the most recent vouchers appearing first. A maximum of 100 vouchers are returned in the response.\n\nWhen you get a list of vouchers, you can optionally specify query parameters to customize the number of vouchers returned per call using `limit`, which page of vouchers to return using `page`, sort the vouchers using the `order` query parameter and more.\n\nThis method will return an error when trying to return a limit of more than 100 vouchers.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterPage99"
            },
            "description": "Which page of results to return. The lowest value is `1`, the highest value is `99`."
          },
          {
            "$ref": "#/components/parameters/category"
          },
          {
            "in": "query",
            "name": "campaign_id",
            "description": "Limit search results to vouchers within the specified campaign",
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignId"
            }
          },
          {
            "$ref": "#/components/parameters/customer"
          },
          {
            "$ref": "#/components/parameters/campaign"
          },
          {
            "$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",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary that contains an array of vouchers. Each entry in the array is a separate voucher object. If no more vouchers are available (query parameter `page` incremented over and above the voucher count), the resulting array will be empty. The result can be narrowed down according to specified (or default) filters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "vouchers",
                      "vouchers": [
                        {
                          "id": "v_hrMBBeT4sOP9VSGPmj5KAgJwX202UjiY",
                          "code": "LOYALTY-CARD-xLPbpbXR",
                          "campaign": "Loyalty Program Fall 2022",
                          "campaign_id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
                          "category": "First",
                          "category_id": "cat_0bb343dee3cdb5ec0c",
                          "categories": [
                            {
                              "id": "cat_0bb343dee3cdb5ec0c",
                              "name": "First",
                              "hierarchy": 1,
                              "created_at": "2022-09-16T11:47:19.568Z",
                              "object": "category"
                            }
                          ],
                          "type": "LOYALTY_CARD",
                          "discount": null,
                          "gift": null,
                          "loyalty_card": {
                            "points": 110,
                            "balance": 100,
                            "next_expiration_date": "2023-12-31",
                            "next_expiration_points": 100
                          },
                          "start_date": null,
                          "expiration_date": null,
                          "validity_timeframe": null,
                          "validity_day_of_week": null,
                          "active": true,
                          "additional_info": null,
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX19OrTPNyUztbNretF7tPRL4ZlUDPAUXVGL9e5UCPh6dic8zXEP8/6I6hUEqtz/F6IMIghWz1ljdjzpdizGHG3HZBw4c19fd8SD/DjhBRDSr8APqKGpZTLKe4QC2gislFTeDAq2lmJb6T1oOTBUGkUEwMgEX1Vlco9A=",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX1/SpYuOrU9wd6/o1wzy6E/04wURHJ1xuMutzkIUx6OBTmHX5BO8XZRmEFHkgjC5eWJ27ArgAruJfwRXWuQfTNFD4raI9YvIiQNEzsZ0ydxwKBqJ/FJtiw69djuzQk1f4HdQo8s5gaZ7fd2U+1zbaeAvi9usyvRHZE4=",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-09-19T07:56:22.355Z",
                          "updated_at": "2022-09-19T08:04:22.458Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 1,
                            "redeemed_points": 10,
                            "object": "list",
                            "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        },
                        {
                          "id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2bn",
                          "code": "AmountDiscount",
                          "campaign": null,
                          "campaign_id": null,
                          "category": "First",
                          "category_id": "cat_0bb343dee3cdb5ec0c",
                          "categories": [
                            {
                              "id": "cat_0bb343dee3cdb5ec0c",
                              "name": "First",
                              "hierarchy": 1,
                              "created_at": "2022-09-16T11:47:19.568Z",
                              "object": "category"
                            }
                          ],
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 400,
                            "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                            "effect": "APPLY_TO_ORDER"
                          },
                          "gift": null,
                          "loyalty_card": null,
                          "start_date": "2022-09-01T00:00:00.000Z",
                          "expiration_date": "2022-10-31T00:00:00.000Z",
                          "validity_timeframe": null,
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4,
                            5
                          ],
                          "active": true,
                          "additional_info": "This voucher discount is based on a formula, payment must be using VISA, and order must be over $100.",
                          "metadata": {},
                          "assets": {
                            "qr": {
                              "id": "U2FsdGVkX18tV6jdzxWPwEzjeiX4DoM06JpwaoKUNGMNx4Td5e8FwA68uIHQwPaRpJr9CUCpiP4IsSD8nEJn1YtEv6FnY83wIv7uljYoQOYmMPyhKec8Ct3zH7KurMGuj4Fhws3HNA3bqP5MYEy+aA==",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "U2FsdGVkX181+WljOgxIt9Jg1Urbuv226+8Ug0DIyZiI0WtThPNYKZZEodzqQpIsGSdrDGXr2chLo+4FH3Ey8G2YXCPM6nUhZRSMF5oL3+uNjcLtBvb7MF5+ynY5fIgpXolwUK0R/BuT4Pa8prhgTg==",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2022-09-12T07:51:02.145Z",
                          "updated_at": "2022-09-19T08:29:12.566Z",
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 2,
                            "object": "list",
                            "url": "/v1/vouchers/AmountDiscount/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/AmountDiscount/publications?page=1&limit=10"
                          },
                          "object": "voucher"
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "generate-random-code",
        "tags": [
          "Vouchers"
        ],
        "summary": "Generate Random Code",
        "description": "Create a generic (standalone) vouchers. You can choose to create a `GIFT_VOUCHER`, a `DISCOUNT_VOUCHER`, or a `LOYALTY_CARD`. \n\nWhen you create a new voucher, you can specify a type to create it.\nCreating a new voucher will create a new generic (standalone) vouchers if no `campaign` name or `campaign_id` is provided. However, if an ID or name of a campaign with the `type` set to `STANDALONE` is provided, the voucher will be added to such campaign. In case of the loyalty card, a campaign name is required.\n\nYou can optionally use the `code` parameter to define a specific code or the `code_config` parameter to design rules for Voucherify API to create a random code. If neither of the two parameters are passed, then a random code is generated by the Voucherify API.\n\nThis method will return an error when trying to create a voucher that already exists.\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.\n>\n>Voucherify developers work on adding an optional feature to create a generic (standalone) vouchers campaign through the API.\n>\n>Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the voucher that you would like to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersCreateRequestBody"
              },
              "examples": {
                "Percentage Discount": {
                  "value": {
                    "category": "New Customers",
                    "code": "NEW-WELCOME-COUPON",
                    "type": "DISCOUNT_VOUCHER",
                    "campaign_id": "camp_Y6dLsYIZloGqP8izufXY6SSJ",
                    "discount": {
                      "percent_off": 10,
                      "type": "PERCENT",
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2016-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 10
                    },
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "validation_rules": [
                      "val_4j7DCRm2IS59"
                    ]
                  }
                },
                "Gift Card": {
                  "value": {
                    "category": "New Customers",
                    "type": "GIFT_VOUCHER",
                    "gift": {
                      "amount": 10000,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2022-01-01T00:00:00Z",
                    "active": true,
                    "additional_info": "This gift card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "code_config": {
                      "pattern": "GIFT-CARD-##########",
                      "prefix": "New-",
                      "postfix": "0",
                      "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "category": "New Customers",
                    "campaign": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                    "type": "LOYALTY_CARD",
                    "loyalty_card": {
                      "points": 10000
                    },
                    "additional_info": "This loyalty card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "code_config": {
                      "pattern": "LOYALTY-CARD-##",
                      "prefix": "New-",
                      "postfix": "1",
                      "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                    }
                  }
                },
                "Unit Discount Multiple Items": {
                  "value": {
                    "category": "New Customers",
                    "code": "MultipleUnitTypesUnitDiscount",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "UNIT",
                      "effect": "ADD_MANY_ITEMS",
                      "units": [
                        {
                          "unit_off": 1,
                          "unit_type": "prod_0a9f9ab4ab019a42d5",
                          "effect": "ADD_NEW_ITEMS"
                        },
                        {
                          "unit_off": 1,
                          "unit_type": "prod_0a9f9aeddb019a42db",
                          "effect": "ADD_MISSING_ITEMS"
                        }
                      ]
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 5
                    },
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    }
                  }
                },
                "Unit Discount Single Item": {
                  "value": {
                    "category": "New Customers",
                    "code": "AddMissingItemDiscount",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "UNIT",
                      "unit_off": 1,
                      "unit_type": "prod_0a9f9ab4ab019a42d5",
                      "effect": "ADD_MISSING_ITEMS"
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 3
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a voucher object if the call succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersCreateResponseBody"
                },
                "examples": {
                  "Percentage Discount": {
                    "value": {
                      "id": "v_YJYfeKoR0XAGIvaM7k51wTbDjU4WIpC5",
                      "code": "NEW-WELCOME-COUPON",
                      "campaign": "Bug fix",
                      "campaign_id": "camp_Y6dLsYIZloGqP8izufXY6SSJ",
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 10,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2016-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX180g6GhUA0kT47tHGvZ5thjCgY5nbsPtiecixkkEznFVg2v3SDG9dpCbXR6BSUdM/d78Wm/zru1ybT4+AQ2X0JnEy86N7TZ/aoezZORjcBRUfyVM/scUUF/vmD4Ezn+Elp2+V9AFcAXN/WthaRMl9e7xvEeIEQ5nao=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/AynivxYCEIxfTnf3A1lO0xsNihOlbUMo6Y6873LQ2qpmkk90aUFnaFKd7pVumcirRweblzGVSxy24Phhd174VSPaLxxmSKp0FPv0dRos/XWBg8zu0Kta0pA/yvFK3WWGlNoPPPnvEhVWKKzOr09Gj94SMrr+TGlI=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T07:14:40.096Z",
                      "updated_at": null,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_COu5PJAsWmAwuCqR",
                            "rule_id": "val_4j7DCRm2IS59",
                            "related_object_id": "v_YJYfeKoR0XAGIvaM7k51wTbDjU4WIpC5",
                            "related_object_type": "voucher",
                            "created_at": "2022-02-17T07:14:40.280Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": 10,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/NEW-WELCOME-COUPON/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/NEW-WELCOME-COUPON/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Voucher": {
                    "value": {
                      "id": "v_yAZyBimXtF9yQ2C5BEF9WMhNzOMJNfz6",
                      "code": "New-GIFT-CARD-8tqB6FcyhE0",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 10000,
                        "balance": 10000,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "loyalty_card": null,
                      "start_date": "2022-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This gift card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+pm0q3U4i/KrjResuZpwDigEa5WcDOlwYS/bj3rsesZXDpJF5MNHMUsKqy0+wn5tY3QbjPGv0dwbqRn/OjrIRgNlP99azD0n0n9C/chiTABp8BxlJmMKKFo5AggBbQu4+Mw8Cv8V3+0Ga7ETzeehS+Yrj6c+3ioxg=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/UaGX0zV8oXbpYah2G76V1ljYSy6hDSnWAZhpz5v10vRibGaOJUahyLcClMyxAsUhU9WXWi4BUGWIEEu510AxzxyGHOTDTjavJH0Q79PI0ciLHdujNFOgLOXWe9Ffwzj+Kvjmbhb22/SVZd/xzQlUBJcv7XboJYU0=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T07:49:10.834Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_amount": 0,
                        "object": "list",
                        "url": "/v1/vouchers/New-GIFT-CARD-8tqB6FcyhE0/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/New-GIFT-CARD-8tqB6FcyhE0/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "v_tVkcOhjHCz9W7q8QnuJnTGPBR2hdaYrC",
                      "code": "New-LOYALTY-CARD-UC1",
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                      "category": "New Customers",
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 10000,
                        "balance": 10000
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This loyalty card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+6lGBFlqtS9OoY2wbAsoSupV43qa+g5sGu+R0IDTq2k85LIfbKfV9sDSYv80pP9ucsazJ6qGI9ineqQyhv9VVHdsJ2qGRiuZzpw/vRkSA0a7J9N1MpANgzqpIULZHLjYtrCQ/2el72nZ6Hpr2NkWtk19JTpNwB8tk=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX180bvJVsyZvpAqwYXTnm4MvvH4Rur+ZhM+Mbmnva/fgYUcUbOttsFXPY/PMZ9Xi8pomVp26a7amIPguNimD8w4PMZLMavMtH7EtJ4k+0V0Wp7JUkudIKeRw2fDnQ3/0cgqvK6PMReUwFWb5nUT3ABpZDAdaOVoMDhE=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T08:06:41.091Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/New-LOYALTY-CARD-UC1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/New-LOYALTY-CARD-UC1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount Multiple Items": {
                    "value": {
                      "id": "v_cu8nyozvTDA413H17bH5BLha0cjxt7s8",
                      "code": "MultipleUnitTypesUnitDiscount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9ab4ab019a42d5",
                            "effect": "ADD_NEW_ITEMS"
                          },
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_MISSING_ITEMS"
                          }
                        ]
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+ocJBtZ9NqT97gZ/QTfOz54TAoRoKO3tnCYBtHZWMghEHT0b2aFrPSL1lqMyf6fYy6DH2/DkH5p5Vd8dOozW1LV6wPVatWpa1lZMeMIB0OcARCW3q+3QydoW2KdliLKyksFwumH9C7Fsnj6HTaEbUjSttTZE/be+o=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+Sly3IYj3EbZFHGGNxV6Ns4j76O8d0kRQe3WriJz5qY6s4GBIwlsdy13AciaQuiVt232HlOlZ4TzGaSSk3+ZMldwBGaTp/fIN9SGBW/NVUtfDOI2sIDLZCBBrdK7WVvtCQQ+1Y+6qClYg/QurJExCFRkDeKpKjDug=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T06:27:45.619Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 5,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount Single Item": {
                    "value": {
                      "id": "v_NQdraO4fXWYvMMWYL9OY22hRernr553n",
                      "code": "AddMissingItemDiscount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_type": "prod_0a9f9ab4ab019a42d5",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19Yh7LTNyOVKSXQ+ceTr023saElWAUeucwOgjTH50x1SoSF/PP1aoGBr6sSxHZNZOvBGumWNHjsF85y7cPY7La/4a0d1kWqnAiBWeWnGOgDFeQFqthGswypFOK1jdAzUPqLSbxW3O6q936N6Bsmoz4QHYE//kfWFhs=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+RqzgyYsIJzAEBxmQt1OZLu4+PSUDQBldDKK1o5XsEoBSQEMPWHis1wJSg4ZNqJ9ZdJ0Ukc+K6X1fjg0ggDsCdXP2ZxpyGPD8/1ReggJZ/tq823ji7A5pzhG1TljA6+vmISuHvs2wkcum0djN9AWuAlB0F/vbXexo=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T06:46:44.536Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 3,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/AddMissingItemDiscount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/AddMissingItemDiscount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the data is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Generating codes in a standalone campaign": {
                    "value": {
                      "code": 400,
                      "key": "invalid_campaign",
                      "message": "Invalid Campaign",
                      "details": "You can not generate vouchers for STANDALONE type campaign.",
                      "request_id": "v-0fb693bc77afe22320"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "in": "path",
          "name": "code",
          "description": "A unique **code** that identifies the voucher.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Get Voucher",
        "description": "Retrieves the voucher with the given `code` or unique Voucherify ID. You can either pass the voucher ID which was assigned by Voucherify, e.g., `v_7HxHkf4VAkMuc8u4lZs78lyRwhRze5UE`, or the `code` of the voucher as the path parameter value, e.g., `7fjWdr`.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a voucher object if a valid identifier was provided. \n\nAdditionally, the response returns validation rules related to the voucher object. They can be inherited from a campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersGetResponseBody"
                },
                "examples": {
                  "Loyalty Card": {
                    "value": {
                      "id": "v_hrMBBeT4sOP9VSGPmj5KAgJwX202UjiY",
                      "code": "LOYALTY-CARD-xLPbpbXR",
                      "campaign": "Loyalty Program Fall 2022",
                      "campaign_id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 110,
                        "balance": 100,
                        "next_expiration_date": "2023-12-31",
                        "next_expiration_points": 100
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19OrTPNyUztbNretF7tPRL4ZlUDPAUXVGL9e5UCPh6dic8zXEP8/6I6hUEqtz/F6IMIghWz1ljdjzpdizGHG3HZBw4c19fd8SD/DjhBRDSr8APqKGpZTLKe4QC2gislFTeDAq2lmJb6T1oOTBUGkUEwMgEX1Vlco9A=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/SpYuOrU9wd6/o1wzy6E/04wURHJ1xuMutzkIUx6OBTmHX5BO8XZRmEFHkgjC5eWJ27ArgAruJfwRXWuQfTNFD4raI9YvIiQNEzsZ0ydxwKBqJ/FJtiw69djuzQk1f4HdQo8s5gaZ7fd2U+1zbaeAvi9usyvRHZE4=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T07:56:22.355Z",
                      "updated_at": "2022-09-19T08:04:22.458Z",
                      "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 1,
                        "redeemed_points": 10,
                        "object": "list",
                        "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/LOYALTY-CARD-xLPbpbXR/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                      "code": "GIFT-CARD-xwc6X7Tk",
                      "campaign": "Gift Cards",
                      "campaign_id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                      "category": null,
                      "category_id": null,
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 55000,
                        "balance": 44700,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "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": "2022-08-29T09:37:20.185Z",
                      "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "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"
                    }
                  },
                  "Amount Discount": {
                    "value": {
                      "id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2bn",
                      "code": "AMOUNTDISCOUNTUSINGFORMULA",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 400,
                        "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2022-09-01T00:00:00.000Z",
                      "expiration_date": "2022-10-31T00:00:00.000Z",
                      "validity_timeframe": null,
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": true,
                      "additional_info": "This voucher discount is based on a formula, payment must be using VISA, and order must be over $100.",
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX18tV6jdzxWPwEzjeiX4DoM06JpwaoKUNGMNx4Td5e8FwA68uIHQwPaRpJr9CUCpiP4IsSD8nEJn1YtEv6FnY83wIv7uljYoQOYmMPyhKec8Ct3zH7KurMGuj4Fhws3HNA3bqP5MYEy+aA==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX181+WljOgxIt9Jg1Urbuv226+8Ug0DIyZiI0WtThPNYKZZEodzqQpIsGSdrDGXr2chLo+4FH3Ey8G2YXCPM6nUhZRSMF5oL3+uNjcLtBvb7MF5+ynY5fIgpXolwUK0R/BuT4Pa8prhgTg==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-12T07:51:02.145Z",
                      "updated_at": "2022-09-19T08:29:12.566Z",
                      "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_tO5AuzXIkkNPTC50",
                            "rule_id": "val_5h0wc453_2",
                            "related_object_id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2bn",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-19T08:27:59.160Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 2,
                        "object": "list",
                        "url": "/v1/vouchers/AMOUNTDISCOUNTUSINGFORMULA/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 1,
                        "url": "/v1/vouchers/AMOUNTDISCOUNTUSINGFORMULA/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Percent Discount": {
                    "value": {
                      "id": "v_2LcXRN4X0TNNgPoBceXIsE4LYs13kta1",
                      "code": "PercentDiscountUsingFormula",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 3,
                        "percent_off_formula": "CUSTOMER_METADATA(\"age\")",
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "gift": null,
                      "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": "U2FsdGVkX1+74dNbbuHNdVR+5SXVrdo6Zp2tUInlseZtheoYEvrayBBDEoJFaeDuC1BzQr+j8ayuFU7+BtCdNe25YRae4Mp+3Y1HsrkVudshKRzMBdS/43GT9Qi6tOXQDsYjHh70zNz13lMOC9bnaX6WZCVU0vRWM/VDXbYNxGZH6V1wpcGOkmkhkEYPSuIXBDF65FsgHOAwIPvKBxa/aQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19t8/dJWDNnnwPtxt3e0kZTDAELYiQcSHWIEO5wr6uLeDbM2KKbGYUfkKKtZRsWtiKhOQQc7zmNoCqR82UB+p0gzGM0tyXa/npbPUTe0Y5Y/arDPnomb9AaUFjK9Uq5OUBYbxi1ERqEhy/20Owr0m0e0E2I3jQmgAxkNokRm1g31zX4zheea8gTtiFwb6ZrYvGbaOhj5IxYWg==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-15T10:20:46.467Z",
                      "updated_at": "2022-09-15T10:43:51.116Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_EuYasM5fyDR9G2r4",
                            "rule_id": "val_0k19OQHjNZRT",
                            "related_object_id": "v_2LcXRN4X0TNNgPoBceXIsE4LYs13kta1",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-15T10:20:46.460Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 3,
                        "object": "list",
                        "url": "/v1/vouchers/PercentDiscountUsingFormula/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/PercentDiscountUsingFormula/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Fixed Discount": {
                    "value": {
                      "id": "v_zXQtyi5FYQYoRXv459hmK8M5Gi2lLoDl",
                      "code": "FixedDiscountUsingFormula",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "FIXED",
                        "effect": "APPLY_TO_ORDER",
                        "fixed_amount": 200,
                        "fixed_amount_formula": "IF(ORDER_UNITS_QUANTITY > 3;CUSTOMER_METADATA(\"age\") + 2;CUSTOMER_METADATA(\"age\") - 2)"
                      },
                      "gift": null,
                      "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": "U2FsdGVkX1+sY8iWRFMrrPOjY6pS7JZSqJUPIzAgFO5oy5GvTj27KrukNxucE4wrA4n9QL7pua3CfJzGWe0Hc5J6XXU2m5ktik4iUNRO6pxZmL4ZuR96C1XHJAGaIiI7lM17OjJD2b72/hyyDUi8DflzcYixFdXTOR3o1rcaPoY=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+af+iouhzUVUL0IocB7BAWR8rB0z8/9/OgYi32EHQ9salEEtE3XYPWtseOAxi5keMRp6K3JLDyx4RvYpw3Fe5SN0ed7PEcWr4fLUoUBntHtH0lOPFOtWxpY3tAjnyWpE/CYTR/S135KZ6GIfCS/+VQNrzbS/bFXgY=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-15T12:46:55.818Z",
                      "updated_at": "2022-09-16T10:03:25.057Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 5,
                        "object": "list",
                        "url": "/v1/vouchers/FixedDiscountUsingFormula/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/FixedDiscountUsingFormula/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount": {
                    "value": {
                      "id": "v_JkjV4v9OKTsaIuHoqXGrkGijNaRGYNzm",
                      "code": "UnitDiscountUsingFormula",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_off_formula": "IF(ORDER_UNITS_QUANTITY > 3;CUSTOMER_METADATA(\"age\") / 5;CUSTOMER_METADATA(\"age\") / 10)",
                        "unit_type": "sku_0b661e41eccd35a8e9",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "gift": null,
                      "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": "U2FsdGVkX1+6okuUQBKDcu0jGGg0jOU3kwYUFhX79TdwYKjXyV14BX74z/lehzciL0vdtutoiMVf8Nzl+B278gSHI5TiecPsTXChbGKSjH9gYUxZkdQev0qfmR4frKHjKKHHfT9DEcRWCLwKDJ9V+b89EAmbMouLlaDvkD63bZI=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19E7POETWB9YO+S4gkbGFQSm4VDNXEvqdlln6cWiyWTplnWkiUbs/2XMIva3q2rHDFP4toeKrLOGeS5mqhJcdd3yVsWXjHaALwCJIis2D4l5soDvz+Ka/vTqJdFWQzqsIl0BqEpr1tLLy8JFMGN7MY5nY3nr/ciSN8=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-15T13:36:27.838Z",
                      "updated_at": "2022-09-16T10:03:25.057Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 5,
                        "object": "list",
                        "url": "/v1/vouchers/UnitDiscountUsingFormula/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/UnitDiscountUsingFormula/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Multiple Unit Discount": {
                    "value": {
                      "id": "v_5Xgi5ht4sw432LQ7bwmyjKnUAYtOrJAh",
                      "code": "UnitDiscountUsingFormulaForMultipleProductVariants",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 3,
                            "unit_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\");CUSTOMER_METADATA(\"age\") / 2)",
                            "unit_type": "sku_0b661e41fc8d35a8f7",
                            "effect": "ADD_MISSING_ITEMS"
                          },
                          {
                            "unit_off": 4,
                            "unit_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\") + 2;CUSTOMER_METADATA(\"age\") - -2)",
                            "unit_type": "sku_0b661e41fc8d35a8f6",
                            "effect": "ADD_NEW_ITEMS"
                          }
                        ]
                      },
                      "gift": null,
                      "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": "U2FsdGVkX1+qkwm+Yu29uhfotQxirJftPuWjA1P9WGxHqqmOHsU9esf6R5Ln7AeiqX8l9iIpy+D3yav5GmF2UrY6PD6fS9Y+yu+7yTVQu+agFZqdN1jvWw4DBOCHKPgynaMiNS29Cv4EIOFCY9Ux+4Lp8aVdalItCVCEH25DxWD+HUKq1lE31Y0DfWssg95oO2m73ZeGa8je7zd09eW7cg==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+poCeZMw207p8HWtpoeokpaPfUQQoRIxpGXmqi5ic2ZPhQwKrUnujPDW4Sw1ODgHV6nLWQQQ9g7j3S4793YfzHDi1H8L3kZroH0TwWFNBgzQkV/QLqc387xUUckr0fvmhTBCarpsB+dWPOwlaNuVivTVB+Yyh/1FcbGbjvbj1Sm12wVNom2KZ3m1K/lJ6vBoGkXqq0jutytA==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-16T05:44:50.722Z",
                      "updated_at": "2022-09-19T09:25:17.303Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 3,
                        "object": "list",
                        "url": "/v1/vouchers/UnitDiscountUsingFormulaForMultipleProductVariants/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/UnitDiscountUsingFormulaForMultipleProductVariants/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Free Shipping": {
                    "value": {
                      "id": "v_gO13ON60WqVmP1DASWuJRF83Xt5KrVNL",
                      "code": "FreeShipping",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_type": "prod_5h1pp1ng",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "gift": null,
                      "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": "U2FsdGVkX19R0AaZSL8eog8GYSGvRcADkJ24Hhr52Awb2KNF11CE7oyTHVBq+S3gexrVR8PxHgEz/jR1Hh2YfM5h0k5CYPD24I/pXJYQVTa1CpXFBrrxVET9QyK48z5hxu2nsHHBsV7g0zK1nIVibsw06db8x1F1zaR7Un9oq6A=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19XHGrCUHCfcSz/VLWmN1UU13QmDsH9ezEYtzHAUAeaLvN12Yv5eBJ7h7R2Og2pNm7mdHxfMR8gBJWEgHuBkodwXch1llhO6hNy9KXebNU+McRx9iEB/DqSzagjaxCiUNB1xitLgXDlUH5cH9naOCOtCHGMrEQW4h0=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-16T07:19:53.945Z",
                      "updated_at": "2022-09-16T07:26:35.361Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 2,
                        "object": "list",
                        "url": "/v1/vouchers/FreeShipping/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/FreeShipping/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting the code of a voucher that has been deleted or does not exist.",
            "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 v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2b",
                      "request_id": "v-0bb3403b9a158c87b2",
                      "resource_id": "v_OBVfpTVf24DBz0HZmKVZa5UEl1DUg2b",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Update Voucher",
        "description": "Updates the specified voucher by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.\n\nFields other than the ones listed in the request body won't be modified. Even if provided, they will be silently skipped.\n\nIf you want to change the amount on a gift card or the number of points on a loyalty card, use the [Add or remove voucher balance](ref:update-voucher-balance) endpoint.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Specify the parameters to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersUpdateRequestBody"
              },
              "examples": {
                "Percent Discount": {
                  "value": {
                    "category": "Second",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "PERCENT",
                      "percent_off": 45,
                      "percent_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\");CUSTOMER_METADATA(\"age\") / 2)",
                      "amount_limit": 1800,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2020-02-01T00:00:00Z",
                    "expiration_date": "2023-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT2H",
                      "interval": "P3D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2
                    ],
                    "active": false,
                    "additional_info": "This voucher can be used with other coupons. Please feel free to do so.",
                    "metadata": {
                      "Season": "Winter"
                    }
                  }
                },
                "Gift Card": {
                  "value": {
                    "category": "Existing Customers",
                    "gift": {
                      "amount": 20000,
                      "effect": "APPLY_TO_ITEMS"
                    },
                    "start_date": "2021-01-01T00:00:00Z",
                    "active": false,
                    "additional_info": "This gift card is disabled.",
                    "metadata": {
                      "test": false,
                      "locale": "de-en-pl"
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "category": "Existing Customers",
                    "loyalty_card": {
                      "points": 20000
                    },
                    "active": false,
                    "additional_info": "This loyalty card is being deactivated and points updated.",
                    "metadata": {
                      "test": false,
                      "locale": "de-en-pl"
                    }
                  }
                },
                "Amount Discount": {
                  "value": {
                    "category": "Existing Customers",
                    "discount": {
                      "amount_off": 2000,
                      "type": "AMOUNT",
                      "effect": "APPLY_TO_ITEMS"
                    },
                    "start_date": "2021-01-01T00:00:00Z"
                  }
                },
                "Fixed Discount": {
                  "value": {
                    "category": "Existing Customers",
                    "discount": {
                      "type": "FIXED",
                      "fixed_amount": 2000,
                      "effect": "APPLY_TO_ITEMS"
                    },
                    "start_date": "2021-01-01T00:00:00Z"
                  }
                },
                "Unit Discount": {
                  "value": {
                    "discount": {
                      "type": "UNIT",
                      "effect": "ADD_MANY_ITEMS",
                      "units": [
                        {
                          "unit_off": 2,
                          "unit_type": "prod_0a9f9ab4ab019a42d5",
                          "effect": "ADD_MISSING_ITEMS"
                        },
                        {
                          "unit_off": 1,
                          "unit_type": "prod_0a9f9aeddb019a42db",
                          "effect": "ADD_MISSING_ITEMS"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the voucher object if the update succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersUpdateResponseBody"
                },
                "examples": {
                  "Percent Discount": {
                    "value": {
                      "id": "v_9PbXndxO3S8xfztwMtIvuMXReonF248m",
                      "code": "percent1",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "Second",
                      "category_id": "cat_0bb81a481615a37b5e",
                      "categories": [
                        {
                          "id": "cat_0bb81a481615a37b5e",
                          "name": "Second",
                          "hierarchy": 2,
                          "created_at": "2022-09-20T05:58:01.561Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 1800,
                        "percent_off": 45,
                        "percent_off_formula": "IF(ORDER_AMOUNT > 100;CUSTOMER_METADATA(\"age\");CUSTOMER_METADATA(\"age\") / 2)",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-02-01T00:00:00.000Z",
                      "expiration_date": "2023-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P3D",
                        "duration": "PT2H"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "active": false,
                      "additional_info": "This voucher can be used with other coupons. Please feel free to do so.",
                      "metadata": {
                        "Season": "Winter"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19MPtNCPjoG/pKloolK+BZH/OCIpjYqj+B6IVJJmTYKeBINcB0JioL/tSw3iuK4FvgF8VyDyTfL26IpzbT81DDOnKeFIDUJraQDJiKxWcrG/RCFsVky4olBJ+GZFb9pLpN5gC/rn0pqYw==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/J73XXWgMf2BsVM21kpnFLQak5dpGzThYNTYPT62U6q+5RDlh/CXylkTrhegRnWJw1HA7iehT8iUoV4M4cV0KBdp5WgJ3lXeFZcpX3Mpu0T02PRcYbdCIiSO1kO50Y8Hg/heHcshw22Q==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T14:41:30.976Z",
                      "updated_at": "2022-09-20T06:00:50.202Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": 101,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/percent1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/percent1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "v_7xaObxyK5LG62Rp0Xqpez7lqiBFL62pL",
                      "code": "welcomegiftcard",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "Existing Customers",
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 20000,
                        "balance": 20000,
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "loyalty_card": null,
                      "start_date": "2021-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": "This gift card is disabled.",
                      "metadata": {
                        "test": false,
                        "locale": "de-en-pl"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+mTbI2MdzBdMJ7AsOPKvGGgRB7O4oHZv5qq8I3M/OBPJm4PV8bTtBgR+oXOU4Jv1ucbIV7yg1mzC86LVFKjO7Ptnj+63mS9QdHvvILEAulBuZZQ+hZ0HmFXjDl4Quz/kUqGwffKGTziQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX184KgQ11OfpqB4WkJuH9ushSwZb0YrcN+8OaGPHxBQMiBr2axwnvQlZYv6YhqWtnc5iHByHrkg+6qYHxOLBPRMWCysIhcuUEB57IDhgYUHRPyM2bWjQadVHngGfVGCQ0CUy4PO/71RdMw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:09:49.665Z",
                      "updated_at": "2022-02-17T11:11:48.071Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_amount": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomegiftcard/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomegiftcard/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "v_l84t3fy3keMUiOeaHbN1cbTdW8O5eUlm",
                      "code": "welcomeloyalty",
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                      "category": "Existing Customers",
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 20000,
                        "balance": 20000
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": "This loyalty card is being deactivated and points updated.",
                      "metadata": {
                        "test": false,
                        "locale": "de-en-pl"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX186PCWooyrNsjfI+nb+Y9ziUZ1k7xe+nJQ53Ms1ynNJOX6JXC6SwxS1WDhYwAKX5FxaDoKyuPf5MkQrkeB6u5bSx333ldAyLypNnqwBD2N17S64WFnTqV7eXUk3hS30wDYcz0cQAJFDcQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/FWUg0RbOU7R7Zqg7/8Ba6oYuXrmIl7EdXGgaPMPfpePNGRzxBu4LP2dNEUO9h1Sh37MR1PxOoaemPwlgTDo/1G8dX1JjSppNoaTHhkzk2w4yutNhP7o8cq3ZBbT3TNMTKb2H3fUMc7A==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:12:01.428Z",
                      "updated_at": "2022-02-17T11:20:12.447Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomeloyalty/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomeloyalty/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Amount Discount": {
                    "value": {
                      "id": "v_jMIjKfG2oJ7vCwIPhsLsbXYGTdPLlbJd",
                      "code": "WelcomeDiscountAmount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "Existing Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 2000,
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2021-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+TcEE9sZP6aMfAW3NZv9GWlCnUNn+SiK4FIbMRWWjN5hzTR7Yc/73yfldUb6SMgIvUNL551Nz/nPjrMY2iauia1MSWX21MItsSPfy8qccrC+WAlvpGK/1ZklnxYaeKqxTqwSXl7ppSlgcuEejbFiaqEDajvYUZsF4=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/AhpZMq/h+Phi8JZF9m4qL8/U/Z5AST82jaAOnnhdHdbaGjB1+/0VFIdGBA8w2+3JX5qd61Dfk6yfiLCraVw7lYjQddCHF5SKtJs4hqsLHZevQTCzpZkeIHC3ThsG/fLZTsaNn8tjewd/W4qn/2Cc5NgTdv7fqui4=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T11:41:05.236Z",
                      "updated_at": "2022-02-17T11:45:29.269Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_tDN7MJNayjrf1wyn",
                            "rule_id": "val_4j7DCRm2IS59",
                            "related_object_id": "v_jMIjKfG2oJ7vCwIPhsLsbXYGTdPLlbJd",
                            "related_object_type": "voucher",
                            "created_at": "2022-02-17T11:41:05.210Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": 10,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/WelcomeDiscountAmount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/WelcomeDiscountAmount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Fixed Discount": {
                    "value": {
                      "id": "v_B1Pe7QPTjXCHm8IcDkJAQs4g6Zc08UlK",
                      "code": "wou4w1Og",
                      "campaign": "Fixed",
                      "campaign_id": "camp_2jVA6EKGSAe6scyc3i1q9ROD",
                      "category": "Existing Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "FIXED",
                        "effect": "APPLY_TO_ITEMS",
                        "fixed_amount": 2000
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2021-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX18zxYPpRIYeGHCoCAp3ZAPEUM0qacHQIIW/82oGOW24bFMA06kahjkZKVA/1mqqJsqh83C29Jhdz82KrRsM2zl9nzplu5hrmn7m0twnf5NQaTTcovEvnBV8Kej9tGhzc/dPwqE+xEKuDg==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX18tsK1tz0X2IQWbFHCY4wZBDjoysFt1fBlWo/9bm/HNTci1Q3bSFuIzqIQqlU2TkSacFBgOWGuVG08XboZsqNSXXsAgST9tyoxpaOJ22B2EwWspdvuwJqvZh4PpEyh3BBDS7eOWsr3+Sw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T11:54:37.766Z",
                      "updated_at": "2022-02-17T12:04:53.346Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": 1,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/wou4w1Og/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/wou4w1Og/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Unit Discount": {
                    "value": {
                      "id": "v_cu8nyozvTDA413H17bH5BLha0cjxt7s8",
                      "code": "MultipleUnitTypesUnitDiscount",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 2,
                            "unit_type": "prod_0a9f9ab4ab019a42d5",
                            "effect": "ADD_MISSING_ITEMS"
                          },
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_MISSING_ITEMS"
                          }
                        ]
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+ocJBtZ9NqT97gZ/QTfOz54TAoRoKO3tnCYBtHZWMghEHT0b2aFrPSL1lqMyf6fYy6DH2/DkH5p5Vd8dOozW1LV6wPVatWpa1lZMeMIB0OcARCW3q+3QydoW2KdliLKyksFwumH9C7Fsnj6HTaEbUjSttTZE/be+o=",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+Sly3IYj3EbZFHGGNxV6Ns4j76O8d0kRQe3WriJz5qY6s4GBIwlsdy13AciaQuiVt232HlOlZ4TzGaSSk3+ZMldwBGaTp/fIN9SGBW/NVUtfDOI2sIDLZCBBrdK7WVvtCQQ+1Y+6qClYg/QurJExCFRkDeKpKjDug=",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-18T06:27:45.619Z",
                      "updated_at": "2022-02-18T06:31:08.630Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": 5,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/MultipleUnitTypesUnitDiscount/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if, for example, the AMOUNT type discount doesn't have the `type` attribute defined.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Voucher": {
                    "value": {
                      "code": 400,
                      "key": "invalid_voucher",
                      "message": "Invalid Voucher",
                      "details": "It is not possible to change Voucher discount type",
                      "request_id": "b7f5149d-83e5-46ef-93ad-ef191a87b185"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Delete Voucher",
        "description": "Deletes a voucher. This operation cannot be undone. Additionally, this operation removes any redemptions on the voucher.\n\nIf the `force` parameter is set to `false` or not set at all, the voucher will be moved to [the bin](ref:list-bin-entries).",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "force",
            "description": "If this flag is set to `true`, the voucher will be removed permanently. If it is set to `false` or not set at all, the voucher will be moved to the bin. Going forward, the user will be able to create another voucher with exactly the same code."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the voucher with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Voucher Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id 10OFF",
                      "request_id": "v-0ae28d3cec96bb1b7e",
                      "resource_id": "10OFF",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Create Voucher",
        "description": "Create a generic (standalone) vouchers. You can choose to create a `GIFT_VOUCHER`, a `DISCOUNT_VOUCHER`, or a `LOYALTY_CARD`. The code path parameter can use all letters of the English alphabet, Arabic numerals and special characters.\n\nWhen you create a new voucher, you can specify a type to create it.\nCreating a new voucher will create a new generic (standalone) vouchers if no `campaign` name or `campaign_id` is provided. However, if an ID or name of a campaign with the `type` set to `STANDALONE` is provided, the voucher will be added to such campaign. In the case of the loyalty card, a campaign name or ID is required.\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers created through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.\n>\n>Voucherify developers work on adding an optional feature to create a generic (standalone) vouchers campaign through the API.\n>\n>Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the voucher that you would like to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersCreateWithSpecificCodeRequestBody"
              },
              "examples": {
                "Percentage Discount": {
                  "value": {
                    "category": "New Customers",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "percent_off": 10,
                      "type": "PERCENT",
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2022-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": false,
                    "additional_info": "This voucher will remain inactive until enabled.",
                    "redemption": {
                      "quantity": 10
                    },
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    },
                    "validation_rules": [
                      "val_4j7DCRm2IS59"
                    ]
                  }
                },
                "Gift Card": {
                  "value": {
                    "category": "New Customers",
                    "type": "GIFT_VOUCHER",
                    "gift": {
                      "amount": 10000,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2022-01-01T00:00:00Z",
                    "active": true,
                    "additional_info": "This gift card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "category": "New Customers",
                    "campaign": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                    "type": "LOYALTY_CARD",
                    "loyalty_card": {
                      "points": 10000
                    },
                    "additional_info": "This loyalty card is enabled immediately upon creation.",
                    "metadata": {
                      "test": true,
                      "locale": "de-en"
                    }
                  }
                },
                "Amount Discount with Formula": {
                  "value": {
                    "category": "First",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "AMOUNT",
                      "amount_off": 100,
                      "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4,
                      5
                    ],
                    "active": true,
                    "additional_info": "This voucher can be used with other coupons.",
                    "redemption": {
                      "quantity": 100
                    },
                    "metadata": {
                      "Season": "Spring"
                    }
                  }
                },
                "Percent Discount with Formula": {
                  "value": {
                    "category": "First",
                    "type": "DISCOUNT_VOUCHER",
                    "discount": {
                      "type": "PERCENT",
                      "percent_off": 40,
                      "percent_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                      "amount_limit": 1700,
                      "effect": "APPLY_TO_ORDER"
                    },
                    "start_date": "2020-01-01T00:00:00Z",
                    "expiration_date": "2022-12-31T23:59:59Z",
                    "validity_timeframe": {
                      "duration": "PT1H",
                      "interval": "P2D"
                    },
                    "validity_day_of_week": [
                      0,
                      1
                    ],
                    "active": true,
                    "additional_info": "This voucher can be used with other coupons.",
                    "redemption": {
                      "quantity": 101
                    },
                    "metadata": {
                      "Season": "Fall"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a voucher object if the call succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersCreateResponseBody"
                },
                "examples": {
                  "Percentage Discount": {
                    "value": {
                      "id": "v_MBOEmHelKwvykVZ8JcT4TE5Kla5IMJyc",
                      "code": "welcome",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 10,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2022-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": false,
                      "additional_info": "This voucher will remain inactive until enabled.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+by33CNzWu6xXjCrLKRr1+H9K3I9wOSa7idiHrMYJe0HlrWiy7INhaJf1BnaKJjLKcUC+4/hCbILtJ9lHXZWhewG5q5rmx29gK0IH2eRauw1qCZKIlXfqeGTG2T5ftPsEl1D4xf8W2MA==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19wOdFeXYXZ4Xu22L0Ummk03Urz/ZTnXUFeHeehtK4L6RTvNgVeSR+McTZR4DYNLEGydZ+Fo2xEqqM1UWyl8Bx22Pi1CxghADOcy3bAvSca7EEPpvKrCY403UWUDvaO/OEAjvVoiEuaHA==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:05:34.668Z",
                      "updated_at": null,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_74F7QZoYbUoljwQO",
                            "rule_id": "val_4j7DCRm2IS59",
                            "related_object_id": "v_MBOEmHelKwvykVZ8JcT4TE5Kla5IMJyc",
                            "related_object_type": "voucher",
                            "created_at": "2022-02-17T09:05:34.642Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": 10,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcome/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcome/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "v_7xaObxyK5LG62Rp0Xqpez7lqiBFL62pL",
                      "code": "welcomegiftcard",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "New Customers",
                      "type": "GIFT_VOUCHER",
                      "discount": null,
                      "gift": {
                        "amount": 10000,
                        "balance": 10000,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "loyalty_card": null,
                      "start_date": "2022-01-01T00:00:00.000Z",
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This gift card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+mTbI2MdzBdMJ7AsOPKvGGgRB7O4oHZv5qq8I3M/OBPJm4PV8bTtBgR+oXOU4Jv1ucbIV7yg1mzC86LVFKjO7Ptnj+63mS9QdHvvILEAulBuZZQ+hZ0HmFXjDl4Quz/kUqGwffKGTziQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX184KgQ11OfpqB4WkJuH9ushSwZb0YrcN+8OaGPHxBQMiBr2axwnvQlZYv6YhqWtnc5iHByHrkg+6qYHxOLBPRMWCysIhcuUEB57IDhgYUHRPyM2bWjQadVHngGfVGCQ0CUy4PO/71RdMw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:09:49.665Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_amount": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomegiftcard/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomegiftcard/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "v_l84t3fy3keMUiOeaHbN1cbTdW8O5eUlm",
                      "code": "welcomeloyalty",
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                      "category": "New Customers",
                      "type": "LOYALTY_CARD",
                      "discount": null,
                      "gift": null,
                      "loyalty_card": {
                        "points": 10000,
                        "balance": 10000
                      },
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": true,
                      "additional_info": "This loyalty card is enabled immediately upon creation.",
                      "metadata": {
                        "test": true,
                        "locale": "de-en"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX186PCWooyrNsjfI+nb+Y9ziUZ1k7xe+nJQ53Ms1ynNJOX6JXC6SwxS1WDhYwAKX5FxaDoKyuPf5MkQrkeB6u5bSx333ldAyLypNnqwBD2N17S64WFnTqV7eXUk3hS30wDYcz0cQAJFDcQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/FWUg0RbOU7R7Zqg7/8Ba6oYuXrmIl7EdXGgaPMPfpePNGRzxBu4LP2dNEUO9h1Sh37MR1PxOoaemPwlgTDo/1G8dX1JjSppNoaTHhkzk2w4yutNhP7o8cq3ZBbT3TNMTKb2H3fUMc7A==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-02-17T09:12:01.428Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "redeemed_points": 0,
                        "object": "list",
                        "url": "/v1/vouchers/welcomeloyalty/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/welcomeloyalty/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Amount Discount with Formula": {
                    "value": {
                      "id": "v_pmjVYKEDFzMqwNroHTlFcI1yKLqUcVVS",
                      "code": "amount1",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 100,
                        "amount_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": true,
                      "additional_info": "This voucher can be used with other coupons.",
                      "metadata": {
                        "Season": "Spring"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+aMFY2yoGxlWkhulvTPR8RlMZtfOaWXnL6PCnegsV73aCTsue+JlUrQsbh+dmp2gJigaVixgvyC7/zUxQjf8tnVT4R79G4LmUkltHMqHsaf++fsP1G07nDl9/2WHh/QVb6z4KP/DX5Dw==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1+X2OimwSCEmGvGrZXXK+b4OrStQELVsHRup8Su+uISCOBz7xWdbpoLVJlSFepcRxSNUUdjcbpgKH7YNfaclrta8Ig6/GK/4YFlh0cPKCGOG5WWyXWzxxmVgVqRdI7KR8/hdaq2FCQeWA==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T14:22:50.552Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 100,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/amount1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/amount1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  },
                  "Percent Discount with Formula": {
                    "value": {
                      "id": "v_9PbXndxO3S8xfztwMtIvuMXReonF248m",
                      "code": "percent1",
                      "campaign": null,
                      "campaign_id": null,
                      "category": "First",
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 1700,
                        "percent_off": 40,
                        "percent_off_formula": "IF(CUSTOMER_METADATA(\"favorite_brands\") contains \"Nike\";20;CUSTOMER_METADATA(\"age\"))",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2020-01-01T00:00:00.000Z",
                      "expiration_date": "2022-12-31T23:59:59.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "PT1H"
                      },
                      "validity_day_of_week": [
                        0,
                        1
                      ],
                      "active": true,
                      "additional_info": "This voucher can be used with other coupons.",
                      "metadata": {
                        "Season": "Fall"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX19MPtNCPjoG/pKloolK+BZH/OCIpjYqj+B6IVJJmTYKeBINcB0JioL/tSw3iuK4FvgF8VyDyTfL26IpzbT81DDOnKeFIDUJraQDJiKxWcrG/RCFsVky4olBJ+GZFb9pLpN5gC/rn0pqYw==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX1/J73XXWgMf2BsVM21kpnFLQak5dpGzThYNTYPT62U6q+5RDlh/CXylkTrhegRnWJw1HA7iehT8iUoV4M4cV0KBdp5WgJ3lXeFZcpX3Mpu0T02PRcYbdCIiSO1kO50Y8Hg/heHcshw22Q==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T14:41:30.976Z",
                      "updated_at": null,
                      "redemption": {
                        "quantity": 101,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/percent1/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/percent1/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a voucher code already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate Code": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated voucher exists with id CODE",
                      "request_id": "v-0ae786a8f786b73dfa",
                      "resource_id": "CODE",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/enable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`.",
          "required": true
        }
      ],
      "post": {
        "operationId": "enable-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Enable Voucher",
        "description": "There are various times when you'll want to manage a voucher's accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*.  \n___\nThe method sets the voucher state to **active**. The voucher can be redeemed - only if the redemption occurs after the start date and the voucher is not expired.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a voucher object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersEnableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "code": "2CpRCE2c",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 300,
                        "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                      },
                      "gift": null,
                      "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": "U2FsdGVkX1+ro/6HLsfI9E/rz0QEoYv+rcVIEERdbV3gB4104zYyGfpydtSxS1WfpbuiDUfMizQAl1EMzoYsud5XTKBBwUkGkI5IPl84lPz+WQtg4nKpjUS0wcA7AuIbz2zb870YfJO/r5UBS5gCqQ==",
                          "url": "{{internalVoucherifyURL}}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19SWjP3ZUbFh26gCGb4xm3K95jhzfk1XXlKcYlHPtDTYR3/4dYbig4xxRmkgpQLa93Woz9Hq3h4JBQ+aTlftkEzL4D4OSAWi1aWlfxVikrJd6TMFLh9mmbmskodjs4MIdOFlluDWyarlw==",
                          "url": "{{internalVoucherifyURL}}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T10:06:07.932Z",
                      "updated_at": "2022-09-19T11:54:17.248Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_HesdqEzt5e9c0T56",
                            "rule_id": "val_gZft0NKZSUWK",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-19T10:06:07.934Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/2CpRCE2c/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/2CpRCE2c/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "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/vouchers/{code}/disable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "post": {
        "operationId": "disable-voucher",
        "tags": [
          "Vouchers"
        ],
        "summary": "Disable Voucher",
        "description": "There are various times when you'll want to manage a voucher's accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*.  \n___\nThis method sets the voucher state to **inactive**. The voucher cannot be redeemed.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a voucher object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersDisableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "code": "2CpRCE2c",
                      "campaign": null,
                      "campaign_id": null,
                      "category": null,
                      "category_id": null,
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 300,
                        "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": null,
                      "expiration_date": null,
                      "validity_timeframe": null,
                      "validity_day_of_week": null,
                      "active": false,
                      "additional_info": null,
                      "metadata": {},
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+ro/6HLsfI9E/rz0QEoYv+rcVIEERdbV3gB4104zYyGfpydtSxS1WfpbuiDUfMizQAl1EMzoYsud5XTKBBwUkGkI5IPl84lPz+WQtg4nKpjUS0wcA7AuIbz2zb870YfJO/r5UBS5gCqQ==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19SWjP3ZUbFh26gCGb4xm3K95jhzfk1XXlKcYlHPtDTYR3/4dYbig4xxRmkgpQLa93Woz9Hq3h4JBQ+aTlftkEzL4D4OSAWi1aWlfxVikrJd6TMFLh9mmbmskodjs4MIdOFlluDWyarlw==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-19T10:06:07.932Z",
                      "updated_at": "2022-09-19T11:53:23.452Z",
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_HesdqEzt5e9c0T56",
                            "rule_id": "val_gZft0NKZSUWK",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                            "related_object_type": "voucher",
                            "created_at": "2022-09-19T10:06:07.934Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/2CpRCE2c/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/2CpRCE2c/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "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/vouchers/{code}/balance": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "post": {
        "operationId": "update-voucher-balance",
        "tags": [
          "Vouchers"
        ],
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "summary": "Adjust Voucher Balance",
        "description": "Add balance to an existing gift card or loyalty card. For loyalty cards, it must be assigned to a holder.",
        "requestBody": {
          "required": true,
          "description": "Provide the amount to be added to/subtracted from the voucher.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersBalanceUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "amount": 10000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a balance object if the operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersBalanceUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "amount": 10000,
                      "total": 20100,
                      "balance": 20100,
                      "type": "gift_voucher",
                      "object": "balance",
                      "related_object": {
                        "type": "voucher",
                        "id": "v_abCdEfghI1JKLMNPqRS2Tu3vWXyza4bc"
                      }
                    }
                  }
                }
              }
            }
          },
          "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/vouchers/{code}/transactions": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "get": {
        "operationId": "list-voucher-transactions",
        "tags": [
          "Vouchers"
        ],
        "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."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "summary": "List Voucher Transactions",
        "description": "List transactions that are associated with credit movements on a gift card or loyalty card.",
        "responses": {
          "200": {
            "description": "Returns a dictionary of transaction objects",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersTransactionsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "vtx_0c9dccc4d5813e71bd",
                          "source_id": "20230317_subtract_1",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "API",
                          "reason": "Subtracting credits from card",
                          "type": "CREDITS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128020,
                              "amount": -2000,
                              "object": "balance",
                              "balance": 121020,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T15:50:00.786Z"
                        },
                        {
                          "id": "vtx_0c9dcc920ac0e9ef82",
                          "source_id": "20230317_add_1",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "API",
                          "reason": "Adding more points to card",
                          "type": "CREDITS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130020,
                              "amount": 20,
                              "object": "balance",
                              "balance": 123020,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-17T15:49:08.768Z"
                        },
                        {
                          "id": "vtx_0c94f018d30bef6689",
                          "source_id": "HRwc0oHz_reward",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "voucherify-web-ui",
                          "reason": "cash reward",
                          "type": "CREDITS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130000,
                              "amount": 2000,
                              "object": "balance",
                              "balance": 123000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:38:02.055Z"
                        },
                        {
                          "id": "vtx_0c94edbbaccbef5db6",
                          "source_id": null,
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": null,
                          "reason": null,
                          "type": "CREDITS_REFUND",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128000,
                              "amount": 44,
                              "object": "balance",
                              "balance": 121000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_jj5EzDxDOd2xFPsAJJ18IaZK",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c94ed583fcafc31c1"
                            },
                            "rollback": {
                              "id": "rr_0c94edbb8d0bef5d9e"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:27:42.389Z"
                        },
                        {
                          "id": "vtx_0c94ed584f4afc31da",
                          "source_id": null,
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": null,
                          "reason": null,
                          "type": "CREDITS_REDEMPTION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128000,
                              "amount": -44,
                              "object": "balance",
                              "balance": 120956,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_jj5EzDxDOd2xFPsAJJ18IaZK",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c94ed583fcafc31c1"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:26:00.640Z"
                        },
                        {
                          "id": "vtx_0c94e9432c4afc2134",
                          "source_id": "HRwc0oHz_removal",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "voucherify-web-ui",
                          "reason": "removal",
                          "type": "CREDITS_REMOVAL",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 128000,
                              "amount": -2000,
                              "object": "balance",
                              "balance": 121000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:08:10.413Z"
                        },
                        {
                          "id": "vtx_0c94e8100f8afc1c6c",
                          "source_id": null,
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": null,
                          "reason": null,
                          "type": "CREDITS_REDEMPTION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130000,
                              "amount": -7000,
                              "object": "balance",
                              "balance": 123000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            },
                            "order": {
                              "id": "ord_qZX3pEt5rFf5W23qRMDQcVt9",
                              "source_id": null
                            },
                            "redemption": {
                              "id": "r_0c94e80fda4afc1c59"
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T18:02:55.935Z"
                        },
                        {
                          "id": "vtx_0c94e6b82a4bef406c",
                          "source_id": "walmart",
                          "voucher_id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                          "campaign_id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                          "source": "voucherify-web-ui",
                          "reason": "return",
                          "type": "CREDITS_ADDITION",
                          "details": {
                            "balance": {
                              "type": "gift_voucher",
                              "total": 130000,
                              "amount": 5000,
                              "object": "balance",
                              "balance": 130000,
                              "related_object": {
                                "id": "v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp",
                                "type": "voucher"
                              }
                            }
                          },
                          "related_transaction_id": null,
                          "created_at": "2023-03-10T17:57:03.758Z"
                        }
                      ],
                      "has_more": true,
                      "more_starting_after": "vtx_0c94e6b82a4bef406c"
                    }
                  }
                }
              }
            }
          },
          "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/vouchers/{code}/transactions/export": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "example": "GIFT-CARD-1",
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. `v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u`."
        }
      ],
      "post": {
        "operationId": "export-voucher-transactions",
        "tags": [
          "Vouchers"
        ],
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "summary": "Export Voucher Transactions",
        "description": "Export transactions that are associated with credit movements on a gift card or loyalty card.\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `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. | 8638 |\n| reason | Contains the reason for the transaction if one was included originally. |  |\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. | 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 |\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 |",
        "requestBody": {
          "description": "Specify the parameters for the camapign transaction export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersTransactionsExportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "parameters": {
                      "order": "-created_at",
                      "fields": [
                        "id",
                        "type",
                        "source_id",
                        "reason",
                        "balance",
                        "amount",
                        "created_at",
                        "voucher_id",
                        "campaign_id",
                        "details",
                        "source"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an export object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersTransactionsExportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "exp_ARi2UbRjgfrHQJoVcKFrBUgA",
                      "object": "export",
                      "created_at": "2023-05-16T08:30:21.496Z",
                      "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",
                          "source"
                        ],
                        "filters": {
                          "voucher_id": {
                            "conditions": {
                              "$in": [
                                "HRwc0oHz"
                              ]
                            }
                          }
                        }
                      },
                      "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/vouchers/import": {
      "post": {
        "operationId": "import-vouchers",
        "tags": [
          "Vouchers"
        ],
        "summary": "Import Vouchers",
        "description": "Import generic (standalone) voucherss and gift cards into the repository.\n\n\n\n> 📘 Important notes\n>\n> - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z.\n> - Custom code attributes (not supported by-default) need to be added as code **metadata**.\n> - You **cannot import the same codes** to a single Voucherify Project.\n\nAny parameters not provided in the payload will be left blank or null.\n\nFor both **standalone discount vouchers and gift cards**, you can import the following fields:  \n\n- code\n- category\n- active\n- type\n- start_date\n- expiration_date\n- redemption.quantity\n- additional_info\n- metadata\n\nFor **gift cards**, you can also import the following field:\n\n- gift.amount\n\nFor **discount vouchers**, you can import the `discount` object. The object will slightly vary depending on the type of discount. Each discount type **requires** the `type` to be defined in the import.\n\n| **Discount Type** | **Required fields** |\n|:---|:---|\n| Amount | amount_off, effect |\n| Percent | percent_off, effect |\n| Fixed | fixed_amount, effect |\n| Unit - One item | unit_off, unit_type, effect |\n| Unit - Multiple items | unit_off, unit_type, effect |\n| Shipping | unit_off, unit_type, effect |\n\nFields other than the ones listed above won't be imported. Even if provided, they will be silently skipped.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The request body is an array of objects. Each object contains details about a specific voucher. ",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersImportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "code": "PROMO-CODE30OFF-NO-EFFECT",
                      "category": "new customer acquisition",
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "discount": {
                        "amount_off": 3000,
                        "type": "AMOUNT"
                      },
                      "start_date": "2020-12-01T23:00:00Z",
                      "expiration_date": "2023-12-19T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code1"
                    },
                    {
                      "code": "PROMO-CODE30-PERCENT-NO-EFFECT",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "GIFT-CARD-100",
                      "type": "GIFT_VOUCHER",
                      "active": true,
                      "category": "new customer acquisition",
                      "gift": {
                        "amount": 10000
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 5
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-GIFT-code2"
                    },
                    {
                      "code": "PROMO-CODE1-PERCENT-EFFECT-ORDER",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE2-PERCENT-EFFECT-ITEM",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-PERCENT-NO-EFFECT-REDEEMED-QUANTITY-ATTRIBUTE-DOESNT-GET-PASSED",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "percent_off": 30,
                        "type": "PERCENT"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1,
                        "redeemed_quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-AMOUNT-EFFECT-ITEMS-PROPORTIONALLY",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "amount_off": 30,
                        "type": "AMOUNT",
                        "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-FIXED-EFFECT-ORDER",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "fixed_amount": 30,
                        "type": "FIXED",
                        "effect": "APPLY_TO_ORDER"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-UNIT-SINGLE-ITEM-EFFECT-MISSING",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "unit_off": 1,
                        "unit_type": "prod_0a9f9aeddb019a42db",
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE2-UNIT-MULTIPLE-ITEMS",
                      "type": "DISCOUNT_VOUCHER",
                      "active": true,
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_MISSING_ITEMS"
                          },
                          {
                            "unit_off": 1,
                            "unit_type": "prod_0a9f9aeddb019a42db",
                            "effect": "ADD_NEW_ITEMS"
                          }
                        ]
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    },
                    {
                      "code": "PROMO-CODE1-SHIPPING",
                      "type": "DISCOUNT_VOUCHER",
                      "active": false,
                      "discount": {
                        "type": "UNIT",
                        "unit_off": 1,
                        "unit_type": "prod_5h1pp1ng",
                        "effect": "ADD_MISSING_ITEMS"
                      },
                      "start_date": "2020-12-10T23:00:00Z",
                      "expiration_date": "2023-12-31T23:00:00Z",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "unit": "EUR"
                      },
                      "additional_info": "secret-code2"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersImportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0aac93c6af84485df3"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/importCSV": {
      "post": {
        "operationId": "import-vouchers-using-csv",
        "tags": [
          "Vouchers"
        ],
        "summary": "Import Vouchers using CSV",
        "description": "Import generic (standalone) voucherss into the repository using a CSV file.\n\nThe CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object.  \n\nYou can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons).\n___\n\n\n> 📘 Categories\n>\n> In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the [List Vouchers](ref:list-vouchers) endpoint.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).\n\nYou can pass the `webhooks_enable=true` parameter to trigger a webhook sendout for created or updated vouchers. Configure the [respective webhooks](ref:introduction-to-webhooks) in Project settings. For updated webhooks, a webhook is sent even if the voucher hasn't been changed in the CSV file.\n\n>🚧 Generic (standalone) vouchers and campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, vouchers imported through the dashboard in the Vouchers section or through the API do not have a campaign attached, so the values for `campaign` and `campaign_id` are `null`.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "The file path is stored in the form `file` header.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/VouchersImportCSVRequestBody"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and vouchers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the **response** and pass it using the [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersImportCsvCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload. You may receive this error if you have incorrectly or have not specified the content type as `multipart/form-data` in the headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example 1": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload should have required property 'file'",
                      "request_id": "74e4bb71-5b6d-49b9-98eb-239691c9d67a"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/bulk/async": {
      "post": {
        "operationId": "update-vouchers-in-bulk",
        "tags": [
          "Vouchers"
        ],
        "summary": "Update Vouchers in Bulk",
        "description": "Updates specific metadata parameters for each code, respectively, in one asynchronous operation.\n\nThe request can include up to **10 MB** of data.\n\nUpserts are not supported.\n\n> 🚧\n> \n> Currently, only **metadata** updates are supported.\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](ref:get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\n\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "List the codes to be updated with the metadata key/value pairs for that code.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersUpdateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "code": "example_code",
                      "metadata": {
                        "lang": "en",
                        "test": false,
                        "MetadataTest": "Update metadata",
                        "update_value": 1,
                        "next_update_date": "2022-11-11T09:00:00.000Z"
                      }
                    },
                    {
                      "code": "example_code2",
                      "metadata": {
                        "lang": "pl",
                        "test": false,
                        "MetadataTest": "Update metadata",
                        "update_value": 2
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersUpdateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "$ref": "#/components/examples/res_async_actions"
                  }
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/metadata/async": {
      "post": {
        "operationId": "update-vouchers-metadata-in-bulk",
        "tags": [
          "Vouchers"
        ],
        "summary": "Update Vouchers' Metadata in Bulk",
        "description": "Updates metadata parameters for a list of codes. Every resource in the list will receive the metadata defined in the request.\n\nThe request can include up to **10 MB** of data.\n\nUpserts are not supported.\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](ref:get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\n\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "List the `codes` of the vouchers you would like to update with the metadata key/value pairs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersMetadataUpdateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "codes": [
                      "PROMO-CODE810",
                      "PROMO-CODE726"
                    ],
                    "metadata": {
                      "lang": "en",
                      "authorized_internally": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersMetadataUpdateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "$ref": "#/components/examples/res_async_actions"
                  }
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/sessions/{sessionKey}": {
      "parameters": [
        {
          "name": "code",
          "in": "path",
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "description": "A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "example": "ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts",
          "name": "sessionKey",
          "in": "path",
          "required": true,
          "description": "A unique session identifier."
        }
      ],
      "delete": {
        "operationId": "release-validation-session",
        "tags": [
          "Vouchers"
        ],
        "summary": "Release Validation Session",
        "description": "Manually release a validation session that has been set up for the voucher. This method undoes the actions that are explained in the [Locking validation session](doc:locking-validation-session) guide. \n\n> 📘 Release session in the Dashboard\n>\n> You can also use the [Validations Manager](https://support.voucherify.io/article/16-dashboard-sections#sessions) in the Dashboard to unlock sessions.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the validation session was released successfully."
          },
          "404": {
            "description": "Returns an error if a voucher or validation session ID is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Voucher not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id Enigma-Voucher",
                      "request_id": "v-10cba70aef56d727d0",
                      "resource_id": "Enigma-Voucher",
                      "resource_type": "voucher"
                    }
                  },
                  "Session not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find session with id Enigma-Session",
                      "request_id": "v-10cba72f7256d72803",
                      "resource_id": "Enigma-Session",
                      "resource_type": "session"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns": {
      "post": {
        "operationId": "create-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Create Campaign",
        "description": "Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes.  \n[campaign object](ref:get-campaign) description.\n\n>🚧 Standalone Vouchers and Campaigns\n>\n>In version [v20241004](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004), generic (standalone) voucherss created through the Voucherify dashboard create a campaign for that voucher. However, you cannot create a standalone discount or gift voucher campaign with the `\"type\": \"STANDALONE\"` through the API. Voucherify developers work on adding that feature.\n>\n>Follow the [Voucherify Release Notes](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20241004) for more details about released features.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the campaign that you would like to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignsCreateRequestBody"
              },
              "examples": {
                "Discount Campaign": {
                  "value": {
                    "name": "Discount Campaign 4",
                    "campaign_type": "DISCOUNT_COUPONS",
                    "join_once": true,
                    "type": "AUTO_UPDATE",
                    "start_date": "2020-08-16T00:00:00Z",
                    "expiration_date": "2023-12-26T00:00:00Z",
                    "vouchers_count": 3,
                    "voucher": {
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "percent_off": 10,
                        "type": "PERCENT"
                      },
                      "redemption": {
                        "quantity": 10
                      },
                      "code_config": {
                        "pattern": "10OFF-#######"
                      }
                    },
                    "validity_timeframe": {
                      "interval": "P2D",
                      "duration": "P1D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2
                    ],
                    "activity_duration_after_publishing": "P24D",
                    "use_voucher_metadata_schema": false,
                    "metadata": {
                      "region": "AMER"
                    }
                  }
                },
                "Gift Card Campaign": {
                  "value": {
                    "name": "Gift Card Campaign",
                    "campaign_type": "GIFT_VOUCHERS",
                    "join_once": true,
                    "type": "AUTO_UPDATE",
                    "start_date": "2020-08-16T00:00:00Z",
                    "expiration_date": "2023-12-26T00:00:00Z",
                    "vouchers_count": 2,
                    "voucher": {
                      "type": "GIFT_VOUCHER",
                      "gift": {
                        "amount": 1000,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "redemption": {
                        "quantity": 10
                      },
                      "code_config": {
                        "pattern": "GIFT-CARD-#######"
                      }
                    },
                    "validity_timeframe": {
                      "interval": "P2D",
                      "duration": "P1D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2
                    ],
                    "activity_duration_after_publishing": "P24D",
                    "use_voucher_metadata_schema": false,
                    "metadata": {
                      "region": "APAC"
                    }
                  }
                },
                "Loyalty Program": {
                  "value": {
                    "name": "Loyalty Campaign",
                    "campaign_type": "LOYALTY_PROGRAM",
                    "auto_join": true,
                    "join_once": true,
                    "type": "AUTO_UPDATE",
                    "start_date": "2020-08-16T00:00:00Z",
                    "expiration_date": "2023-12-26T00:00:00Z",
                    "vouchers_count": 2,
                    "voucher": {
                      "type": "LOYALTY_CARD",
                      "loyalty_card": {
                        "points": 1000,
                        "expiration_rules": {
                          "period_type": "MONTH",
                          "period_value": 3,
                          "rounding_type": "END_OF_YEAR"
                        }
                      },
                      "redemption": {
                        "quantity": 10
                      },
                      "code_config": {
                        "pattern": "LOYALTY-CARD-#######"
                      }
                    },
                    "validity_timeframe": {
                      "interval": "P2D",
                      "duration": "P1D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2
                    ],
                    "activity_duration_after_publishing": "P24D",
                    "use_voucher_metadata_schema": false,
                    "metadata": {
                      "region": "APAC"
                    }
                  }
                },
                "Promotion": {
                  "value": {
                    "name": "Promotion - API - 4",
                    "campaign_type": "PROMOTION",
                    "type": "STATIC",
                    "use_voucher_metadata_schema": false,
                    "start_date": "2020-08-16T00:00:00Z",
                    "expiration_date": "2023-12-26T00:00:00Z",
                    "active": false,
                    "promotion": {
                      "tiers": [
                        {
                          "name": "Percent Discount",
                          "banner": "Get 40% off",
                          "action": {
                            "discount": {
                              "type": "PERCENT",
                              "percent_off": 40,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {
                            "level": "B"
                          },
                          "active": false,
                          "start_date": "2022-09-21T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": {
                            "interval": "P2D",
                            "duration": "P1D"
                          },
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4
                          ],
                          "validation_rules": [
                            "val_q8qUBMOh5qIQ"
                          ]
                        },
                        {
                          "name": "Order more than $100",
                          "banner": "Get $30 off",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 3000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {
                            "level": "A"
                          },
                          "active": false,
                          "start_date": "2022-09-21T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": {
                            "interval": "P2D",
                            "duration": "P1D"
                          },
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4
                          ],
                          "validation_rules": [
                            "val_q8qUBMOh5qIQ"
                          ]
                        }
                      ]
                    },
                    "validity_timeframe": {
                      "interval": "P2D",
                      "duration": "P1D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2
                    ],
                    "activity_duration_after_publishing": "P24D",
                    "metadata": {
                      "region": "APAC"
                    }
                  }
                },
                "Referral Program": {
                  "value": {
                    "name": "Referral Campaign 2",
                    "campaign_type": "REFERRAL_PROGRAM",
                    "join_once": true,
                    "type": "AUTO_UPDATE",
                    "start_date": "2020-08-16T00:00:00Z",
                    "expiration_date": "2023-12-26T00:00:00Z",
                    "vouchers_count": 2,
                    "referral_program": {
                      "conversion_event_type": "redemption"
                    },
                    "voucher": {
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 45,
                        "effect": "APPLY_TO_ORDER",
                        "amount_limit": 15
                      },
                      "redemption": {
                        "quantity": 10
                      },
                      "code_config": {
                        "pattern": "REFERRAL-CODE-#######"
                      },
                      "is_referral_code": true
                    },
                    "validity_timeframe": {
                      "interval": "P2D",
                      "duration": "P1D"
                    },
                    "validity_day_of_week": [
                      0,
                      1,
                      2
                    ],
                    "activity_duration_after_publishing": "P24D",
                    "use_voucher_metadata_schema": false,
                    "metadata": {
                      "region": "APAC"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a campaign object if the call succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsCreateResponseBody"
                },
                "examples": {
                  "Discount Campaign": {
                    "value": {
                      "id": "camp_NdBCAQk1AAZcMcv6kt6X164Q",
                      "name": "Discount Campaign 4",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "PERCENT",
                          "percent_off": 10
                        },
                        "redemption": {
                          "quantity": 10
                        },
                        "code_config": {
                          "length": 7,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "10OFF-#######"
                        },
                        "is_referral_code": false,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": "2023-12-26T00:00:00.000Z",
                        "validity_timeframe": {
                          "interval": "P2D",
                          "duration": "P1D"
                        }
                      },
                      "auto_join": false,
                      "join_once": true,
                      "use_voucher_metadata_schema": false,
                      "start_date": "2020-08-16T00:00:00.000Z",
                      "expiration_date": "2023-12-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "activity_duration_after_publishing": "P24D",
                      "vouchers_count": 0,
                      "active": true,
                      "metadata": {
                        "region": "AMER"
                      },
                      "created_at": "2022-09-21T09:25:49.617Z",
                      "category": "First",
                      "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_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "object": "campaign"
                    }
                  },
                  "Gift Card Campaign": {
                    "value": {
                      "id": "camp_B2Gx83JsSbmvj05MOwxYbNm6",
                      "name": "Gift Card Campaign",
                      "campaign_type": "GIFT_VOUCHERS",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "GIFT_VOUCHER",
                        "gift": {
                          "amount": 1000,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "redemption": {
                          "quantity": 10
                        },
                        "code_config": {
                          "length": 7,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "GIFT-CARD-#######"
                        },
                        "is_referral_code": false,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": "2023-12-26T00:00:00.000Z",
                        "validity_timeframe": {
                          "interval": "P2D",
                          "duration": "P1D"
                        }
                      },
                      "auto_join": false,
                      "join_once": true,
                      "use_voucher_metadata_schema": false,
                      "start_date": "2020-08-16T00:00:00.000Z",
                      "expiration_date": "2023-12-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "activity_duration_after_publishing": "P24D",
                      "vouchers_count": 0,
                      "active": true,
                      "metadata": {
                        "region": "APAC"
                      },
                      "created_at": "2022-09-21T09:31:16.266Z",
                      "category": "First",
                      "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_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "object": "campaign"
                    }
                  },
                  "Loyalty Program": {
                    "value": {
                      "id": "camp_FZL4iTTdZw36nZOoXYQ172fQ",
                      "name": "Loyalty Campaign",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 1000,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 3,
                            "rounding_type": "END_OF_YEAR"
                          }
                        },
                        "redemption": {
                          "quantity": 10
                        },
                        "code_config": {
                          "length": 7,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "LOYALTY-CARD-#######"
                        },
                        "is_referral_code": false,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": "2023-12-26T00:00:00.000Z",
                        "validity_timeframe": {
                          "interval": "P2D",
                          "duration": "P1D"
                        }
                      },
                      "auto_join": true,
                      "join_once": true,
                      "use_voucher_metadata_schema": false,
                      "start_date": "2020-08-16T00:00:00.000Z",
                      "expiration_date": "2023-12-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "activity_duration_after_publishing": "P24D",
                      "vouchers_count": 0,
                      "active": true,
                      "metadata": {
                        "region": "APAC"
                      },
                      "created_at": "2022-09-21T09:39:45.479Z",
                      "category": "First",
                      "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_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "object": "campaign"
                    }
                  },
                  "Promotion": {
                    "value": {
                      "id": "camp_ru1B8mQjY75KxXupt7RPZcb8",
                      "name": "Promotion - API - 4",
                      "campaign_type": "PROMOTION",
                      "type": "STATIC",
                      "auto_join": false,
                      "join_once": false,
                      "use_voucher_metadata_schema": false,
                      "start_date": "2020-08-16T00:00:00.000Z",
                      "expiration_date": "2023-12-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "activity_duration_after_publishing": "P24D",
                      "active": true,
                      "metadata": {
                        "region": "APAC"
                      },
                      "created_at": "2022-09-23T08:54:38.281Z",
                      "category": "First",
                      "creation_status": "DONE",
                      "vouchers_generation_status": "DONE",
                      "protected": false,
                      "promotion": {
                        "object": "list",
                        "data_ref": "tiers",
                        "tiers": [
                          {
                            "id": "promo_M4OfmMgSUyN12JPAw3l4hWjD",
                            "created_at": "2022-09-23T08:54:38.286Z",
                            "name": "Percent Discount",
                            "banner": "Get 40% off",
                            "action": {
                              "discount": {
                                "type": "PERCENT",
                                "percent_off": 40,
                                "effect": "APPLY_TO_ORDER"
                              }
                            },
                            "metadata": {
                              "level": "B"
                            },
                            "hierarchy": 1,
                            "promotion_id": "camp_ru1B8mQjY75KxXupt7RPZcb8",
                            "campaign": {
                              "id": "camp_ru1B8mQjY75KxXupt7RPZcb8",
                              "start_date": "2020-08-16T00:00:00.000Z",
                              "expiration_date": "2023-12-26T00:00:00.000Z",
                              "validity_timeframe": {
                                "interval": "P2D",
                                "duration": "P1D"
                              },
                              "validity_day_of_week": [
                                0,
                                1,
                                2
                              ],
                              "active": true,
                              "category_id": "cat_0bb343dee3cdb5ec0c",
                              "object": "campaign"
                            },
                            "campaign_id": "camp_ru1B8mQjY75KxXupt7RPZcb8",
                            "active": false,
                            "start_date": "2022-09-21T00:00:00.000Z",
                            "expiration_date": "2022-09-30T00:00:00.000Z",
                            "validity_timeframe": {
                              "interval": "P2D",
                              "duration": "P1D"
                            },
                            "validity_day_of_week": [
                              1,
                              2,
                              3,
                              4
                            ],
                            "summary": {
                              "redemptions": {
                                "total_redeemed": 0
                              },
                              "orders": {
                                "total_amount": 0,
                                "total_discount_amount": 0
                              }
                            },
                            "object": "promotion_tier",
                            "validation_rule_assignments": {
                              "object": "list",
                              "data_ref": "data",
                              "data": [
                                {
                                  "id": "asgm_dr3oXeN98YfiTF60",
                                  "rule_id": "val_q8qUBMOh5qIQ",
                                  "related_object_id": "promo_M4OfmMgSUyN12JPAw3l4hWjD",
                                  "related_object_type": "promotion_tier",
                                  "created_at": "2022-09-23T08:54:38.286Z",
                                  "object": "validation_rules_assignment"
                                }
                              ],
                              "total": 1
                            }
                          },
                          {
                            "id": "promo_uMSxvzhxXDp3Ijs3659npqb2",
                            "created_at": "2022-09-23T08:54:38.314Z",
                            "name": "Order more than $100",
                            "banner": "Get $30 off",
                            "action": {
                              "discount": {
                                "type": "AMOUNT",
                                "amount_off": 3000,
                                "effect": "APPLY_TO_ORDER"
                              }
                            },
                            "metadata": {
                              "level": "A"
                            },
                            "hierarchy": 2,
                            "promotion_id": "camp_ru1B8mQjY75KxXupt7RPZcb8",
                            "campaign": {
                              "id": "camp_ru1B8mQjY75KxXupt7RPZcb8",
                              "start_date": "2020-08-16T00:00:00.000Z",
                              "expiration_date": "2023-12-26T00:00:00.000Z",
                              "validity_timeframe": {
                                "interval": "P2D",
                                "duration": "P1D"
                              },
                              "validity_day_of_week": [
                                0,
                                1,
                                2
                              ],
                              "active": true,
                              "category_id": "cat_0bb343dee3cdb5ec0c",
                              "object": "campaign"
                            },
                            "campaign_id": "camp_ru1B8mQjY75KxXupt7RPZcb8",
                            "active": false,
                            "start_date": "2022-09-21T00:00:00.000Z",
                            "expiration_date": "2022-09-30T00:00:00.000Z",
                            "validity_timeframe": {
                              "interval": "P2D",
                              "duration": "P1D"
                            },
                            "validity_day_of_week": [
                              1,
                              2,
                              3,
                              4
                            ],
                            "summary": {
                              "redemptions": {
                                "total_redeemed": 0
                              },
                              "orders": {
                                "total_amount": 0,
                                "total_discount_amount": 0
                              }
                            },
                            "object": "promotion_tier",
                            "validation_rule_assignments": {
                              "object": "list",
                              "data_ref": "data",
                              "data": [
                                {
                                  "id": "asgm_jgJlWms7GVK59iNR",
                                  "rule_id": "val_q8qUBMOh5qIQ",
                                  "related_object_id": "promo_uMSxvzhxXDp3Ijs3659npqb2",
                                  "related_object_type": "promotion_tier",
                                  "created_at": "2022-09-23T08:54:38.314Z",
                                  "object": "validation_rules_assignment"
                                }
                              ],
                              "total": 1
                            }
                          }
                        ],
                        "total": 2,
                        "has_more": false
                      },
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "object": "campaign"
                    }
                  },
                  "Referral Program": {
                    "value": {
                      "id": "camp_N8rztKAqOYIdFxNLr9eNIjyB",
                      "name": "Referral Campaign 2",
                      "campaign_type": "REFERRAL_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "PERCENT",
                          "amount_limit": 15,
                          "percent_off": 45,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "redemption": {
                          "quantity": 10
                        },
                        "code_config": {
                          "length": 7,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "REFERRAL-CODE-#######"
                        },
                        "is_referral_code": true,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": "2023-12-26T00:00:00.000Z",
                        "validity_timeframe": {
                          "interval": "P2D",
                          "duration": "P1D"
                        }
                      },
                      "referral_program": {
                        "conversion_event_type": "redemption"
                      },
                      "auto_join": false,
                      "join_once": true,
                      "use_voucher_metadata_schema": false,
                      "start_date": "2020-08-16T00:00:00.000Z",
                      "expiration_date": "2023-12-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "activity_duration_after_publishing": "P24D",
                      "vouchers_count": 0,
                      "active": true,
                      "metadata": {
                        "region": "APAC"
                      },
                      "created_at": "2022-09-23T09:06:41.757Z",
                      "category": "First",
                      "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_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "object": "campaign"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if an incomplete request body is provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 400,
                      "key": "invalid_campaign",
                      "message": "Invalid Campaign",
                      "details": "Property 'discount' is required for REFERRAL_PROGRAM campaign",
                      "request_id": "v-0bb99c9213425fa250"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "When a payload value 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 category with id cat_0bb343dee3cdb5ec0c",
                      "request_id": "v-0c55671ed1cb0f1a27",
                      "resource_id": "cat_0bb343dee3cdb5ec0c",
                      "resource_type": "category"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a campaign with the same name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated campaign exists with name Discount Campaign",
                      "request_id": "v-0bb98f8c6552250aab",
                      "resource_id": "Discount Campaign",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-campaigns",
        "tags": [
          "Campaigns"
        ],
        "summary": "List Campaigns",
        "description": "Retrieve a list of campaigns in a project. \n\nThe campaigns are returned sorted by creation date, with the most recent campaigns appearing first.  \n\nWhen you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using `limit`, which page of campaigns to return using `page`, sort the campaigns using the `order` query parameter and filter the results by the `campaign_type`.\n\nThis method will return an error when trying to return a limit of more than 100 campaigns.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/campaign_type"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterExpandListCampaigns"
            },
            "in": "query",
            "name": "expand",
            "description": "Includes an expanded `categories` object in the response. If the [Areas and Stores](https://support.voucherify.io/article/623-areas-and-stores) Enterprise feature is enabled, add `access_settings_assignments` to return assigned areas and stores."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignStatusListCampaigns"
            },
            "in": "query",
            "name": "campaign_status",
            "description": "Sorts the results by the status of the campaign."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterIsReferralCodeListCampaigns"
            },
            "in": "query",
            "name": "is_referral_code",
            "description": "Sorts the results that are or are not referral campaigns."
          },
          {
            "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."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListCampaigns"
            },
            "in": "query",
            "name": "filters",
            "description": "Filters the results by various campaign properties.",
            "style": "deepObject",
            "explode": true
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignsAccessSetttings"
            },
            "in": "query",
            "name": "access_settings",
            "description": "Filter by areas and stores IDs to return campaigns that are assigned to areas, stores, and all stores in an area.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with a `campaign` property that contains an array of campaigns. The maximum number of campaigns returned is determined by the `limit` query parameter. Each entry in the array is a separate campaign object. If no more campaigns are available, the resulting array on a given page will be empty.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "campaigns",
                      "campaigns": [
                        {
                          "id": "camp_SibPsDRKQvg3SUtptgPZCNZb",
                          "name": "Voucher Metadata",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "type": "AUTO_UPDATE",
                          "voucher": {
                            "type": "DISCOUNT_VOUCHER",
                            "discount": {
                              "type": "PERCENT",
                              "amount_limit": 4400,
                              "percent_off": 30,
                              "effect": "APPLY_TO_ORDER"
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 9,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "#########",
                              "prefix": "Discount-",
                              "postfix": "YY"
                            },
                            "is_referral_code": false,
                            "start_date": "2022-09-20T00:00:00.000Z",
                            "expiration_date": "2022-09-30T00:00:00.000Z",
                            "validity_timeframe": {
                              "interval": "P3D",
                              "duration": "P1D"
                            }
                          },
                          "auto_join": false,
                          "join_once": false,
                          "use_voucher_metadata_schema": false,
                          "start_date": "2022-09-20T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": {
                            "interval": "P3D",
                            "duration": "P1D"
                          },
                          "validity_day_of_week": [
                            1,
                            2,
                            3,
                            4
                          ],
                          "activity_duration_after_publishing": "P24D",
                          "vouchers_count": 1,
                          "active": true,
                          "metadata": {
                            "region": "AMER"
                          },
                          "created_at": "2022-09-20T09:32:29.530Z",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": null,
                          "object": "campaign"
                        },
                        {
                          "id": "camp_HgsbCKauXmEoPnnh8aas0ISe",
                          "name": "Static Campaign",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "type": "STATIC",
                          "voucher": {
                            "type": "DISCOUNT_VOUCHER",
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 3000,
                              "effect": "APPLY_TO_ORDER"
                            },
                            "redemption": {
                              "quantity": 1
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########"
                            },
                            "is_referral_code": false
                          },
                          "auto_join": false,
                          "join_once": true,
                          "use_voucher_metadata_schema": true,
                          "vouchers_count": 1,
                          "active": true,
                          "metadata": {},
                          "created_at": "2022-09-20T07:52:34.499Z",
                          "updated_at": "2022-09-20T11:38:13.501Z",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": null,
                          "object": "campaign"
                        },
                        {
                          "id": "camp_f7fBbQxUuTN7dI7tGOo5XMDA",
                          "name": "Loyalty Program Fall 2022",
                          "campaign_type": "LOYALTY_PROGRAM",
                          "type": "AUTO_UPDATE",
                          "voucher": {
                            "type": "LOYALTY_CARD",
                            "loyalty_card": {
                              "points": 0,
                              "expiration_rules": {
                                "period_type": "MONTH",
                                "period_value": 7,
                                "rounding_type": "END_OF_YEAR"
                              }
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########",
                              "prefix": "LOYALTY-CARD-"
                            },
                            "is_referral_code": false
                          },
                          "auto_join": true,
                          "join_once": true,
                          "use_voucher_metadata_schema": true,
                          "vouchers_count": 1,
                          "active": true,
                          "metadata": {},
                          "created_at": "2022-09-19T07:56:22.103Z",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": "cat_0bb343dee3cdb5ec0c",
                          "object": "campaign"
                        },
                        {
                          "id": "camp_4tHsQEDUOER6PeW8SoMdnHH6",
                          "name": "Dynamic Discounts",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "type": "AUTO_UPDATE",
                          "voucher": {
                            "type": "DISCOUNT_VOUCHER",
                            "discount": {
                              "type": "PERCENT",
                              "percent_off": 5,
                              "percent_off_formula": "IF(ORDER_AMOUNT > 300;15;5)",
                              "effect": "APPLY_TO_ORDER"
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########",
                              "prefix": "DYNAMIC-"
                            },
                            "is_referral_code": false
                          },
                          "auto_join": false,
                          "join_once": false,
                          "use_voucher_metadata_schema": true,
                          "vouchers_count": 1,
                          "active": true,
                          "metadata": {
                            "marketing_text": "Purchases above $300 are eligible for a 15% discount."
                          },
                          "created_at": "2022-07-12T15:12:02.575Z",
                          "updated_at": "2022-07-20T10:48:05.617Z",
                          "category": "test",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": "cat_0b688929a2476386a8",
                          "object": "campaign"
                        },
                        {
                          "id": "camp_JlsseNSDO7l4neFtev6p6945",
                          "name": "$20 OFF Entire Order",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "type": "AUTO_UPDATE",
                          "voucher": {
                            "type": "DISCOUNT_VOUCHER",
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 2000,
                              "effect": "APPLY_TO_ORDER"
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########",
                              "prefix": "$20OFFORDER-"
                            },
                            "is_referral_code": false
                          },
                          "auto_join": false,
                          "join_once": false,
                          "use_voucher_metadata_schema": true,
                          "vouchers_count": 1,
                          "active": true,
                          "metadata": {},
                          "created_at": "2022-07-11T09:43:36.057Z",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": null,
                          "object": "campaign"
                        },
                        {
                          "id": "camp_Uj3cNbWSgt7Zl4AyHM7Sa5Qk",
                          "name": "3% OFF Entire Order",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "type": "AUTO_UPDATE",
                          "voucher": {
                            "type": "DISCOUNT_VOUCHER",
                            "discount": {
                              "type": "PERCENT",
                              "percent_off": 3,
                              "effect": "APPLY_TO_ORDER"
                            },
                            "redemption": {
                              "quantity": null
                            },
                            "code_config": {
                              "length": 8,
                              "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                              "pattern": "########",
                              "prefix": "3%OFFORDER-"
                            },
                            "is_referral_code": false
                          },
                          "auto_join": false,
                          "join_once": false,
                          "use_voucher_metadata_schema": true,
                          "vouchers_count": 1,
                          "active": true,
                          "metadata": {},
                          "created_at": "2022-07-11T09:41:12.087Z",
                          "creation_status": "DONE",
                          "vouchers_generation_status": "DONE",
                          "protected": false,
                          "category_id": null,
                          "object": "campaign"
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaignId}": {
      "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": "get-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Campaign",
        "description": "Retrieves the campaign with the given campaign ID or campaign name.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a campaign object if a valid identifier was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_JlsseNSDO7l4neFtev6p6945",
                      "name": "$20 OFF Entire Order",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 2000,
                          "effect": "APPLY_TO_ORDER"
                        },
                        "redemption": {
                          "quantity": null
                        },
                        "code_config": {
                          "length": 8,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "########",
                          "prefix": "$20OFFORDER-"
                        },
                        "is_referral_code": false
                      },
                      "auto_join": false,
                      "join_once": false,
                      "use_voucher_metadata_schema": true,
                      "vouchers_count": 1,
                      "active": true,
                      "metadata": {},
                      "created_at": "2022-07-11T09:43:36.057Z",
                      "creation_status": "DONE",
                      "vouchers_generation_status": "DONE",
                      "protected": false,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "category_id": null,
                      "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 when requesting the campaign that has been deleted or 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 campaign with id camp_jcErmtGAOmHUAy0oUgkwKnP",
                      "request_id": "v-0bb8694614d58bf2a8",
                      "resource_id": "camp_jcErmtGAOmHUAy0oUgkwKnP",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Update Campaign",
        "description": "Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. \n\nFields other than the ones listed in the request body won't be modified. Even if provided, they will be silently skipped.   \n\n> #### Vouchers will be affected\n>\n> This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the campaign parameters to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignsUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "description": "New description"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the campaign object if the update succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_FZL4iTTdZw36nZOoXYQ172fQ",
                      "name": "Loyalty Campaign",
                      "campaign_type": "LOYALTY_PROGRAM",
                      "type": "AUTO_UPDATE",
                      "voucher": {
                        "type": "LOYALTY_CARD",
                        "loyalty_card": {
                          "points": 1000,
                          "expiration_rules": {
                            "period_type": "MONTH",
                            "period_value": 3,
                            "rounding_type": "END_OF_YEAR"
                          }
                        },
                        "redemption": {
                          "quantity": 10
                        },
                        "code_config": {
                          "length": 7,
                          "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
                          "pattern": "LOYALTY-CARD-#######"
                        },
                        "is_referral_code": false,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": "2023-12-26T00:00:00.000Z",
                        "validity_timeframe": {
                          "interval": "P2D",
                          "duration": "P1D"
                        }
                      },
                      "auto_join": false,
                      "join_once": false,
                      "use_voucher_metadata_schema": false,
                      "description": "New description",
                      "start_date": "2020-08-16T00:00:00.000Z",
                      "expiration_date": "2023-12-26T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "P1D"
                      },
                      "validity_day_of_week": [
                        0,
                        1,
                        2
                      ],
                      "activity_duration_after_publishing": "P24D",
                      "vouchers_count": 2,
                      "active": true,
                      "metadata": {
                        "region": "APAC"
                      },
                      "created_at": "2022-09-21T09:39:45.479Z",
                      "updated_at": "2022-09-23T09:47:00.205Z",
                      "category": "First",
                      "creation_status": "MODIFYING",
                      "vouchers_generation_status": "MODIFYING",
                      "protected": false,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "category_id": "cat_0bb343dee3cdb5ec0c",
                      "categories": [
                        {
                          "id": "cat_0bb343dee3cdb5ec0c",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-09-16T11:47:19.568Z",
                          "object": "category"
                        }
                      ],
                      "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-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Delete Campaign",
        "description": "Deletes a campaign and all related vouchers. This action cannot be undone. Also, this method immediately removes any redemptions on the voucher.\n\nIf the `force` parameter is set to `false` or not set at all, the campaign and all related vouchers will be moved to [the bin](ref:list-bin-entries).\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "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 campaign and related vouchers will be moved to the bin. Going forward, the user will be able to create the next campaign with exactly the same name.",
            "name": "force"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the 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](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsDeleteResponseBody"
                }
              }
            }
          },
          "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 indicating that the campaign with given ID 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 Spring Campaign",
                      "request_id": "v-0adac46be8cdbfd921",
                      "resource_id": "Spring Campaign",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaignId}/vouchers": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."
        }
      ],
      "post": {
        "operationId": "add-vouchers-to-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Add Vouchers to Campaign",
        "description": "This method gives the possibility to push new vouchers to an existing campaign. New vouchers will inherit properties from the campaign profile. However, it is possible to overwrite some of them in the request body. If you provide an optional `code_config` parameter with a voucher code configuration, then it will be used to generate new voucher codes. Otherwise, the voucher code configuration from the campaign will be used.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterInteger"
            },
            "in": "query",
            "name": "vouchers_count",
            "description": "Number of vouchers that should be added."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the voucher parameters that you would like to overwrite.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignsVouchersCreateInBulkRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a voucher object if the call succeeded for a voucher count of 1.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsVouchersCreateResponseBody"
                }
              }
            }
          },
          "202": {
            "description": "Returns an `async_action_id` if the request was made to create more than 1 voucher.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsVouchersCreateInBulkResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaignId}/vouchers/{code}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the campaign to which voucher will be added. 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/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A custom **code** that identifies the voucher."
        }
      ],
      "post": {
        "operationId": "add-voucher-with-specific-code-to-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Add Voucher with Specific Code to Campaign",
        "description": "This method gives a possibility to add a new voucher to an existing campaign. The voucher definition will be inherited from the definition kept in the campaign profile. However, you are able to overwrite a few properties inherited from the campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the voucher parameters that you would like to overwrite.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignsVouchersCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "category_id": "cat_0bb81a481615a37b5e",
                    "start_date": "2022-09-24T00:00:00Z",
                    "expiration_date": "2022-09-25T23:59:59Z",
                    "active": false,
                    "redemption": {
                      "quantity": null
                    },
                    "additional_info": "Voucher added using API",
                    "metadata": {
                      "Season": "Fall"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a voucher object if the call succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsVouchersCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "v_EJwB9Wy2aOIsDpWhnl2QBY51OqjQ5Ukg",
                      "code": "Code3",
                      "campaign": "Add Voucher to Campaign",
                      "campaign_id": "camp_xxpmFyWO9h9s5cEe7HtmOK5B",
                      "category": null,
                      "category_id": "cat_0bb81a481615a37b5e",
                      "type": "DISCOUNT_VOUCHER",
                      "discount": {
                        "type": "PERCENT",
                        "amount_limit": 2000,
                        "percent_off": 30,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "gift": null,
                      "loyalty_card": null,
                      "start_date": "2022-09-24T00:00:00.000Z",
                      "expiration_date": "2022-09-25T23:59:59.000Z",
                      "validity_timeframe": null,
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "active": true,
                      "additional_info": "Voucher added using API",
                      "metadata": {
                        "Season": "Fall"
                      },
                      "assets": {
                        "qr": {
                          "id": "U2FsdGVkX1+p2kdatp7KAUZxgSATC1gRWgsb1Q3RQyClNOBrfUrRKpTjSPSzBuUSZzb45TIpfWRISSiaz1QXGh8z9sVSHIWQsGLO6+1N81zXuY6/pnC7gRBa4edwMaRoCAwzqO9JDw148AGk4XrXLg==",
                          "url": "{{internalVoucherifyURL}}"
                        },
                        "barcode": {
                          "id": "U2FsdGVkX19wrLVWzIOgoVd9an76OxiJWB5/u9yWGoD7cqN6Qd1K9noNyR1YwvHnBrcN5fa5qtY+sOXonn7WsynAWeR289gA0XobsHHE2VWe8BzNZ7h2kH90SsiW+NCQg6Ts8clYWWP5lrGyV/fzoA==",
                          "url": "{{internalVoucherifyURL}}"
                        }
                      },
                      "is_referral_code": false,
                      "created_at": "2022-09-21T07:14:28.217Z",
                      "updated_at": null,
                      "validation_rules_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [],
                        "total": 0
                      },
                      "redemption": {
                        "quantity": null,
                        "redeemed_quantity": 0,
                        "object": "list",
                        "url": "/v1/vouchers/Code3/redemptions?page=1&limit=10"
                      },
                      "publish": {
                        "object": "list",
                        "count": 0,
                        "url": "/v1/vouchers/Code3/publications?page=1&limit=10"
                      },
                      "object": "voucher"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a voucher with the same code already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated voucher exists with id Code1",
                      "request_id": "v-0bb974be99d22504cd",
                      "resource_id": "Code1",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaignId}/import": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The ID of an existing campaign to which you're importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."
        }
      ],
      "post": {
        "operationId": "import-vouchers-to-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Import Vouchers to Campaign",
        "description": "Imports vouchers to an **existing** campaign.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "requestBody": {
          "description": "Discount type, expiration date and the remaining attributes will be taken from the [Campaign](ref:get-campaign) settings.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignsImportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "code": "CODE7",
                      "category": "First",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "active": true
                    },
                    {
                      "code": "CODE8",
                      "category": "Second",
                      "redemption": {
                        "quantity": 18
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "active": true
                    },
                    {
                      "code": "CODE9",
                      "redemption": {
                        "quantity": 4
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "active": true
                    }
                  ]
                },
                "Gift Cards": {
                  "value": [
                    {
                      "code": "CODE13",
                      "category": "First",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "gift": {
                        "amount": 500
                      },
                      "active": true
                    },
                    {
                      "code": "CODE14",
                      "category": "Second",
                      "redemption": {
                        "quantity": 18
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "gift": {
                        "amount": 2000
                      },
                      "active": true
                    },
                    {
                      "code": "CODE15",
                      "redemption": {
                        "quantity": 4
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "active": false
                    }
                  ]
                },
                "Loyalty Cards": {
                  "value": [
                    {
                      "code": "CODE10",
                      "category": "First",
                      "redemption": {
                        "quantity": 1
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "loyalty_card": {
                        "points": 300
                      },
                      "active": true
                    },
                    {
                      "code": "CODE11",
                      "category": "Second",
                      "redemption": {
                        "quantity": 18
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "loyalty_card": {
                        "points": 2000
                      },
                      "active": true
                    },
                    {
                      "code": "CODE12",
                      "redemption": {
                        "quantity": 4
                      },
                      "metadata": {
                        "season": "Fall"
                      },
                      "additional_info": "secret-code1",
                      "active": true
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the vouchers will be imported to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsImportCreateResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the request includes incorrect data, e.g. a wrong data type or duplicated codes.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/e_400_invalid_voucher"
                    },
                    {
                      "$ref": "#/components/schemas/e_400_duplicate_key"
                    }
                  ]
                },
                "examples": {
                  "Duplicate Codes": {
                    "value": {
                      "code": 400,
                      "key": "duplicate_key",
                      "message": "Duplicate codes",
                      "details": "2 voucher codes(s) already exist.",
                      "request_id": "v-0adaccaba61502e4b3"
                    }
                  },
                  "Missing Code": {
                    "value": {
                      "code": 400,
                      "key": "invalid_voucher",
                      "message": "Invalid Voucher",
                      "details": "Found 1 voucher(s) without 'code' value",
                      "request_id": "v-0bbc38ce088c8b2f9a"
                    }
                  },
                  "Invalid Payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .redemption.quantity should be number,null",
                      "request_id": "v-0c545db3808418908f"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaignId}/importCSV": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value."
        }
      ],
      "post": {
        "operationId": "import-vouchers-to-campaign-using-csv",
        "tags": [
          "Campaigns"
        ],
        "summary": "Import Vouchers to Campaign by CSV",
        "description": "Imports vouchers to an **existing** campaign.  \n\n\nThe CSV file has to include headers in the first line. \n\nCurl Example\n\n\n> 📘 Active\n>\n> The CSV file is allowed in two versions; either with or without a column titled `Active`. It indicates whether the voucher is enabled after the import event.  \n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CampaignsVouchersImportCSVRequestBody"
              }
            }
          },
          "description": "The file path is stored in the form `file` header."
        },
        "responses": {
          "200": {
            "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the vouchers will be imported to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsImportCsvCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "$ref": "#/components/examples/res_async_actions"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign 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 campaign with id camp_FZL4iTTdZw36nZOoXYQ172fQ",
                      "request_id": "v-0bc26adad888b6fed1",
                      "resource_id": "camp_FZL4iTTdZw36nZOoXYQ172fQ",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/qualification": {
      "post": {
        "operationId": "examine-campaigns-qualification",
        "deprecated": true,
        "tags": [
          "Campaigns"
        ],
        "summary": "Examine Qualification [Deprecated]",
        "description": "\n\n[Read](doc:checking-eligibility-for-coupons) about Qualification API limits before you start.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "audienceRulesOnly",
            "description": "This parameter set to true will ask only for verifying vouchers' validation rules only against conditions applied to audiences' attributes (belonging into segment and Customer metadata)"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimitExamineCampaignsQualification"
            },
            "in": "query",
            "name": "limit",
            "description": "The number of campaigns to be qualified. The maximum number is 50."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderExamineCampaignsQualification"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` means sorting in a descending order."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/2_req_examine_qualification"
              },
              "examples": {
                "Example": {
                  "value": {
                    "customer": {
                      "source_id": "source-id",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "order": {
                      "amount": 10000,
                      "items": [
                        {
                          "product_id": "product-id",
                          "quantity": "1",
                          "price": 10000,
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ]
                    },
                    "metadata": {
                      "key": "value"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This operation returns the list of valid and active campaigns based on the qualification of a given context (e.g., customer profile, redemptions metadata, order).\n\n[Read](doc:checking-eligibility-for-coupons) about Qualification API limits before you start.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/2_res_examine_qualification"
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaignId}/enable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value."
        }
      ],
      "post": {
        "operationId": "enable-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Enable Campaign",
        "description": "There are various times when you'll want to manage a campaign's accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*.  \n\nSets campaign state to **active**. The vouchers in this campaign can be redeemed - only if the redemption occurs after the start date of the campaign and voucher and the voucher and campaign are not expired.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an empty json `{}`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsEnableResponseBody"
                },
                "examples": {
                  "Empty JSON": {
                    "value": {}
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign 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 campaign with id camp_h8RyP6FV94F3Ev2odP24j5p",
                      "request_id": "v-0adaf4847c9502879b",
                      "resource_id": "camp_h8RyP6FV94F3Ev2odP24j5p",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{campaignId}/disable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value."
        }
      ],
      "post": {
        "operationId": "disable-campaign",
        "tags": [
          "Campaigns"
        ],
        "summary": "Disable Campaign",
        "description": "There are various times when you'll want to manage a campaign's accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*.  \n\nSets campaign state to **inactive**. The vouchers in this campaign can no longer be redeemed.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an empty json `{}`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsDisableResponseBody"
                },
                "examples": {
                  "Empty JSON": {
                    "value": {}
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign 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 campaign with id Spring Campaign",
                      "request_id": "v-0adaf3735116bb298b",
                      "resource_id": "Spring Campaign",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/campaigns/{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-campaign-transactions",
        "tags": [
          "Campaigns"
        ],
        "summary": "List Campaign Transactions",
        "description": "Retrieves all transactions for the campaign with the given campaign ID or campaign name. The `id` filter denotes the unique transaction identifier.\n\n> 🚧\n> The endpoint works only for gift card and loyalty campaigns.",
        "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.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "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/CampaignsTransactionsListResponseBody"
                },
                "examples": {
                  "Gift or loyalty campaign": {
                    "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/campaigns/{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-campaign-transactions",
        "tags": [
          "Campaigns"
        ],
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "summary": "Export Campaign Transactions",
        "description": "Export transactions is an asynchronous process that generates a CSV file with the data about credit movements on all gift cards 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](ref: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. |**Gift cards**:<br>- `CREDITS_REMOVAL`<br>- `CREDITS_ADDITION`<br>- `CREDITS_REFUND`<br>- `CREDITS_REDEMPTION`<br>**Loyalty cards**:<br>- `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: `CREDITS_ADDITION`, `CREDITS_REMOVAL`, `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: `CREDITS_ADDITION`, `CREDITS_REMOVAL`, `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> 👍 Export Loyalty Campaign Transactions\n>\n> For loyalty campaigns, this method works in the same way the [POST Export Loyalty Campaign Transactions](ref:export-loyalty-campaign-transactions) does.",
        "requestBody": {
          "description": "Specify the parameters for the transaction export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CampaignsTransactionsExportCreateRequestBody"
              },
              "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"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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/campaigns/{campaignId}/summary": {
      "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": "get-campaign-summary",
        "tags": [
          "Campaigns"
        ],
        "summary": "Get Campaign Summary",
        "description": "Returns data for campaign analytics, covering validations, redemptions, publications, and other details specific to a given campaign type.\n\nUse `start_date` and `end_date` to narrow down the data to specific periods.\n\n>🚧 Campaigns created before v20250602 version\n>\n>This endpoint returns analytics data for campaigns that were created after the [v20250602 version](https://support.voucherify.io/article/23-whats-new-in-voucherify#v20250602) was released on 17 June 2025. Older campaigns return empty data.",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDateOnly"
            },
            "description": "Timestamp representing the date which results must begin on. Represented in ISO 8601 format."
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDateOnly"
            },
            "description": "Timestamp representing the date which results must end on. Represented in ISO 8601 format."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "campaigns"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns campaign analytics data. Returns different data depending on the campaign type.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignsSummaryGetResponseBody"
                },
                "examples": {
                  "Generic code discount campaign": {
                    "value": {
                      "object": "campaign_summary",
                      "campaign": {
                        "id": "camp_WaZ6r4LSF1alRaIwJVKS07bs",
                        "name": "Summer-2025",
                        "campaign_type": "DISCOUNT_COUPONS",
                        "type": "STANDALONE",
                        "voucher": {
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 2000,
                            "effect": "APPLY_TO_ORDER"
                          },
                          "redemption": {
                            "quantity": null
                          },
                          "is_referral_code": false
                        },
                        "auto_join": false,
                        "join_once": false,
                        "use_voucher_metadata_schema": true,
                        "vouchers_count": 1,
                        "active": true,
                        "metadata": {},
                        "created_at": "2025-06-17T08:05:57.720Z",
                        "creation_status": "DONE",
                        "vouchers_generation_status": "DONE",
                        "protected": false,
                        "category_id": null,
                        "categories": [],
                        "object": "campaign"
                      },
                      "redemptions": 10,
                      "redemptions_succeeded": 8,
                      "redemptions_failed": 2,
                      "rollbacks": 1,
                      "rollbacks_succeeded": 1,
                      "rollbacks_failed": 0,
                      "validations": 10,
                      "validations_succeeded": 8,
                      "validations_failed": 2,
                      "vouchers_created": 1,
                      "vouchers_deleted": 0,
                      "publications": 0,
                      "publications_succeeded": 0,
                      "publications_failed": 0,
                      "discounted_amount": 20000,
                      "rolledback_discounted_amount": 200,
                      "orders_amount": 19453,
                      "orders_rolledback_amount": 800
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a campaign is 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 DOES_NOT_EXIST",
                      "request_id": "v-10cb77ea020c70aa60",
                      "resource_id": "DOES_NOT_EXIST",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers": {
      "get": {
        "operationId": "list-promotion-tiers",
        "tags": [
          "Promotions"
        ],
        "summary": "List Promotion Tiers",
        "description": "This method enables you to list promotion tiers.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "is_available",
            "description": "This parameter allows filtering promotions that are only available at the moment. When set to `true`, it selects only non-expired and active promotions."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimit"
            },
            "in": "query",
            "name": "limit",
            "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterPage"
            },
            "in": "query",
            "description": "Which page of results to return. The lowest value is `1`.",
            "name": "page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListPromotionTiers"
            },
            "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",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with a `tiers` property that contains an array of promotion tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsTiersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "tiers",
                      "tiers": [
                        {
                          "id": "promo_NzjTc3ZXTe7md5SziK3uYtei",
                          "created_at": "2022-09-21T11:38:34.962Z",
                          "name": "Order more than $100",
                          "banner": "Order more than $100",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 3000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {},
                          "hierarchy": 1,
                          "promotion_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                          "campaign": {
                            "id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                            "start_date": "2022-09-21T00:00:00.000Z",
                            "expiration_date": "2022-09-30T00:00:00.000Z",
                            "validity_timeframe": {
                              "interval": "P3D",
                              "duration": "P2D"
                            },
                            "validity_day_of_week": [
                              1,
                              2,
                              3,
                              4,
                              5
                            ],
                            "active": true,
                            "category_id": "cat_0bb81a481615a37b5e",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                          "active": true,
                          "start_date": "2022-09-21T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": {
                            "interval": "P3D",
                            "duration": "P2D"
                          },
                          "validity_day_of_week": [
                            1,
                            2
                          ],
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 0
                            },
                            "orders": {
                              "total_amount": 0,
                              "total_discount_amount": 0
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": null
                        },
                        {
                          "id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
                          "created_at": "2021-12-15T11:34:01.358Z",
                          "updated_at": "2022-02-09T09:20:08.619Z",
                          "name": "Hot Promotion - Tier 2",
                          "banner": "Get Tier 2 Discount $20 Off",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 2000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {},
                          "hierarchy": 2,
                          "promotion_id": "camp_5h0wc453_5",
                          "campaign": {
                            "id": "camp_5h0wc453_5",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "category_id": "cat_0b688929a2476386a6",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_5h0wc453_5",
                          "active": true,
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 33
                            },
                            "orders": {
                              "total_amount": 519200,
                              "total_discount_amount": 66000
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": {
                            "object": "list",
                            "data_ref": "data",
                            "data": [
                              {
                                "id": "asgm_pEe1inoYSfmO12p7",
                                "rule_id": "val_5h0wc453_5",
                                "related_object_id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
                                "related_object_type": "promotion_tier",
                                "created_at": "2021-12-15T11:34:01.358Z",
                                "object": "validation_rules_assignment"
                              }
                            ],
                            "total": 1
                          }
                        },
                        {
                          "id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
                          "created_at": "2021-12-15T11:34:01.333Z",
                          "updated_at": "2022-02-09T09:20:05.603Z",
                          "name": "Hot Promotion - Tier 1",
                          "banner": "Get Tier 1 Discount 10zl",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 1000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {
                            "ProductionMetaData": "Hot Promotion - Tier 1"
                          },
                          "hierarchy": 1,
                          "promotion_id": "camp_5h0wc453_5",
                          "campaign": {
                            "id": "camp_5h0wc453_5",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "category_id": "cat_0b688929a2476386a6",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_5h0wc453_5",
                          "active": true,
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 11
                            },
                            "orders": {
                              "total_amount": 1414979,
                              "total_discount_amount": 11000
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": {
                            "object": "list",
                            "data_ref": "data",
                            "data": [
                              {
                                "id": "asgm_QqYs7GGVy7cuh3L9",
                                "rule_id": "val_5h0wc453_4",
                                "related_object_id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
                                "related_object_type": "promotion_tier",
                                "created_at": "2021-12-15T11:34:01.333Z",
                                "object": "validation_rules_assignment"
                              }
                            ],
                            "total": 1
                          }
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/{campaignId}/tiers": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID assigned by Voucherify."
        }
      ],
      "get": {
        "operationId": "list-promotion-tiers-from-campaign",
        "tags": [
          "Promotions"
        ],
        "summary": "List Promotion Tiers from Campaign",
        "description": "This method enables you to list promotion tiers from a specified campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with a `tiers` property that contains an array of promotion tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsTiersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "tiers",
                      "tiers": [
                        {
                          "id": "promo_xyOKjAmysZrwt3aqq1dMUwMU",
                          "created_at": "2022-04-07T08:43:53.730Z",
                          "updated_at": "2022-08-26T05:22:43.220Z",
                          "name": "Amount",
                          "banner": "Get $10 off entire order",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 1000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {},
                          "hierarchy": 2,
                          "promotion_id": "camp_SGq39XXJ47vm7Xys3D0NLgQ0",
                          "campaign": {
                            "id": "camp_SGq39XXJ47vm7Xys3D0NLgQ0",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "category_id": "cat_0b5f67863083bf7c05",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_SGq39XXJ47vm7Xys3D0NLgQ0",
                          "active": true,
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 1
                            },
                            "orders": {
                              "total_amount": 2187,
                              "total_discount_amount": 1000
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": null
                        },
                        {
                          "id": "promo_CQonGnrsFAdEJfJQ3oKB3a8G",
                          "created_at": "2022-04-07T08:43:53.581Z",
                          "updated_at": "2022-08-26T05:22:43.008Z",
                          "name": "Percentage",
                          "banner": "Get 10% OFF on entire order",
                          "action": {
                            "discount": {
                              "type": "PERCENT",
                              "percent_off": 10,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {},
                          "hierarchy": 1,
                          "promotion_id": "camp_SGq39XXJ47vm7Xys3D0NLgQ0",
                          "campaign": {
                            "id": "camp_SGq39XXJ47vm7Xys3D0NLgQ0",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "category_id": "cat_0b5f67863083bf7c05",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_SGq39XXJ47vm7Xys3D0NLgQ0",
                          "active": true,
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 1
                            },
                            "orders": {
                              "total_amount": 71600,
                              "total_discount_amount": 7160
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": null
                        }
                      ],
                      "total": 2,
                      "has_more": false
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "add-promotion-tier-to-campaign",
        "tags": [
          "Promotions"
        ],
        "summary": "Add Promotion Tier to Campaign",
        "description": "This method allows you to add a new promotion tier to an existing campaign. The tier hierarchy will be set as the next consequtive integer following the lowest ranking tier.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the promotion tier parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromotionsTiersCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Order more than $100",
                    "banner": "Order more than $100",
                    "action": {
                      "discount": {
                        "type": "AMOUNT",
                        "amount_off": 3000,
                        "effect": "APPLY_TO_ORDER"
                      }
                    },
                    "metadata": {},
                    "active": true,
                    "start_date": "2022-09-21T00:00:00.000Z",
                    "expiration_date": "2022-09-30T00:00:00.000Z",
                    "validity_timeframe": {
                      "interval": "P2D",
                      "duration": "P1D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3,
                      4
                    ],
                    "validation_rules": [
                      "val_q8qUBMOh5qIQ"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a promotion tier object if the promotion tier was successfully added to the campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsTiersCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "promo_JcYGIKJsnv0SpZcx2njZm69x",
                      "created_at": "2022-09-22T11:21:57.808Z",
                      "name": "Order more than $100",
                      "banner": "Order more than $100",
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 3000,
                          "effect": "APPLY_TO_ORDER"
                        }
                      },
                      "metadata": {},
                      "hierarchy": 6,
                      "campaign": {
                        "id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "expiration_date": "2022-09-30T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "active": true,
                        "object": "campaign"
                      },
                      "campaign_id": null,
                      "active": true,
                      "start_date": "2022-09-21T00:00:00.000Z",
                      "expiration_date": "2022-09-30T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P2D",
                        "duration": "P1D"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4
                      ],
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 0
                        },
                        "orders": {
                          "total_amount": 0,
                          "total_discount_amount": 0
                        }
                      },
                      "object": "promotion_tier",
                      "validation_rule_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_AmeYPmiLZKaIxq01",
                            "rule_id": "val_q8qUBMOh5qIQ",
                            "related_object_id": "promo_JcYGIKJsnv0SpZcx2njZm69x",
                            "related_object_type": "promotion_tier",
                            "created_at": "2022-09-22T11:21:57.808Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers/{promotionTierId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterPromotionTierId"
          },
          "name": "promotionTierId",
          "in": "path",
          "required": true,
          "description": "Unique promotion tier ID."
        }
      ],
      "get": {
        "operationId": "get-promotion-tier",
        "tags": [
          "Promotions"
        ],
        "summary": "Get Promotion Tier",
        "description": "This method enables you to retrieve a specific promotion tier.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a promotion tier object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsTiersGetResponseBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-promotion-tier",
        "tags": [
          "Promotions"
        ],
        "summary": "Update Promotion Tier",
        "description": "This method updates a promotion tier.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the promotion tier parameters that you would like to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromotionsTiersUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Order more than $100 USD",
                    "banner": "Order more than $100 USD",
                    "action": {
                      "discount": {
                        "type": "PERCENT",
                        "percent_off": 25,
                        "effect": "APPLY_TO_ORDER"
                      }
                    },
                    "metadata": {
                      "level": "A-21"
                    },
                    "hierarchy": 1,
                    "start_date": "2022-09-22T00:00:00.000Z",
                    "expiration_date": "2022-09-29T00:00:00.000Z",
                    "validity_timeframe": {
                      "interval": "P3D",
                      "duration": "P2D"
                    },
                    "validity_day_of_week": [
                      1,
                      2,
                      3
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a promotion tier object if the update was successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsTiersUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "promo_hINAfBAVhmFuSAzi3vptfyxW",
                      "created_at": "2022-09-22T12:40:23.286Z",
                      "updated_at": "2022-09-22T12:40:58.626Z",
                      "name": "Order more than $100 USD",
                      "banner": "Order more than $100 USD",
                      "action": {
                        "discount": {
                          "type": "PERCENT",
                          "percent_off": 25,
                          "effect": "APPLY_TO_ORDER"
                        }
                      },
                      "metadata": {
                        "level": "A-21"
                      },
                      "hierarchy": 1,
                      "campaign": {
                        "id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "expiration_date": "2022-09-30T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "active": true,
                        "object": "campaign"
                      },
                      "campaign_id": null,
                      "active": false,
                      "start_date": "2022-09-22T00:00:00.000Z",
                      "expiration_date": "2022-09-29T00:00:00.000Z",
                      "validity_timeframe": {
                        "interval": "P3D",
                        "duration": "P2D"
                      },
                      "validity_day_of_week": [
                        1,
                        2,
                        3
                      ],
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 0
                        },
                        "orders": {
                          "total_amount": 0,
                          "total_discount_amount": 0
                        }
                      },
                      "object": "promotion_tier",
                      "validation_rule_assignments": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "asgm_8e3e53ZgDNcoRGAI",
                            "rule_id": "val_q8qUBMOh5qIQ",
                            "related_object_id": "promo_hINAfBAVhmFuSAzi3vptfyxW",
                            "related_object_type": "promotion_tier",
                            "created_at": "2022-09-22T12:40:23.286Z",
                            "object": "validation_rules_assignment"
                          }
                        ],
                        "total": 1
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-promotion-tier",
        "tags": [
          "Promotions"
        ],
        "summary": "Delete Promotion Tier",
        "description": "This method deletes a promotion tier.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the promotion tier with given ID was 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 promotion_tier with id promo_2EnAik6Jt7dKTOMkRTIgEjZ",
                      "request_id": "v-0ae284707e9027a79d",
                      "resource_id": "promo_2EnAik6Jt7dKTOMkRTIgEjZ",
                      "resource_type": "promotion_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers/{promotionTierId}/enable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterPromotionTierId"
          },
          "name": "promotionTierId",
          "in": "path",
          "required": true,
          "description": "Unique promotion tier ID."
        }
      ],
      "post": {
        "operationId": "enable-promotion-tier",
        "tags": [
          "Promotions"
        ],
        "summary": "Enable Promotion Tier",
        "description": "This method enables a promotion tier, i.e. makes the `active` parameter = `true`.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the promotion tier object with an updated `active` parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsTiersEnableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "promo_NzjTc3ZXTe7md5SziK3uYtei",
                      "created_at": "2022-09-21T11:38:34.962Z",
                      "updated_at": "2022-09-22T10:32:07.712Z",
                      "name": "Order more than $100",
                      "banner": "Order more than $100",
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 3000,
                          "effect": "APPLY_TO_ORDER"
                        }
                      },
                      "metadata": {},
                      "hierarchy": 1,
                      "campaign": {
                        "id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "expiration_date": "2022-09-30T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "active": true,
                        "object": "campaign"
                      },
                      "campaign_id": null,
                      "active": true,
                      "start_date": "2022-09-21T00:00:00.000Z",
                      "expiration_date": "2022-09-30T00:00:00.000Z",
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 2
                        },
                        "orders": {
                          "total_amount": 37650,
                          "total_discount_amount": 6000
                        }
                      },
                      "object": "promotion_tier",
                      "validation_rule_assignments": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the promotion tier 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 promotion_tier with id promo_NzjTc3ZXTe7md5SziK3uYte",
                      "request_id": "v-0bbaea52be14cc9782",
                      "resource_id": "promo_NzjTc3ZXTe7md5SziK3uYte",
                      "resource_type": "promotion_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers/{promotionTierId}/disable": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterPromotionTierId"
          },
          "name": "promotionTierId",
          "in": "path",
          "required": true,
          "description": "Unique promotion tier ID."
        }
      ],
      "post": {
        "operationId": "disable-promotion-tier",
        "tags": [
          "Promotions"
        ],
        "summary": "Disable Promotion Tier",
        "description": "This method disables a promotion tier, i.e. makes the `active` parameter = `false`.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the promotion tier object with an updated `active` parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsTiersDisableResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "promo_NzjTc3ZXTe7md5SziK3uYtei",
                      "created_at": "2022-09-21T11:38:34.962Z",
                      "updated_at": "2022-09-22T10:34:09.529Z",
                      "name": "Order more than $100",
                      "banner": "Order more than $100",
                      "action": {
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 3000,
                          "effect": "APPLY_TO_ORDER"
                        }
                      },
                      "metadata": {},
                      "hierarchy": 1,
                      "campaign": {
                        "id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "expiration_date": "2022-09-30T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "active": true,
                        "object": "campaign"
                      },
                      "campaign_id": null,
                      "active": false,
                      "start_date": "2022-09-21T00:00:00.000Z",
                      "expiration_date": "2022-09-30T00:00:00.000Z",
                      "validity_day_of_week": [
                        1,
                        2,
                        3,
                        4,
                        5
                      ],
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 2
                        },
                        "orders": {
                          "total_amount": 37650,
                          "total_discount_amount": 6000
                        }
                      },
                      "object": "promotion_tier",
                      "validation_rule_assignments": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the promotion tier 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 promotion_tier with id promo_NzjTc3ZXTe7md5SziK3uYte",
                      "request_id": "v-0bbaea52be14cc9782",
                      "resource_id": "promo_NzjTc3ZXTe7md5SziK3uYte",
                      "resource_type": "promotion_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/stacks": {
      "get": {
        "operationId": "list-all-promotion-stacks",
        "tags": [
          "Promotions"
        ],
        "summary": "List Promotion Stacks",
        "description": "This method enables you to list promotion stacks irrespective of the campaign they are associated with. \n\nYou can use filters in the query parameters to specify the stacks to be returned in the response.\n\n## Advanced filters for fetching promotion stacks\n\n| **Filters** | **Examples** |\n| :--- | :--- |\n| Created Before | - `[created_at][before]=2021-12-30T13:52:18.227Z`<br>- `[filters][created_at][conditions][$before][0]=2021-12-30T13:52:18.227Z` |\n| Created After | - `[created_at][after]=2021-12-30T13:52:18.227Z`<br>- `[filters][created_at][conditions][$after][0]=2021-12-30T13:52:18.227Z` |\n| Updated Before | - `[updated_at][before]=2021-12-30T13:52:18.227Z`<br>- `[filters][updated_at][conditions][$before][0]=2021-12-30T13:52:18.227Z` |\n| Updated After | - `[updated_at][after]=2021-12-30T13:52:18.227Z`<br>- `[filters][updated_at][conditions][$after][0]=2021-12-30T13:52:18.227Z` |",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimit"
            },
            "in": "query",
            "name": "limit",
            "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterPage"
            },
            "in": "query",
            "description": "Which page of results to return. The lowest value is `1`.",
            "name": "page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListAllPromotionStacks"
            },
            "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."
          },
          {
            "$ref": "#/components/parameters/created_at"
          },
          {
            "$ref": "#/components/parameters/updated_at"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with a `data` property that contains an array of promotion stacks across all your campaigns.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsStacksListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "stack_SLuhQrAt3mXwHg776lYkzZO8",
                          "name": "Stack 2",
                          "created_at": "2022-11-03T10:18:58.356Z",
                          "campaign_id": "camp_h8RyP6FV94F3Ev2odP24j5p1",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Mfww2TuoeU23enqSmnz0f3rh",
                              "promo_vU5IHaLKS7mmZ3ylABET6ikb",
                              "promo_TeHA11JlfN29mUftDcpqIWWq",
                              "promo_bhKBsIX3tO7yqmpTLCLLuaud"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_twQWp1TyaxX5RlSqn061xGVy",
                          "name": "First stack",
                          "created_at": "2021-12-27T11:59:21.838Z",
                          "updated_at": "2022-12-16T08:22:51.970Z",
                          "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Vet0vCNyyo5pOddHfu2X3FCB",
                              "promo_PoIyRVFA5c0Jk514xCpzKHga",
                              "promo_Mwy9XpA0TLctSGriM5kum0qp"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_vhCqN5PY7rmPw8yACRvHRZaz",
                          "name": "Second stack",
                          "created_at": "2021-12-27T11:55:47.431Z",
                          "updated_at": "2022-12-16T08:22:52.221Z",
                          "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Vet0vCNyyo5pOddHfu2X3FCB",
                              "promo_PoIyRVFA5c0Jk514xCpzKHga",
                              "promo_Mwy9XpA0TLctSGriM5kum0qp"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_zwChew7GY1AnDZJQ6GVP2sdT",
                          "name": "Third stack",
                          "created_at": "2021-12-27T11:54:26.283Z",
                          "updated_at": "2022-12-16T08:22:52.483Z",
                          "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Vet0vCNyyo5pOddHfu2X3FCB",
                              "promo_Mwy9XpA0TLctSGriM5kum0qp",
                              "promo_PoIyRVFA5c0Jk514xCpzKHga"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_NS5hEUznL9XPa89rbrOZYMey",
                          "name": "Fourth stack",
                          "created_at": "2021-12-27T11:48:43.982Z",
                          "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Vet0vCNyyo5pOddHfu2X3FCB",
                              "promo_Mwy9XpA0TLctSGriM5kum0qp",
                              "promo_PoIyRVFA5c0Jk514xCpzKHga"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_Rz0NvFtCZOObS3J5R68KET17",
                          "name": "Third stack",
                          "created_at": "2021-12-27T11:40:57.426Z",
                          "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Vet0vCNyyo5pOddHfu2X3FCB",
                              "promo_PoIyRVFA5c0Jk514xCpzKHga"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_e8pH0nIuANmYRPE0x8hwDrpm",
                          "name": "Second stack",
                          "created_at": "2021-12-27T08:43:13.875Z",
                          "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Mwy9XpA0TLctSGriM5kum0qp",
                              "promo_PoIyRVFA5c0Jk514xCpzKHga"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_3Q4EJpZqg3DI5IRwgBYfsb37",
                          "name": "First stack",
                          "created_at": "2021-12-27T08:43:13.498Z",
                          "campaign_id": "camp_HXsR22VUMC4hN4DR7eAhCalp",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_Vet0vCNyyo5pOddHfu2X3FCB",
                              "promo_PoIyRVFA5c0Jk514xCpzKHga"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_KxSD0GahLUg9ULB6TseGfUHJ",
                          "name": "Stack 1",
                          "created_at": "2021-12-23T12:28:38.881Z",
                          "campaign_id": "camp_h8RyP6FV94F3Ev2odP24j5p1",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_NMex647s5UushvbBUJmYT2Fc",
                              "promo_4TqHr24boFISDrcOHSlfAxwm"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        }
                      ],
                      "total": 9
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/{campaignId}/stacks": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique campaign ID."
        }
      ],
      "get": {
        "operationId": "list-promotion-stacks-in-campaign",
        "tags": [
          "Promotions"
        ],
        "summary": "List Promotion Stacks in Campaign",
        "description": "This method enables you to list promotion stacks from a specified campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of promotion stack objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsStacksListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "stack_p0WhtyyDU95crobleMpRabhH",
                          "name": "First stack",
                          "created_at": "2022-09-22T13:03:25.740Z",
                          "campaign_id": "camp_99HUWI53bVyLzPN1Fg5TBLWX",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_dJNhAEeV5sR5oPQq1UrUdnMC",
                              "promo_aaAF8mVAzA0PF1igia2OC63d"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        },
                        {
                          "id": "stack_XAzn8AFR3Ks3DBPLAQxV7zHe",
                          "name": "Second stack",
                          "created_at": "2022-09-22T13:03:25.903Z",
                          "campaign_id": "camp_99HUWI53bVyLzPN1Fg5TBLWX",
                          "object": "promotion_stack",
                          "tiers": {
                            "ids": [
                              "promo_aaAF8mVAzA0PF1igia2OC63d",
                              "promo_dJNhAEeV5sR5oPQq1UrUdnMC"
                            ],
                            "hierarchy_mode": "MANUAL"
                          }
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-promotion-stack",
        "tags": [
          "Promotions"
        ],
        "summary": "Create Promotion Stack",
        "description": "This method creates one promotion stack. The sequence of promotion tier IDs will determine the promotion stacking order.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the order of promotion tiers for the promotion stack.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromotionsStacksCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Fifth Stack",
                    "tiers": {
                      "ids": [
                        "promo_aaAF8mVAzA0PF1igia2OC63d",
                        "promo_t9zdL6XMFk7B8fQ23zxELtdE",
                        "promo_dJNhAEeV5sR5oPQq1UrUdnMC"
                      ],
                      "hierarchy_mode": "MANUAL"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a new stack object if a valid promotion campaign identifier was provided in the path and available promotion IDs in the payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsStacksCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stack_q2AmzFvOMCmg4Wdu5bDBlME6",
                      "name": "Fifth Stack",
                      "created_at": "2022-09-23T07:44:53.888Z",
                      "campaign_id": "camp_99HUWI53bVyLzPN1Fg5TBLWX",
                      "object": "promotion_stack",
                      "tiers": {
                        "ids": [
                          "promo_aaAF8mVAzA0PF1igia2OC63d",
                          "promo_t9zdL6XMFk7B8fQ23zxELtdE",
                          "promo_dJNhAEeV5sR5oPQq1UrUdnMC"
                        ],
                        "hierarchy_mode": "MANUAL"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign or promotion tier cannot 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_99HUWI53bVyLzPN1Fg5TBLW",
                      "request_id": "v-0bbc10de5886137afd",
                      "resource_id": "camp_99HUWI53bVyLzPN1Fg5TBLW",
                      "resource_type": "campaign"
                    }
                  },
                  "Promotion Tier Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find promotion_tier with id promo_dJNhAEeV5sR5oPQq1UrUdnM",
                      "request_id": "v-0bbc11186303fa288a",
                      "resource_id": "promo_dJNhAEeV5sR5oPQq1UrUdnM",
                      "resource_type": "promotion_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/{campaignId}/stacks/{stackId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "ID of the promotion 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 Campaign`. "
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterPromotionStackId"
          },
          "name": "stackId",
          "in": "path",
          "required": true,
          "description": "Promotion stack ID."
        }
      ],
      "get": {
        "operationId": "get-promotion-stack",
        "tags": [
          "Promotions"
        ],
        "summary": "Get Promotion Stack",
        "description": "This method returns the details of a promotion stack, including the promotion tiers grouped within the stack.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a stack object if valid identifiers were provided in the path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsStacksGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stack_p0WhtyyDU95crobleMpRabhH",
                      "name": "First stack",
                      "created_at": "2022-09-22T13:03:25.740Z",
                      "campaign_id": "camp_99HUWI53bVyLzPN1Fg5TBLWX",
                      "object": "promotion_stack",
                      "tiers": {
                        "ids": [
                          "promo_dJNhAEeV5sR5oPQq1UrUdnMC",
                          "promo_aaAF8mVAzA0PF1igia2OC63d"
                        ],
                        "hierarchy_mode": "MANUAL"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the campaign or promotion stack cannot be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Stack Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find promotion_stack with id stack_p0WhtyyDU95crobleMpRabh",
                      "request_id": "v-0bbc0a659591f99d65",
                      "resource_id": "stack_p0WhtyyDU95crobleMpRabh",
                      "resource_type": "promotion_stack"
                    }
                  },
                  "Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_99HUWI53bVyLzPN1Fg5TBLW",
                      "request_id": "v-0bbc0aa77a0c8b78e8",
                      "resource_id": "camp_99HUWI53bVyLzPN1Fg5TBLW",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-promotion-stack",
        "tags": [
          "Promotions"
        ],
        "summary": "Update Promotion Stack",
        "description": "This methods allows for editing an existing stack.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the promotion stack parameters that you would like to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PromotionsStacksUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Fifth Stack Modified",
                    "tiers": {
                      "ids": [
                        "promo_aaAF8mVAzA0PF1igia2OC63d",
                        "promo_t9zdL6XMFk7B8fQ23zxELtdE"
                      ],
                      "hierarchy_mode": "MANUAL"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a promotion stack with updated parameters if the update was successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromotionsStacksUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stack_q2AmzFvOMCmg4Wdu5bDBlME6",
                      "name": "Fifth Stack Modified",
                      "created_at": "2022-09-23T07:44:53.888Z",
                      "updated_at": "2022-09-23T07:59:44.172Z",
                      "campaign_id": "camp_99HUWI53bVyLzPN1Fg5TBLWX",
                      "object": "promotion_stack",
                      "tiers": {
                        "ids": [
                          "promo_aaAF8mVAzA0PF1igia2OC63d",
                          "promo_t9zdL6XMFk7B8fQ23zxELtdE"
                        ],
                        "hierarchy_mode": "MANUAL"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-promotion-stack",
        "tags": [
          "Promotions"
        ],
        "summary": "Delete Promotion Stack",
        "description": "This method deletes a promotion stack.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the stack or campaign with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Stack Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find promotion_stack with id stack_KOIde7AUf08at12lZ1r3OfFp",
                      "request_id": "v-0ae289ca779027b030",
                      "resource_id": "stack_KOIde7AUf08at12lZ1r3OfFp",
                      "resource_type": "promotion_stack"
                    }
                  },
                  "Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id Summer % Promotion",
                      "request_id": "v-0ae28a621c46af534b",
                      "resource_id": "Summer % Promotion",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/rewards": {
      "get": {
        "operationId": "list-rewards",
        "tags": [
          "Rewards"
        ],
        "summary": "List Rewards",
        "description": "Retrieve rewards.",
        "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. Use this parameter to get the reward details in the context of an assignment ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of reward objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "rew_3e7IqghVtTR7L3xQMSCxjFu2",
                          "name": "Get $10",
                          "type": "CAMPAIGN",
                          "parameters": {
                            "campaign": {
                              "id": "camp_FNYR4jhqZBM9xTptxDGgeNBV",
                              "balance": 1000,
                              "type": "GIFT_VOUCHERS"
                            }
                          },
                          "stock": null,
                          "redeemed": null,
                          "attributes": {},
                          "created_at": "2022-03-10T08:40:20.917Z",
                          "updated_at": "2022-08-17T07:52:56.965Z",
                          "metadata": null,
                          "object": "reward"
                        },
                        {
                          "id": "rew_nIy4gHpQHle2c3pNMwuj7G6j",
                          "name": "Get 100 Points",
                          "type": "CAMPAIGN",
                          "parameters": {
                            "campaign": {
                              "id": "camp_E87CubZLZ8eoQt3c4kAEZsx0",
                              "balance": 100,
                              "type": "LOYALTY_PROGRAM"
                            }
                          },
                          "stock": null,
                          "redeemed": null,
                          "attributes": {},
                          "created_at": "2022-02-28T11:56:13.764Z",
                          "updated_at": null,
                          "metadata": null,
                          "object": "reward"
                        },
                        {
                          "id": "rew_BNZ3van6AF2AiquWp8Lfw0xq",
                          "name": "30% discount",
                          "type": "CAMPAIGN",
                          "parameters": {
                            "campaign": {
                              "id": "camp_ZtHLATYVpItqmuSqmaz1rZ2Y",
                              "type": "DISCOUNT_COUPONS"
                            }
                          },
                          "stock": null,
                          "redeemed": null,
                          "attributes": {},
                          "created_at": "2022-08-11T09:48:50.609Z",
                          "updated_at": null,
                          "metadata": {},
                          "object": "reward"
                        },
                        {
                          "id": "rew_nlV8bgWU1jNO9YWQ7CdZmzq7",
                          "name": "1 point = $0.01",
                          "type": "COIN",
                          "parameters": {
                            "coin": {
                              "exchange_ratio": 0.01,
                              "points_ratio": 1
                            }
                          },
                          "stock": null,
                          "redeemed": null,
                          "attributes": {},
                          "created_at": "2022-08-11T16:45:21.582Z",
                          "updated_at": null,
                          "metadata": {
                            "Type": "0.01"
                          },
                          "object": "reward"
                        },
                        {
                          "id": "rew_x6FmF1KFdDs06hYPr9lK6ajf",
                          "name": "Material Reward",
                          "type": "MATERIAL",
                          "parameters": {
                            "product": {
                              "id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619"
                            }
                          },
                          "stock": "4",
                          "redeemed": "1",
                          "attributes": {
                            "image_url": "https://voucherify-uploads.s3.amazonaws.com/org_2qt8DYlM/img_wJHdZUAVSpWtYM6ORq4up3I2.png",
                            "description": "Get a Comic Book in Archie's series."
                          },
                          "created_at": "2022-08-17T07:13:32.781Z",
                          "updated_at": null,
                          "metadata": {
                            "Type": "Personal"
                          },
                          "object": "reward"
                        }
                      ],
                      "total": 5
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-reward",
        "tags": [
          "Rewards"
        ],
        "summary": "Create Reward",
        "description": "Create a new reward.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "requestBody": {
          "description": "Define parameters of the new reward.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsCreateRequestBody"
              },
              "examples": {
                "Gift card credits": {
                  "value": {
                    "name": "Digital - Gift Card Reward",
                    "type": "CAMPAIGN",
                    "metadata": {
                      "Type": "Gift"
                    },
                    "parameters": {
                      "campaign": {
                        "id": "camp_hC2GdqYtOmTT45zfhib62cK1",
                        "balance": 3000
                      }
                    }
                  }
                },
                "Discount Coupon": {
                  "value": {
                    "name": "Digital - Discount Coupon",
                    "type": "CAMPAIGN",
                    "metadata": {
                      "Type": "Discount"
                    },
                    "parameters": {
                      "campaign": {
                        "id": "camp_hC2GdqYtOmTT45zfhib62cK1"
                      }
                    }
                  }
                },
                "Loyalty Points": {
                  "value": {
                    "name": "Digital - Loyalty Points Reward",
                    "type": "CAMPAIGN",
                    "metadata": {
                      "Type": "Loyalty Points"
                    },
                    "parameters": {
                      "campaign": {
                        "id": "camp_hC2GdqYtOmTT45zfhib62cK1",
                        "balance": 100
                      }
                    }
                  }
                },
                "Pay with Points": {
                  "value": {
                    "name": "Pay with Points Reward",
                    "type": "COIN",
                    "metadata": {
                      "Type": "Coin"
                    },
                    "parameters": {
                      "coin": {
                        "exchange_ratio": 900,
                        "points_ratio": 8000
                      }
                    }
                  }
                },
                "Material Reward": {
                  "value": {
                    "name": "Get a Comic Book",
                    "metadata": {
                      "Type": "Material"
                    },
                    "type": "MATERIAL",
                    "parameters": {
                      "product": {
                        "id": "prod_0b15f6b9f650c16990",
                        "sku_id": "sku_0b1621b319d248b79f"
                      }
                    },
                    "stock": 2,
                    "attributes": {
                      "image_url": "https://www.website.com/img_fPHsk9Ob.png",
                      "description": "Archie's Series"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a reward object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsCreateResponseBody"
                },
                "examples": {
                  "Material": {
                    "value": {
                      "id": "rew_Crmu3hu2FKZWZIML59AeAs1n",
                      "name": "Material Reward",
                      "type": "MATERIAL",
                      "parameters": {
                        "product": {
                          "id": "prod_0b15f6b9f650c16990",
                          "sku_id": "sku_0b1621b319d248b79f"
                        }
                      },
                      "stock": "2",
                      "redeemed": null,
                      "attributes": {
                        "image_url": "{{internalVoucherifyURL}}",
                        "description": "Archie's Series"
                      },
                      "created_at": "2022-08-25T11:20:58.172Z",
                      "updated_at": null,
                      "metadata": {
                        "Type": "Material"
                      },
                      "object": "reward"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/rewards/{rewardId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardId"
          },
          "name": "rewardId",
          "in": "path",
          "required": true,
          "description": "A unique reward ID."
        }
      ],
      "get": {
        "operationId": "get-reward",
        "tags": [
          "Rewards"
        ],
        "summary": "Get Reward",
        "description": "Retrieve a reward by the reward ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a reward object if a valid identifier was provided. ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Reward"
                }
              }
            }
          },
          "404": {
            "description": "Not Found. When requesting a reward that has been deleted or does not exist, the resource will not be returned.",
            "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 with id rew_C7wS9eHFDN4CIbXI5PpLSkG",
                      "request_id": "v-0b8c77bcc890215e35",
                      "resource_id": "rew_C7wS9eHFDN4CIbXI5PpLSkG",
                      "resource_type": "reward"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-reward",
        "tags": [
          "Rewards"
        ],
        "summary": "Update Reward",
        "description": "Update the details of a reward.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "requestBody": {
          "description": "Define the parameters to be updated for the reward.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsUpdateRequestBody"
              },
              "examples": {
                "Gift card credits": {
                  "value": {
                    "name": "Digital - Gift Card Reward",
                    "metadata": {
                      "Type": "Gift"
                    },
                    "parameters": {
                      "campaign": {
                        "id": "camp_hC2GdqYtOmTT45zfhib62cK1",
                        "balance": 3000
                      }
                    }
                  }
                },
                "Discount Coupon": {
                  "value": {
                    "name": "Digital - Discount Coupon",
                    "metadata": {
                      "Type": "Discount"
                    },
                    "parameters": {
                      "campaign": {
                        "id": "camp_hC2GdqYtOmTT45zfhib62cK1"
                      }
                    }
                  }
                },
                "Loyalty points": {
                  "value": {
                    "name": "Digital - Loyalty Points Reward",
                    "metadata": {
                      "Type": "Loyalty Points"
                    },
                    "parameters": {
                      "campaign": {
                        "id": "camp_hC2GdqYtOmTT45zfhib62cK1",
                        "balance": 100
                      }
                    }
                  }
                },
                "Pay with Points": {
                  "value": {
                    "name": "Pay with Points Reward",
                    "metadata": {
                      "Type": "Coin"
                    },
                    "parameters": {
                      "coin": {
                        "exchange_ratio": 900,
                        "points_ratio": 8000
                      }
                    }
                  }
                },
                "Material Reward": {
                  "value": {
                    "name": "Get a Comic Book",
                    "metadata": {
                      "Type": "Physical product"
                    },
                    "parameters": {
                      "product": {
                        "id": "prod_0b15f6b9f650c16990",
                        "sku_id": "sku_0b1621b319d248b79f"
                      }
                    },
                    "stock": 2,
                    "attributes": {
                      "image_url": "{{internalVoucherifyURL}}",
                      "description": "Comic book"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an updated reward object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsUpdateResponseBody"
                },
                "examples": {
                  "Material": {
                    "value": {
                      "id": "rew_wg2pvCr5LDhCq4uVQZ9LhuZm",
                      "name": "Get a Comic Book",
                      "type": "MATERIAL",
                      "parameters": {
                        "product": {
                          "id": "prod_0b15f6b9f650c16990",
                          "sku_id": "sku_0b1621b319d248b79f"
                        }
                      },
                      "stock": "2",
                      "redeemed": null,
                      "attributes": {
                        "image_url": "{{internalVoucherifyURL}}",
                        "description": "Comic book"
                      },
                      "created_at": "2022-08-25T10:00:12.794Z",
                      "updated_at": "2022-08-25T10:06:30.655Z",
                      "metadata": {
                        "Type": "Physical product"
                      },
                      "object": "reward"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the balance parameter is not defined correctly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_balance"
                },
                "examples": {
                  "Invalid Balance": {
                    "value": {
                      "code": 400,
                      "key": "invalid_balance",
                      "message": "Property 'parameters.campaign.balance' is invalid",
                      "details": "Property 'parameters.campaign.balance' must be greater than zero for campaign type: GIFT_VOUCHERS",
                      "request_id": "v-0b96d2b90dce48855f"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-reward",
        "tags": [
          "Rewards"
        ],
        "summary": "Delete Reward",
        "description": "Delete a reward.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "400": {
            "description": "Bad Request. Returns an error indicating that the reward with given ID is assigned to a resource.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceInUseError"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 400,
                      "key": "resource_in_use",
                      "message": "Resource in use",
                      "details": "Resource reward with id rew_fcYALROsORec6cP0VBItCVfq is in use by reward_assignments with ids [rewa_5WV7H3y2lT3GGl03Xjw29IEc]",
                      "request_id": "v-0b8c7b967950216291",
                      "related_object_ids": [
                        "rewa_5WV7H3y2lT3GGl03Xjw29IEc"
                      ],
                      "related_object_type": "reward_assignment"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the reward with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Reward Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find reward with id rew_2erjvECLs92GYzKbak3QkyT",
                      "request_id": "v-0ae29895e8c6b7781a",
                      "resource_id": "rew_2erjvECLs92GYzKbak3QkyT",
                      "resource_type": "reward"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/rewards/{rewardId}/assignments": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardId"
          },
          "name": "rewardId",
          "in": "path",
          "required": true,
          "description": "A unique reward ID."
        }
      ],
      "get": {
        "operationId": "list-reward-assignments",
        "tags": [
          "Rewards"
        ],
        "summary": "List Reward Assignments",
        "description": "Retrieve reward assignments by the reward ID.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of reward assignment objects. Each object contains information regarding the resource to which the reward was assigned and the cost in loyalty points for the reward.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsAssignmentsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "rewa_PbIRoMXpwe5QhobW4JKu0VjH",
                          "reward_id": "rew_C7wS9eHFDN4CIbXI5PpLSkGY",
                          "related_object_id": "camp_wciTvaOfYmAa3EmIIW3QpXXZ",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 15
                            }
                          },
                          "created_at": "2022-08-17T08:13:02.507Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        },
                        {
                          "id": "rewa_pJYQBXSitK2OVPK3XMXZK76X",
                          "reward_id": "rew_C7wS9eHFDN4CIbXI5PpLSkGY",
                          "related_object_id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                          "related_object_type": "campaign",
                          "parameters": {
                            "loyalty": {
                              "points": 20
                            }
                          },
                          "created_at": "2022-08-24T11:40:22.418Z",
                          "updated_at": null,
                          "object": "reward_assignment"
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the given reward is missing, does not exist or was 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 reward with id rew_C7wS9eHFDN4CIbXI5PpLSkGYi",
                      "request_id": "v-0b95a68c678ad5c765",
                      "resource_id": "rew_C7wS9eHFDN4CIbXI5PpLSkGYi",
                      "resource_type": "reward"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-reward-assignment",
        "tags": [
          "Rewards"
        ],
        "summary": "Create Reward Assignment",
        "description": "Assigns a reward to a specified loyalty campaign.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsAssignmentsCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "campaign": "camp_OTuGGP90PivbvROsRvfM65El",
                    "parameters": {
                      "loyalty": {
                        "points": 39
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a reward assignment object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsAssignmentsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "rewa_cqD2XE5x8LcD2c1FLlvqikti",
                      "reward_id": "rew_C7wS9eHFDN4CIbXI5PpLSkGY",
                      "related_object_id": "camp_OTuGGP90PivbvROsRvfM65El",
                      "related_object_type": "campaign",
                      "parameters": {
                        "loyalty": {
                          "points": 39
                        }
                      },
                      "created_at": "2022-08-24T13:44:42.610Z",
                      "updated_at": null,
                      "object": "reward_assignment"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if request body parameters are missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_missing_param"
                },
                "examples": {
                  "Missing Parameter": {
                    "value": {
                      "code": 400,
                      "key": "missing_param",
                      "message": "Missing required parameter",
                      "details": "Parameter 'parameters.loyalty' is required",
                      "request_id": "v-0b95c7f3684ad5f06d"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when creating a reward assignment for a reward that has been deleted or does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Reward Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find reward with id rew_C7wS9eHFDN4CIbXI5PpLSkGYi",
                      "request_id": "v-0b95c0bedf46fcbe83",
                      "resource_id": "rew_C7wS9eHFDN4CIbXI5PpLSkGYi",
                      "resource_type": "reward"
                    }
                  },
                  "Missing Campaign": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id null",
                      "request_id": "v-0b95c68b12cad5eebb",
                      "resource_id": null,
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a conflict is found, i.e. an assignment for the reward has already been created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate Found": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated reward_assignment exists with id rewa_q1Ad955TUZS4nVIxplOw9pL3",
                      "request_id": "v-0b95c78daa06fcc6bb",
                      "resource_id": "rewa_q1Ad955TUZS4nVIxplOw9pL3",
                      "resource_type": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/rewards/{rewardId}/assignments/{assignmentId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardId"
          },
          "name": "rewardId",
          "in": "path",
          "required": true,
          "description": "A unique reward ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardAssignmentId"
          },
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "A unique reward assignment ID."
        }
      ],
      "put": {
        "operationId": "update-reward-assignment",
        "tags": [
          "Rewards"
        ],
        "summary": "Update Reward Assignment",
        "description": "Update the number of points needed to successfully redeem the reward.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "requestBody": {
          "description": "Define the number of points required to exchange for the reward.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsAssignmentsUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "parameters": {
                      "loyalty": {
                        "points": 35
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the updated reward assignment object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsAssignmentsUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "rewa_pJYQBXSitK2OVPK3XMXZK76X",
                      "reward_id": "rew_C7wS9eHFDN4CIbXI5PpLSkGY",
                      "related_object_id": "camp_jcErmtGAOmHUAy0oUgkwKnPZ",
                      "related_object_type": "campaign",
                      "parameters": {
                        "loyalty": {
                          "points": 35
                        }
                      },
                      "created_at": "2022-08-24T11:40:22.418Z",
                      "updated_at": "2022-08-24T13:02:32.262Z",
                      "object": "reward_assignment"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the reward assignment with given ID was 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 reward_assignment with id rewa_pJYQBXSitK2OVPK3XMXZK76XI",
                      "request_id": "v-0b95b8760a4ad5dda1",
                      "resource_id": "rewa_pJYQBXSitK2OVPK3XMXZK76XI",
                      "resource_type": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-reward-assignment",
        "tags": [
          "Rewards"
        ],
        "summary": "Delete Reward Assignment",
        "description": "This method deletes a reward assignment for a particular reward.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the reward or reward assignment with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Reward Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find reward with id rew_2erjvECLs92GYzKbak3QkyT",
                      "request_id": "v-0ae29f325e1027cde8",
                      "resource_id": "rew_2erjvECLs92GYzKbak3QkyT",
                      "resource_type": "reward"
                    }
                  },
                  "Reward Assignment Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find reward_assignment with id rewa_YkwQ5ezNYTQV2geodMVhTpy",
                      "request_id": "v-0ae2a0588b9027cf95",
                      "resource_id": "rewa_YkwQ5ezNYTQV2geodMVhTpy",
                      "resource_type": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get-reward-assignment",
        "tags": [
          "Rewards"
        ],
        "summary": "Get Reward Assignment",
        "description": "Retrieve a reward assignment.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "rewards"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a reward assignment object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsAssignmentsGetResponseBody"
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the 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_pJYQBXSitK2OVPK3XMXZK76X",
                      "request_id": "v-0b95b596e98ad5da24",
                      "resource_id": "rewa_pJYQBXSitK2OVPK3XMXZK76X",
                      "resource_type": "reward_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/publications": {
      "get": {
        "operationId": "list-publications",
        "tags": [
          "Publications"
        ],
        "summary": "List Publications",
        "description": "Retrieve a list of publications. To return a **particular** publication, you can use the `source_id` query parameter and provide the `source_id` of the publication you are looking for specifically.\n\n## Pagination\n\n\n```url\nGET /v1/publications?filters[customer_id][conditions][$is][0]=cust_lUET6gRpO5Wxlg5p2j2gRCgL&filters[customer_id][conditions][$is][1]=cust_aR7NfHusxT7PdTMAKMfWDXnc&filters[junction]=OR\n```",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListPublications"
            },
            "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": "campaign",
            "description": "Filters by a given campaign name."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCustomerId"
            },
            "in": "query",
            "name": "customer",
            "description": "Filters by a unique customer ID."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCode"
            },
            "in": "query",
            "name": "voucher",
            "description": "Filters by a given voucher code."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterResultListPublications"
            },
            "in": "query",
            "name": "result",
            "description": "Filters by a publication result."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterVoucherTypeListPublications"
            },
            "in": "query",
            "name": "voucher_type",
            "description": "Filters by a voucher type."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "is_referral_code",
            "description": "This filter works only for the `true` option. If set to `true`, the query returns only publications of codes from referral campaigns. "
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListPublications"
            },
            "in": "query",
            "name": "filters",
            "description": "Filters for listing publications.",
            "style": "deepObject",
            "explode": true
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "source_id",
            "description": "Using this endpoint with a particular publication `source_id`, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular `source_id`."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "publications"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of publications you've previously created with [create publication](ref:create-publication) or implicitly by the distribution manager. The publications are returned in sorted order, with the most recent ones appearing first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicationsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "publications",
                      "publications": [
                        {
                          "id": "pub_QzQT50e5i2y3bRoEVvhFgrKbZ7t6BRwu",
                          "object": "publication",
                          "created_at": "2022-09-28T13:31:23.522Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "cindy.jones@email.com",
                          "metadata": {
                            "distribution_id": "distr_WXm0CBttar2ug2hBx3EdPtS8Ei",
                            "source_type": "distribution",
                            "source_id": "distr_WXm0CBttar2ug2hBx3EdPtS8Ei"
                          },
                          "channel": "Automation",
                          "source_id": null,
                          "result": "SUCCESS",
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Cindy Jones",
                            "email": "cindy.jones@email.com",
                            "source_id": "cindy.jones@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook"
                            },
                            "object": "customer"
                          },
                          "voucher": {
                            "code": "FNV5IrtY",
                            "object": "voucher",
                            "campaign": "Loyalty Campaign",
                            "loyalty_card": {
                              "points": 0,
                              "balance": 0
                            },
                            "is_referral_code": false
                          },
                          "vouchers_id": [
                            "v_i3HOzVClfJUDia0qCu7TSuGfDj7c0dgD"
                          ]
                        },
                        {
                          "id": "pub_8KOKHObAjuemuI0b6225emIhmWDL1ZoX",
                          "object": "publication",
                          "created_at": "2022-09-28T13:31:02.766Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "sandy.jones@email.com",
                          "metadata": {},
                          "channel": "voucherify-website",
                          "source_id": null,
                          "result": "SUCCESS",
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "Sandy Jones",
                            "email": "sandy.jones@email.com",
                            "source_id": "sandy.jones@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook"
                            },
                            "object": "customer"
                          },
                          "voucher": {
                            "code": "Voucher-1",
                            "object": "voucher",
                            "campaign": null,
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 200,
                              "amount_off_formula": "IF(VOUCHER_PUBLISH_COUNT = 1;25;5)",
                              "effect": "APPLY_TO_ORDER"
                            },
                            "is_referral_code": false
                          },
                          "vouchers_id": [
                            "v_1iEL92K634EIOqeYJw6AHrnjEhGPEdpu"
                          ]
                        },
                        {
                          "id": "pub_DcQPfyVYzomtkQGXFW7dcdyNoJ6vQ4NV",
                          "object": "publication",
                          "created_at": "2022-09-13T06:15:08.249Z",
                          "customer_id": "cust_ur1hIPGflbaAe14mLlLdon3G",
                          "tracking_id": "1",
                          "metadata": {},
                          "channel": "voucherify-website",
                          "source_id": null,
                          "result": "SUCCESS",
                          "customer": {
                            "id": "cust_ur1hIPGflbaAe14mLlLdon3G",
                            "name": "Bob Jones",
                            "email": "bob.jones@email.com",
                            "source_id": "1",
                            "metadata": {
                              "accepts_marketing": false
                            },
                            "object": "customer"
                          },
                          "voucher": {
                            "code": "GIFT-WOZaK5YF1Fs87tAX",
                            "object": "voucher",
                            "campaign": "Gift Cards",
                            "gift": {
                              "amount": 0,
                              "balance": 0
                            },
                            "is_referral_code": false
                          },
                          "vouchers_id": [
                            "v_yzOeb7vw63vbPfA30215dFm7aRXa8Xoc"
                          ]
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if you request a page higher than 1000.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 400,
                      "key": "page_over_limit",
                      "message": "Listing resource above 1000 page is not supported",
                      "details": "Property .page cannot be higher than 1000",
                      "request_id": "v-0bc2a39574c61362af"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-publication",
        "tags": [
          "Publications"
        ],
        "summary": "Create Publication",
        "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet.  \n\n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "join_once",
            "description": "Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "publications"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the publication parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicationsCreateRequestBody"
              },
              "examples": {
                "Example - Specific Voucher": {
                  "value": {
                    "campaign": {
                      "name": "campaign-name"
                    },
                    "customer": {
                      "source_id": "source-id",
                      "Name": "Customer Name",
                      "email": "customer email"
                    },
                    "voucher": "voucher-code",
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Example - Random Voucher": {
                  "value": {
                    "campaign": {
                      "name": "campaign-name",
                      "count": 1
                    },
                    "customer": {
                      "source_id": "source-id",
                      "Name": "Customer Name",
                      "email": "customer email"
                    },
                    "voucher": "voucher-code",
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Example 3": {
                  "value": {
                    "source_id": "publication_source_ID_10",
                    "campaign": "Test - Discount Effect - Amount - Items",
                    "channel": "myown",
                    "customer": {
                      "source_id": "pub_source_customer_5",
                      "name": "Bob Jones",
                      "description": "A frequent customer",
                      "email": "bob.smith@email.com",
                      "phone": "+1 933 222 3333",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "1901-12-01"
                    },
                    "metadata": {
                      "year": 2022
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a publication object if a valid identifier was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicationsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "pub_ocaXCa023ayJ3WL1ARxUeKgIvg3JcEGh",
                      "object": "publication",
                      "created_at": "2022-09-30T16:30:32.924Z",
                      "customer_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                      "tracking_id": "pub_source_customer_5",
                      "metadata": {
                        "year": 2022
                      },
                      "channel": "myown",
                      "source_id": "publication_source_ID_10",
                      "result": "SUCCESS",
                      "customer": {
                        "id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                        "name": "Bob Jones",
                        "email": "bob.smith@email.com",
                        "source_id": "pub_source_customer_5",
                        "metadata": {
                          "lang": "en",
                          "test": true
                        },
                        "object": "customer"
                      },
                      "voucher": {
                        "id": "v_6Hy5FdNlu3dP65fJu5BgXma31Sl3rgkf",
                        "code": "cEsMn0uA",
                        "campaign": "Test - Discount Effect - Amount - Items",
                        "campaign_id": "camp_dphuwqH7BOVkgh4JmpDtS32l",
                        "category": null,
                        "category_id": null,
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 300,
                          "effect": "APPLY_TO_ITEMS"
                        },
                        "gift": null,
                        "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": "U2FsdGVkX188XVmOotyCyR2j3G8sJR8HzS3DQ+6J1OElPWSmjlEnthuJc7rkc7WIVxjT4pTl1JVVkHEuGXNXdzRik11H8S18HQeQFJFiuwLZ2mzEC2zZitEinyUxtZwhnEHoi0eGAgYCG7iVMNuOQA==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX18wDd9CcLM0Ef7aBfUSXZUoCQpuNpk4CHGOipbn+wFkfzcIZGBtUlxrI2KsXciCqF+c93AKzsymq5Yw8eEAFF/FK5f94z4/sgzaLDvyBmPCXHuS11Ew9S4ZEMjdTkUJftER2IlxWaCARA==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-30T16:30:32.956Z",
                        "updated_at": null,
                        "holder_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0,
                          "object": "list",
                          "url": "/v1/vouchers/cEsMn0uA/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/cEsMn0uA/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "vouchers_id": [
                        "v_6Hy5FdNlu3dP65fJu5BgXma31Sl3rgkf"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if a publication with the same source ID already exists in the system or some request body parameter is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing Parameters": {
                    "value": {
                      "code": 400,
                      "key": "missing_vouchers",
                      "message": "Missing vouchers",
                      "details": "Either Campaign or Voucher is required"
                    }
                  },
                  "Already published": {
                    "value": {
                      "code": 400,
                      "key": "voucher_already_published",
                      "message": "Voucher already published",
                      "details": "Voucher 'v_Y5P4UZ1yilkiYOIJmAAgWazUi1wfkNwF' has already been published",
                      "request_id": "v-0bc40bb800d5651137"
                    }
                  },
                  "Duplicate Source ID": {
                    "value": {
                      "code": 400,
                      "key": "duplicate_source_id",
                      "message": "Duplicate source_id",
                      "details": "Publication with source_id: 'publication_source_ID_1' already exists",
                      "request_id": "v-0bc40bf81555651191"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is 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 1",
                      "request_id": "v-0bc40546e5d56508e5",
                      "resource_id": "1",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/validate": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCode"
          },
          "name": "code",
          "in": "path",
          "required": true,
          "description": "A code that identifies the voucher."
        }
      ],
      "post": {
        "operationId": "validate-voucher",
        "deprecated": true,
        "tags": [
          "Validations"
        ],
        "summary": "Validate Voucher [Deprecated]",
        "description": "[disabled voucher](ref:disable-voucher)\n* `customer does not match segment rules` - learn more [customer tracking](doc:customers#customer-tracking) \n* `order does not match validation rules` - learn more about [validation rules](doc:validation-rules)",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the voucher validation context using the request body parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VouchersValidateRequestBody"
              },
              "examples": {
                "Free Shipping": {
                  "value": {
                    "customer": {
                      "id": "cust_4vMj8Twr5nBzvTrNCgipMb6M"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0ba621bae5d39762ce",
                          "quantity": "1"
                        },
                        {
                          "product_id": "prod_0b661d404787ec6d3b",
                          "quantity": "1",
                          "price": 3100
                        }
                      ]
                    }
                  }
                },
                "Multiple Product Variants": {
                  "value": {
                    "customer": {
                      "source_id": "08dd9b5a-26de-44aa-a1d4-d9adfa9e8ec2"
                    },
                    "order": {
                      "id": "ord_FDdsDI3FppuiqHa4s7drZEMP"
                    }
                  }
                },
                "Unit - Add order items": {
                  "value": {
                    "customer": {
                      "source_id": "08dd9b5a-26de-44aa-a1d4-d9adfa9e8ec2"
                    },
                    "order": {
                      "source_id": "47f491d1-a697-4f92-95ca-2ba1f463efa8"
                    },
                    "session": {
                      "type": "LOCK",
                      "ttl_unit": "NANOSECONDS",
                      "ttl": 1
                    }
                  }
                },
                "Fixed": {
                  "value": {
                    "customer": {
                      "source_id": "08dd9b5a-26de-44aa-a1d4-d9adfa9e8ec2"
                    },
                    "order": {
                      "items": [
                        {
                          "source_id": "webinar_BF_sweater_pink_sweater",
                          "quantity": "1",
                          "price": 6500,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_navy_sweat_pants",
                          "quantity": "1",
                          "price": 6000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "5h1pp1ng",
                          "quantity": "1",
                          "price": 2000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_gray_sweat_pants",
                          "quantity": "2",
                          "price": 5000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_sweater_pearl",
                          "quantity": "2",
                          "price": 11000,
                          "related_object": "product"
                        }
                      ]
                    },
                    "session": {
                      "type": "LOCK"
                    }
                  }
                },
                "Percentage": {
                  "value": {
                    "customer": {
                      "source_id": "your_customer_source_ID",
                      "name": "Bob Smith",
                      "description": "A frequent customer",
                      "email": "bob.smith@email.com",
                      "phone": "+1 933 222 3333",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "1960-12-01"
                    },
                    "order": {
                      "items": [
                        {
                          "source_id": "webinar_BF_sweater_pink_sweater",
                          "quantity": "1",
                          "price": 6500,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_navy_sweat_pants",
                          "quantity": "1",
                          "price": 6000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "5h1pp1ng",
                          "quantity": "1",
                          "price": 2000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_gray_sweat_pants",
                          "quantity": "2",
                          "price": 5000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_sweater_pearl",
                          "quantity": "2",
                          "price": 11000,
                          "related_object": "product"
                        }
                      ]
                    },
                    "session": {
                      "type": "LOCK",
                      "key": "your_custom_key",
                      "ttl_unit": "NANOSECONDS",
                      "ttl": 1
                    }
                  }
                },
                "Amount": {
                  "value": {
                    "customer": {
                      "source_id": "your_customer_source_ID",
                      "name": "Bob Smith",
                      "description": "A frequent customer",
                      "email": "bob.smith@email.com",
                      "phone": "+1 933 222 3333",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "1960-12-01"
                    },
                    "order": {
                      "items": [
                        {
                          "source_id": "webinar_BF_sweater_pink_sweater",
                          "quantity": "1",
                          "price": 6500,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_navy_sweat_pants",
                          "quantity": "1",
                          "price": 6000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "5h1pp1ng",
                          "quantity": "1",
                          "price": 2000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_pants_gray_sweat_pants",
                          "quantity": "2",
                          "price": 5000,
                          "related_object": "product"
                        },
                        {
                          "source_id": "webinar_BF_sweater_pearl",
                          "quantity": "2",
                          "price": 11000,
                          "related_object": "product"
                        }
                      ],
                      "metadata": {
                        "currency": "EUR"
                      }
                    },
                    "session": {
                      "type": "LOCK",
                      "key": "your_custom_key",
                      "ttl_unit": "NANOSECONDS",
                      "ttl": 1
                    }
                  }
                },
                "Loyalty Card": {
                  "value": {
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0bd76fc58f8038b043",
                          "quantity": "1"
                        },
                        {
                          "product_id": "prod_0bd76bd0e204542738",
                          "quantity": "1"
                        }
                      ]
                    },
                    "reward": {
                      "id": "rew_4ZF6Y69U2PXE3GLIZxfozgg1",
                      "points": 10
                    }
                  }
                },
                "Gift Card": {
                  "value": {
                    "customer": {
                      "source_id": "286401dc-6f4c-4ebb-8ca2-9f78b3e84c7d"
                    },
                    "order": {
                      "amount": 1000,
                      "metadata": {
                        "currency": "USD"
                      }
                    },
                    "gift": {
                      "credits": 2
                    },
                    "metadata": {
                      "location_id": [
                        "L1"
                      ]
                    }
                  }
                },
                "Referral Code": {
                  "value": {
                    "customer": {
                      "source_id": "earlybirdcust"
                    },
                    "order": {
                      "amount": 20000,
                      "metadata": {
                        "currency": "USD"
                      }
                    },
                    "metadata": {
                      "location_id": [
                        "L1"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns information whether the voucher is valid in the context of the parameter values provided in the request body.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersValidateResponseBody"
                },
                "examples": {
                  "False": {
                    "value": {
                      "valid": false,
                      "reason": "redemption does not match validation rules",
                      "error": {
                        "code": 400,
                        "key": "redemption_rules_violated",
                        "message": "redemption does not match validation rules",
                        "details": "Gift Card cannot be redeemed because of violated validation rules: val_wvipKm99CJuL",
                        "request_id": "v-0bccef7a9585cf63b6"
                      },
                      "tracking_id": "track_ZGPtmYcM+Mw=",
                      "code": "vBQvYFEM",
                      "metadata": {}
                    }
                  },
                  "Free Shipping": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "order": {
                        "amount": 4300,
                        "total_amount": 4300,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0ba621bae5d39762ce",
                            "quantity": 1,
                            "amount": 1200,
                            "price": 1200,
                            "subtotal_amount": 1200,
                            "product": {
                              "id": "prod_0ba621bae5d39762ce",
                              "source_id": "arabica_plus",
                              "name": "Arabica Coffee 250g",
                              "price": 1200
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d404787ec6d3b",
                            "quantity": 1,
                            "amount": 3100,
                            "price": 3100,
                            "subtotal_amount": 3100,
                            "product": {
                              "id": "prod_0b661d404787ec6d3b",
                              "source_id": "7717f389-4621-4c7a-a6db-d4acfe051a97",
                              "name": "Kate Moss by Mario Testino"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "discount_quantity": 1,
                            "initial_quantity": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "Test - Discount - Free Shipping",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS",
                        "unit_off": 1,
                        "unit_type": "prod_5h1pp1ng",
                        "product": {
                          "id": "prod_5h1pp1ng",
                          "source_id": "5h1pp1ng",
                          "name": "Shipping"
                        }
                      },
                      "metadata": {}
                    }
                  },
                  "Multiple Product Varients": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "order": {
                        "id": "ord_FDdsDI3FppuiqHa4s7drZEMP",
                        "source_id": "47f491d1-a697-4f92-95ca-2ba1f463efa8",
                        "created_at": "2022-09-21T13:09:25.773Z",
                        "updated_at": "2022-09-21T13:09:27.139Z",
                        "status": "PAID",
                        "amount": 237300,
                        "initial_amount": 28000,
                        "discount_amount": 8400,
                        "items_discount_amount": 209300,
                        "total_discount_amount": 217700,
                        "total_amount": 19600,
                        "items_applied_discount_amount": 209300,
                        "total_applied_discount_amount": 209300,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "A0E20000000295J",
                            "related_object": "sku",
                            "product_id": "prod_0b661d31134b299cc2",
                            "quantity": 1,
                            "amount": 9500,
                            "price": 9500,
                            "subtotal_amount": 9500,
                            "product": {
                              "id": "prod_0b661d31134b299cc2",
                              "source_id": "2c446063-d582-4d7e-9651-23971b3e56f7",
                              "name": "Keychain D‘Amico"
                            },
                            "sku": {
                              "id": "sku_0b661d6265cb29ae52",
                              "source_id": "A0E20000000295J",
                              "sku": "Keychain D‘Amico",
                              "metadata": {},
                              "price": 9500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "M0E20000000EAT6",
                            "related_object": "sku",
                            "quantity": 1,
                            "amount": 18500,
                            "price": 18500,
                            "subtotal_amount": 18500,
                            "product": {
                              "name": "Jogging pants Paolo Pecora light grey"
                            },
                            "sku": {
                              "sku": "Jogging pants Paolo Pecora light grey",
                              "metadata": {}
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "discount_quantity": 1,
                            "initial_quantity": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "sku_id": "sku_0b661e41fc8d35a8f7",
                            "quantity": 3,
                            "discount_quantity": 3,
                            "initial_quantity": 0,
                            "amount": 89700,
                            "discount_amount": 89700,
                            "initial_amount": 0,
                            "applied_discount_amount": 89700,
                            "price": 29900,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f7",
                              "source_id": "M0E20000000ELDG",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "sku_id": "sku_0b661e41fc8d35a8f6",
                            "quantity": 4,
                            "discount_quantity": 4,
                            "initial_quantity": 0,
                            "amount": 119600,
                            "discount_amount": 119600,
                            "initial_amount": 0,
                            "applied_discount_amount": 119600,
                            "price": 29900,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f6",
                              "source_id": "M0E20000000ELDF",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                          "object": "customer"
                        },
                        "customer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0bb9c69ca9d5a364b2": {
                            "date": "2022-09-21T13:09:25.799Z",
                            "related_object_type": "redemption",
                            "related_object_id": "r_0bb9c69ca9d5a364b2",
                            "stacked": [
                              "r_0bb9c69ca9d5a364b3",
                              "r_0bb9c69ca9d5a364b4"
                            ]
                          }
                        }
                      },
                      "code": "Test - Discount - Unit - Multiple - Product Variants",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MANY_ITEMS",
                        "units": [
                          {
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 3,
                            "unit_type": "sku_0b661e41fc8d35a8f7",
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f7",
                              "source_id": "M0E20000000ELDG",
                              "sku": "Casual jacket Michael Kors beige"
                            },
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            }
                          },
                          {
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 4,
                            "unit_type": "sku_0b661e41fc8d35a8f6",
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f6",
                              "source_id": "M0E20000000ELDF",
                              "sku": "Casual jacket Michael Kors beige"
                            },
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            }
                          }
                        ]
                      },
                      "metadata": {}
                    }
                  },
                  "Unit - Add order items": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "session": {
                        "key": "ssn_K7DV3RbAGNCRVrPNZxJfld3FdwAQwOGl",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "id": "ord_FDdsDI3FppuiqHa4s7drZEMP",
                        "source_id": "47f491d1-a697-4f92-95ca-2ba1f463efa8",
                        "created_at": "2022-09-21T13:09:25.773Z",
                        "updated_at": "2022-09-21T13:09:27.139Z",
                        "status": "PAID",
                        "amount": 117700,
                        "initial_amount": 28000,
                        "discount_amount": 8400,
                        "items_discount_amount": 89700,
                        "total_discount_amount": 98100,
                        "total_amount": 19600,
                        "items_applied_discount_amount": 89700,
                        "total_applied_discount_amount": 89700,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "A0E20000000295J",
                            "related_object": "sku",
                            "product_id": "prod_0b661d31134b299cc2",
                            "quantity": 1,
                            "amount": 9500,
                            "price": 9500,
                            "subtotal_amount": 9500,
                            "product": {
                              "id": "prod_0b661d31134b299cc2",
                              "source_id": "2c446063-d582-4d7e-9651-23971b3e56f7",
                              "name": "Keychain D‘Amico"
                            },
                            "sku": {
                              "id": "sku_0b661d6265cb29ae52",
                              "source_id": "A0E20000000295J",
                              "sku": "Keychain D‘Amico",
                              "metadata": {},
                              "price": 9500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "M0E20000000EAT6",
                            "related_object": "sku",
                            "quantity": 1,
                            "amount": 18500,
                            "price": 18500,
                            "subtotal_amount": 18500,
                            "product": {
                              "name": "Jogging pants Paolo Pecora light grey"
                            },
                            "sku": {
                              "sku": "Jogging pants Paolo Pecora light grey",
                              "metadata": {}
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_5h1pp1ng",
                            "quantity": 1,
                            "discount_quantity": 1,
                            "initial_quantity": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "sku_id": "sku_0b661e41fc8d35a8f8",
                            "quantity": 3,
                            "discount_quantity": 3,
                            "initial_quantity": 0,
                            "amount": 89700,
                            "discount_amount": 89700,
                            "initial_amount": 0,
                            "applied_discount_amount": 89700,
                            "price": 29900,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f8",
                              "source_id": "M0E20000000ELDH",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                          "object": "customer"
                        },
                        "customer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0bb9c69ca9d5a364b2": {
                            "date": "2022-09-21T13:09:25.799Z",
                            "related_object_type": "redemption",
                            "related_object_id": "r_0bb9c69ca9d5a364b2",
                            "stacked": [
                              "r_0bb9c69ca9d5a364b3",
                              "r_0bb9c69ca9d5a364b4"
                            ]
                          }
                        }
                      },
                      "code": "Test - Discount - Unit - Add new order items",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_NEW_ITEMS",
                        "unit_off": 3,
                        "unit_type": "sku_0b661e41fc8d35a8f8",
                        "sku": {
                          "id": "sku_0b661e41fc8d35a8f8",
                          "source_id": "M0E20000000ELDH",
                          "sku": "Casual jacket Michael Kors beige"
                        },
                        "product": {
                          "id": "prod_0b661d4bd2c7ec7d1f",
                          "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                          "name": "Casual jacket Michael Kors beige"
                        }
                      },
                      "metadata": {}
                    }
                  },
                  "Fixed": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [
                          {
                            "object": "product",
                            "id": "prod_5h1pp1ng",
                            "source_id": "5h1pp1ng",
                            "price": 2000,
                            "price_formula": "IF(ORDER_AMOUNT > 400;0;20)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "products_collection",
                            "id": "pc_2KWKXn09Dk8neCfymqd4xOq8",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "products_collection",
                            "id": "pc_x7HELQo52g2uI6nDuuOTRjAW",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.9;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76ca337954ca116",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76bd0e204542738",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.9;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76b8656956a183f",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 200;ORDER_ITEM_PRICE * 0.9;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          },
                          {
                            "object": "product",
                            "id": "prod_0bd76f59f98617518e",
                            "source_id": "webinar_BF_sweater_pearl",
                            "price": 99900,
                            "price_formula": "IF(ORDER_AMOUNT > 300;ORDER_ITEM_PRICE * 0.8;ORDER_ITEM_PRICE)",
                            "effect": "APPLY_TO_EVERY"
                          }
                        ],
                        "total": 7,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "session": {
                        "key": "ssn_u8rvi3Ac70S5ZRELWrxYsR2bnolpVWNg",
                        "type": "LOCK",
                        "ttl": 7,
                        "ttl_unit": "DAYS"
                      },
                      "order": {
                        "amount": 46500,
                        "items_discount_amount": 9300,
                        "total_discount_amount": 9300,
                        "total_amount": 37200,
                        "items_applied_discount_amount": 9300,
                        "total_applied_discount_amount": 9300,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "discount_amount": 1300,
                            "applied_discount_amount": 1300,
                            "price": 6500,
                            "subtotal_amount": 5200,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "discount_amount": 600,
                            "applied_discount_amount": 600,
                            "price": 6000,
                            "subtotal_amount": 5400,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "discount_amount": 2000,
                            "applied_discount_amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping",
                              "price": 0
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "discount_amount": 1000,
                            "applied_discount_amount": 1000,
                            "price": 5000,
                            "subtotal_amount": 9000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "discount_amount": 4400,
                            "applied_discount_amount": 4400,
                            "price": 11000,
                            "subtotal_amount": 17600,
                            "product": {
                              "id": "prod_0bd76f59f98617518e",
                              "source_id": "webinar_BF_sweater_pearl",
                              "name": "Pearl Sweater",
                              "price": 11000
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "SPENDMOREGETMORE-DaIXFJvn",
                      "discount": {
                        "type": "FIXED",
                        "effect": "APPLY_TO_ITEMS"
                      },
                      "metadata": {
                        "shoutout": "Order more than 200€ to get 10% off pants, more than 300€ to get 20% off sweaters, and more than 400€ to get free shipping."
                      },
                      "campaign": "SPENDMOREGETMORE",
                      "campaign_id": "camp_Nwb2mppeDTtk23s1FVo6riwp"
                    }
                  },
                  "Voucher expired": {
                    "value": {
                      "valid": false,
                      "reason": "voucher expired",
                      "error": {
                        "code": 400,
                        "key": "voucher_expired",
                        "message": "voucher expired",
                        "details": "EarlyBird-tB6zCApA",
                        "request_id": "v-0be43067028abb6ca8"
                      },
                      "tracking_id": "track_4Wb/eeza4PDXKElxYR/QtlDQOVFpY9mP",
                      "code": "EarlyBird-tB6zCApA",
                      "metadata": {
                        "shoutout": "Get an early bird special. The earlier you order, the better discount you will get."
                      }
                    }
                  },
                  "Percentage": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_4Wb/eeza4PDXKElxYR/QtlDQOVFpY9mP",
                      "session": {
                        "key": "your_custom_key",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "amount": 46500,
                        "discount_amount": 4650,
                        "total_discount_amount": 4650,
                        "total_amount": 41850,
                        "applied_discount_amount": 4650,
                        "total_applied_discount_amount": 4650,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "price": 6500,
                            "subtotal_amount": 6500,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 2000,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping",
                              "price": 0
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "price": 11000,
                            "subtotal_amount": 22000,
                            "product": {
                              "id": "prod_0bd76f59f98617518e",
                              "source_id": "webinar_BF_sweater_pearl",
                              "name": "Pearl Sweater",
                              "price": 11000
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "EarlyBird-tB6zCApA",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER",
                        "percent_off": 10
                      },
                      "expiration_date": "2022-10-29T00:00:00.000Z",
                      "metadata": {
                        "shoutout": "Get an early bird special. The earlier you order, the better discount you will get."
                      },
                      "campaign": "Webinar - Early Bird Scenario",
                      "campaign_id": "camp_z1g3iFqQe5qiZ9TTYFVpMwC0"
                    }
                  },
                  "Amount": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_4Wb/eeza4PDXKElxYR/QtlDQOVFpY9mP",
                      "session": {
                        "key": "your_custom_key",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "amount": 46500,
                        "discount_amount": 1000,
                        "total_discount_amount": 1000,
                        "total_amount": 45500,
                        "applied_discount_amount": 1000,
                        "total_applied_discount_amount": 1000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "price": 6500,
                            "subtotal_amount": 6500,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 2000,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping",
                              "price": 0
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "price": 11000,
                            "subtotal_amount": 22000,
                            "product": {
                              "id": "prod_0bd76f59f98617518e",
                              "source_id": "webinar_BF_sweater_pearl",
                              "name": "Pearl Sweater",
                              "price": 11000
                            }
                          }
                        ],
                        "metadata": {
                          "currency": "EUR"
                        },
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "PAYINEUROS",
                      "discount": {
                        "type": "AMOUNT",
                        "effect": "APPLY_TO_ORDER",
                        "amount_off": 1000
                      },
                      "metadata": {
                        "shoutout": "Pay in euros to get 10 Euros off, any other currency to get 5 off in that currency."
                      }
                    }
                  },
                  "Loyalty points exceeded": {
                    "value": {
                      "valid": false,
                      "reason": "loyalty card points exceeded",
                      "error": {
                        "code": 400,
                        "key": "loyalty_card_points_exceeded",
                        "message": "loyalty card points exceeded",
                        "details": "LOYALTY-CARD-ng3Kb9tM",
                        "request_id": "v-0be434ae35cabb018a"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "code": "LOYALTY-CARD-ng3Kb9tM",
                      "metadata": {}
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "order": {
                        "amount": 14500,
                        "discount_amount": 50,
                        "total_discount_amount": 50,
                        "total_amount": 14450,
                        "applied_discount_amount": 50,
                        "total_applied_discount_amount": 50,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bd76fc58f8038b043",
                            "quantity": 1,
                            "amount": 8500,
                            "price": 8500,
                            "subtotal_amount": 8500,
                            "product": {
                              "id": "prod_0bd76fc58f8038b043",
                              "source_id": "webinar_BF_sweater_yellow",
                              "name": "Yellow Sweater",
                              "price": 8500
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bd76bd0e204542738",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000,
                            "product": {
                              "id": "prod_0bd76bd0e204542738",
                              "source_id": "webinar_BF_pants_navy_sweat_pants",
                              "name": "Navy Sweat Pants",
                              "price": 6000
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "LOYALTY-CARD-ng3Kb9tM",
                      "loyalty": {
                        "points_cost": 10
                      },
                      "reward": {
                        "id": "rew_4ZF6Y69U2PXE3GLIZxfozgg1",
                        "assignment_id": "rewa_WkeBlLhj0sRae70J5AAvLbmy",
                        "points": 10
                      },
                      "metadata": {},
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_ZNb23Xtw1WuGCm7gdax84PUi"
                    }
                  },
                  "Voucher disabled": {
                    "value": {
                      "valid": false,
                      "reason": "voucher is disabled",
                      "error": {
                        "code": 400,
                        "key": "voucher_disabled",
                        "message": "voucher is disabled",
                        "details": "GIFT-CARD-kW4aEsfB",
                        "request_id": "v-0be43817d7121a437d"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "code": "GIFT-CARD-kW4aEsfB",
                      "metadata": {}
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "order": {
                        "amount": 1000,
                        "discount_amount": 2,
                        "total_discount_amount": 2,
                        "total_amount": 998,
                        "applied_discount_amount": 2,
                        "total_applied_discount_amount": 2,
                        "metadata": {
                          "currency": "USD"
                        },
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "GIFT-CARD-kW4aEsfB",
                      "gift": {
                        "amount": 32000,
                        "balance": 21500,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "metadata": {},
                      "campaign": "Gift Card Campaign",
                      "campaign_id": "camp_ZjoZEdmnyUCPYwMPN0IVbvDK"
                    }
                  },
                  "Cannot be redeemed by referrer": {
                    "value": {
                      "valid": false,
                      "reason": "voucher cannot be redeemed by referrer",
                      "error": {
                        "code": 400,
                        "key": "referrer_not_permitted_to_redeem",
                        "message": "voucher cannot be redeemed by referrer",
                        "details": "REFERRAL-CODE-OxBakPYf",
                        "request_id": "v-0be43a8a110abb1bd3"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "code": "REFERRAL-CODE-OxBakPYf",
                      "metadata": {}
                    }
                  },
                  "Referral Code": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_p6hPsnZj2VSvyXDjH9o6aQ==",
                      "order": {
                        "amount": 20000,
                        "discount_amount": 6000,
                        "total_discount_amount": 6000,
                        "total_amount": 14000,
                        "applied_discount_amount": 6000,
                        "total_applied_discount_amount": 6000,
                        "metadata": {
                          "currency": "USD"
                        },
                        "referrer": {
                          "id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                          "object": "customer"
                        },
                        "customer_id": null,
                        "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                        "object": "order"
                      },
                      "code": "REFERRAL-CODE-OxBakPYf",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER",
                        "percent_off": 30
                      },
                      "metadata": {},
                      "campaign": "Referral Campaign",
                      "campaign_id": "camp_TnOf5NB4Jtjxwoq38WckMJfy"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if request body is missing parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_error"
                },
                "examples": {
                  "Missing reward": {
                    "value": {
                      "code": 400,
                      "key": "missing_reward",
                      "message": "Missing reward",
                      "details": "A reward is required when redeeming a LOYALTY_CARD",
                      "request_id": "v-0bcb925c6d90f7f8fc",
                      "error": {
                        "message": "Missing reward = please add one."
                      }
                    }
                  },
                  "Missing Parameter": {
                    "value": {
                      "code": 400,
                      "key": "missing_order_items_amount",
                      "message": "Missing applicable order items",
                      "details": "At least one applicable order item with amount is required to redeem this GIFT_VOUCHER",
                      "request_id": "v-0bcccfd04085cf2540",
                      "error": {
                        "message": "Request should contain an amount for the item."
                      }
                    }
                  },
                  "Metadata Validation Failed": {
                    "value": {
                      "code": 400,
                      "key": "metadata_validation_failed",
                      "message": "Metadata validation failed",
                      "details": "location_id: must be an array, and every element: must be a string, must be equal to one of L1,L2,L3 (actual value is 'L1')",
                      "request_id": "v-0bcced27715305d3fa"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/validation": {
      "post": {
        "operationId": "validate-promotions",
        "deprecated": true,
        "tags": [
          "Validations"
        ],
        "summary": "Validate Promotions [Deprecated]",
        "description": "\n```cURL\ncurl -X **GET** \\\n  -H \"X-Client-Application-Id: 011240bf-d5fc-4ef1-9e82-11eb68c43bf5\" \\\n  -H \"X-Client-Token: 9e2230c5-71fb-460a-91c6-fbee64707a20\" \\\n  -H \"Content-Type: application/json\" \\\n  -d `{\n    \"customer\": {\n        \"id\": \"cust_gN9KgORZECfdhG9qT6n82Zr7\"\n    },\n    \"order\": {\n        \"items\": [\n            {\n                \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n                \"quantity\": 1\n            },\n            {\n                \"product_id\": \"prod_0a9f9aeddb019a42db\",\n                \"quantity\": 1\n            },\n            {\n                \"product_id\": \"prod_0a9f9ab4ab019a42d5\",\n                \"quantity\": \"1\"\n            },\n            {\n                \"sku_id\": \"sku_0b7d7dfb090be5c619\",\n                \"quantity\": 1\n            },\n            {\n                \"product_id\": \"prod_0b72b0bd64d198e3ae\",\n                \"quantity\": 1\n            },\n            {\n                \"product_id\": \"prod_0b7d7c4e814be5c502\",\n                \"quantity\": 1\n            }\n        ],\n        \"metadata\":{\n            \"payment_mean\": [\"credit-card\"]\n        }\n    },\n    \"options\": {\n        \"expand\": [\n            \"category\"\n        ]\n    }\n  }`\\\n  'https://api.voucherify.io/v1/promotions/validation?[filters][metadata.has_budget][conditions][$is]=true'\n```",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "audienceRulesOnly",
            "description": "If you add a query param AudienceRulesOnly=true, the request will be validated against customer-related rules only, the rest of attached limits and rules will be ignored."
          },
          {
            "name": "filters",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersValidatePromotions"
            },
            "style": "deepObject",
            "explode": true,
            "description": "Filter conditions."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the customer and order context.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/6_req_validate_promotion"
              },
              "examples": {
                "Example": {
                  "value": {
                    "customer": {
                      "source_id": "source-id",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    },
                    "order": {
                      "amount": 10000,
                      "items": [
                        {
                          "product_id": "product-id",
                          "quantity": "1",
                          "price": 10000,
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ]
                    },
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Customer Rules Only": {
                  "value": {
                    "customer": {
                      "id": "cust_gN9KgORZECfdhG9qT6n82Zr7"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": "1"
                        },
                        {
                          "sku_id": "sku_0b7d7dfb090be5c619",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b72b0bd64d198e3ae",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b7d7c4e814be5c502",
                          "quantity": 1
                        }
                      ],
                      "metadata": {
                        "payment_mean": [
                          "credit-card"
                        ]
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    }
                  }
                },
                "Campaign Specific": {
                  "value": {
                    "customer": {
                      "source_id": "test-user@email.com"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": "1"
                        },
                        {
                          "sku_id": "sku_0b7d7dfb090be5c619",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b72b0bd64d198e3ae",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b7d7c4e814be5c502",
                          "quantity": 1
                        }
                      ],
                      "metadata": {
                        "payment_mean": [
                          "credit-card"
                        ]
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    },
                    "metadata": {
                      "store_names": "Store 1 - New York - Broadway"
                    }
                  }
                },
                "Promotion Tier Metadata": {
                  "value": {
                    "customer": {
                      "name": "Joe McDonald",
                      "email": "joey@email.com",
                      "source_id": "123_source_id"
                    },
                    "order": {
                      "items": [
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0a9f9ab4ab019a42d5",
                          "quantity": "1"
                        },
                        {
                          "sku_id": "sku_0b7d7dfb090be5c619",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b72b0bd64d198e3ae",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0b7d7c4e814be5c502",
                          "quantity": 1
                        }
                      ],
                      "metadata": {
                        "payment_mean": [
                          "credit-card"
                        ]
                      }
                    },
                    "options": {
                      "expand": [
                        "category"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a list of valid promotions for a given context (customer and order). You can then choose which promotion to apply, i.e. the highest discount amount.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/6_res_validate_promotion"
                },
                "examples": {
                  "Customer Rules Only": {
                    "value": {
                      "valid": true,
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "promotions": [
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 9351000,
                            "initial_amount": 72100,
                            "items_discount_amount": 9340400,
                            "total_discount_amount": 9340400,
                            "total_amount": 10600,
                            "items_applied_discount_amount": 9340400,
                            "total_applied_discount_amount": 9340400,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 23,
                                "discount_quantity": 22,
                                "initial_quantity": 1,
                                "amount": 39100,
                                "discount_amount": 37400,
                                "initial_amount": 1700,
                                "applied_discount_amount": 37400,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 222,
                                "discount_quantity": 222,
                                "initial_quantity": 1,
                                "amount": 333000,
                                "discount_amount": 333000,
                                "initial_amount": 1500,
                                "applied_discount_amount": 333000,
                                "price": 1500,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 111,
                                "discount_quantity": 111,
                                "initial_quantity": 1,
                                "amount": 6660000,
                                "discount_amount": 6660000,
                                "initial_amount": 60000,
                                "applied_discount_amount": 6660000,
                                "price": 60000,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae2dc5a090fd0184",
                                "sku_id": "sku_0bae3b28f610fd0da1",
                                "quantity": 11,
                                "discount_quantity": 11,
                                "initial_quantity": 0,
                                "amount": 2310000,
                                "discount_amount": 2310000,
                                "initial_amount": 0,
                                "applied_discount_amount": 2310000,
                                "price": 210000,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bae2dc5a090fd0184",
                                  "source_id": "first_product",
                                  "name": "Samsung Phone 1",
                                  "price": 220000
                                },
                                "sku": {
                                  "id": "sku_0bae3b28f610fd0da1",
                                  "source_id": "first_product_sku_1",
                                  "sku": "Samsung phone 256GB",
                                  "price": 210000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_ByIIAHC1Mz9ouJsitzAWsush",
                          "name": "Multiple",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MANY_ITEMS",
                            "units": [
                              {
                                "effect": "ADD_MISSING_ITEMS",
                                "unit_off": 11,
                                "unit_type": "sku_0bae3b28f610fd0da1",
                                "sku": {
                                  "id": "sku_0bae3b28f610fd0da1",
                                  "source_id": "first_product_sku_1",
                                  "sku": "Samsung phone 256GB"
                                },
                                "product": {
                                  "id": "prod_0bae2dc5a090fd0184",
                                  "source_id": "first_product",
                                  "name": "Samsung Phone 1"
                                }
                              },
                              {
                                "effect": "ADD_NEW_ITEMS",
                                "unit_off": 22,
                                "unit_type": "sku_0b7d7dfb090be5c619",
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1"
                                },
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1"
                                }
                              },
                              {
                                "effect": "ADD_MISSING_ITEMS",
                                "unit_off": 111,
                                "unit_type": "prod_0b7d7c4e814be5c502",
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12"
                                }
                              },
                              {
                                "effect": "ADD_MISSING_ITEMS",
                                "unit_off": 222,
                                "unit_type": "prod_0b72b0bd64d198e3ae",
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage"
                                }
                              }
                            ]
                          },
                          "campaign": {
                            "id": "camp_JtoaZ8Qgpf6FkMAy2wWiOJWH",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "discount_amount": 9340400,
                          "applied_discount_amount": 9340400,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 9522100,
                            "initial_amount": 72100,
                            "items_discount_amount": 9450000,
                            "total_discount_amount": 9450000,
                            "total_amount": 72100,
                            "items_applied_discount_amount": 9450000,
                            "total_applied_discount_amount": 9450000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae2dc5a090fd0184",
                                "sku_id": "sku_0bae3b28f610fd0da1",
                                "quantity": 45,
                                "discount_quantity": 45,
                                "initial_quantity": 0,
                                "amount": 9450000,
                                "discount_amount": 9450000,
                                "initial_amount": 0,
                                "applied_discount_amount": 9450000,
                                "price": 210000,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0bae2dc5a090fd0184",
                                  "source_id": "first_product",
                                  "name": "Samsung Phone 1",
                                  "price": 220000
                                },
                                "sku": {
                                  "id": "sku_0bae3b28f610fd0da1",
                                  "source_id": "first_product_sku_1",
                                  "sku": "Samsung phone 256GB",
                                  "price": 210000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                          "name": "Add new SKU",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 45,
                            "unit_type": "sku_0bae3b28f610fd0da1",
                            "sku": {
                              "id": "sku_0bae3b28f610fd0da1",
                              "source_id": "first_product_sku_1",
                              "sku": "Samsung phone 256GB"
                            },
                            "product": {
                              "id": "prod_0bae2dc5a090fd0184",
                              "source_id": "first_product",
                              "name": "Samsung Phone 1"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 4,
                          "discount_amount": 9450000,
                          "applied_discount_amount": 9450000,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 109500,
                            "initial_amount": 72100,
                            "items_discount_amount": 39100,
                            "total_discount_amount": 39100,
                            "total_amount": 70400,
                            "items_applied_discount_amount": 39100,
                            "total_applied_discount_amount": 39100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 23,
                                "discount_quantity": 23,
                                "initial_quantity": 1,
                                "amount": 39100,
                                "discount_amount": 39100,
                                "initial_amount": 1700,
                                "applied_discount_amount": 39100,
                                "price": 1700,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_NcdD0zLo6FUhKWpNrNuP3Pte",
                          "name": "Add missing SKU",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 23,
                            "unit_type": "sku_0b7d7dfb090be5c619",
                            "sku": {
                              "id": "sku_0b7d7dfb090be5c619",
                              "source_id": "ComicBook_1",
                              "sku": "Comics1"
                            },
                            "product": {
                              "id": "prod_0b7d7dfb05cbe5c616",
                              "source_id": "Books",
                              "name": "Comic Books1"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 3,
                          "discount_amount": 39100,
                          "applied_discount_amount": 39100,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 76100,
                            "initial_amount": 72100,
                            "items_discount_amount": 4000,
                            "total_discount_amount": 4000,
                            "total_amount": 72100,
                            "items_applied_discount_amount": 4000,
                            "total_applied_discount_amount": 4000,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b00ffed198e344",
                                "quantity": 8,
                                "discount_quantity": 8,
                                "initial_quantity": 0,
                                "amount": 4000,
                                "discount_amount": 4000,
                                "initial_amount": 0,
                                "applied_discount_amount": 4000,
                                "price": 500,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b72b00ffed198e344",
                                  "source_id": "roses_1",
                                  "name": "Bouquet - Romantic Roses",
                                  "price": 500
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_nGr1SWuy9vduABkbbJkl8cHb",
                          "name": "Add new order items",
                          "banner": "Add Romantic Roses",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_NEW_ITEMS",
                            "unit_off": 8,
                            "unit_type": "prod_0b72b00ffed198e344",
                            "product": {
                              "id": "prod_0b72b00ffed198e344",
                              "source_id": "roses_1",
                              "name": "Bouquet - Romantic Roses"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 2,
                          "discount_amount": 4000,
                          "applied_discount_amount": 4000,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 78100,
                            "initial_amount": 72100,
                            "items_discount_amount": 7500,
                            "total_discount_amount": 7500,
                            "total_amount": 70600,
                            "items_applied_discount_amount": 7500,
                            "total_applied_discount_amount": 7500,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 5,
                                "discount_quantity": 5,
                                "initial_quantity": 1,
                                "amount": 7500,
                                "discount_amount": 7500,
                                "initial_amount": 1500,
                                "applied_discount_amount": 7500,
                                "price": 1500,
                                "subtotal_amount": 0,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_R50x0A66V6jmPhM7YYOcFZfL",
                          "name": "Add missing order items",
                          "banner": "Add Boho Vintage",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 5,
                            "unit_type": "prod_0b72b0bd64d198e3ae",
                            "product": {
                              "id": "prod_0b72b0bd64d198e3ae",
                              "source_id": "vase_1",
                              "name": "Vase - Boho Vintage"
                            }
                          },
                          "campaign": {
                            "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "discount_amount": 7500,
                          "applied_discount_amount": 7500,
                          "metadata": {},
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 72100,
                            "total_amount": 72100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_5h1pp1ng",
                                "quantity": 1,
                                "discount_quantity": 1,
                                "initial_quantity": 0,
                                "product": {
                                  "id": "prod_5h1pp1ng",
                                  "source_id": "5h1pp1ng",
                                  "name": "Shipping"
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_jp2l6wRcTL4cARG5E8XRo42A",
                          "name": "Get",
                          "banner": "Free shipping",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 1,
                            "unit_type": "prod_5h1pp1ng",
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          "campaign": {
                            "id": "camp_wCEdu2igBcyv7CNna9ughGKc",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [
                              {
                                "object": "products_collection",
                                "id": "pc_a11pr0dUc75",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9ab4ab019a42d5",
                                "source_id": "prod_0a9f9ab4ab019a42d5",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9aeddb019a42db",
                                "source_id": "prod_0a9f9aeddb019a42db",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "sku",
                                "id": "sku_0b7d7dfb090be5c619",
                                "source_id": "ComicBook_1",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "product_source_id": "Books",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b72b0bd64d198e3ae",
                                "source_id": "vase_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b7d7c4e814be5c502",
                                "source_id": "prod_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 6,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 72100,
                            "items_discount_amount": 67300,
                            "total_discount_amount": 67300,
                            "total_amount": 4800,
                            "items_applied_discount_amount": 67300,
                            "total_applied_discount_amount": 67300,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "discount_amount": 2300,
                                "applied_discount_amount": 2300,
                                "price": 3100,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "discount_amount": 900,
                                "applied_discount_amount": 900,
                                "price": 1700,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "discount_amount": 700,
                                "applied_discount_amount": 700,
                                "price": 1500,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "discount_amount": 59200,
                                "applied_discount_amount": 59200,
                                "price": 60000,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_WEloFBBJ8JJDCxrtR1FPy6t1",
                          "name": "Get Amount Off",
                          "banner": "Every product is worth 8",
                          "discount": {
                            "type": "FIXED",
                            "effect": "APPLY_TO_ITEMS"
                          },
                          "campaign": {
                            "id": "camp_Ds2u0MSFGuKhDuR3jEa5dHBx",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 2,
                          "discount_amount": 67300,
                          "applied_discount_amount": 67300,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        }
                      ]
                    }
                  },
                  "Campaign specific": {
                    "value": {
                      "valid": true,
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "promotions": [
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                          "order": {
                            "amount": 72100,
                            "discount_amount": 100,
                            "total_discount_amount": 100,
                            "total_amount": 72000,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_g83qUzYZpfX0OMAFOVoQuOYG",
                          "name": "1",
                          "discount": {
                            "type": "AMOUNT",
                            "effect": "APPLY_TO_ORDER",
                            "amount_off": 100
                          },
                          "campaign": {
                            "id": "camp_nYcAyjFXmEaBU0nB7EQ4hVTr",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "categories": [
                              {
                                "id": "cat_0b5f66bc97ce5be3c6",
                                "name": "Sixth",
                                "hierarchy": 6,
                                "created_at": "2022-07-13T08:27:14.926Z",
                                "object": "category"
                              }
                            ],
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "discount_amount": 100,
                          "applied_discount_amount": 100,
                          "metadata": {},
                          "object": "promotion_tier"
                        }
                      ]
                    }
                  },
                  "Promotion Tier Metadata": {
                    "value": {
                      "valid": true,
                      "tracking_id": "track_oNgl7cQ8tVTg/fIVul/GKA==",
                      "promotions": [
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_oNgl7cQ8tVTg/fIVul/GKA==",
                          "order": {
                            "amount": 72100,
                            "total_amount": 72100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "price": 3100,
                                "subtotal_amount": 3100,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "price": 2900,
                                "subtotal_amount": 2900,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "price": 1700,
                                "subtotal_amount": 1700,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "price": 1500,
                                "subtotal_amount": 1500,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "price": 60000,
                                "subtotal_amount": 60000,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_5h1pp1ng",
                                "quantity": 1,
                                "discount_quantity": 1,
                                "initial_quantity": 0,
                                "product": {
                                  "id": "prod_5h1pp1ng",
                                  "source_id": "5h1pp1ng",
                                  "name": "Shipping"
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_jp2l6wRcTL4cARG5E8XRo42A",
                          "name": "Get",
                          "banner": "Free shipping",
                          "discount": {
                            "type": "UNIT",
                            "effect": "ADD_MISSING_ITEMS",
                            "unit_off": 1,
                            "unit_type": "prod_5h1pp1ng",
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          "campaign": {
                            "id": "camp_wCEdu2igBcyv7CNna9ughGKc",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 1,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        },
                        {
                          "valid": true,
                          "applicable_to": {
                            "data": [
                              {
                                "object": "products_collection",
                                "id": "pc_a11pr0dUc75",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9ab4ab019a42d5",
                                "source_id": "prod_0a9f9ab4ab019a42d5",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0a9f9aeddb019a42db",
                                "source_id": "prod_0a9f9aeddb019a42db",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "sku",
                                "id": "sku_0b7d7dfb090be5c619",
                                "source_id": "ComicBook_1",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "product_source_id": "Books",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b72b0bd64d198e3ae",
                                "source_id": "vase_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              },
                              {
                                "object": "product",
                                "id": "prod_0b7d7c4e814be5c502",
                                "source_id": "prod_1",
                                "price": 800,
                                "effect": "APPLY_TO_EVERY"
                              }
                            ],
                            "total": 6,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "inapplicable_to": {
                            "data": [],
                            "total": 0,
                            "data_ref": "data",
                            "object": "list"
                          },
                          "tracking_id": "track_oNgl7cQ8tVTg/fIVul/GKA==",
                          "order": {
                            "amount": 72100,
                            "items_discount_amount": 67300,
                            "total_discount_amount": 67300,
                            "total_amount": 4800,
                            "items_applied_discount_amount": 67300,
                            "total_applied_discount_amount": 67300,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9aeddb019a42db",
                                "quantity": 1,
                                "amount": 3100,
                                "discount_amount": 2300,
                                "applied_discount_amount": 2300,
                                "price": 3100,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9aeddb019a42db",
                                  "name": "Blue T-Shirt",
                                  "price": 3100
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0a9f9ab4ab019a42d5",
                                "quantity": 1,
                                "amount": 2900,
                                "discount_amount": 2100,
                                "applied_discount_amount": 2100,
                                "price": 2900,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0a9f9ab4ab019a42d5",
                                  "name": "Red T-Shirt",
                                  "price": 2900
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7dfb05cbe5c616",
                                "sku_id": "sku_0b7d7dfb090be5c619",
                                "quantity": 1,
                                "amount": 1700,
                                "discount_amount": 900,
                                "applied_discount_amount": 900,
                                "price": 1700,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7dfb05cbe5c616",
                                  "source_id": "Books",
                                  "name": "Comic Books1",
                                  "price": 2100
                                },
                                "sku": {
                                  "id": "sku_0b7d7dfb090be5c619",
                                  "source_id": "ComicBook_1",
                                  "sku": "Comics1",
                                  "price": 1700
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b72b0bd64d198e3ae",
                                "quantity": 1,
                                "amount": 1500,
                                "discount_amount": 700,
                                "applied_discount_amount": 700,
                                "price": 1500,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b72b0bd64d198e3ae",
                                  "source_id": "vase_1",
                                  "name": "Vase - Boho Vintage",
                                  "price": 1500
                                }
                              },
                              {
                                "object": "order_item",
                                "product_id": "prod_0b7d7c4e814be5c502",
                                "quantity": 1,
                                "amount": 60000,
                                "discount_amount": 59200,
                                "applied_discount_amount": 59200,
                                "price": 60000,
                                "subtotal_amount": 800,
                                "product": {
                                  "id": "prod_0b7d7c4e814be5c502",
                                  "source_id": "prod_1",
                                  "name": "Apple iPhone 12",
                                  "price": 60000
                                }
                              }
                            ],
                            "metadata": {
                              "payment_mean": [
                                "credit-card"
                              ]
                            },
                            "customer_id": null,
                            "referrer_id": null,
                            "object": "order"
                          },
                          "id": "promo_WEloFBBJ8JJDCxrtR1FPy6t1",
                          "name": "Get Amount Off",
                          "banner": "Every product is worth 8",
                          "discount": {
                            "type": "FIXED",
                            "effect": "APPLY_TO_ITEMS"
                          },
                          "campaign": {
                            "id": "camp_Ds2u0MSFGuKhDuR3jEa5dHBx",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "object": "campaign"
                          },
                          "hierarchy": 2,
                          "discount_amount": 67300,
                          "applied_discount_amount": 67300,
                          "metadata": {
                            "has_budget": true,
                            "audience_restricted": false
                          },
                          "object": "promotion_tier"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers/{tierId}/validation": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "tierId",
          "in": "path",
          "required": true,
          "description": "Unique promotion tier ID."
        }
      ],
      "post": {
        "operationId": "validate-promotion-tier",
        "deprecated": true,
        "tags": [
          "Validations"
        ],
        "summary": "Validate Promotion Tier [Deprecated]",
        "description": "\n> ❗️ Deprecated  \n>\n> This endpoint represents the deprecated version of the API responsible for promotion tier redemption, and we do not recommend using it. The new [Stackable Discounts API](ref:validate-stacked-discounts) introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint. \n\nTo verify whether the promotion tier discount can be applied to an order. This method is designed for server side integration which means that it is accessible only through private keys.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the customer and order context.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/6_req_validate_promotion_tier"
              },
              "examples": {
                "Using IDs": {
                  "value": {
                    "customer": {
                      "source_id": "test-user@email.io"
                    },
                    "order": {
                      "id": "ord_71uW6qnB5CFZlLHCeCNC4qtS"
                    }
                  }
                },
                "Using Redemption Metadata": {
                  "value": {
                    "customer": {
                      "source_id": "test-user@email.com"
                    },
                    "order": {
                      "amount": 200000,
                      "items": [
                        {
                          "product_id": "prod_anJ03RZZq74z4v",
                          "quantity": 2
                        },
                        {
                          "sku_id": "sku_0KtP4rvwEECQ2U",
                          "related_object": "sku",
                          "quantity": 1
                        }
                      ]
                    },
                    "metadata": {
                      "store_names": "Store 1 - New York - Broadway"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns validation result in `valid` key of the promotion tier object. Returns `true` if the promotion tier rules and validation rules are satisfied given the request body parameters. Returns `false` if the data provided in the payload does not meet validation rules or promotion tier requirements.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/6_res_validate_promotion_tier"
                },
                "examples": {
                  "Promotion Valid": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_OWyBVb1mg1qnieLLNygh19A0Ia7FsJck",
                      "order": {
                        "id": "ord_71uW6qnB5CFZlLHCeCNC4qtS",
                        "source_id": null,
                        "created_at": "2022-11-17T12:17:55.096Z",
                        "updated_at": null,
                        "status": "CREATED",
                        "amount": 9918200,
                        "initial_amount": 468200,
                        "items_discount_amount": 9450000,
                        "total_discount_amount": 9450000,
                        "total_amount": 468200,
                        "items_applied_discount_amount": 9450000,
                        "total_applied_discount_amount": 9450000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6500,
                            "price": 6500,
                            "subtotal_amount": 6500
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_navy_sweat_pants",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 6000,
                            "price": 6000,
                            "subtotal_amount": 6000
                          },
                          {
                            "object": "order_item",
                            "source_id": "5h1pp1ng",
                            "related_object": "product",
                            "quantity": 1,
                            "amount": 2000,
                            "price": 2000,
                            "subtotal_amount": 2000,
                            "product": {
                              "id": "prod_5h1pp1ng",
                              "source_id": "5h1pp1ng",
                              "name": "Shipping"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pearl",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 22000,
                            "price": 11000,
                            "subtotal_amount": 22000
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b7d7dfb05cbe5c616",
                            "sku_id": "sku_0b7d7dfb090be5c619",
                            "quantity": 1,
                            "amount": 1700,
                            "price": 1700,
                            "subtotal_amount": 1700,
                            "product": {
                              "id": "prod_0b7d7dfb05cbe5c616",
                              "source_id": "Books",
                              "name": "Comic Books1",
                              "price": 2100
                            },
                            "sku": {
                              "id": "sku_0b7d7dfb090be5c619",
                              "source_id": "ComicBook_1",
                              "sku": "Comics1",
                              "price": 1700
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bae32322150fd0546",
                            "quantity": 2,
                            "amount": 420000,
                            "price": 210000,
                            "subtotal_amount": 420000,
                            "product": {
                              "id": "prod_0bae32322150fd0546",
                              "name": "Samsung Phone",
                              "price": 210000
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bae2dc5a090fd0184",
                            "sku_id": "sku_0bae3b28f610fd0da1",
                            "quantity": 45,
                            "discount_quantity": 45,
                            "initial_quantity": 0,
                            "amount": 9450000,
                            "discount_amount": 9450000,
                            "initial_amount": 0,
                            "applied_discount_amount": 9450000,
                            "price": 210000,
                            "subtotal_amount": 0,
                            "product": {
                              "id": "prod_0bae2dc5a090fd0184",
                              "source_id": "first_product",
                              "name": "Samsung Phone 1",
                              "price": 220000
                            },
                            "sku": {
                              "id": "sku_0bae3b28f610fd0da1",
                              "source_id": "first_product_sku_1",
                              "sku": "Samsung phone 256GB",
                              "price": 210000
                            }
                          }
                        ],
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "id": "promo_ZWkx6R0I1Ts3N9HL4kfTdxOm",
                      "name": "Add new SKU",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_NEW_ITEMS",
                        "unit_off": 45,
                        "unit_type": "sku_0bae3b28f610fd0da1",
                        "sku": {
                          "id": "sku_0bae3b28f610fd0da1",
                          "source_id": "first_product_sku_1",
                          "sku": "Samsung phone 256GB"
                        },
                        "product": {
                          "id": "prod_0bae2dc5a090fd0184",
                          "source_id": "first_product",
                          "name": "Samsung Phone 1"
                        }
                      },
                      "campaign": {
                        "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                        "start_date": null,
                        "expiration_date": null,
                        "active": true,
                        "object": "campaign"
                      },
                      "hierarchy": 4,
                      "discount_amount": 9450000,
                      "applied_discount_amount": 9450000,
                      "metadata": {},
                      "object": "promotion_tier"
                    }
                  },
                  "Promotion Invalid with Error Message": {
                    "value": {
                      "valid": false,
                      "reason": "redemption does not match validation rules",
                      "error": {
                        "code": 400,
                        "key": "redemption_rules_violated",
                        "message": "redemption does not match validation rules",
                        "details": "Promotion Tier cannot be redeemed because of violated validation rules: val_eqSA1dXOv491",
                        "request_id": "v-0c034585fd16cf6958"
                      },
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "id": "promo_R50x0A66V6jmPhM7YYOcFZfL",
                      "name": "Add missing order items",
                      "banner": "Add Boho Vintage",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS",
                        "unit_off": 5,
                        "unit_type": "prod_0b72b0bd64d198e3ae"
                      },
                      "campaign": {
                        "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                        "start_date": null,
                        "expiration_date": null,
                        "active": true,
                        "object": "campaign"
                      },
                      "hierarchy": 1,
                      "metadata": {
                        "has_budget": true
                      },
                      "object": "promotion_tier"
                    }
                  },
                  "Promotion Invalid with Custom Message": {
                    "value": {
                      "valid": false,
                      "reason": "Inactive Promotion",
                      "error": {
                        "message": "Promotion is inactive this weekend."
                      },
                      "tracking_id": "track_OWyBVb1mg1oMY1lADmgwuXCw/qYHp5h0",
                      "id": "promo_R50x0A66V6jmPhM7YYOcFZfL",
                      "name": "Add missing order items",
                      "banner": "Add Boho Vintage",
                      "discount": {
                        "type": "UNIT",
                        "effect": "ADD_MISSING_ITEMS",
                        "unit_off": 5,
                        "unit_type": "prod_0b72b0bd64d198e3ae"
                      },
                      "campaign": {
                        "id": "camp_40LC42P5NFbkkD4RWoJ4btks",
                        "start_date": null,
                        "expiration_date": null,
                        "active": true,
                        "object": "campaign"
                      },
                      "hierarchy": 1,
                      "metadata": {
                        "has_budget": true
                      },
                      "object": "promotion_tier"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/redemptions/{redemptionId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "redemptionId",
          "in": "path",
          "required": true,
          "description": "ID of previously created redemption."
        }
      ],
      "get": {
        "operationId": "get-redemption",
        "tags": [
          "Redemptions"
        ],
        "summary": "Get Redemption",
        "description": "Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a redemption object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsGetResponseBody"
                },
                "examples": {
                  "Discount Voucher": {
                    "value": {
                      "id": "r_0bade27c428db5873e",
                      "object": "redemption",
                      "date": "2022-09-12T07:29:28.211Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_ebmAU9uv3dTE2Khqyh7i5ka7",
                        "source_id": null,
                        "created_at": "2022-09-12T07:29:26.245Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 22500,
                        "discount_amount": 300,
                        "total_discount_amount": 300,
                        "total_amount": 22200,
                        "applied_discount_amount": 300,
                        "total_applied_discount_amount": 300,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0b2c36568000039138",
                            "quantity": 1,
                            "amount": 22500,
                            "price": 22500,
                            "subtotal_amount": 22500,
                            "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_0bade27c428db5873e": {
                            "date": "2022-09-12T07:29:26.282Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_c1yOEjZXOyVIe89VAYiRvL3QimZjXo8h"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_c1yOEjZXOyVIe89VAYiRvL3QimZjXo8h",
                      "voucher": {
                        "id": "v_c1yOEjZXOyVIe89VAYiRvL3QimZjXo8h",
                        "code": "FB-metadata-string",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      }
                    }
                  },
                  "Loyalty Card - Material Reward Product Type": {
                    "value": {
                      "id": "r_0c5bf0e6d601c7d7de",
                      "object": "redemption",
                      "date": "2023-01-25T12:08:09.503Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 4,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dSOsWkNCRT24lHPkMu8o5QbX",
                        "source_id": null,
                        "created_at": "2023-01-25T12:08:07.750Z",
                        "updated_at": null,
                        "status": "PAID",
                        "items": [],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf0e6d601c7d7de": {
                            "date": "2023-01-25T12:08:07.768Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "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,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "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_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": null,
                        "parameters": {
                          "product": {
                            "id": "prod_0b2c2ddf35150b83bb",
                            "sku_id": null
                          }
                        },
                        "type": "MATERIAL"
                      },
                      "loyalty_card": {
                        "points": 4
                      }
                    }
                  },
                  "Loyalty Card - Material Reward SKU Type": {
                    "value": {
                      "id": "r_0c5bf18dad48a34392",
                      "object": "redemption",
                      "date": "2023-01-25T12:11:00.543Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 6,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dwb6bpqjIlMuXFS71NuHed9S",
                        "source_id": null,
                        "created_at": "2023-01-25T12:10:58.598Z",
                        "updated_at": null,
                        "status": "PAID",
                        "items": [],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf18dad48a34392": {
                            "date": "2023-01-25T12:10:58.613Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "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,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "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": null,
                        "parameters": {
                          "product": {
                            "id": "prod_5h0wc453_2",
                            "sku_id": "sku_0a3efc9044dd121803"
                          }
                        },
                        "type": "MATERIAL"
                      },
                      "loyalty_card": {
                        "points": 6
                      }
                    }
                  },
                  "Loyalty Card - Pay with Points": {
                    "value": {
                      "id": "r_0b5e402ad54a3afe9c",
                      "object": "redemption",
                      "date": "2022-07-12T11:00:26.247Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 5,
                      "redemption": "r_0b5e402ad50a3afe98",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_9akjPYZNskEhKZ4zCZt6TKwq",
                        "source_id": null,
                        "created_at": "2022-07-12T11:00:26.224Z",
                        "amount": 20000,
                        "discount_amount": 5100,
                        "total_discount_amount": 5100,
                        "total_amount": 14900,
                        "applied_discount_amount": 500,
                        "total_applied_discount_amount": 500,
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_pQZDYaH8LzoOvgh3234DqZQjGJgbPov6",
                      "voucher": {
                        "id": "v_pQZDYaH8LzoOvgh3234DqZQjGJgbPov6",
                        "code": "LOYALTY-CARD-zOR2sV9Q",
                        "campaign": "Loyalty Program",
                        "campaign_id": "camp_Hpt5hPTA8kSKRWGxBGw8Y0So",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "reward": {
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "name": "Bob Jones",
                          "email": "bob.jones@email.com",
                          "source_id": "36_bob",
                          "metadata": {
                            "accepts_marketing": false
                          },
                          "object": "customer"
                        },
                        "assignment_id": "rewa_X3jnD5XFxP6GXCzPZUNknDck",
                        "id": "rew_6rhNwuuWFQJLvTPO34ilg6jq",
                        "object": "reward",
                        "name": "Pay with Points",
                        "created_at": "2022-07-11T08:18:18.205Z",
                        "updated_at": null,
                        "parameters": {
                          "coin": {
                            "exchange_ratio": 1,
                            "points_ratio": 1
                          }
                        },
                        "type": "COIN"
                      },
                      "loyalty_card": {
                        "points": 5
                      }
                    }
                  },
                  "Loyalty Card - Digital Reward - Discount Voucher": {
                    "value": {
                      "id": "r_0c5bf3323008a35032",
                      "object": "redemption",
                      "date": "2023-01-25T12:18:10.707Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {
                        "redemption_location": {
                          "city": "Warsaw",
                          "state": "Polyork"
                        }
                      },
                      "amount": 2,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dqxr4uzaYWkTZnrSEMoQtCF8",
                        "source_id": null,
                        "created_at": "2023-01-25T12:18:09.203Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 2100,
                        "total_amount": 2100,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 3,
                            "amount": 2100,
                            "price": 700,
                            "subtotal_amount": 2100,
                            "product": {
                              "id": "prod_0bc3bd8a4e072c5275",
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf3323008a35032": {
                            "date": "2023-01-25T12:18:09.216Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "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,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "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_4GaEX7clyqMaveT7vHhoyRpsIgxv95Q6",
                          "code": "HAPPY-ORDER5My",
                          "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": "21ceb848-4869-4dac-ba41-f854bda3a101",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "1dba9cb2-fb28-4c8d-8548-5edb2eb01f5a",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2023-01-25T12:18:09.256Z",
                          "updated_at": null,
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0,
                            "object": "list",
                            "url": "/v1/vouchers/HAPPY-ORDER5My/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/HAPPY-ORDER5My/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
                      }
                    }
                  },
                  "Loyalty Card - Digital Reward - Credits on Gift Card": {
                    "value": {
                      "id": "r_0c5c1435d053202118",
                      "object": "redemption",
                      "date": "2023-01-25T14:42:25.206Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 1,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_v0r7JfUQgWRpw28UJm9Z5AaH",
                        "source_id": null,
                        "created_at": "2023-01-25T14:42:23.637Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 22500,
                        "total_amount": 22500,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0b2c36568000039138",
                            "quantity": 1,
                            "amount": 22500,
                            "price": 22500,
                            "subtotal_amount": 22500,
                            "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_0c5c1435d053202118": {
                            "date": "2023-01-25T14:42:23.681Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "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,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "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": 55080,
                            "balance": 44780
                          },
                          "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-11T15:23:02.789Z",
                          "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
                      }
                    }
                  },
                  "Loyalty Card - Digital Reward - Points on Loyalty Card": {
                    "value": {
                      "id": "r_0c5c226f498f1a93f0",
                      "object": "redemption",
                      "date": "2023-01-25T15:44:34.317Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": {},
                      "amount": 1,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_1fv4ITwpUQra6iDTHFPVfnRR",
                        "source_id": null,
                        "created_at": "2023-01-25T15:44:32.494Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 700,
                        "total_amount": 700,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 1,
                            "amount": 700,
                            "price": 700,
                            "subtotal_amount": 700,
                            "product": {
                              "id": "prod_0bc3bd8a4e072c5275",
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5c226f498f1a93f0": {
                            "date": "2023-01-25T15:44:32.550Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "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,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "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": 1000,
                            "balance": 870
                          },
                          "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": "2022-10-01T00:02:05.604Z",
                          "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
                      }
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "r_0b5e7d29ba4fb72ee4",
                      "object": "redemption",
                      "date": "2022-07-12T15:26:52.777Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 5000,
                      "redemption": "r_0b5e7d29ba0fb72ee2",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_5iOTjTG4I3Yo2G2bH1qHk66a",
                        "source_id": null,
                        "created_at": "2022-07-12T15:26:52.773Z",
                        "amount": 30200,
                        "discount_amount": 9530,
                        "total_discount_amount": 9530,
                        "total_amount": 20670,
                        "applied_discount_amount": 5000,
                        "total_applied_discount_amount": 5000,
                        "metadata": {},
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                      "voucher": {
                        "id": "v_hS8JFl8S6lNcd1L69wLIoXgTio7eWEgk",
                        "code": "GIFT-CARD-xwc6X7Tk",
                        "campaign": "Gift Cards",
                        "campaign_id": "camp_kdxp3vf1clQ9CFs1jpqv3tZe",
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "gift": {
                        "amount": 5000
                      }
                    }
                  },
                  "Promotion Tier": {
                    "value": {
                      "id": "r_0c5d6689b35320059a",
                      "object": "redemption",
                      "date": "2023-01-26T15:20:35.916Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_4kVJ1PiXP3TNfik3pM79KZsn",
                        "source_id": null,
                        "created_at": "2023-01-26T15:20:34.216Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 200000,
                        "discount_amount": 80000,
                        "total_discount_amount": 80000,
                        "total_amount": 120000,
                        "applied_discount_amount": 80000,
                        "total_applied_discount_amount": 80000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5d6689b35320059a": {
                            "date": "2023-01-26T15:20:34.253Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "action": null,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": null,
                          "expiration_date": null,
                          "object": "campaign"
                        },
                        "campaign_id": null,
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 0
                          },
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null
                      }
                    }
                  },
                  "Stacked Redemption": {
                    "value": {
                      "id": "r_0b5e3e2b7f851d0192",
                      "object": "redemption",
                      "date": "2022-07-12T10:51:33.098Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_qjnno0eUQ1fs0RMjejfbZp7q",
                        "source_id": null,
                        "created_at": "2022-07-12T10:51:31.687Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 20000,
                        "discount_amount": 6100,
                        "total_discount_amount": 6100,
                        "total_amount": 13900,
                        "applied_discount_amount": 6100,
                        "total_applied_discount_amount": 6100,
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0b5e3e2b7f851d0192": {
                            "date": "2022-07-12T10:51:31.711Z",
                            "related_object_type": "redemption",
                            "related_object_id": "r_0b5e3e2b7f851d0192",
                            "stacked": [
                              "r_0b5e3e2b7f851d0193",
                              "r_0b5e3e2b7fc51d0194",
                              "r_0b5e3e2b7fc51d0195",
                              "r_0b5e3e2b7fc51d0196",
                              "r_0b5e3e2b7fc51d0197"
                            ]
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "name": "Bob Jones",
                        "email": "bob.jones@email.com",
                        "source_id": "36_bob",
                        "metadata": {
                          "accepts_marketing": false
                        },
                        "object": "customer"
                      },
                      "related_object_type": "redemption",
                      "related_object_id": "r_0b5e3e2b7f851d0192",
                      "voucher": null
                    }
                  },
                  "Failed Voucher": {
                    "value": {
                      "id": "rf_0c5bd3c15701c78243",
                      "object": "redemption",
                      "date": "2023-01-25T10:00:47.812Z",
                      "customer_id": "cust_w1aRTTkpzeTGtOauISc8CKUN",
                      "tracking_id": "track_hr0jh/qNQqZWu7gkCEcVwEg27bNVrn2+",
                      "metadata": {
                        "location_id": [],
                        "redemption_location": {
                          "city": "Albany",
                          "state": "New York"
                        }
                      },
                      "result": "FAILURE",
                      "failure_code": "voucher_disabled",
                      "failure_message": "voucher is disabled",
                      "order": null,
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "customer": {
                        "id": "cust_w1aRTTkpzeTGtOauISc8CKUN",
                        "name": "Bobby's Friend",
                        "email": null,
                        "source_id": "create_order_referrer_1",
                        "metadata": {},
                        "object": "customer"
                      },
                      "related_object_type": "voucher",
                      "related_object_id": "v_zr4XJD6b6JtldZq9EorHf4jxRbahjkfi",
                      "voucher": {
                        "id": "v_zr4XJD6b6JtldZq9EorHf4jxRbahjkfi",
                        "code": "PROMO-CODE2",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      }
                    }
                  },
                  "Failed Promotion Tier": {
                    "value": {
                      "id": "rf_0c5d6e47050156bfc2",
                      "object": "redemption",
                      "date": "2023-01-26T15:54:23.508Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "FAILURE",
                      "failure_code": "promotion_inactive",
                      "failure_message": "Inactive Promotion",
                      "order": null,
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 2
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "action": null,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": null,
                          "expiration_date": null,
                          "object": "campaign"
                        },
                        "campaign_id": null,
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 0
                          },
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null
                      }
                    }
                  },
                  "Failed Redemption": {
                    "value": {
                      "id": "rf_0c5bde8dfc0156f0e3",
                      "object": "redemption",
                      "date": "2023-01-25T10:47:58.578Z",
                      "customer_id": null,
                      "tracking_id": null,
                      "metadata": null,
                      "result": "FAILURE",
                      "failure_code": "not_found",
                      "failure_message": "Resource not found",
                      "order": null,
                      "channel": {
                        "channel_id": "abcdefg-efgj-ijkl-mnop-qrstuvxyz",
                        "channel_type": "API"
                      },
                      "customer": null,
                      "related_object_type": "redemption",
                      "related_object_id": "rf_0c5bde8dfc0156f0e3",
                      "voucher": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/{code}/redemption": {
      "parameters": [
        {
          "$ref": "#/components/parameters/code"
        }
      ],
      "get": {
        "operationId": "get-voucher-redemptions",
        "tags": [
          "Redemptions"
        ],
        "summary": "Get Voucher's Redemptions",
        "description": "Retrieve the number of times a voucher was redeemed and each of the redemption details.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A dictionary with a `redemption_entries` property that contains an array of voucher's redemptions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VouchersRedemptionGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "quantity": null,
                      "redeemed_quantity": 6,
                      "object": "list",
                      "url": "/v1/vouchers/Test - FB - Vouchers - 9/redemptions?page=1&limit=10",
                      "data_ref": "redemption_entries",
                      "total": 6,
                      "redemption_entries": [
                        {
                          "id": "r_0bc92f81a6801f9bca",
                          "object": "redemption",
                          "date": "2022-10-03T12:24:58.008Z",
                          "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                          "tracking_id": "track_fxEMFisanb6bqeHALcTMxy9fmc+1Azdq951CZwGFCweQF8eGLowFHg==",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_bhp1EH2SDz7UwkkurPFPLPhi",
                            "source_id": null,
                            "created_at": "2022-10-03T12:24:56.179Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 100,
                            "total_discount_amount": 100,
                            "total_amount": 229900,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                              "object": "customer"
                            },
                            "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc92f81a6801f9bca": {
                                "date": "2022-10-03T12:24:56.219Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "name": null,
                            "email": null,
                            "source_id": "johnnyy@email.com",
                            "metadata": {},
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc92e6a68050e118c",
                          "object": "redemption",
                          "date": "2022-10-03T12:20:11.873Z",
                          "customer_id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                          "tracking_id": "track_5DQxXbK0C0pvAaHk7mnulmKhuFqhawWj",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_rBsuJYqf4eFZgqj6IxeJgEcN",
                            "source_id": null,
                            "created_at": "2022-10-03T12:20:10.222Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 100,
                            "total_discount_amount": 100,
                            "total_amount": 229900,
                            "applied_discount_amount": 100,
                            "total_applied_discount_amount": 100,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                              "object": "customer"
                            },
                            "customer_id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc92e6a68050e118c": {
                                "date": "2022-10-03T12:20:10.272Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_TzWOhveicr7BI1Qg4bCFrrQQ",
                            "name": "Bob Jones",
                            "email": "bob.smith@email.com",
                            "source_id": "pub_source_customer_4",
                            "metadata": {
                              "lang": "en",
                              "test": true
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc92db6e6001f9aa8",
                          "object": "redemption",
                          "date": "2022-10-03T12:17:07.780Z",
                          "customer_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                          "tracking_id": "track_5DQxXbK0C0pvAaHk7mnulmYlx396Pk4X",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_JvZbg1LFcXdQ67no5SENGldH",
                            "source_id": null,
                            "created_at": "2022-10-03T12:17:06.404Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 1200,
                            "total_discount_amount": 1200,
                            "total_amount": 228800,
                            "applied_discount_amount": 1200,
                            "total_applied_discount_amount": 1200,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                              "object": "customer"
                            },
                            "customer_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc92db6e6001f9aa8": {
                                "date": "2022-10-03T12:17:06.456Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                            "name": "Bob Jones",
                            "email": "bob.smith@email.com",
                            "source_id": "pub_source_customer_5",
                            "metadata": {
                              "lang": "en",
                              "test": true
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc2dc6404426c0ab3",
                          "object": "redemption",
                          "date": "2022-09-28T14:30:56.199Z",
                          "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                          "tracking_id": "track_fxEMFisanb6bqeHALcTMxy9fmc+1Azdq951CZwGFCweQF8eGLowFHg==",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_6uuhGraDuXMOpVRTJT251kKW",
                            "source_id": null,
                            "created_at": "2022-09-28T14:30:54.681Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 800,
                            "total_discount_amount": 800,
                            "total_amount": 229200,
                            "applied_discount_amount": 800,
                            "total_applied_discount_amount": 800,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                              "object": "customer"
                            },
                            "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc2dc6404426c0ab3": {
                                "date": "2022-09-28T14:30:54.737Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
                            "name": null,
                            "email": null,
                            "source_id": "jonny@email.com",
                            "metadata": {},
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc2d6f0ebc95f1783",
                          "object": "redemption",
                          "date": "2022-09-28T14:07:07.516Z",
                          "customer_id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                          "tracking_id": "track_ThofCMTQe4EVIo0zvvOlTor1twaQNd7E",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_ZQevc2J2sBegsnp5DwanXHsa",
                            "source_id": null,
                            "created_at": "2022-09-28T14:07:06.073Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 0,
                            "total_discount_amount": 0,
                            "total_amount": 230000,
                            "applied_discount_amount": 0,
                            "total_applied_discount_amount": 0,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                              "object": "customer"
                            },
                            "customer_id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc2d6f0ebc95f1783": {
                                "date": "2022-09-28T14:07:06.159Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                            "name": "Bob Smith",
                            "email": "bob.smith.1@email.com",
                            "source_id": "bob.smith.1@email.com",
                            "metadata": {
                              "lang": "en",
                              "test": false
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        },
                        {
                          "id": "r_0bc2d3c4f7495f159a",
                          "object": "redemption",
                          "date": "2022-09-28T13:53:16.057Z",
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "tracking_id": "track_fxEMFisanb4sbl4Z4yCnJyDW013IrRbJmqKByTNHbXE=",
                          "metadata": {},
                          "result": "SUCCESS",
                          "order": {
                            "id": "ord_ff6rwr58kmdyuLsi5orplnVW",
                            "source_id": null,
                            "created_at": "2022-09-28T13:53:14.604Z",
                            "updated_at": null,
                            "status": "PAID",
                            "amount": 230000,
                            "discount_amount": 800,
                            "total_discount_amount": 800,
                            "total_amount": 229200,
                            "applied_discount_amount": 800,
                            "total_applied_discount_amount": 800,
                            "items": [
                              {
                                "object": "order_item",
                                "product_id": "prod_0bae45ffc7003ffc52",
                                "quantity": 1,
                                "amount": 230000,
                                "price": 230000,
                                "subtotal_amount": 230000,
                                "product": {
                                  "id": "prod_0bae45ffc7003ffc52",
                                  "source_id": "second_product",
                                  "name": "Samsung Phone 2",
                                  "price": 230000
                                }
                              }
                            ],
                            "metadata": {},
                            "customer": {
                              "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                              "object": "customer"
                            },
                            "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "referrer_id": null,
                            "object": "order",
                            "redemptions": {
                              "r_0bc2d3c4f7495f159a": {
                                "date": "2022-09-28T13:53:14.717Z",
                                "related_object_type": "voucher",
                                "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno"
                              }
                            }
                          },
                          "channel": {
                            "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                            "channel_type": "USER"
                          },
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "name": "John Smith",
                            "email": "john.smith@email.com",
                            "source_id": "john.smith@email.com",
                            "metadata": {
                              "acquisition_channel": "Facebook"
                            },
                            "object": "customer"
                          },
                          "related_object_type": "voucher",
                          "related_object_id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                          "voucher": {
                            "id": "v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno",
                            "code": "Test - FB - Vouchers - 9",
                            "campaign_id": null
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "redeem-voucher",
        "deprecated": true,
        "tags": [
          "Redemptions"
        ],
        "summary": "Redeem Voucher [Deprecated]",
        "description": "\n```json title=Example Response\n{\n    \"id\": \"r_se17sLon6YX5wMhYVzfQa2dc\",\n    \"object\": \"redemption\",\n    \"date\": \"2020-05-24T13:41:16Z\",\n    \"customer_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n    \"amount\": 10,\n    \"order\": {\n        \"status\": \"PROCESSING\",\n        \"items\": [\n            {\n                \"object\": \"order_item\",\n                \"product_id\": \"test_source_1\",\n                \"quantity\": 1,\n                \"amount\": 15000,\n                \"price\": 15000\n            },\n            {\n                \"object\": \"order_item\",\n                \"product_id\": \"test_source_2\",\n                \"quantity\": 1,\n                \"amount\": 10000,\n                \"price\": 10000\n            }\n        ],\n        \"customer\": {\n            \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n            \"object\": \"customer\",\n            \"referrals\": {\n                \"campaigns\": [],\n                \"total\": 0\n            }\n        },\n        \"amount\": 25000,\n        \"object\": \"order\",\n        \"id\": \"ord_EfMmve84JzQIg2MCM3cAvLgF\",\n        \"created_at\": \"2020-05-24T13:41:16Z\",\n        \"discount_amount\": 25000\n    },\n    \"customer\": {\n        \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n        \"source_id\": \"tom+Loyalty@email.com\",\n        \"name\": \"Tom Loyalty\",\n        \"email\": \"tom+Loyalty@email.com\",\n        \"metadata\": {},\n        \"object\": \"customer\"\n    },\n    \"reward\": {\n        \"assignment_id\": \"rewa_g3QQwQfhJrjBYzEa1NJkub7N\",\n        \"loyalty_tier_id\": null,\n        \"id\": \"rew_noP2S5H8PEBFT97mennSA531\",\n        \"name\": \"1 point 25$\",\n        \"created_at\": \"2020-05-24T12:57:19Z\",\n        \"parameters\": {\n            \"automation_id\": null,\n            \"coin\": {\n                \"exchange_ratio\": 25.0\n            }\n        },\n        \"type\": \"COIN\",\n        \"object\": \"reward\"\n    },\n    \"metadata\": {\n        \"category\": \"vip\",\n        \"shop\": \"s1\",\n        \"location\": \"l1\"\n    },\n    \"result\": \"SUCCESS\",\n    \"tracking_id\": \"track_IWQYtuUE7phYpPzTHD5uwbyvlrO4nqyzipbQQtsHrRw=\",\n    \"voucher\": {\n        \"id\": \"v_wjgLC2lrQy1urPOdd35JX0RtkcOcQOmb\",\n        \"code\": \"Dm1x8MuX\",\n        \"campaign\": \"TestLoyalty-GivePoints\",\n        \"campaign_id\": \"camp_qVVaC4vpVlof03eBi8qb5gE7\",\n        \"category\": null,\n        \"type\": \"LOYALTY_CARD\",\n        \"discount\": null,\n        \"gift\": null,\n        \"loyalty_card\": {\n            \"points\": 439,\n            \"balance\": 223\n        },\n        \"start_date\": null,\n        \"expiration_date\": null,\n        \"validity_timeframe\": null,\n        \"validity_day_of_week\": null,\n        \"publish\": {\n            \"object\": \"list\",\n            \"count\": 1,\n            \"url\": \"/v1/vouchers/Dm1x8MuX/publications?page=1&limit=10\"\n        },\n        \"redemption\": {\n            \"object\": \"list\",\n            \"quantity\": null,\n            \"redeemed_quantity\": 7,\n            \"url\": \"/v1/vouchers/Dm1x8MuX/redemptions?page=1&limit=10\",\n            \"redeemed_points\": 216\n        },\n        \"active\": true,\n        \"additional_info\": null,\n        \"metadata\": {},\n        \"assets\": {\n            \"qr\": {\n                \"id\": \"U2FsdGVkX1+9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g==\",\n                \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/qr/U2FsdGVkX1%2B9Eo0bLWMZmYK6nQxl3AyR3nqkloGURcpRJcxL3hl5xXSGRYjYdySc9twLaKnYGVXbLtjCGW8FBotl1rTAxLJQm4okoJ385Gd6pc1ty6AnhaHHJjCeLoYYSQCG1EyP9PRxnTihjmsE9g%3D%3D\"\n            },\n            \"barcode\": {\n                \"id\": \"U2FsdGVkX19NfR0ANlhLM7Df9Ec+xqTh6aTbHakk/Gzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF/BSQTyJx0YSK+HIUG9RGD+9rVhiC7+4WkSKrgAZ+NeqQBIqcespt8WWygXjfkvbyXBSF7Lg==\",\n                \"url\": \"https://dev.dl.voucherify.io/api/v1/assets/barcode/U2FsdGVkX19NfR0ANlhLM7Df9Ec%2BxqTh6aTbHakk%2FGzeh9zTiuj8KUBLswVXkz0gdLVnn1ZtzjCv7oF%2FBSQTyJx0YSK%2BHIUG9RGD%2B9rVhiC7%2B4WkSKrgAZ%2BNeqQBIqcespt8WWygXjfkvbyXBSF7Lg%3D%3D\"\n            }\n        },\n        \"is_referral_code\": false,\n        \"holder_id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n        \"updated_at\": \"2020-05-24T13:41:16Z\",\n        \"holder\": {\n            \"id\": \"cust_lXisxEaEHYKTEVf1YnNS8AUh\",\n            \"source_id\": \"tom+Loyalty@email.com\",\n            \"name\": \"Tom Loyalty\",\n            \"email\": \"tom+Loyalty@email.com\",\n            \"metadata\": {},\n            \"object\": \"customer\"\n        },\n        \"object\": \"voucher\",\n        \"validation_rules_assignments\": {\n            \"data\": [],\n            \"object\": \"list\",\n            \"total\": 0,\n            \"data_ref\": \"data\"\n        }\n    }\n}\n```",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "A tracking identifier of a user that redeemed a voucher. Identifier generated during voucher validation based on your internal id (e.g., email, database ID). This is a hashed customer source ID. If you also pass a customer ID, the tracking ID must be the ID of a source of the customer object. Otherwise, if you do not pass a customer ID, the tracking you provide must either be a token, like the ones returnee by [voucher validation](ref:validate-voucher), or a string identifying customer, with the options described below. **Although not all information is required, the extra info helps prevent fraud.**"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the redemption context in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/7_req_redeem_voucher"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a redemption object if the redeem operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/7_res_redeem_voucher"
                },
                "examples": {
                  "Gift Voucher": {
                    "value": {
                      "id": "r_0c5e8a38730ccec0d5",
                      "object": "redemption",
                      "date": "2023-01-27T12:34:57.100Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 2000,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_S4BvUj64TlGqVZDOeud7z3rU",
                        "source_id": null,
                        "created_at": "2023-01-27T12:34:57.086Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "discount_amount": 2000,
                        "total_discount_amount": 2000,
                        "total_amount": 4000,
                        "applied_discount_amount": 2000,
                        "total_applied_discount_amount": 2000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8a38730ccec0d5": {
                            "date": "2023-01-27T12:34:57.100Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                            "related_object_parent_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6"
                          }
                        }
                      },
                      "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_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                      "voucher": {
                        "id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                        "code": "CODE14",
                        "campaign": "Gift Card Campaign",
                        "campaign_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6",
                        "category": "Second",
                        "category_id": "cat_0bb343dee3cdb5ec0c",
                        "categories": [],
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "gift": {
                          "amount": 2000,
                          "balance": 0,
                          "effect": null
                        },
                        "loyalty_card": null,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": "secret-code1",
                        "metadata": {
                          "region": "APAC",
                          "season": "Fall"
                        },
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1+VibJ6VGxrSVw5qmdbPMP3aP8HfcngMxtQc9Bm649CK1dK36e8YR820Ct26IkvDemEDzV8ozhB3F2BpazbgvCmhAo2Gvmo2WtwBwPh2ISAPJiXQCHRjwmKiqogjqQaNKWLxwDIBUc2jQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1/GVIi0p5fL5hxAY/ZBmuAU7nYYS03umjd30dwI5v5ZbpNc3Q5MiYbMuIOIT0H2fUTTwd//S4R9AB+60T/x4kSKu3lgfa9KgJmbyrzXm7Ggly06/qph4/asJaZVZIXEba4WJCeHqXCEgg==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-23T11:05:42.164Z",
                        "updated_at": "2023-01-27T12:34:57.102Z",
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": 18,
                          "redeemed_quantity": 1,
                          "redeemed_amount": 2000,
                          "object": "list",
                          "url": "/v1/vouchers/CODE14/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/CODE14/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"
                        }
                      },
                      "gift": {
                        "amount": 2000
                      }
                    }
                  },
                  "Discount Coupon": {
                    "value": {
                      "id": "r_0c5e8ef10842da0aad",
                      "object": "redemption",
                      "date": "2023-01-27T12:55:34.689Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_J5ogV1Gkk2yfxmBEhYIg4O65",
                        "source_id": null,
                        "created_at": "2023-01-27T12:55:34.673Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "items_discount_amount": 300,
                        "total_discount_amount": 300,
                        "total_amount": 5700,
                        "items_applied_discount_amount": 300,
                        "total_applied_discount_amount": 300,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "discount_amount": 148,
                            "applied_discount_amount": 148,
                            "price": 3000,
                            "subtotal_amount": 3152
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "discount_amount": 152,
                            "applied_discount_amount": 152,
                            "price": 3000,
                            "subtotal_amount": 3248
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8ef10842da0aad": {
                            "date": "2023-01-27T12:55:34.689Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u"
                          }
                        }
                      },
                      "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_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "voucher": {
                        "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                        "code": "2CpRCE2c",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 300,
                          "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                        },
                        "gift": null,
                        "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": "U2FsdGVkX1+ro/6HLsfI9E/rz0QEoYv+rcVIEERdbV3gB4104zYyGfpydtSxS1WfpbuiDUfMizQAl1EMzoYsud5XTKBBwUkGkI5IPl84lPz+WQtg4nKpjUS0wcA7AuIbz2zb870YfJO/r5UBS5gCqQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX19SWjP3ZUbFh26gCGb4xm3K95jhzfk1XXlKcYlHPtDTYR3/4dYbig4xxRmkgpQLa93Woz9Hq3h4JBQ+aTlftkEzL4D4OSAWi1aWlfxVikrJd6TMFLh9mmbmskodjs4MIdOFlluDWyarlw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-19T10:06:07.932Z",
                        "updated_at": "2023-01-27T12:55:34.690Z",
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [
                            {
                              "id": "asgm_HesdqEzt5e9c0T56",
                              "rule_id": "val_gZft0NKZSUWK",
                              "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                              "related_object_type": "voucher",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 2,
                          "object": "list",
                          "url": "/v1/vouchers/2CpRCE2c/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/2CpRCE2c/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [
                            {
                              "object": "product",
                              "id": "prod_0a9f9ab4ab019a42d5",
                              "source_id": "prod_0a9f9ab4ab019a42d5",
                              "effect": "APPLY_TO_EVERY"
                            },
                            {
                              "object": "product",
                              "id": "prod_0a9f9aeddb019a42db",
                              "source_id": "prod_0a9f9aeddb019a42db",
                              "effect": "APPLY_TO_EVERY"
                            }
                          ],
                          "total": 2,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      }
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "r_0c5e8f2cd78497a372",
                      "object": "redemption",
                      "date": "2023-01-27T12:56:35.934Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 300,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_MGTimoN4VtSj7iT75bP01FsH",
                        "source_id": null,
                        "created_at": "2023-01-27T12:56:35.923Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "discount_amount": 6000,
                        "total_discount_amount": 6000,
                        "total_amount": 0,
                        "applied_discount_amount": 6000,
                        "total_applied_discount_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8f2cd78497a372": {
                            "date": "2023-01-27T12:56:35.934Z",
                            "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": 6500,
                          "balance": 5086
                        },
                        "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-01-27T12:56:35.935Z",
                        "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": 1414,
                          "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": 300
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if something goes wrong. A common source of error is an invalid or expired voucher, or a valid gift card with insufficient available balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_error_expanded"
                },
                "examples": {
                  "Voucher disabled": {
                    "value": {
                      "code": 400,
                      "key": "voucher_disabled",
                      "message": "voucher is disabled",
                      "details": "AnsvocvP",
                      "request_id": "v-0c5d710a63c4110ae9",
                      "resource_id": "rf_0c5d710a87c8a31f86",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The voucher has been disabled and cannot be used."
                      }
                    }
                  },
                  "Invalid Customer": {
                    "value": {
                      "code": 400,
                      "key": "invalid_customer",
                      "message": "Customer must be a holder of a loyalty card.",
                      "details": "AnsvocvP",
                      "request_id": "v-0c5e628bd14411244b",
                      "resource_id": "rf_0c5e628bf841c7f248",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The customer is invalid."
                      }
                    }
                  },
                  "Voucher Inactive": {
                    "value": {
                      "code": 400,
                      "key": "voucher_not_active_now",
                      "message": "voucher not active now",
                      "details": "CODE14",
                      "request_id": "v-0c5e89b9300d820994",
                      "resource_id": "rf_0c5e89b945d33b9c02",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The voucher is not active in the given timeframe."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/redemptions/{redemptionId}/rollback": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRedemptionId"
          },
          "name": "redemptionId",
          "in": "path",
          "required": true,
          "description": "The original redemption ID to be rolled back (undone)."
        }
      ],
      "post": {
        "operationId": "rollback-redemption",
        "tags": [
          "Redemptions"
        ],
        "summary": "Rollback Redemption",
        "description": "Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. This endpoint rolls back only single redemptions, meaning those that are not stacked. Stacked redemptions belong to a parent redemption. To roll back a parent redemption, including all of its individual redemptions, use the [POST Rollback Stackable Redemptions](ref:rollback-stacked-redemptions) \n>🚧 \n>You can roll back a redemption up to 3 months back. \n\n ## Effect \nThe operation \n- creates a rollback entry in voucher's redemption history (`redemption.redemption_entries`) and \n- gives 1 redemption back to the pool (decreases `redeemed_quantity` by 1). \n## Returned funds \nIn case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "reason",
            "description": "Reason for the rollback."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "Customer's `source_id`."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "requestBody": {
          "description": "Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedemptionsRollbackCreateRequestBody"
              },
              "examples": {
                "Promotion": {
                  "value": {
                    "customer": {
                      "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "name": "Annie Lemons",
                      "email": "annie@lemon.com",
                      "phone": "+1 933 222 3334",
                      "birthday": "1900-12-02",
                      "birthdate": "1900-12-01",
                      "address": {
                        "city": "New York",
                        "state": "NY",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "country": "United States",
                        "postal_code": "100012"
                      },
                      "metadata": {
                        "age": 23
                      }
                    },
                    "order": {
                      "source_id": "test_rollback_8"
                    },
                    "metadata": {
                      "location_id": [
                        "L2"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a redemption rollback object indicating the result of the rollback.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsRollbackCreateResponseBody"
                },
                "examples": {
                  "Loyalty Card": {
                    "value": {
                      "id": "rr_0c5eba630bc4979e70",
                      "object": "redemption_rollback",
                      "date": "2023-01-27T16:05:23.631Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": -2,
                      "redemption": "r_0c5bf3323008a35032",
                      "reason": "A UI rollback to check for result in API response to listing.",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_dqxr4uzaYWkTZnrSEMoQtCF8",
                        "source_id": null,
                        "created_at": "2023-01-25T12:18:09.203Z",
                        "updated_at": "2023-01-27T16:05:23.687Z",
                        "status": "CANCELED",
                        "amount": 2100,
                        "total_amount": 2100,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0bc3bd8a4e072c5275",
                            "quantity": 3,
                            "amount": 2100,
                            "price": 700,
                            "subtotal_amount": 2100,
                            "product": {
                              "name": "Bouquet - Romantic Roses",
                              "price": 700
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5bf3323008a35032": {
                            "date": "2023-01-25T12:18:09.216Z",
                            "rollback_id": "rr_0c5eba630bc4979e70",
                            "rollback_date": "2023-01-27T16:05:23.631Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_u3dRiZ0XHqX5Euhy5ezB5UQ5Sf85VXFP",
                            "related_object_parent_id": "camp_22noMlhTADb7Fq2UL3vWu3d1"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH",
                        "channel_type": "USER"
                      },
                      "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,
                        "categories": [],
                        "discount": null,
                        "gift": null,
                        "loyalty_card": null,
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "additional_info": null,
                        "assets": {
                          "qr": {},
                          "barcode": {}
                        },
                        "updated_at": null,
                        "object": "voucher"
                      },
                      "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_4GaEX7clyqMaveT7vHhoyRpsIgxv95Q6",
                          "code": "HAPPY-ORDER5My",
                          "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": "21ceb848-4869-4dac-ba41-f854bda3a101",
                              "url": "{{internalVoucherifyURL}}"
                            },
                            "barcode": {
                              "id": "1dba9cb2-fb28-4c8d-8548-5edb2eb01f5a",
                              "url": "{{internalVoucherifyURL}}"
                            }
                          },
                          "is_referral_code": false,
                          "created_at": "2023-01-25T12:18:09.256Z",
                          "updated_at": null,
                          "holder_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "redemption": {
                            "quantity": null,
                            "redeemed_quantity": 0,
                            "object": "list",
                            "url": "/v1/vouchers/HAPPY-ORDER5My/redemptions?page=1&limit=10"
                          },
                          "publish": {
                            "object": "list",
                            "count": 1,
                            "url": "/v1/vouchers/HAPPY-ORDER5My/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
                      }
                    }
                  },
                  "Discount Coupon": {
                    "value": {
                      "id": "rr_0c5eb002b40cce9d62",
                      "object": "redemption_rollback",
                      "date": "2023-01-27T15:20:03.536Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "redemption": "r_0c5e8ef10842da0aad",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_J5ogV1Gkk2yfxmBEhYIg4O65",
                        "source_id": null,
                        "created_at": "2023-01-27T12:55:34.673Z",
                        "updated_at": "2023-01-27T15:20:03.743Z",
                        "status": "CANCELED",
                        "amount": 6000,
                        "total_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8ef10842da0aad": {
                            "date": "2023-01-27T12:55:34.689Z",
                            "rollback_id": "rr_0c5eb002b40cce9d62",
                            "rollback_date": "2023-01-27T15:20:03.536Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "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_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "voucher": {
                        "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                        "code": "2CpRCE2c",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 300,
                          "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                        },
                        "gift": null,
                        "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": "U2FsdGVkX1+ro/6HLsfI9E/rz0QEoYv+rcVIEERdbV3gB4104zYyGfpydtSxS1WfpbuiDUfMizQAl1EMzoYsud5XTKBBwUkGkI5IPl84lPz+WQtg4nKpjUS0wcA7AuIbz2zb870YfJO/r5UBS5gCqQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX19SWjP3ZUbFh26gCGb4xm3K95jhzfk1XXlKcYlHPtDTYR3/4dYbig4xxRmkgpQLa93Woz9Hq3h4JBQ+aTlftkEzL4D4OSAWi1aWlfxVikrJd6TMFLh9mmbmskodjs4MIdOFlluDWyarlw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-19T10:06:07.932Z",
                        "updated_at": "2023-01-27T15:20:03.707Z",
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 1,
                          "object": "list",
                          "url": "/v1/vouchers/2CpRCE2c/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/2CpRCE2c/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      }
                    }
                  },
                  "Gift Card": {
                    "value": {
                      "id": "rr_0c5eb099214ccea115",
                      "object": "redemption_rollback",
                      "date": "2023-01-27T15:22:37.573Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": -2000,
                      "redemption": "r_0c5e8a38730ccec0d5",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_S4BvUj64TlGqVZDOeud7z3rU",
                        "source_id": null,
                        "created_at": "2023-01-27T12:34:57.086Z",
                        "updated_at": "2023-01-27T15:22:37.628Z",
                        "status": "CANCELED",
                        "amount": 6000,
                        "total_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8a38730ccec0d5": {
                            "date": "2023-01-27T12:34:57.100Z",
                            "rollback_id": "rr_0c5eb099214ccea115",
                            "rollback_date": "2023-01-27T15:22:37.573Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                            "related_object_parent_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "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_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                      "voucher": {
                        "id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                        "code": "CODE14",
                        "campaign": "Gift Card Campaign",
                        "campaign_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6",
                        "category": "Second",
                        "category_id": "cat_0bb343dee3cdb5ec0c",
                        "categories": [],
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "gift": {
                          "amount": 2000,
                          "balance": 2000,
                          "effect": null
                        },
                        "loyalty_card": null,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": "secret-code1",
                        "metadata": {
                          "region": "APAC",
                          "season": "Fall"
                        },
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1+VibJ6VGxrSVw5qmdbPMP3aP8HfcngMxtQc9Bm649CK1dK36e8YR820Ct26IkvDemEDzV8ozhB3F2BpazbgvCmhAo2Gvmo2WtwBwPh2ISAPJiXQCHRjwmKiqogjqQaNKWLxwDIBUc2jQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1/GVIi0p5fL5hxAY/ZBmuAU7nYYS03umjd30dwI5v5ZbpNc3Q5MiYbMuIOIT0H2fUTTwd//S4R9AB+60T/x4kSKu3lgfa9KgJmbyrzXm7Ggly06/qph4/asJaZVZIXEba4WJCeHqXCEgg==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-23T11:05:42.164Z",
                        "updated_at": "2023-01-27T15:22:37.595Z",
                        "redemption": {
                          "quantity": 18,
                          "redeemed_quantity": 0,
                          "redeemed_amount": 0,
                          "object": "list",
                          "url": "/v1/vouchers/CODE14/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/CODE14/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "gift": {
                        "amount": -2000
                      }
                    }
                  },
                  "Promotion Tier": {
                    "value": {
                      "id": "rr_0ca286e96cc03f3e76",
                      "object": "redemption_rollback",
                      "date": "2023-03-21T07:57:12.526Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": {
                        "location_id": [
                          "L2"
                        ]
                      },
                      "redemption": "r_0ca286d222d2f7dc1f",
                      "reason": "To undo a redemption.",
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_0FR01SqYIxV4ITzgs1yZjkK6",
                        "source_id": "test_rollback_8",
                        "created_at": "2023-03-21T07:56:48.634Z",
                        "updated_at": "2023-03-21T07:57:12.546Z",
                        "status": "CANCELED",
                        "amount": 200000,
                        "total_amount": 200000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0ca286d222d2f7dc1f": {
                            "date": "2023-03-21T07:56:48.651Z",
                            "rollback_id": "rr_0ca286e96cc03f3e76",
                            "rollback_date": "2023-03-21T07:57:12.526Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "e55f3aaa-b303-421a-b562-ca8529ed341d",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemons",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 23
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "created_at": "2022-09-23T08:31:23.022Z",
                        "updated_at": "2023-02-01T07:47:57.324Z",
                        "name": "Percent Discount",
                        "banner": "Get 40% off",
                        "action": {
                          "discount": {
                            "type": "PERCENT",
                            "percent_off": 40,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 2,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": "2019-08-16T00:00:00.000Z",
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign"
                        },
                        "campaign_id": "camp_w7BUstntAm8jbIDjfM49volj",
                        "active": true,
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 5
                          },
                          "orders": {
                            "total_amount": 616000,
                            "total_discount_amount": 246400
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": null,
                        "category_id": null,
                        "categories": []
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the rollback redemption process failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Already rolledback": {
                    "value": {
                      "code": 400,
                      "key": "already_rolled_back",
                      "message": "Already rolled back",
                      "details": "Redemption has been already rolled back.",
                      "request_id": "v-0c5eb3bd81cd7e3a39",
                      "resource_id": "rrf_0c5eb3bd884497ed05",
                      "resource_type": "redemption_rollback"
                    }
                  },
                  "Invalid Redemption Parent": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redemption_parent",
                      "message": "Invalid redemption parent",
                      "details": "You can rollback only a redemption that does not have parent redemption.",
                      "request_id": "v-0c6382005e03b3bd2f"
                    }
                  },
                  "Invalid Redemption": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redemption",
                      "message": "Invalid redemption",
                      "details": "You can rollback only a single redemption. Use different endpoint for stacked redemption.",
                      "request_id": "v-0c675e5e2e04e31bb3"
                    }
                  },
                  "Invalid Order": {
                    "value": {
                      "code": 400,
                      "key": "invalid_order",
                      "message": "Invalid order",
                      "details": "Order is not related with redemption.",
                      "request_id": "v-0ca2770e3fc4047e25"
                    }
                  },
                  "Invalidate Customer": {
                    "value": {
                      "code": 400,
                      "key": "invalid_customer",
                      "message": "Invalid customer",
                      "details": "Customer is not related with redemption.",
                      "request_id": "v-0ca284851b0404513f"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the rollback redemption process failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Cannot find customer": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cust_eWgXlBBiY6THFRJwX45Iakv4s",
                      "request_id": "v-0c5ebc5de80a2cf1a5",
                      "resource_id": "cust_eWgXlBBiY6THFRJwX45Iakv4s",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/promotions/tiers/{promotionTierId}/redemption": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterPromotionTierId"
          },
          "name": "promotionTierId",
          "in": "path",
          "required": true,
          "description": "ID of the promotion tier to be redeemed."
        }
      ],
      "post": {
        "operationId": "redeem-promotion",
        "deprecated": true,
        "tags": [
          "Redemptions"
        ],
        "summary": "Redeem Promotion [Deprecated]",
        "description": "[redemption rollback](ref:rollback-redemption).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "promotions"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the redemption context in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/7_req_redeem_promotion_tier"
              },
              "examples": {
                "One product one sku": {
                  "value": {
                    "customer": {
                      "source_id": "annie@lemon.com",
                      "name": "Annie Lemon",
                      "email": "annie@lemon.com"
                    },
                    "order": {
                      "amount": 200000,
                      "items": [
                        {
                          "source_id": "apple534",
                          "product_id": "prod_anJ03RZZq74z4v",
                          "related_object": "product",
                          "quantity": 2,
                          "price": 50000,
                          "product": {
                            "override": true,
                            "name": "Apple iPhone 8",
                            "metadata": {
                              "shop": "citycenter",
                              "category": "electronics"
                            }
                          },
                          "metadata": {
                            "series": "2022-783CV"
                          }
                        },
                        {
                          "sku_id": "sku_0KtP4rvwEECQ2U",
                          "source_id": "apple534-ihd5",
                          "related_object": "sku",
                          "quantity": 1,
                          "price": 100000,
                          "sku": {
                            "override": true,
                            "sku": "Apple iPad 10 Silver 64GB",
                            "metadata": {
                              "category": "electronics"
                            }
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a redemption object if the redeem operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/7_obj_redemption_object_promotion_tier_extended"
                },
                "examples": {
                  "One product one sku": {
                    "value": {
                      "id": "r_0ca2699201c03f121b",
                      "object": "redemption",
                      "date": "2023-03-21T05:49:00.807Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_IVEF85NZCXmP4S1fGmImSTwH",
                        "source_id": null,
                        "created_at": "2023-03-21T05:49:00.772Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 200000,
                        "discount_amount": 80000,
                        "total_discount_amount": 80000,
                        "total_amount": 120000,
                        "applied_discount_amount": 80000,
                        "total_applied_discount_amount": 80000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0ca2699201c03f121b": {
                            "date": "2023-03-21T05:49:00.807Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "channel": {
                        "channel_id": "e55f3aaa-b303-421a-b562-ca8529ed341d",
                        "channel_type": "API"
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 2
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "created_at": "2022-09-23T08:31:23.022Z",
                        "updated_at": "2023-02-01T07:47:57.324Z",
                        "name": "Percent Discount",
                        "banner": "Get 40% off",
                        "action": {
                          "discount": {
                            "type": "PERCENT",
                            "percent_off": 40,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 2,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": "2019-08-16T00:00:00.000Z",
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign"
                        },
                        "campaign_id": "camp_w7BUstntAm8jbIDjfM49volj",
                        "active": true,
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 5
                          },
                          "orders": {
                            "total_amount": 616000,
                            "total_discount_amount": 246400
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [
                            {
                              "id": "asgm_z6MvMg2Zf2UABNWN",
                              "rule_id": "val_q8qUBMOh5qIQ",
                              "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                              "related_object_type": "promotion_tier",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        },
                        "category_id": null,
                        "categories": []
                      }
                    }
                  },
                  "Example": {
                    "value": {
                      "id": "r_0c64c10b8ece60bd91",
                      "object": "redemption",
                      "date": "2023-02-01T08:25:22.235Z",
                      "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "tracking_id": "track_VAVW6qltuo1/z+G2GI2LPw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_7n58dbLV2jMG4C14XjEYEbjh",
                        "source_id": null,
                        "created_at": "2023-02-01T08:25:22.192Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 200000,
                        "discount_amount": 80000,
                        "total_discount_amount": 80000,
                        "total_amount": 120000,
                        "applied_discount_amount": 80000,
                        "total_applied_discount_amount": 80000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "apple534",
                            "related_object": "product",
                            "product_id": "prod_anJ03RZZq74z4v",
                            "quantity": 2,
                            "amount": 100000,
                            "price": 50000,
                            "subtotal_amount": 100000,
                            "product": {
                              "id": "prod_0c5d6689b39320059b",
                              "source_id": "prod_anJ03RZZq74z4v",
                              "name": "Apple iPhone 8",
                              "metadata": {
                                "shop": "citycenter",
                                "category": "electronics"
                              }
                            },
                            "metadata": {
                              "series": "2022-783CV"
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "apple534-ihd5",
                            "related_object": "sku",
                            "sku_id": "sku_0KtP4rvwEECQ2U",
                            "quantity": 1,
                            "amount": 100000,
                            "price": 100000,
                            "subtotal_amount": 100000,
                            "sku": {
                              "sku": "Apple iPad 10 Silver 64GB",
                              "metadata": {
                                "category": "electronics"
                              }
                            }
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                          "object": "customer"
                        },
                        "customer_id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c64c10b8ece60bd91": {
                            "date": "2023-02-01T08:25:22.235Z",
                            "related_object_type": "promotion_tier",
                            "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                            "related_object_parent_id": "camp_w7BUstntAm8jbIDjfM49volj"
                          }
                        }
                      },
                      "customer": {
                        "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                        "name": "Annie Lemon",
                        "email": "annie@lemon.com",
                        "source_id": "annie@lemon.com",
                        "metadata": {
                          "age": 2
                        },
                        "object": "customer"
                      },
                      "related_object_type": "promotion_tier",
                      "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                      "voucher": null,
                      "promotion_tier": {
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                        "created_at": "2022-09-23T08:31:23.022Z",
                        "updated_at": "2023-02-01T07:47:57.324Z",
                        "name": "Percent Discount",
                        "banner": "Get 40% off",
                        "action": {
                          "discount": {
                            "type": "PERCENT",
                            "percent_off": 40,
                            "effect": "APPLY_TO_ORDER"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 2,
                        "campaign": {
                          "id": "camp_w7BUstntAm8jbIDjfM49volj",
                          "start_date": "2019-08-16T00:00:00.000Z",
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign"
                        },
                        "campaign_id": null,
                        "active": true,
                        "start_date": "2022-09-21T00:00:00.000Z",
                        "validity_day_of_week": [
                          1,
                          2,
                          3,
                          4,
                          5
                        ],
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 3
                          },
                          "orders": {
                            "total_amount": 408000,
                            "total_discount_amount": 163200
                          }
                        },
                        "object": "promotion_tier",
                        "validation_rule_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [
                            {
                              "id": "asgm_z6MvMg2Zf2UABNWN",
                              "rule_id": "val_q8qUBMOh5qIQ",
                              "related_object_id": "promo_DE1N30D731Tg2F6NoMwNas2W",
                              "related_object_type": "promotion_tier",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the promotion tier is inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_error_expanded"
                },
                "examples": {
                  "Inactive Promotion": {
                    "value": {
                      "code": 400,
                      "key": "promotion_inactive",
                      "message": "Inactive Promotion",
                      "details": "Promotion Tier with id: promo_DE1N30D731Tg2F6NoMwNas2W is disabled.",
                      "request_id": "v-0c64b722160294496b",
                      "resource_id": "rf_0c64b7223cce60eec6",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The promotion is inactive."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/redemptions/{parentRedemptionId}/rollbacks": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRedemptionId"
          },
          "name": "parentRedemptionId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a parent redemption, e.g. `r_JQfm73zWSJFQxs3bGxweYjgm`."
        }
      ],
      "post": {
        "operationId": "rollback-stacked-redemptions",
        "tags": [
          "Redemptions"
        ],
        "summary": "Rollback Stackable Redemptions",
        "description": "Rollback a stackable redemption. When you roll back a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter. However, you can use this endpoint to roll back a single redemption that does not have a parent, similarly to [POST Rollback redemption](ref:rollback-redemption).\n>🚧 \n> You can roll back a redemption up to 3 months back.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "reason",
            "description": "Reason for the rollback."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "Customer's `source_id`."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "redemptions"
            ]
          }
        ],
        "requestBody": {
          "description": "Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RedemptionsRollbacksCreateRequestBody"
              },
              "examples": {
                "Promotion": {
                  "value": {
                    "customer": {
                      "id": "cust_SolpIN5N4oZbCnrxZ5NHrbVB",
                      "name": "Annie Lemons",
                      "email": "annie@lemon.com",
                      "phone": "+1 933 222 3334",
                      "birthday": "1900-12-02",
                      "birthdate": "1900-12-01",
                      "address": {
                        "city": "New York",
                        "state": "NY",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "country": "United States",
                        "postal_code": "100012"
                      },
                      "metadata": {
                        "age": 23
                      }
                    },
                    "order": {
                      "source_id": "test_rollback_8"
                    },
                    "metadata": {
                      "location_id": [
                        "L2"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an array with the individual redemption rollback results along with the parent rollback result and related order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedemptionsRollbacksCreateResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Returns an error indicating that the parent redemption ID is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Redemption Parent": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redemption_parent",
                      "message": "Invalid redemption parent",
                      "details": "You can rollback only a redemption that does not have parent redemption.",
                      "request_id": "v-0b56a1cf1e4d69b375"
                    }
                  },
                  "Already rolled back": {
                    "value": {
                      "code": 400,
                      "key": "already_rolled_back",
                      "message": "Already rolled back",
                      "details": "Redemption has been already rolled back.",
                      "request_id": "v-0c67af9544c4e3388f",
                      "resource_id": "rrf_0c67af954e039be56b",
                      "resource_type": "redemption_rollback"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/loyalties": {
      "get": {
        "operationId": "list-loyalty-programs",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Campaigns",
        "description": "Returns 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](https://support.voucherify.io/article/623-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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Create Loyalty Campaign",
        "description": "Creates a batch of [loyalty campaign object](ref:get-loyalty-program) description.",
        "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"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Loyalty Campaign",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Update Loyalty Campaign",
        "description": "Updates 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](ref: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
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Delete Loyalty Campaign",
        "description": "Deletes 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](ref: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](ref: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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Members",
        "description": "Returns 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Add Member",
        "description": "This method assigns a loyalty card to a customer. It selects a \n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use **auto-update** campaign.",
        "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](ref: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"
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Member",
        "description": "Retrieves 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Member",
        "description": "Retrieve loyalty card with the given member ID (i.e. voucher code).    \n\n[endpoint](ref:get-member-1). The URL was re-designed to allow you to retrieve loyalty card details without having to provide the `campaignId` as a path parameter.",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Campaign Pending Points",
        "description": "Lists 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>👍 Configuring pending points\n>\n>Pending points are configured as part of an earning rule with [POST Create earning rule](ref:create-earning-rule) or [PUT Update earning rule](ref:update-earning-rule).",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Pending Points",
        "description": "Lists 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>👍 Configuring pending points\n>\n>Pending points are configured as part of an earning rule with [POST Create earning rule](ref:create-earning-rule) or [PUT Update earning rule](ref:update-earning-rule).",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Pending Points",
        "description": "\n> 📘 Alternative endpoint\n> This endpoint is an alternative to this [endpoint](ref:list-member-pending-points-1). The URL was re-designed to list member pending points without having to provide the `campaignId` as a path parameter.\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>👍 Configuring pending points\n>\n>Pending points are configured as part of an earning rule with [POST Create earning rule](ref:create-earning-rule) or [PUT Update earning rule](ref:update-earning-rule).",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Activate Member Pending Points",
        "description": "Activate 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](ref:list-member-pending-points-1), [without campaign ID](ref:list-member-pending-points)), [List campaign pending points](ref:list-campaign-pending-points).\n\nThis **POST** method does not require a request body.\n\n>👍 Configuring pending points\n>\n>Pending points are configured as part of an earning rule with [POST Create earning rule](ref:create-earning-rule) or [PUT Update earning rule](ref:update-earning-rule).",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Adjust Member Pending Points",
        "description": "Adjusts the pending points with a given ID. You can add or subtract the number of points.\n\n>👍 Configuring pending points\n>\n>Pending points are configured as part of an earning rule with [POST Create earning rule](ref:create-earning-rule) or [PUT Update earning rule](ref:update-earning-rule).",
        "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
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Cancel Member Pending Points",
        "description": "Cancel 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](ref:list-member-pending-points-1), [without campaign ID](ref:list-member-pending-points)), [List campaign pending points](ref:list-campaign-pending-points).\n\nThis **POST** method does not require a request body and it returns an empty, 204, response.\n\n>👍 Configuring pending points\n>\n>Pending points are configured as part of an earning rule with [POST Create earning rule](ref:create-earning-rule) or [PUT Update earning rule](ref:update-earning-rule).",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Activity",
        "description": "Retrieves 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Activity",
        "description": "\n> 📘 Alternative endpoint\n> This endpoint is an alternative to this [endpoint](ref:list-member-activity-1). The URL was re-designed to allow you to get member activities without having to provide the `campaignId` as a path parameter.\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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Adjust Loyalty Card Balance",
        "description": "This 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 >🚧 Async Action\n> \n> This 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.",
        "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
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Adjust Loyalty Card Balance",
        "description": "This 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[endpoint](ref:update-loyalty-card-balance-1). 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.",
        "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"
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Transfer Loyalty Points",
        "description": "Transfer points between different loyalty cards which have holders. You need to provide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters in the URL. In the request body, you 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 they were published to customers.",
        "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
                    }
                  ]
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Campaign Transactions",
        "description": "Retrieves 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",
        "tags": [
          "Loyalties"
        ],
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "loyalties"
            ]
          }
        ],
        "summary": "Export Loyalty Campaign Transactions",
        "description": "Export 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](ref: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> 👍 Export Campaign Transactions\n>\n> This method works in the same way the [POST Export Campaign Transactions](ref: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.",
        "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"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Card Transactions",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Card Transactions",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Export Loyalty Card Transactions",
        "description": "Export 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"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Export Loyalty Card Transactions",
        "description": "Export 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"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Card Point Expiration",
        "description": "Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the [Exports API](ref: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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Export Loyalty Campaign Point Expiration",
        "description": "Schedule 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"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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](ref: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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Earning Rules",
        "description": "Returns 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Create Earning Rule",
        "description": "Create earning rules for a loyalty campaign.\n\n> 🚧 Maximum number of earning rules\n>\n> You can create up to 100 earning rules per project. The limit can be customized for clients with a single-tenant setup.",
        "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."
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Earning Rule",
        "description": "Retrieves 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Update Earning Rule",
        "description": "Update 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"
                    }
                  }
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Delete Earning Rule",
        "description": "This 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Enable Earning Rule",
        "description": "Enable 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Disable Earning Rule",
        "description": "Disable 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member Rewards",
        "description": "Retrieves 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Reward Details",
        "description": "Get 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Reward Assignments",
        "description": "Returns reward assignments from a given loyalty campaign.\n\n> 📘 Alternative endpoint\n>\n> This endpoint is an alternative to this [endpoint](ref:list-reward-assignments-2). The URL was re-designed to be more contextual to the type of data returned in the response.",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Reward Assignments",
        "description": "Returns 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Create Reward Assignment",
        "description": "Add 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
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Reward Assignment",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Reward Assignment",
        "description": "Retrieve specific reward assignment.\n\n> 📘 Alternative endpoint\n>\n> This endpoint is an alternative to this [endpoint](ref:get-reward-assignment-2). ",
        "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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Update Reward Assignment",
        "description": "Updates 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
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-reward-assignment-1",
        "tags": [
          "Loyalties"
        ],
        "summary": "Delete Reward Assignment",
        "description": "This 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Redeem Reward",
        "description": "Exchange 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"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Redeem Reward",
        "description": "[endpoint](ref:redeem-reward-1). The URL was re-designed to allow you to redeem a reward without having to provide the `campaignId` as a path parameter.",
        "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"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Tiers",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Create loyalty tiers",
        "description": "Creates 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"
              }
            }
          }
        }
      }
    },
    "/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",
        "tags": [
          "Loyalties"
        ],
        "summary": "Get Loyalty Tier",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Member's Loyalty Tiers",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Tier Earning Rules",
        "description": "Retrieve 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",
        "tags": [
          "Loyalties"
        ],
        "summary": "List Loyalty Tier Rewards",
        "description": "Get 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/customers": {
      "get": {
        "operationId": "list-customers",
        "tags": [
          "Customers"
        ],
        "summary": "List Customers",
        "description": "Returns a list of customers.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterPage99"
            },
            "description": "Which page of results to return. The lowest value is `1`, the highest value is `99`."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "email",
            "description": "Limit the customers to the ones that have this specific email address."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "description": "Limit the customers to the ones that are located in the specified city.",
            "name": "city"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "description": "Filter customers by the name property.",
            "name": "name"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "description": "Filter customers by the segment id.",
            "name": "segment_id"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "in": "query",
            "description": "Filter customers by date customer was created.",
            "name": "created_at[before]"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "in": "query",
            "description": "Filter customers by date customer was created.",
            "name": "created_at[after]"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "in": "query",
            "description": "Filter customers by date customer was updated last time.",
            "name": "updated_at[before]"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "in": "query",
            "description": "Filter customers by date customer was updated last time.",
            "name": "updated_at[after]"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListCustomers"
            },
            "in": "query",
            "name": "order",
            "description": "This is a property that controls the sorting direction of the results. Sort 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/ParameterDate"
            },
            "in": "query",
            "name": "starting_after",
            "description": "A cursor for pagination. This is a date-time value that defines your place in the list based on `created_at` property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at `2020-05-24T13:43:09.024Z`, your subsequent call can include `starting_after=2020-05-24T13:43:09.024Z` in order to fetch the next page of the list. \n\n| **Option** | **Format** | **Sorting** |\n|:---|:---|:---|\n| Return customers **before** a specific creation date  | - set `starting_after` parameter to the breakpoint date | Sorting order is **descending**; the most recent dates first and least recent dates last. |\n| Return customers **after** a specific create or update date | - include the `order` parameter set to `created_at` or `updated_at`<br>- set `starting_after` to the breakpoint date | Sorting order is **ascending**; the least recent dates first and the most recent dates last. |\n"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with customer objects. The customers are returned sorted by creation date, with the most recent customers appearing first.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "customers",
                      "customers": [
                        {
                          "id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                          "source_id": "source_123",
                          "name": "Bob Smith",
                          "description": "A frequent customer",
                          "email": "bob.smith@email.com",
                          "phone": "+1 933 222 3333",
                          "birthdate": "2022-01-01",
                          "address": {
                            "city": "New York",
                            "state": "NY",
                            "line_1": "123 Main St.",
                            "line_2": "APT 3 BLG 5",
                            "country": "United States",
                            "postal_code": "10001"
                          },
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 1,
                              "total_failed": 0,
                              "total_succeeded": 1,
                              "total_rolled_back": 0,
                              "total_rollback_failed": 0,
                              "total_rollback_succeeded": 0,
                              "gift": {
                                "redeemed_amount": 0,
                                "amount_to_go": 0
                              },
                              "loyalty_card": {
                                "redeemed_points": 0,
                                "points_to_go": 4200
                              }
                            },
                            "orders": {
                              "total_amount": 1600,
                              "total_count": 1,
                              "average_amount": 1600,
                              "last_order_amount": 1600,
                              "last_order_date": "2022-08-30T10:17:39.220Z"
                            }
                          },
                          "loyalty": {
                            "points": 2200,
                            "referred_customers": 0,
                            "campaigns": {
                              "Christmas Campaign": {
                                "points": 1000,
                                "referred_customers": 0
                              },
                              "Fall Campaign": {
                                "points": 75,
                                "referred_customers": 0
                              },
                              "Winter Campaign": {
                                "points": 75,
                                "referred_customers": 0
                              },
                              "Summer Campaign": {
                                "points": 50,
                                "referred_customers": 0
                              },
                              "Spring Campaign": {
                                "points": 1000,
                                "referred_customers": 0
                              }
                            }
                          },
                          "referrals": {
                            "total": 1,
                            "campaigns": [
                              {
                                "campaign_id": "camp_rRsfatlwN7unSeUIJDCYedal",
                                "referrer_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                                "related_object_id": "r_0b9d4c5121d64dd01d",
                                "related_object_type": "redemption",
                                "date": "2022-08-30T10:17:41.089Z"
                              }
                            ]
                          },
                          "metadata": {
                            "lang": "en",
                            "test": true
                          },
                          "system_metadata": {},
                          "created_at": "2022-08-30T06:32:07.380Z",
                          "updated_at": "2022-08-30T10:17:58.049Z",
                          "object": "customer"
                        },
                        {
                          "id": "cust_X0hU04x7FeisPnD5lctZcQkI",
                          "source_id": "jane.smith@email.com",
                          "name": "Jane Smith",
                          "description": "A nice customer",
                          "email": "jane.smith@email.com",
                          "phone": "+1 933 222 3333",
                          "birthdate": "2022-01-02",
                          "address": {
                            "city": "New Yorke",
                            "state": "NY",
                            "line_1": "123 Main Ste.",
                            "line_2": "APT 3 BLG 4e",
                            "country": "United Statese",
                            "postal_code": "10001e"
                          },
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 4,
                              "total_failed": 0,
                              "total_succeeded": 4,
                              "total_rolled_back": 1,
                              "total_rollback_failed": 0,
                              "total_rollback_succeeded": 1,
                              "gift": {
                                "redeemed_amount": 0,
                                "amount_to_go": 0
                              },
                              "loyalty_card": {
                                "redeemed_points": 0,
                                "points_to_go": 15549
                              }
                            },
                            "orders": {
                              "total_amount": 210000,
                              "total_count": 3,
                              "average_amount": 70000,
                              "last_order_amount": 70000,
                              "last_order_date": "2022-08-30T11:51:08.029Z"
                            }
                          },
                          "loyalty": {
                            "points": 15399,
                            "referred_customers": 0,
                            "campaigns": {
                              "Christmas Campaign": {
                                "points": 7000,
                                "referred_customers": 0
                              },
                              "Fall Campaign": {
                                "points": 2299,
                                "referred_customers": 0
                              },
                              "Winter Campaign": {
                                "points": 25,
                                "referred_customers": 0
                              },
                              "Summer Campaign": {
                                "points": 75,
                                "referred_customers": 0
                              },
                              "Spring Campaign": {
                                "points": 6000,
                                "referred_customers": 0
                              }
                            }
                          },
                          "referrals": {
                            "total": 2,
                            "campaigns": [
                              {
                                "campaign_id": "camp_rRsfatlwN7unSeUIJDCYedal",
                                "referrer_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Zi",
                                "related_object_id": "r_0b9d4cc4aa164dd073",
                                "related_object_type": "redemption",
                                "date": "2022-08-30T10:19:39.196Z"
                              },
                              {
                                "campaign_id": "camp_YDsFdX8TgFtT0RUuKEFyhqs3",
                                "referrer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                                "related_object_id": "r_0b9d61b6484ead0324",
                                "related_object_type": "redemption",
                                "date": "2022-08-30T11:51:10.445Z"
                              }
                            ]
                          },
                          "metadata": {
                            "lang": "en",
                            "test": false
                          },
                          "system_metadata": {},
                          "created_at": "2022-08-09T09:50:53.620Z",
                          "updated_at": "2022-08-30T11:51:24.327Z",
                          "object": "customer"
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-customer",
        "tags": [
          "Customers"
        ],
        "summary": "Create Customer",
        "description": "Creates a customer object.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the customer database, Voucherify will return a related customer object with updated fields.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "requestBody": {
          "description": "Create a customer with specified parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomersCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "source_id": "source_123",
                    "name": "Bob Smith",
                    "description": "A frequent customer",
                    "email": "bob.smith@email.com",
                    "phone": "+1 933 222 3333",
                    "address": {
                      "city": "New York",
                      "country": "United States",
                      "line_1": "123 Main St.",
                      "line_2": "APT 3 BLG 4",
                      "postal_code": "10001",
                      "state": "NY"
                    },
                    "metadata": {
                      "lang": "en",
                      "test": true
                    },
                    "birthdate": "2022-01-01"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a customer object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                      "source_id": "source_123",
                      "name": "Bob Smith",
                      "description": "A frequent customer",
                      "email": "bob.smith@email.com",
                      "phone": "+1 933 222 3333",
                      "birthdate": "2022-01-01",
                      "address": {
                        "city": "New York",
                        "state": "NY",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 4",
                        "country": "United States",
                        "postal_code": "10001"
                      },
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 0,
                          "total_failed": 0,
                          "total_succeeded": 0,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0,
                          "gift": {
                            "redeemed_amount": 0,
                            "amount_to_go": 0
                          },
                          "loyalty_card": {
                            "redeemed_points": 0,
                            "points_to_go": 0
                          }
                        },
                        "orders": {
                          "total_amount": 0,
                          "total_count": 0,
                          "average_amount": 0,
                          "last_order_amount": 0
                        }
                      },
                      "loyalty": {
                        "points": 0,
                        "referred_customers": 0,
                        "campaigns": {}
                      },
                      "referrals": {
                        "total": 0,
                        "campaigns": []
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "system_metadata": {},
                      "created_at": "2022-08-30T06:32:07.380Z",
                      "object": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{customerId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomerId"
          },
          "name": "customerId",
          "in": "path",
          "required": true,
          "description": "A Voucherify customer's `id` or `source_id`."
        }
      ],
      "get": {
        "operationId": "get-customer",
        "tags": [
          "Customers"
        ],
        "summary": "Get Customer",
        "description": "Retrieve customer details.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a customer object if a valid identifier was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "cust_T849EgzNVVmn5icJ2FAkT2rO",
                      "source_id": "alice.morgan@email.com",
                      "name": "Alice Morgan",
                      "email": "alice.morgan@email.com",
                      "address": null,
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 2,
                          "total_failed": 0,
                          "total_succeeded": 2,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0,
                          "gift": {
                            "redeemed_amount": 0,
                            "amount_to_go": 0
                          },
                          "loyalty_card": {
                            "redeemed_points": 0,
                            "points_to_go": 3303
                          }
                        },
                        "orders": {
                          "total_amount": 203900,
                          "total_count": 2,
                          "average_amount": 101950,
                          "last_order_amount": 3900,
                          "last_order_date": "2022-07-26T14:59:52.814Z"
                        }
                      },
                      "loyalty": {
                        "points": 3303,
                        "referred_customers": 0,
                        "campaigns": {
                          "Summer Campaign": {
                            "points": 3303,
                            "referred_customers": 0
                          }
                        }
                      },
                      "referrals": {
                        "total": 0,
                        "campaigns": []
                      },
                      "system_metadata": {},
                      "created_at": "2022-02-07T08:28:23.644Z",
                      "updated_at": "2022-07-26T14:59:59.806Z",
                      "assets": {
                        "cockpit_url": "{{internalVoucherifyURL}}"
                      },
                      "object": "customer"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found. When requesting the ID of a customer that has been deleted or does not exist in the system, the resource will not be returned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cust_sehkNIi8Uq2qQuRqSr7xn4Z",
                      "request_id": "v-0b4c590350857970df",
                      "resource_id": "cust_sehkNIi8Uq2qQuRqSr7xn4Z",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-customer",
        "tags": [
          "Customers"
        ],
        "summary": "Delete Customer",
        "description": "This method deletes a customer.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the customer with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Customer Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cust_7pm0hh0yemiydeFsdYXZlr1",
                      "request_id": "v-0ae398fd9ac683dc84",
                      "resource_id": "cust_7pm0hh0yemiydeFsdYXZlr1",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-customer",
        "tags": [
          "Customers"
        ],
        "summary": "Update Customer",
        "description": "Updates the specified customer by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomersUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Alice McDonald",
                    "email": "alice.mdconald@email.com",
                    "description": "Updating customer data",
                    "phone": "+1 (132) 222-2222",
                    "address": {
                      "city": "New York",
                      "country": "United States",
                      "line_1": "123 Main St.",
                      "line_2": "APT 3 BLG 4",
                      "postal_code": "10001",
                      "state": "NY"
                    },
                    "metadata": {
                      "lang": "en",
                      "test": true
                    },
                    "birthdate": "2022-01-01",
                    "birthday": "2022-01-02"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a customer object if updates were successful.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "cust_T849EgzNVVmn5icJ2FAkT2rO",
                      "source_id": "alice@morgan.com",
                      "name": "Alice McDonald",
                      "description": "Updating customer data",
                      "email": "alice.mdconald@email.com",
                      "phone": "+1 (132) 222-2222",
                      "birthday": "2022-01-02",
                      "birthdate": "2022-01-01",
                      "address": {
                        "city": "New York",
                        "state": "NY",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 4",
                        "country": "United States",
                        "postal_code": "10001"
                      },
                      "summary": {
                        "redemptions": {
                          "total_redeemed": 2,
                          "total_failed": 0,
                          "total_succeeded": 2,
                          "total_rolled_back": 0,
                          "total_rollback_failed": 0,
                          "total_rollback_succeeded": 0,
                          "gift": {
                            "redeemed_amount": 0,
                            "amount_to_go": 0
                          },
                          "loyalty_card": {
                            "redeemed_points": 0,
                            "points_to_go": 4428
                          }
                        },
                        "orders": {
                          "total_amount": 203900,
                          "total_count": 2,
                          "average_amount": 101950,
                          "last_order_amount": 3900,
                          "last_order_date": "2022-07-26T14:59:52.814Z"
                        }
                      },
                      "loyalty": {
                        "points": 3403,
                        "referred_customers": 0,
                        "campaigns": {
                          "Summer Campaign": {
                            "points": 0,
                            "referred_customers": 0
                          },
                          "Spring Campaign": {
                            "points": 50,
                            "referred_customers": 0
                          },
                          "Fall Campaign": {
                            "points": 50,
                            "referred_customers": 0
                          },
                          "Winter Campaign": {
                            "points": 3303,
                            "referred_customers": 0
                          }
                        }
                      },
                      "referrals": {
                        "total": 0,
                        "campaigns": []
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "system_metadata": {},
                      "created_at": "2022-02-07T08:28:23.644Z",
                      "updated_at": "2022-08-31T09:58:30.475Z",
                      "object": "customer"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that a customer with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id alice2@morgan.com",
                      "request_id": "v-0b9e924dd243bf26e2",
                      "resource_id": "alice2@morgan.com",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{customerId}/permanent-deletion": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomerId"
          },
          "name": "customerId",
          "in": "path",
          "required": true,
          "description": "A Voucherify customer's `id` or `source_id`."
        }
      ],
      "post": {
        "operationId": "customer-permanently-deletion",
        "tags": [
          "Customers"
        ],
        "summary": "Delete Customer Permanently",
        "description": "The organization user can remove consumer data permanently from the Voucherify system by using this API method. It deletes all customer data and connected resources. It makes the customer profile forgotten by Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a permanent deletion object and status of the deletion.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersPermanentDeletionCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "del_7k3buMvBsJuXiLRmdh1WZvZs",
                      "created_at": "2022-09-02T17:50:29.302Z",
                      "related_object_id": "cust_XI8sPLvznzVpNI1BMIWGcUJa",
                      "related_object": "customer",
                      "status": "DONE",
                      "data_json": {
                        "events": 16,
                        "customer_events": 28,
                        "daily_events": 0,
                        "segments": 0,
                        "orders": 9,
                        "order_events": 5,
                        "customer": 1
                      },
                      "object": "pernament_deletion"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that a customer with given ID was 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 customer with id cust_W8n9I8pJDXlM69j49iKJeYp",
                      "request_id": "v-0b4c62635a154e96f1",
                      "resource_id": "cust_W8n9I8pJDXlM69j49iKJeYp",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/importCSV": {
      "post": {
        "operationId": "import-customers-using-csv",
        "tags": [
          "Customers"
        ],
        "summary": "Import and Update Customers using CSV",
        "description": "This API method lets you import or update customer data. To get a proper and valid response, please send a CSV file with data separated by commas.  \n\n## Request Example\n\n> 📘 Standard customer fields mapping\n>\n> **No spaces allowed in field names**  \n> Id, Name, Email, Phone, Birthdate, Source_id, Address_line_1, Address_line_2, Address_Postal_Code, Address_City, Address_State, Address_Country, Description, Metadata_name_1, Metadata_name_2\n\n## Update Customers using CSV\n\nIf you would like to update customer's data, you can do it using the CSV file with new data. However, remember to include a `source_id` in your CSV file to manage the update successfully.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "requestBody": {
          "description": "The file path is stored in the form `file` header.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CustomersImportCSVRequestBody"
              },
              "examples": {}
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and customers will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersImportCsvCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/bulk/async": {
      "post": {
        "operationId": "update-customers-in-bulk",
        "tags": [
          "Customers"
        ],
        "summary": "Update Customers in Bulk",
        "description": "Updates customers in one asynchronous operation.\n\nThe request can include up to **10 MB** of data.\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](ref:get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\n\n\nIf a customer object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value `false` in the `found` column and `true` in the `updated` column.\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "requestBody": {
          "description": "List the customer fields to be updated in each customer object.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "title": "Update Customers in bulk Request Body",
                "description": "Request body schema for `/customers/bulk/async`.",
                "items": {
                  "$ref": "#/components/schemas/CustomersUpdateInBulkRequestBody"
                }
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "source_id": "John.Smith@email.com",
                      "name": "John Smith",
                      "email": "john.smith@email.com",
                      "description": "Updating customer data",
                      "phone": "+1 (132) 222-2222",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 4",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "2022-04-04"
                    },
                    {
                      "source_id": "Jane.Smith@email.com",
                      "name": "Jane Smith",
                      "email": "Jane.Smith@email.com",
                      "description": "Updating customer data",
                      "phone": "+1 (132) 222-2222",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 4",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "2022-03-03"
                    },
                    {
                      "source_id": "Sally.Smith@email.com",
                      "name": "Sally Smith",
                      "email": "Sally.Smith@email.com",
                      "description": "Updating customer data",
                      "phone": "+1 (132) 222-2222",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 4",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthdate": "2022-02-02"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersUpdateInBulkResponseBody"
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "default": 429
                    },
                    "message": {
                      "type": "string",
                      "default": "Too many requests hit the API too quickly."
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/metadata/async": {
      "post": {
        "operationId": "update-customers-metadata-in-bulk",
        "tags": [
          "Customers"
        ],
        "summary": "Update Customers' Metadata in Bulk",
        "description": "Updates metadata parameters for a list of customers. Every resource in the list will receive the metadata defined in the request.\n\nThe request can include up to **10 MB** of data.\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](ref:get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\nIf a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value `false` in the `found` column and `true` in the `updated` column.\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "requestBody": {
          "description": "List the `source_ids` of the customers you would like to update with the metadata key/value pairs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomersMetadataUpdateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "source_ids": [
                      "source_123",
                      "source_456"
                    ],
                    "metadata": {
                      "lang": "en",
                      "test": false
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersMetadataUpdateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{customerId}/activity": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomerId"
          },
          "name": "customerId",
          "in": "path",
          "required": true,
          "description": "A Voucherify customer's `id` or source ID of the customer who performed the activities."
        }
      ],
      "get": {
        "operationId": "list-customer-activity",
        "tags": [
          "Customers"
        ],
        "summary": "List Customer Activity",
        "description": "Retrieve customer activities.",
        "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. "
          },
          {
            "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."
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "description": "Timestamp representing the date and time which results must begin on. Represented in ISO 8601 format."
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "description": "Timestamp representing the date and time which results must end on. Represented in ISO 8601 format."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignId"
            },
            "in": "query",
            "name": "campaign_id",
            "description": "Requests only events related to specific campaign identified by its ID."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignType"
            },
            "in": "query",
            "name": "campaign_type",
            "description": "Filters related customer's activity for the selected campaign types. Allowed values: \n`DISCOUNT_COUPONS`,\n`REFERRAL_PROGRAM`,\n`GIFT_VOUCHERS`,\n`PROMOTION`,\n`LOYALTY_PROGRAM`."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterActivityCategory"
            },
            "in": "query",
            "name": "category",
            "description": "Filters activities for actions or effects. Allowed values: \n`ACTION`,\n`EFFECT`."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCustomerEvent"
            },
            "in": "query",
            "name": "type",
            "description": "Event name of the customer event."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with customer activities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersActivityListResponseBody"
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the customer ID could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Customer ID not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id jck-wbh",
                      "request_id": "v-0fa4de30126b92bfb8",
                      "resource_id": "jck-wbh",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{customerId}/activities": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomerId"
          },
          "name": "customerId",
          "in": "path",
          "required": true,
          "description": "A Voucherify customer's `id` or source ID of the customer who performed the activities."
        }
      ],
      "get": {
        "operationId": "list-customer-activities",
        "deprecated": true,
        "tags": [
          "Customers"
        ],
        "summary": "List Customer Activities [Deprecated]",
        "description": "> ❗️ Deprecated  \n>\n> This endpoint represents the deprecated version of the API responsible for listing customer activities and we do not recommend using it. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.\n\nRetrieve customer activities.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "in": "query",
            "name": "starting_after",
            "description": "A cursor for pagination. `starting_after` is a date-time value that defines your place in the list based on `created_at` property from the activity object. For instance, if you make a list request and receive 100 objects, ending with an object created at `2020-05-24T13:43:09.024Z`, your subsequent call can include `starting_after=2020-05-24T13:43:09.024Z` in order to fetch the next page of the list."
          },
          {
            "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."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignType"
            },
            "in": "query",
            "name": "campaign_type",
            "description": "Through this parameter you can control a type of campaign by which Voucherify will filter related customer's activity. API will return only records related to that given type. Allowed values: DISCOUNT_COUPONS, REFERRAL_PROGRAM, GIFT_VOUCHERS, PROMOTION, LOYALTY_PROGRAM"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCampaignId"
            },
            "in": "query",
            "name": "campaign_id",
            "description": "By applying this parameter you request only events related to specific campaign identified by its ID."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterProductId"
            },
            "in": "query",
            "name": "product_id",
            "description": "By applying this parameter you request only events related to specific product identified by its ID."
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "description": "Timestamp representing the date and time which results must end on. Represented in ISO 8601 format."
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "description": "Timestamp representing the date and time which results must end on. Represented in ISO 8601 format."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with customer activities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersActivitiesListResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{customerId}/segments": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomerId"
          },
          "name": "customerId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a customer represented by an internal customer ID or customer source ID."
        }
      ],
      "get": {
        "operationId": "list-customer-segments",
        "tags": [
          "Customers"
        ],
        "summary": "List Customer's Segments",
        "description": "Returns the list of segments IDs to which the customer belongs to.  \n\nIf you pass a `customerId` which is not stored and recognized by Voucherify as an existing customer in the system, the response will generate a list of segments that the customer would potentialy qualify for if they were to become a customer tracked in the system.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The method returns segment(s) to which the given customer belongs to.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersSegmentsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "seg_DNAOhUtJffvX0f57ajLMFBYR",
                          "name": "area code not 123",
                          "object": "segment"
                        },
                        {
                          "id": "seg_IPIYx96l92Op0Sy5MOaImhgw",
                          "name": "not bob.smith@email.com",
                          "object": "segment"
                        },
                        {
                          "id": "seg_1wc52c5z6r1kQ81brO8j9Hk2",
                          "name": "Birthday After Dec 31",
                          "object": "segment"
                        },
                        {
                          "id": "seg_ZEbbT4mq1ePpM9PzR02lcww2",
                          "name": "Start with S",
                          "object": "segment"
                        },
                        {
                          "id": "seg_WJv55MbzQwnr56ttJ2xUrSgt",
                          "name": "Loyalty Card",
                          "object": "segment"
                        }
                      ],
                      "total": 5
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/customers/{customerId}/redeemables": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomerId"
          },
          "name": "customerId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a customer represented by an internal customer ID or customer source ID."
        }
      ],
      "get": {
        "operationId": "list-customer-redeemables",
        "tags": [
          "Customers"
        ],
        "summary": "List Customer's Redeemables",
        "description": "Retrieves all the redeemables that have been assigned to the customer.\n\nTo use this endpoint, you must have the following permissions:\n\n- Read Customers (`customers.details.read`)",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListRedeemables"
            },
            "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 events starting after an event with the given ID."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListCustomerRedeemables"
            },
            "description": "Filters for listing customer redeemables.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "customers"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The method returns redeemable(s) to which the given customer is assigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersRedeemablesListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "rh_0e7b8db4700106a852",
                          "created_at": "2024-03-22T17:48:25.910Z",
                          "redeemable_id": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1",
                          "redeemable_object": "voucher",
                          "customer_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
                          "holder_role": "OWNER",
                          "campaign_id": "camp_weer1c3p5ZgktqfW56RfoNaG",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "redeemable": {
                            "type": "voucher",
                            "voucher": {
                              "id": "v_GXVguPhq2khgFxH7GrRXWA91gDr1LiA1",
                              "code": "3xRUnMVG",
                              "campaign": "Gaz6Q29w1d",
                              "campaign_id": "camp_weer1c3p5ZgktqfW56RfoNaG",
                              "category": null,
                              "category_id": null,
                              "categories": [],
                              "type": "DISCOUNT_VOUCHER",
                              "discount": {
                                "type": "AMOUNT",
                                "amount_off": 1000
                              },
                              "gift": null,
                              "loyalty_card": null,
                              "start_date": null,
                              "expiration_date": null,
                              "validity_timeframe": null,
                              "validity_hours": null,
                              "validity_day_of_week": null,
                              "active": true,
                              "additional_info": null,
                              "metadata": {},
                              "assets": {
                                "qr": {
                                  "id": "fa250fcd-8d51-41e7-9dda-9288ce2799a7",
                                  "url": "{{internalVoucherifyURL}}"
                                },
                                "barcode": {
                                  "id": "1b876033-ad88-4e74-8344-27fca1767006",
                                  "url": "{{internalVoucherifyURL}}"
                                }
                              },
                              "is_referral_code": false,
                              "created_at": "2024-03-22T17:48:18.57+00:00",
                              "updated_at": "2024-03-22T17:48:25.910974+00:00",
                              "holder_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
                              "redemption": {
                                "quantity": null,
                                "redeemed_quantity": 0,
                                "object": "list",
                                "url": "/v1/vouchers/3xRUnMVG/redemptions?page=1&limit=10"
                              },
                              "publish": {
                                "object": "list",
                                "count": 1,
                                "url": "/v1/vouchers/3xRUnMVG/publications?page=1&limit=10"
                              },
                              "object": "voucher"
                            },
                            "status": "ACTIVE"
                          }
                        },
                        {
                          "id": "rh_0e79fe37e4926cafd6",
                          "created_at": "2024-03-21T12:43:02.915Z",
                          "redeemable_id": "v_nnxc1aFzFZCAhRlG6sm0kSO4jKUohc9b",
                          "redeemable_object": "voucher",
                          "customer_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
                          "holder_role": "REFERRER",
                          "campaign_id": "camp_ixXNxP8kRoV15RoyZU4HqqYJ",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "redeemable": {
                            "type": "voucher",
                            "voucher": {
                              "id": "v_nnxc1aFzFZCAhRlG6sm0kSO4jKUohc9b",
                              "code": "PBF3ZYfS",
                              "campaign": "REFER_2",
                              "campaign_id": "camp_ixXNxP8kRoV15RoyZU4HqqYJ",
                              "category": null,
                              "category_id": null,
                              "categories": [],
                              "type": "DISCOUNT_VOUCHER",
                              "discount": {
                                "type": "AMOUNT",
                                "amount_off": 88800,
                                "effect": "APPLY_TO_ORDER"
                              },
                              "gift": null,
                              "loyalty_card": null,
                              "start_date": null,
                              "expiration_date": null,
                              "validity_timeframe": null,
                              "validity_hours": null,
                              "validity_day_of_week": null,
                              "active": true,
                              "additional_info": null,
                              "metadata": {},
                              "assets": {
                                "qr": {
                                  "id": "fc0471bf-0c7b-443f-9532-303437041eea",
                                  "url": "{{internalVoucherifyURL}}"
                                },
                                "barcode": {
                                  "id": "5b2f2007-494b-40c3-9d4c-ad27269a0cd0",
                                  "url": "{{internalVoucherifyURL}}"
                                }
                              },
                              "is_referral_code": true,
                              "created_at": "2024-03-21T12:42:49.771+00:00",
                              "updated_at": "2024-03-21T12:43:02.915953+00:00",
                              "holder_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
                              "referrer_id": "cust_p1ufreYbVbwZ1x70nFkH9rF9",
                              "redemption": {
                                "quantity": null,
                                "redeemed_quantity": 0,
                                "object": "list",
                                "url": "/v1/vouchers/PBF3ZYfS/redemptions?page=1&limit=10"
                              },
                              "publish": {
                                "object": "list",
                                "count": 1,
                                "url": "/v1/vouchers/PBF3ZYfS/publications?page=1&limit=10"
                              },
                              "object": "voucher"
                            },
                            "status": "ACTIVE"
                          }
                        }
                      ],
                      "total": 2,
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cstmr_15071410",
                      "request_id": "v-0eed8c98734a6e8706",
                      "resource_id": "cstmr_15071410",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders": {
      "get": {
        "operationId": "list-orders",
        "tags": [
          "Orders"
        ],
        "summary": "List Orders",
        "description": "Returns a list of orders.\n\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListOrders"
            },
            "in": "query",
            "name": "order",
            "description": "This is a property that controls the sorting direction of the results. Sort 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",
              "orders"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with order objects. The orders are returned sorted by creation date by default, with the most recent orders appearing last, unless you specify another sequence using the order query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "orders",
                      "orders": [
                        {
                          "id": "ord_v5vupdacgud1CwUSyKqSlHuk",
                          "source_id": null,
                          "created_at": "2022-09-09T07:44:41.594Z",
                          "updated_at": "2022-09-09T07:44:42.331Z",
                          "status": "PAID",
                          "amount": 2700,
                          "discount_amount": 1243,
                          "items_discount_amount": 270,
                          "total_discount_amount": 1513,
                          "total_amount": 1187,
                          "items": [
                            {
                              "object": "order_item",
                              "source_id": "prod_5h1pp1ng",
                              "related_object": "product",
                              "quantity": 1,
                              "amount": 700,
                              "discount_amount": 70,
                              "price": 700,
                              "subtotal_amount": 630,
                              "product": {
                                "name": "Shipping"
                              }
                            },
                            {
                              "object": "order_item",
                              "source_id": "roses_1",
                              "related_object": "product",
                              "quantity": 1,
                              "amount": 500,
                              "discount_amount": 50,
                              "price": 500,
                              "subtotal_amount": 450,
                              "product": {
                                "name": "Bouquet - Romantic Roses",
                                "price": 500
                              }
                            },
                            {
                              "object": "order_item",
                              "source_id": "vase_1",
                              "related_object": "product",
                              "quantity": 1,
                              "amount": 1500,
                              "discount_amount": 150,
                              "price": 1500,
                              "subtotal_amount": 1350,
                              "product": {
                                "name": "Vase - Boho Vintage",
                                "price": 1500
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "object": "customer"
                          },
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0baa093537528ef645": {
                              "date": "2022-09-09T07:44:41.695Z",
                              "related_object_type": "redemption",
                              "related_object_id": "r_0baa093537528ef645",
                              "stacked": [
                                "r_0baa093537528ef646",
                                "r_0baa093537528ef647",
                                "r_0baa093537528ef648"
                              ]
                            }
                          }
                        },
                        {
                          "id": "ord_3JkWC6jG0JgyRf5lO3r4IyU1",
                          "source_id": null,
                          "created_at": "2022-09-09T07:04:22.597Z",
                          "updated_at": "2022-09-09T07:04:23.743Z",
                          "status": "PAID",
                          "amount": 73100,
                          "items_discount_amount": 7310,
                          "total_discount_amount": 7310,
                          "total_amount": 65790,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 1,
                              "amount": 70000,
                              "discount_amount": 7000,
                              "price": 70000,
                              "subtotal_amount": 63000,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619",
                              "quantity": 1,
                              "amount": 1600,
                              "discount_amount": 160,
                              "price": 1600,
                              "subtotal_amount": 1440,
                              "product": {
                                "name": "Comic Books1",
                                "price": 1600
                              },
                              "sku": {
                                "sku": "Comics1",
                                "price": 1600
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b72b0bd64d198e3ae",
                              "quantity": 1,
                              "amount": 1500,
                              "discount_amount": 150,
                              "price": 1500,
                              "subtotal_amount": 1350,
                              "product": {
                                "name": "Vase - Boho Vintage",
                                "price": 1500
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "object": "customer"
                          },
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba9fffae90e1b2495": {
                              "date": "2022-09-09T07:04:22.692Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_24rljiUfdLNC9poBf0BPNmoh2txzFkLs"
                            }
                          }
                        },
                        {
                          "id": "ord_HwdbziIPvUZJkIC7z74FKmPv",
                          "source_id": null,
                          "created_at": "2022-09-09T06:47:14.195Z",
                          "updated_at": "2022-09-09T06:47:15.369Z",
                          "status": "PAID",
                          "amount": 71600,
                          "discount_amount": 7160,
                          "total_discount_amount": 7160,
                          "total_amount": 64440,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619",
                              "quantity": 1,
                              "amount": 1600,
                              "price": 1600,
                              "subtotal_amount": 1600,
                              "product": {
                                "name": "Comic Books1",
                                "price": 1600
                              },
                              "sku": {
                                "sku": "Comics1",
                                "price": 1600
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 1,
                              "amount": 70000,
                              "price": 70000,
                              "subtotal_amount": 70000,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "object": "customer"
                          },
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba9fc0eb00e1b2230": {
                              "date": "2022-09-09T06:47:14.369Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_3vEprqa6tbzfhFtpjr4mDlkNchXepW7s"
                            }
                          }
                        },
                        {
                          "id": "ord_HRluwFS2seoILUkXxWML0D7Z",
                          "source_id": null,
                          "created_at": "2022-09-09T06:44:27.383Z",
                          "updated_at": "2022-09-09T06:44:28.252Z",
                          "status": "PAID",
                          "amount": 71600,
                          "discount_amount": 100,
                          "total_discount_amount": 100,
                          "total_amount": 71500,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619",
                              "quantity": 1,
                              "amount": 1600,
                              "price": 1600,
                              "subtotal_amount": 1600,
                              "product": {
                                "name": "Comic Books1",
                                "price": 1600
                              },
                              "sku": {
                                "sku": "Comics1",
                                "price": 1600
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 1,
                              "amount": 70000,
                              "price": 70000,
                              "subtotal_amount": 70000,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "object": "customer"
                          },
                          "referrer": {
                            "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                            "object": "customer"
                          },
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "referrer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                          "object": "order",
                          "redemptions": {
                            "r_0ba9fb6bb7928ed9ec": {
                              "date": "2022-09-09T06:44:27.486Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_vhHuiEmZSchWHtE0xKm0HM7PFCR9cNkA",
                              "related_object_parent_id": "camp_rRsfatlwN7unSeUIJDCYedal"
                            }
                          }
                        },
                        {
                          "id": "ord_Qg5utCohAZ3tafYvc1O4C80r",
                          "source_id": null,
                          "created_at": "2022-09-09T06:42:34.083Z",
                          "updated_at": "2022-09-09T06:42:35.169Z",
                          "status": "PAID",
                          "amount": 70000,
                          "discount_amount": 4000,
                          "total_discount_amount": 4000,
                          "total_amount": 66000,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 1,
                              "amount": 70000,
                              "price": 70000,
                              "subtotal_amount": 70000,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "object": "customer"
                          },
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba9fafd11d28ed999": {
                              "date": "2022-09-09T06:42:34.183Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_RaMaTT7F0Q47BetdGcFxsyqwo1aZGzJs",
                              "related_object_parent_id": "camp_hg7ajfHh6DcE1xa18mw3SdF6"
                            }
                          }
                        },
                        {
                          "id": "ord_G9LBb5SOPa36pHdwxUvzkw4P",
                          "source_id": null,
                          "created_at": "2022-09-09T06:38:17.984Z",
                          "updated_at": "2022-09-09T06:38:19.064Z",
                          "status": "PAID",
                          "amount": 4600,
                          "items_discount_amount": 300,
                          "total_discount_amount": 300,
                          "total_amount": 4300,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619",
                              "quantity": 1,
                              "amount": 1600,
                              "price": 1600,
                              "subtotal_amount": 1600,
                              "product": {
                                "name": "Comic Books1",
                                "price": 1600
                              },
                              "sku": {
                                "sku": "Comics1",
                                "price": 1600
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0a65b3ff8592d7a5b5",
                              "quantity": 1,
                              "amount": 3000,
                              "discount_amount": 300,
                              "price": 3000,
                              "subtotal_amount": 2700,
                              "product": {
                                "name": "Koffee Cup",
                                "price": 3000
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                            "object": "customer"
                          },
                          "customer_id": "cust_tAED42tFhLM9v7GmZUaklJFd",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba9fa02fcd28ed8f1": {
                              "date": "2022-09-09T06:38:18.099Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_KqP2NOSb4dJb1D6UBhcq7ScPZXun0y40",
                              "related_object_parent_id": "camp_hC2GdqYtOmTT45zfhib62cK1"
                            }
                          }
                        },
                        {
                          "id": "ord_N3YBowDTZs0UH2hHoMZLbUDN",
                          "source_id": null,
                          "created_at": "2022-09-09T06:18:31.459Z",
                          "updated_at": "2022-09-09T06:18:31.624Z",
                          "status": "PAID",
                          "amount": 71600,
                          "discount_amount": 7160,
                          "total_discount_amount": 7160,
                          "total_amount": 64440,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 1,
                              "amount": 70000,
                              "price": 70000,
                              "subtotal_amount": 70000,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619",
                              "quantity": 1,
                              "amount": 1600,
                              "price": 1600,
                              "subtotal_amount": 1600,
                              "product": {
                                "name": "Comic Books1",
                                "price": 1600
                              },
                              "sku": {
                                "sku": "Comics1",
                                "price": 1600
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                            "object": "customer"
                          },
                          "customer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba9f57c37128ed639": {
                              "date": "2022-09-09T06:18:31.516Z",
                              "related_object_type": "promotion_tier",
                              "related_object_id": "promo_CQonGnrsFAdEJfJQ3oKB3a8G",
                              "related_object_parent_id": "camp_SGq39XXJ47vm7Xys3D0NLgQ0"
                            }
                          }
                        },
                        {
                          "id": "ord_3R6vsxRZRkND8rpe0rAn9Agc",
                          "source_id": null,
                          "created_at": "2022-09-05T08:13:13.720Z",
                          "updated_at": "2022-09-05T08:13:14.498Z",
                          "status": "PAID",
                          "amount": 74000,
                          "items_discount_amount": 1500,
                          "total_discount_amount": 1500,
                          "total_amount": 72500,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 1,
                              "amount": 70000,
                              "price": 70000,
                              "subtotal_amount": 70000,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b72b0bd64d198e3ae",
                              "quantity": 2,
                              "amount": 3000,
                              "discount_amount": 500,
                              "price": 1500,
                              "subtotal_amount": 2500,
                              "product": {
                                "name": "Vase - Boho Vintage",
                                "price": 1500
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b72b00ffed198e344",
                              "quantity": 2,
                              "amount": 1000,
                              "discount_amount": 1000,
                              "price": 500,
                              "subtotal_amount": 0,
                              "product": {
                                "name": "Bouquet - Romantic Roses",
                                "price": 500
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                            "object": "customer"
                          },
                          "customer_id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba4e961444579711a": {
                              "date": "2022-09-05T08:13:13.873Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_hwySVBBk6YmMD4GzZHJzke1Fxo3QO7kP",
                              "related_object_parent_id": "camp_Uji5a53s5wRSUHqznncTkhHh"
                            }
                          }
                        },
                        {
                          "id": "ord_7bqlkoHyEJCQuxVZpKfZYNeA",
                          "source_id": null,
                          "created_at": "2022-09-02T17:12:13.213Z",
                          "updated_at": "2022-09-02T17:12:13.969Z",
                          "status": "PAID",
                          "amount": 292400,
                          "items_discount_amount": 900,
                          "total_discount_amount": 900,
                          "total_amount": 291500,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619",
                              "quantity": 4,
                              "amount": 6400,
                              "price": 1600,
                              "subtotal_amount": 6400,
                              "product": {
                                "name": "Comic Books1",
                                "price": 1600
                              },
                              "sku": {
                                "sku": "Comics1",
                                "price": 1600
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b72b0bd64d198e3ae",
                              "quantity": 4,
                              "amount": 6000,
                              "price": 1500,
                              "subtotal_amount": 6000,
                              "product": {
                                "name": "Vase - Boho Vintage",
                                "price": 1500
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 4,
                              "amount": 280000,
                              "discount_amount": 900,
                              "price": 70000,
                              "subtotal_amount": 279100,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                            "object": "customer"
                          },
                          "customer_id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba187f9bb45792c13": {
                              "date": "2022-09-02T17:12:13.293Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_pg6DhwhmeZASoSoJ15PdzMT9MhsPjYuc",
                              "related_object_parent_id": "camp_W8DJVd8J0btqXT6FBwn7BSkC"
                            }
                          }
                        },
                        {
                          "id": "ord_7HwbJiHmS07O7FsVAtjJcuRS",
                          "source_id": null,
                          "created_at": "2022-09-02T17:08:37.794Z",
                          "updated_at": "2022-09-02T17:08:38.879Z",
                          "status": "PAID",
                          "amount": 223900,
                          "items_discount_amount": 900,
                          "total_discount_amount": 900,
                          "total_amount": 223000,
                          "items": [
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7dfb05cbe5c616",
                              "sku_id": "sku_0b7d7dfb090be5c619",
                              "quantity": 4,
                              "amount": 6400,
                              "discount_amount": 300,
                              "price": 1600,
                              "subtotal_amount": 6100,
                              "product": {
                                "name": "Comic Books1",
                                "price": 1600
                              },
                              "sku": {
                                "sku": "Comics1",
                                "price": 1600
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b7d7c4e814be5c502",
                              "quantity": 3,
                              "amount": 210000,
                              "discount_amount": 300,
                              "price": 70000,
                              "subtotal_amount": 209700,
                              "product": {
                                "name": "Apple iPhone 12",
                                "price": 70000
                              }
                            },
                            {
                              "object": "order_item",
                              "product_id": "prod_0b72b0bd64d198e3ae",
                              "quantity": 5,
                              "amount": 7500,
                              "discount_amount": 300,
                              "price": 1500,
                              "subtotal_amount": 7200,
                              "product": {
                                "name": "Vase - Boho Vintage",
                                "price": 1500
                              }
                            }
                          ],
                          "metadata": {},
                          "customer": {
                            "id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                            "object": "customer"
                          },
                          "customer_id": "cust_CSnYd37MXmrbS19XCrghjBsv",
                          "referrer_id": null,
                          "object": "order",
                          "redemptions": {
                            "r_0ba1872762c5792b73": {
                              "date": "2022-09-02T17:08:37.899Z",
                              "related_object_type": "voucher",
                              "related_object_id": "v_yQydppWWJpSUuGNEWJ4I2upFGY2Ma4IY",
                              "related_object_parent_id": "camp_A5L21BD4cJii28882owYBqTV"
                            }
                          }
                        }
                      ],
                      "total": 441
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-order",
        "tags": [
          "Orders"
        ],
        "summary": "Create Order",
        "description": "Creates an order object and triggers an order creation event.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the order database, Voucherify will return a related order object with updated fields.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "orders"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the order parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "amount": 20000,
                    "customer": {
                      "source_id": "sample_customer"
                    },
                    "status": "PAID",
                    "items": [
                      {
                        "quantity": 1,
                        "price": 20000,
                        "source_id": "sample product1",
                        "related_object": "product",
                        "product": {
                          "metadata": {
                            "key": "value"
                          }
                        }
                      }
                    ]
                  }
                },
                "Example 2": {
                  "value": {
                    "source_id": "new",
                    "status": "FULFILLED",
                    "metadata": {
                      "location_id": [
                        "L1",
                        "L2"
                      ],
                      "payment_mean": [
                        "paypal",
                        "credit-card"
                      ]
                    },
                    "customer": {
                      "source_id": "bob.smith.1@email.com",
                      "name": "Bob Smith",
                      "description": "A nice customer",
                      "email": "bob.smith.1@email.com",
                      "phone": "+1 933 222 3333",
                      "address": {
                        "city": "New York",
                        "country": "United Statese",
                        "line_1": "123 Main St",
                        "line_2": "APT 3 BLG 4",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": false
                      },
                      "birthdate": "2022-01-02"
                    },
                    "referrer": {
                      "source_id": "jane.smith@email.com",
                      "name": "Jane Smith",
                      "description": "A really nice customer",
                      "email": "jane.smith@email.com",
                      "phone": "+1 933 222 3334",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 4",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": false
                      },
                      "birthday": "2022-03-03"
                    },
                    "items": [
                      {
                        "source_id": "prod_1",
                        "related_object": "product",
                        "quantity": 2,
                        "product": {
                          "name": "Apple iPhone 12",
                          "price": 60000,
                          "metadata": {
                            "color": [
                              "purple"
                            ],
                            "vendor": "mall"
                          },
                          "override": true
                        }
                      },
                      {
                        "source_id": "ComicBook_1",
                        "related_object": "sku",
                        "quantity": 1,
                        "product": {
                          "source_id": "Books",
                          "name": "Comic Books1",
                          "price": 2100,
                          "metadata": {
                            "color": [
                              "silver"
                            ],
                            "vendor": "Bookstore1"
                          },
                          "override": true
                        },
                        "sku": {
                          "sku": "Comics1",
                          "source_id": "ComicBook_1",
                          "price": 1700,
                          "metadata": {
                            "color": [
                              "golden"
                            ],
                            "vendor": "islands"
                          },
                          "override": true
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an order object if the operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ord_cRKOEXiBOj0EZKF7g9n6l0eH",
                      "source_id": "new",
                      "created_at": "2022-09-09T09:20:01.660Z",
                      "updated_at": "2022-09-09T09:24:43.604Z",
                      "status": "FULFILLED",
                      "amount": 121700,
                      "total_amount": 121700,
                      "items": [
                        {
                          "object": "order_item",
                          "source_id": "prod_1",
                          "related_object": "product",
                          "quantity": 2,
                          "amount": 120000,
                          "price": 60000,
                          "subtotal_amount": 120000,
                          "product": {
                            "id": "prod_0b7d7c4e814be5c502",
                            "source_id": "prod_1",
                            "name": "Apple iPhone 12",
                            "metadata": {
                              "color": [
                                "purple"
                              ],
                              "vendor": "mall"
                            },
                            "price": 60000
                          }
                        },
                        {
                          "object": "order_item",
                          "source_id": "ComicBook_1",
                          "related_object": "sku",
                          "product_id": "prod_0b7d7dfb05cbe5c616",
                          "quantity": 1,
                          "amount": 1700,
                          "price": 1700,
                          "subtotal_amount": 1700,
                          "product": {
                            "id": "prod_0b7d7dfb05cbe5c616",
                            "source_id": "Books",
                            "name": "Comic Books1",
                            "metadata": {
                              "color": [
                                "silver"
                              ],
                              "vendor": "Bookstore1"
                            },
                            "price": 2100
                          },
                          "sku": {
                            "id": "sku_0b7d7dfb090be5c619",
                            "source_id": "ComicBook_1",
                            "sku": "Comics1",
                            "metadata": {
                              "color": [
                                "golden"
                              ],
                              "vendor": "islands"
                            },
                            "price": 1700
                          }
                        }
                      ],
                      "metadata": {
                        "location_id": [
                          "L1",
                          "L2"
                        ],
                        "payment_mean": [
                          "paypal",
                          "credit-card"
                        ]
                      },
                      "customer": {
                        "id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                        "object": "customer"
                      },
                      "referrer": {
                        "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                        "object": "customer"
                      },
                      "customer_id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                      "referrer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                      "object": "order"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/{orderId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterOrderId"
          },
          "name": "orderId",
          "in": "path",
          "required": true,
          "description": "Unique Voucherify order ID or order source ID."
        }
      ],
      "get": {
        "operationId": "get-order",
        "tags": [
          "Orders"
        ],
        "summary": "Get Order",
        "description": "Retrieve an order.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "orders"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an order object if a valid identifier was provided. ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersGetResponseBody"
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting an order that has been deleted or 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 order with id ord_nIcO2s8iD4Xh5E9IGDQ57Ax",
                      "request_id": "v-0baa1ad023d0656a84",
                      "resource_id": "ord_nIcO2s8iD4Xh5E9IGDQ57Ax",
                      "resource_type": "order"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-order",
        "tags": [
          "Orders"
        ],
        "summary": "Update Order",
        "description": "Updates the specified order by setting the values of the parameters passed in the request body. Any parameters not provided will be left unchanged.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "orders"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters of the order that are to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "status": "CANCELED"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the order object if the update succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ord_cRKOEXiBOj0EZKF7g9n6l0eH",
                      "source_id": "new",
                      "created_at": "2022-09-09T09:20:01.660Z",
                      "updated_at": "2022-09-09T09:41:00.881Z",
                      "status": "CANCELED",
                      "amount": 121700,
                      "total_amount": 121700,
                      "items": [
                        {
                          "object": "order_item",
                          "source_id": "prod_1",
                          "related_object": "product",
                          "quantity": 2,
                          "amount": 120000,
                          "price": 60000,
                          "subtotal_amount": 120000,
                          "product": {
                            "id": "prod_0b7d7c4e814be5c502",
                            "source_id": "prod_1",
                            "name": "Apple iPhone 12",
                            "metadata": {
                              "color": [
                                "purple"
                              ],
                              "vendor": "mall"
                            },
                            "price": 60000
                          }
                        },
                        {
                          "object": "order_item",
                          "source_id": "ComicBook_1",
                          "related_object": "sku",
                          "product_id": "prod_0b7d7dfb05cbe5c616",
                          "quantity": 1,
                          "amount": 1700,
                          "price": 1700,
                          "subtotal_amount": 1700,
                          "product": {
                            "id": "prod_0b7d7dfb05cbe5c616",
                            "source_id": "Books",
                            "name": "Comic Books1",
                            "metadata": {
                              "color": [
                                "silver"
                              ],
                              "vendor": "Bookstore1"
                            },
                            "price": 2100
                          },
                          "sku": {
                            "id": "sku_0b7d7dfb090be5c619",
                            "source_id": "ComicBook_1",
                            "sku": "Comics1",
                            "metadata": {
                              "color": [
                                "golden"
                              ],
                              "vendor": "islands"
                            },
                            "price": 1700
                          }
                        }
                      ],
                      "metadata": {
                        "location_id": [
                          "L1",
                          "L2"
                        ],
                        "payment_mean": [
                          "paypal",
                          "credit-card"
                        ]
                      },
                      "customer": {
                        "id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                        "object": "customer"
                      },
                      "referrer": {
                        "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                        "object": "customer"
                      },
                      "customer_id": "cust_H0nXrItO1DNV3UiPIl54HA5o",
                      "referrer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv",
                      "object": "order"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/import": {
      "post": {
        "operationId": "import-orders",
        "tags": [
          "Orders"
        ],
        "summary": "Import Orders",
        "description": "[update order](ref:update-order) endpoints should be used. This is critical because this endpoint does not store events or launch distributions.\n\n## Limitations\n\n### Import volume\n\nThere can be only a single on-going order import per tenant per project at a given time. The user can schedule more imports but those extra imports will be scheduled to run in sequence one by one.  \n\n### Maximum count of orders in single import\n\nThere is a `2000` limit but we might decide to change it to a lower / higher value at any given time depending if we find this value is too high or too low with time.\n\n## Notifications\n\nThere are no notifications on the Dashboard because this import is launched via the API.\n\n## Triggered actions\n  \nIf you import orders with customers, then a logic will be scheduled responsible for placing these customers into segments and refreshing the segment's summary. Consequently, this update will trigger \n- **customers entering into segments** \n- **distributions** based on any rules tied to customer entering segment(s)\n- **earning rules** based on the customer entering segment(s)\n\n## What is not triggered\n\n1. No webhooks are triggered during the import of orders - for both orders and upserted products / skus.  \n\n2. Distributions based on Order Update, Order Paid, Order Created and Order Cancelled. In other words if you have a distribution based on Order Paid and you import an order with a PAID status, the distribution is not going to be triggered.    \n\n3. No events are created during the import of orders - for both orders and upserted products / skus. In other words you won't see any events in the Activity tab in the Dashboard such as Order created or Order paid. If you are additionally upserting products / skus, then you won't see the Product created events listed, etc.   \n\n4. Earning rules based on Order Paid won't be triggered.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "orders"
            ]
          }
        ],
        "requestBody": {
          "description": "The request body is sent in the form of an array of order objects.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersImportCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "source_id": "orderImport14",
                      "status": "PAID",
                      "metadata": {
                        "location_id": [
                          "L1",
                          "L2"
                        ],
                        "payment_mean": [
                          "paypal",
                          "credit-card"
                        ]
                      },
                      "customer": {
                        "source_id": "bob2.smith@email.com",
                        "name": "Bob Smith",
                        "description": "A nice customer",
                        "email": "bob.smith@email.com",
                        "phone": "+1 933 222 3333",
                        "address": {
                          "city": "New York",
                          "country": "United States",
                          "line_1": "123 Main St.",
                          "line_2": "APT 3 BLG 4",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {
                          "lang": "en",
                          "test": true
                        },
                        "birthdate": "2022-01-01"
                      },
                      "referrer": {
                        "source_id": "jane.smith@email.com",
                        "name": "Jane Smith",
                        "description": "A really nice customer",
                        "email": "jane.smith@email.com",
                        "phone": "+1 933 222 3334",
                        "address": {
                          "city": "New York",
                          "country": "United States",
                          "line_1": "123 Main St.",
                          "line_2": "APT 3 BLG 4",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {
                          "lang": "en",
                          "test": false
                        },
                        "birthday": "2022-03-03"
                      },
                      "items": [
                        {
                          "source_id": "prod_1",
                          "related_object": "product",
                          "quantity": 2,
                          "product": {
                            "name": "Apple iPhone 12",
                            "price": 70000,
                            "metadata": {
                              "color": [
                                "silver"
                              ],
                              "vendor": "mall"
                            },
                            "override": true
                          }
                        },
                        {
                          "source_id": "ComicBook_1",
                          "related_object": "sku",
                          "quantity": 1,
                          "product": {
                            "source_id": "Books",
                            "name": "Comic Books1",
                            "price": 1600,
                            "metadata": {
                              "color": [
                                "silver"
                              ],
                              "vendor": "Bookstore1"
                            },
                            "override": true
                          },
                          "sku": {
                            "sku": "Comics1",
                            "source_id": "ComicBook_1",
                            "price": 1600,
                            "metadata": {
                              "color": [
                                "golden"
                              ],
                              "vendor": "islands"
                            },
                            "override": true
                          }
                        }
                      ]
                    },
                    {
                      "source_id": "orderImport15",
                      "status": "PAID",
                      "metadata": {
                        "location_id": [
                          "L3"
                        ],
                        "payment_mean": [
                          "wire-transfer"
                        ]
                      },
                      "customer": {
                        "source_id": "bob2.smith@email.com"
                      },
                      "referrer": {
                        "source_id": "jane.smith@email.com"
                      },
                      "items": [
                        {
                          "source_id": "ComicBook_1",
                          "quantity": 4,
                          "related_object": "sku",
                          "sku": {
                            "source_id": "ComicBook_1"
                          }
                        },
                        {
                          "source_id": "vase_1",
                          "quantity": 1,
                          "related_object": "product",
                          "product": {
                            "source_id": "vase_1"
                          }
                        }
                      ]
                    },
                    {
                      "source_id": "orderImport16",
                      "status": "FULFILLED",
                      "metadata": {
                        "location_id": [
                          "L3"
                        ],
                        "payment_mean": [
                          "wire-transfer"
                        ]
                      },
                      "customer": {
                        "id": "cust_LMY4ZylSdUYB1J4tzqNcl5VV"
                      },
                      "referrer": {
                        "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
                      },
                      "items": [
                        {
                          "product_id": "prod_0b72b0bd64d198e3ae",
                          "quantity": 2
                        },
                        {
                          "sku_id": "sku_0b1621b319d248b79f",
                          "quantity": 2
                        }
                      ]
                    },
                    {
                      "source_id": "orderImport17",
                      "status": "CANCELED",
                      "amount": 7000,
                      "metadata": {
                        "location_id": [
                          "L3"
                        ],
                        "payment_mean": [
                          "wire-transfer"
                        ]
                      }
                    },
                    {
                      "source_id": "orderImport18",
                      "status": "CREATED",
                      "metadata": {
                        "location_id": [
                          "L3"
                        ],
                        "payment_mean": [
                          "wire-transfer"
                        ]
                      },
                      "items": [
                        {
                          "source_id": "ComicBook_1",
                          "amount": 900,
                          "related_object": "sku"
                        },
                        {
                          "source_id": "vase_1",
                          "amount": 2000,
                          "related_object": "product"
                        }
                      ]
                    },
                    {
                      "source_id": "orderImport19",
                      "status": "CREATED",
                      "metadata": {
                        "location_id": [
                          "L3"
                        ],
                        "payment_mean": [
                          "wire-transfer"
                        ]
                      },
                      "items": [
                        {
                          "amount": 900
                        },
                        {
                          "amount": 2000
                        }
                      ]
                    },
                    {
                      "source_id": "orderImport20",
                      "status": "CREATED",
                      "metadata": {
                        "location_id": [
                          "L3"
                        ],
                        "payment_mean": [
                          "wire-transfer"
                        ]
                      },
                      "items": [
                        {
                          "price": 900,
                          "quantity": 2
                        },
                        {
                          "price": 2000,
                          "quantity": 3
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the ID of the scheduled asynchronous action, informing you that your request has been accepted and the order(s) will be added to the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and pass it using [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersImportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .items[0].initial_quantity cannot be lower than 1",
                      "request_id": "v-0c5561d945cb0f0fb5"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/orders/export": {
      "post": {
        "operationId": "create-order-export",
        "tags": [
          "Orders"
        ],
        "summary": "Create Orders Export",
        "description": "Creates a downloadable CSV file containing a list of orders.\n\nThe parameters listed in the payload resembles headers in the CSV file. To include a parameter to the file, add it to the `parameters.fields` object in the request body.\n\nThe available filters are all [order object](ref:get-order) attributes. Additionally, any metadata defined in the metadata schema can be exported.\n\nPassing an empty JSON will generate a file containing three default fields: `id`, `source_id`, and `status`.\n\nThe fields array is an array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique order ID. | ord_A69RIxEdRsPuC6i8gFGVHUft |\n| source_id | Unique order source ID. | 8638 |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the order was created. | 2022-03-09T09:16:32.521Z |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the order was last updated. | 2022-03-09T09:16:33.331Z |\n| status | Order status. | `PAID`, `CREATED`, `FULFILLED`, `CANCELED` |\n| amount | Total amount of order items. | 7700 |\n| discount_amount | Represents total amount of the discount applied to whole cart. | 500 |\n| items_discount_amount | Represents total amount of the discount applied to order line items. | 100 |\n| total_discount_amount | All discounts applied to the order including discounts applied to particular order line items and discounts applied to the whole cart. | 600 |\n| total_amount | Total order amount after applying all discounts. | 7100 |\n| customer_id | Customer unique ID. | cust_2G4fUQdCXUqp35nXNleav7bO |\n| referrer_id | Referrer unique ID. | cust_IkrTR674vvQvr9a4rDMiqglY |\n| metadata | Returns all order metadata. | Response will include all order metadata. |\n| metadata.X | Where X is the name of a particular order metadata property. | The returned value will depend on the type of data defined in the Dashboard > Project Settings > Metdata Schemas > Order. |",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "orders"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify which order parameters you would like to export.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrdersExportCreateRequestBody"
              },
              "examples": {
                "Using fields": {
                  "value": {
                    "parameters": {
                      "fields": [
                        "id",
                        "source_id",
                        "status",
                        "created_at",
                        "updated_at",
                        "amount",
                        "discount_amount",
                        "items_discount_amount",
                        "total_discount_amount",
                        "total_amount",
                        "customer_id",
                        "referrer_id",
                        "metadata.payment_mean"
                      ]
                    }
                  }
                },
                "Using fields and filters": {
                  "value": {
                    "parameters": {
                      "fields": [
                        "id",
                        "source_id",
                        "status",
                        "created_at",
                        "updated_at",
                        "amount",
                        "discount_amount",
                        "items_discount_amount",
                        "total_discount_amount",
                        "total_amount",
                        "customer_id",
                        "referrer_id",
                        "metadata.payment_mean"
                      ],
                      "order": "-updated_at",
                      "filters": {
                        "discount_amount": {
                          "conditions": {
                            "$more_than": 100000
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the `id` of the export object and `status` of the file generation process. The `id` is used in the [Download Export](ref:download-export) method to return the contents of the CSV file. The status indicates whether the file has been scheduled for creation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrdersExportCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "exp_pT2Y1mgYsAgRAqsWTGf7PQX7",
                      "object": "export",
                      "created_at": "2022-09-09T10:45:52.362Z",
                      "status": "SCHEDULED",
                      "channel": "API",
                      "exported_object": "order",
                      "parameters": {
                        "fields": [
                          "id",
                          "source_id",
                          "status",
                          "created_at",
                          "updated_at",
                          "amount",
                          "discount_amount",
                          "items_discount_amount",
                          "total_discount_amount",
                          "total_amount",
                          "customer_id",
                          "referrer_id",
                          "metadata.payment_mean"
                        ]
                      },
                      "result": null,
                      "user_id": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the request payload is specified incorrectly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .parameters.filters should match either `filters[${field}][conditions][${condition}][${index}]` or `filters[${field}][conditions][${condition}]` format and condition must be one of: $in, $not_in, $in_location, $not_in_location, $is, $is_days_ago, $is_days_in_future, $is_not, $has_value, $is_unknown, $contains, $not_contain, $starts_with, $ends_with, $more_than, $less_than, $more_than_ago, $less_than_ago, $more_than_future, $less_than_future, $more_than_equal, $less_than_equal, $after, $before, $count, $count_less, $count_more, $today, $tomorrow, $yesterday, $this_week, $last_week, $next_week, $this_month, $last_month, $next_month, $this_year, $next_year, $last_year, $is_day_of_month, $is_day, $is_month, $is_year, $today_md, $tomorrow_md, $yesterday_md, $this_week_md, $last_week_md, $next_week_md, $this_month_md, $last_month_md, $next_month_md, $is_days_ago_md, $is_more_days_ago_md, $is_less_days_ago_md, $is_days_in_future_md, $is_more_days_in_future_md, $is_less_days_in_future_md, $is_years_ago, $active, $failed, $in_progress, $expired, $before_start, $enabled, $disabled, $redeemed, $redeemable",
                      "request_id": "v-0c52e783650ae585b2"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/products": {
      "get": {
        "operationId": "list-products",
        "tags": [
          "Products"
        ],
        "summary": "List Products",
        "description": "Retrieve a list of products.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/start_date"
          },
          {
            "$ref": "#/components/parameters/end_date"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with product objects. The products are returned sorted by creation date by default, with the most recent products appearing last, unless you specify another sequence using the `order` query parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "products",
                      "products": [
                        {
                          "id": "prod_f1r5Tpr0DuC7",
                          "source_id": "test_prod_id_1",
                          "name": "Apple iPhone 8",
                          "price": null,
                          "attributes": [
                            "color",
                            "memory"
                          ],
                          "metadata": {
                            "test": true,
                            "vendor": "Cortland"
                          },
                          "image_url": null,
                          "created_at": "2021-12-03T06:33:46.101Z",
                          "updated_at": null,
                          "object": "product",
                          "skus": {
                            "data": [
                              {
                                "id": "sku_0a417bd1d9952f9d6f",
                                "source_id": "test_iphone_8_silver_256gb",
                                "product_id": "prod_f1r5Tpr0DuC7",
                                "sku": "iPhone 8 Silver 256GB",
                                "price": null,
                                "currency": null,
                                "attributes": {
                                  "color": "silver",
                                  "memory": "256"
                                },
                                "image_url": null,
                                "metadata": {},
                                "created_at": "2021-12-03T06:33:46.599097+00:00",
                                "updated_at": null,
                                "object": "sku"
                              },
                              {
                                "id": "sku_0a417bd1d9952f9d6e",
                                "source_id": "test_iphone_8_silver_64gb",
                                "product_id": "prod_f1r5Tpr0DuC7",
                                "sku": "iPhone 8 Silver 64GB",
                                "price": null,
                                "currency": null,
                                "attributes": {
                                  "color": "silver",
                                  "memory": "64"
                                },
                                "image_url": null,
                                "metadata": {},
                                "created_at": "2021-12-03T06:33:46.598595+00:00",
                                "updated_at": null,
                                "object": "sku"
                              }
                            ],
                            "total": 2
                          }
                        },
                        {
                          "id": "prod_0ac67e1bb8072eec48",
                          "source_id": "test_volleyball",
                          "name": "VolleyBall",
                          "price": 1100,
                          "attributes": [],
                          "metadata": {
                            "color": [
                              "white"
                            ],
                            "label": true,
                            "origin": "PL"
                          },
                          "image_url": null,
                          "created_at": "2022-03-16T14:01:45.459Z",
                          "updated_at": "2022-04-26T12:51:35.500Z",
                          "object": "product",
                          "skus": {
                            "data": [
                              {
                                "id": "sku_0ac768973f5c4ea0d0",
                                "source_id": "test_volleyball_pl",
                                "product_id": "prod_0ac67e1bb8072eec48",
                                "sku": "PL",
                                "price": 500,
                                "currency": "USD",
                                "attributes": {},
                                "image_url": null,
                                "metadata": {
                                  "color": [
                                    "red"
                                  ]
                                },
                                "created_at": "2022-03-17T07:06:13.629918+00:00",
                                "updated_at": null,
                                "object": "sku"
                              },
                              {
                                "id": "sku_0ac7689713072e1df6",
                                "source_id": "test_volleyball_us",
                                "product_id": "prod_0ac67e1bb8072eec48",
                                "sku": "US",
                                "price": 1500,
                                "currency": "USD",
                                "attributes": {},
                                "image_url": null,
                                "metadata": {
                                  "color": [
                                    "yellow"
                                  ]
                                },
                                "created_at": "2022-03-17T07:06:13.452532+00:00",
                                "updated_at": null,
                                "object": "sku"
                              }
                            ],
                            "total": 2
                          }
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-product",
        "tags": [
          "Products"
        ],
        "summary": "Create Product",
        "description": "Creates a product object.\n\n\n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the product database, Voucherify will return a related product object with updated fields.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the product parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductsCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "source_id": "first_product",
                    "name": "Samsung Phone",
                    "price": 200000,
                    "attributes": [
                      "color",
                      "memory",
                      "processor"
                    ],
                    "metadata": {
                      "test": true,
                      "vendor": "Online Store"
                    },
                    "image_url": "{{internalVoucherifyURL}}"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a product object if the operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "prod_0bae2dc5a090fd0184",
                      "source_id": "first_product",
                      "name": "Samsung Phone",
                      "price": 200000,
                      "attributes": [
                        "color",
                        "memory",
                        "processor"
                      ],
                      "metadata": {
                        "test": true,
                        "vendor": "Online Store"
                      },
                      "image_url": "https://www.website.com/image.png",
                      "created_at": "2022-09-12T12:58:22.232Z",
                      "updated_at": "2022-09-12T12:59:55.890Z",
                      "object": "product"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/{productId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProductId"
          },
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "A Voucherify product ID or source ID."
        }
      ],
      "get": {
        "operationId": "get-product",
        "tags": [
          "Products"
        ],
        "summary": "Get Product",
        "description": "Retrieve product details.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a product object if a valid identifier was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "prod_f1r5Tpr0DuC7",
                      "source_id": "test_prod_id_1",
                      "name": "Apple iPhone 8",
                      "price": null,
                      "attributes": [
                        "color",
                        "memory"
                      ],
                      "metadata": {
                        "test": true,
                        "vendor": "Cortland"
                      },
                      "image_url": null,
                      "created_at": "2021-12-03T06:33:46.101Z",
                      "updated_at": null,
                      "object": "product",
                      "skus": {
                        "object": "list",
                        "data_ref": "data",
                        "data": [
                          {
                            "id": "sku_0a417bd1d9952f9d6f",
                            "source_id": "test_iphone_8_silver_256gb",
                            "product_id": "prod_f1r5Tpr0DuC7",
                            "sku": "iPhone 8 Silver 256GB",
                            "price": null,
                            "currency": null,
                            "attributes": {
                              "color": "silver",
                              "memory": "256"
                            },
                            "image_url": null,
                            "metadata": {},
                            "created_at": "2021-12-03T06:33:46.599097+00:00",
                            "updated_at": null,
                            "object": "sku"
                          },
                          {
                            "id": "sku_0a417bd1d9952f9d6e",
                            "source_id": "test_iphone_8_silver_64gb",
                            "product_id": "prod_f1r5Tpr0DuC7",
                            "sku": "iPhone 8 Silver 64GB",
                            "price": null,
                            "currency": null,
                            "attributes": {
                              "color": "silver",
                              "memory": "64"
                            },
                            "image_url": null,
                            "metadata": {},
                            "created_at": "2021-12-03T06:33:46.598595+00:00",
                            "updated_at": null,
                            "object": "sku"
                          }
                        ],
                        "total": 2
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting a product that has been deleted or 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 product with id test_prod_id_",
                      "request_id": "v-0bae1d3caf478da111",
                      "resource_id": "test_prod_id_",
                      "resource_type": "product"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-product",
        "tags": [
          "Products"
        ],
        "summary": "Update Product",
        "description": "Updates the specified product by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters of the product that are to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductsUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "price": 210000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns an updated product object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "prod_0bae2dc5a090fd0184",
                      "source_id": "first_product",
                      "name": "Samsung Phone",
                      "price": 210000,
                      "attributes": [
                        "color",
                        "memory",
                        "processor"
                      ],
                      "metadata": {
                        "test": false,
                        "vendor": "Online Stores"
                      },
                      "image_url": "https://www.website.com/image.png",
                      "created_at": "2022-09-12T12:58:22.232Z",
                      "updated_at": "2022-09-12T13:33:48.904Z",
                      "object": "product"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-product",
        "tags": [
          "Products"
        ],
        "summary": "Delete Product",
        "description": "Deletes a product and all related SKUs. This operation cannot be undone. \n\nIf the `force` parameter is set to `false` or not set at all, the product and all related SKUs will be moved to [the bin](ref:list-bin-entries).",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "force",
            "description": "If this flag is set to `true`, the product and all related SKUs will be removed permanently. If it is set to `false` or not set at all, the product and all related SKUs will be moved to the bin. Going forward, the user will be able to create another product with exactly the same `source_id`."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the product with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Product Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find product with id prod_0a4934c50ddc5dbae",
                      "request_id": "v-0ae39cd7de8683dfd8",
                      "resource_id": "prod_0a4934c50ddc5dbae",
                      "resource_type": "product"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/bulk/async": {
      "post": {
        "operationId": "update-products-in-bulk",
        "tags": [
          "Products"
        ],
        "summary": "Update Products in Bulk",
        "description": "Update products in one asynchronous operation.\n\nThe request can include up to **10 MB** of data.\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](ref:get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\n\n\nIf a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value `false` in the `found` column and `true` in the `updated` column.\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "requestBody": {
          "description": "List the product fields to be updated in each product object.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ProductsUpdateInBulkRequestBody"
                }
              },
              "examples": {
                "Example": {
                  "value": [
                    {
                      "source_id": "first_product",
                      "name": "Samsung Phone 1",
                      "price": 220000,
                      "attributes": [
                        "color",
                        "memory",
                        "processor"
                      ],
                      "metadata": {
                        "test": true,
                        "vendor": "Online Store - 3"
                      },
                      "image_url": "{{internalVoucherifyURL}}"
                    },
                    {
                      "source_id": "second_product",
                      "name": "Samsung Phone 2",
                      "price": 230000,
                      "attributes": [
                        "color",
                        "memory",
                        "processor"
                      ],
                      "metadata": {
                        "test": true,
                        "vendor": "Online Store - 4"
                      },
                      "image_url": "{{internalVoucherifyURL}}"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsUpdateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/metadata/async": {
      "post": {
        "operationId": "update-products-metadata-in-bulk",
        "tags": [
          "Products"
        ],
        "summary": "Update Products' Metadata in Bulk",
        "description": "Updates metadata parameters for a list of products. Every resource in the list will receive the metadata defined in the request.\n\nThe request can include up to **10 MB** of data.\n\nThe response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](ref:get-async-action) endpoint to check, e.g.:\n\n- The status of your request (in queue, in progress, done, or failed)\n\n- Resources that failed to be updated\n\n- The report file with details about the update\n\n\nIf a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value `false` in the `found` column and `true` in the `updated` column.\n\nThis API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "requestBody": {
          "description": "List the `source_ids` of the products you would like to update with the metadata key/value pairs.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductsMetadataUpdateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "source_ids": [
                      "123-567-3433",
                      "test_volleyball"
                    ],
                    "metadata": {
                      "label": true,
                      "origin": "PL"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Returns the ID of the scheduled asynchronous action. The response informs you that the request has been accepted and the resources will be updated in the repository asynchronously. To check the status and result, copy the `async_action_id` from the response and use it as a query parameter in the [GET Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsMetadataUpdateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "413": {
            "description": "Returns an error if the payload exceeds 10 MB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Request Entity Too Large": {
                    "value": {
                      "statusCode": 413,
                      "error": "Request Entity Too Large",
                      "message": "Payload content length greater than maximum allowed: 10485760"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/skus/{skuId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterSkuId"
          },
          "name": "skuId",
          "in": "path",
          "required": true,
          "description": "A Voucherify SKU identifier or SKU source ID."
        }
      ],
      "get": {
        "operationId": "get-sku",
        "tags": [
          "Products"
        ],
        "summary": "Get SKU",
        "description": "Retrieve details of a SKU.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "skus"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns requested SKU object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkusGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "sku_0b1621b2f25248b79c",
                      "source_id": "sku_source_id_1",
                      "product_id": "prod_0b15f6b9f650c16990",
                      "sku": "Extra Small Blue Shirt",
                      "price": 1300,
                      "currency": "USD",
                      "attributes": {
                        "size": "XS",
                        "color": "blue",
                        "ranking": 1
                      },
                      "image_url": "",
                      "metadata": {},
                      "created_at": "2022-05-17T10:36:30.057Z",
                      "updated_at": "2022-07-01T05:34:16.822Z",
                      "object": "sku"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the sku with given ID was 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 sku with id sku_0b1621b319d248b79",
                      "request_id": "v-0b4fe3ddc55646d01d",
                      "resource_id": "sku_0b1621b319d248b79",
                      "resource_type": "sku"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/{productId}/skus": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProductId"
          },
          "name": "productId",
          "in": "path",
          "description": "A Voucherify [product](ref:get-product) ID or product source ID.",
          "required": true
        }
      ],
      "get": {
        "operationId": "list-skus-in-product",
        "tags": [
          "Products"
        ],
        "summary": "List SKUs in Product",
        "description": "Retrieve all SKUs for a given product.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/start_date"
          },
          {
            "$ref": "#/components/parameters/end_date"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of SKUs.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsSkusListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "skus",
                      "skus": [
                        {
                          "id": "sku_0b1621b2f25248b79c",
                          "source_id": "sku_source_id_1",
                          "product_id": "prod_0b15f6b9f650c16990",
                          "sku": "Extra Small Blue Shirt",
                          "price": 1300,
                          "currency": "USD",
                          "attributes": {
                            "size": "XS",
                            "color": "blue",
                            "ranking": 1
                          },
                          "image_url": "",
                          "metadata": {},
                          "created_at": "2022-05-17T10:36:30.057Z",
                          "updated_at": "2022-07-01T05:34:16.822Z",
                          "object": "sku"
                        },
                        {
                          "id": "sku_0b1621b3181248b79d",
                          "source_id": "sku_source_id_3",
                          "product_id": "prod_0b15f6b9f650c16990",
                          "sku": "Medium Yellow Shirt",
                          "price": 1450,
                          "currency": "USD",
                          "attributes": {
                            "size": "M",
                            "color": "yellow",
                            "ranking": 3
                          },
                          "image_url": "",
                          "metadata": {},
                          "created_at": "2022-05-17T10:36:30.180Z",
                          "updated_at": "2022-07-01T05:34:16.842Z",
                          "object": "sku"
                        },
                        {
                          "id": "sku_0b1621b3199248b79e",
                          "source_id": "sku_source_id_2",
                          "product_id": "prod_0b15f6b9f650c16990",
                          "sku": "Small Red Shirt",
                          "price": 1400,
                          "currency": "USD",
                          "attributes": {
                            "size": "S",
                            "color": "red",
                            "ranking": 2
                          },
                          "image_url": "",
                          "metadata": {},
                          "created_at": "2022-05-17T10:36:30.183Z",
                          "updated_at": "2022-07-01T05:34:16.927Z",
                          "object": "sku"
                        },
                        {
                          "id": "sku_0b1621b319d248b79f",
                          "source_id": "sku_source_id_4",
                          "product_id": "prod_0b15f6b9f650c16990",
                          "sku": "Large Pink Shirt -",
                          "price": 1700,
                          "currency": "USD",
                          "attributes": {
                            "size": "L",
                            "color": "pink",
                            "ranking": 4
                          },
                          "image_url": "",
                          "metadata": {},
                          "created_at": "2022-05-17T10:36:30.187Z",
                          "updated_at": "2022-07-05T08:47:50.680Z",
                          "object": "sku"
                        }
                      ],
                      "total": 4
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting a product that has been deleted or 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 product with id prod_0b15f6b9f650c6990",
                      "request_id": "v-0bae223075878da708",
                      "resource_id": "prod_0b15f6b9f650c6990",
                      "resource_type": "product"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-sku",
        "tags": [
          "Products"
        ],
        "summary": "Create SKU",
        "description": "This method adds product variants to a \n\n> 📘 Upsert Mode\n>\n> If you pass an `id` or a `source_id` that already exists in the sku database, Voucherify will return a related sku object with updated fields.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the SKU parameters to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductsSkusCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "source_id": "first_product_sku_1",
                    "sku": "Samsung phone 256GB",
                    "price": 1300,
                    "currency": "USD",
                    "attributes": {
                      "color": "vintage-black",
                      "memory": "256",
                      "processor": "Intel"
                    },
                    "image_url": "{{internalVoucherifyURL}}",
                    "metadata": {
                      "imported": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the created SKU object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsSkusCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "sku_0bae3b28f610fd0da1",
                      "source_id": "first_product_sku_1",
                      "product_id": "prod_0bae2dc5a090fd0184",
                      "sku": "Samsung phone 256GB",
                      "price": 1300,
                      "currency": "USD",
                      "attributes": {
                        "color": "vintage-black",
                        "memory": "256",
                        "processor": "Intel"
                      },
                      "image_url": "{{internalVoucherifyURL}}",
                      "metadata": {
                        "imported": true
                      },
                      "created_at": "2022-09-12T13:56:51.828Z",
                      "updated_at": null,
                      "object": "sku"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/{productId}/skus/{skuId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProductId"
          },
          "name": "productId",
          "in": "path",
          "required": true,
          "description": "A unique Voucherify [product](ref:get-product) ID or product source ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterSkuId"
          },
          "name": "skuId",
          "in": "path",
          "required": true,
          "description": "A Voucherify [SKU ID](ref:get-sku) or SKU source ID."
        }
      ],
      "put": {
        "operationId": "update-sku",
        "tags": [
          "Products"
        ],
        "summary": "Update SKU",
        "description": "Updates the specified SKU by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.\n\nFields other than the ones listed in the request body schema won't be modified. Even if provided, they will be silently skipped.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductsSkusUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "price": 210000,
                    "currency": "PLN"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the SKU object with the updated parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsSkusUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "sku_0bae3b28f610fd0da1",
                      "source_id": "first_product_sku_1",
                      "product_id": "prod_0bae2dc5a090fd0184",
                      "sku": "Samsung phone 256GB",
                      "price": 210000,
                      "currency": "PLN",
                      "attributes": {
                        "color": "vintage-black",
                        "memory": "256",
                        "processor": "Intel"
                      },
                      "image_url": "{{internalVoucherifyURL}}",
                      "metadata": {
                        "imported": true
                      },
                      "created_at": "2022-09-12T13:56:51.828Z",
                      "updated_at": "2022-09-12T14:09:40.859Z",
                      "object": "sku"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-sku",
        "tags": [
          "Products"
        ],
        "summary": "Delete SKU",
        "description": "Deletes a product SKU. This operation cannot be undone. \n\nIf the `force` parameter is set to `false` or not set at all, the SKU will be moved to [the bin](ref:list-bin-entries).",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "force",
            "description": "If this flag is set to `true`, the SKU will be removed permanently. If it is set to `false` or not set at all, the SKU will be moved to the bin. Going forward, the user will be able to create another SKU with exactly the same `source_id`."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the product or sku with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Product Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find product with id 123-567-343",
                      "request_id": "v-0ae3a0d26fd40ecd11",
                      "resource_id": "123-567-343",
                      "resource_type": "product"
                    }
                  },
                  "SKU Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find sku with id sku_0ae3a06b20019ba8f",
                      "request_id": "v-0ae3a1534d940ecd81",
                      "resource_id": "sku_0ae3a06b20019ba8f",
                      "resource_type": "sku"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/products/importCSV": {
      "post": {
        "operationId": "import-products-using-csv",
        "tags": [
          "Products"
        ],
        "summary": "Import Products using CSV",
        "description": "Import products into the repository using a CSV file.  \n\nCurl Example\n\n\n> 📘 Standard product fields mapping\n>\n> - Create a **comma separated value (CSV) file** or download our CSV import template. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b82ed68d51e779443f550/Import_products_template.csv).\n> - Supported CSV file headers: `name,source_id,price,attributes,image_url,Metadata_property_name`\n> - **Name** is a **required** field. The remaining fields in the CSV template are optional.\n> - Override/Update products' **names** in Voucherify using this method. Data will be updated for each product included in the CSV file whose **source_id** matches a source ID in Voucherify. No other data can be updated other than the product name.\n> - Note that dates and date-time attributes need to be provided in compliance with the **ISO 8601 norms**. For example, 2022-03-11T09:00:00.000Z or 2022-03-11\n>    - `YYYY-MM-DD`\n>    - `YYYY-MM-DDTHH`\n>    - `YYYY-MM-DDTHH:mm`\n>    - `YYYY-MM-DDTHH:mm:ss`\n>    - `YYYY-MM-DDTHH:mm:ssZ`\n>    - `YYYY-MM-DDTHH:mm:ssZ`\n>    - `YYYY-MM-DDTHH:mm:ss.SSSZ`\n> - Columns that cannot be mapped to standard fields, will be mapped to **Custom attributes** and added as **products' metadata**. There is no limit on the number of custom attributes that you can import as metadata. \n> - To provide the proper data type, you need to add all custom attributes to the metadata schema **before importing the file**. Read more [here](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata).\n> - **Product attributes** (not custom attributes) need to be separated by a comma and enclosed in double quotes, i.e \"attribute1,attribute2\".\n> - Headers with metadata names **can't contain white-space characters**.\n> - If you import metadata defined in the schema as **arrays (multiple)**, you need to separate each value using a comma, for example:  \n>    - array of strings: \"subscribed,premium\"  \n>    - array of numbers: \"123,234\". \n>    - array of dates: \"2000-01-01,2000-01-02\"\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "products"
            ]
          }
        ],
        "requestBody": {
          "description": "The file path is stored in the form `file` header.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ProductsImportCSVRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and products will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsImportCsvCreateResponseBody"
                },
                "examples": {
                  "Async Action": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an invalid payload error. You may receive this error if you have incorrectly or have not specified the content type as `multipart/form-data` in the headers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload should have required property 'file'",
                      "request_id": "v-0c4c46bbad0136789f"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/skus/importCSV": {
      "post": {
        "operationId": "import-skus-using-csv",
        "tags": [
          "Products"
        ],
        "summary": "Import SKUs using CSV",
        "description": "Import SKUs into the repository using a CSV file.\n\nThe CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). \n\nCurl Example\n\n\n> 📘 Standard SKU fields mapping\n>\n> - **Required** fields are `source_id` and `product_id`.\n> - Supported CSV file headers: `product_id,sku,source_id,price,image_url,attributes`\n> - SKU **source_id** must be unique in the entire product catalog, no duplicates are allowed.\n> - SKU attributes need to be in the form of a stringy-fied json, i.e.`\"{'color':'blue'}\"`. These attributes must be defined in the **product** beforehand so you can import them to the SKU.\n> - You can use this method to update the following parameters in bulk: **sku** and the sku **price**.\n> - Columns that cannot be mapped to standard fields will be mapped to Custom attributes and added as product metadata. There is no limit on the number of custom attributes that you can import as metadata.\n\nThis API request starts a process that affects Voucherify data in bulk. \n\nIn case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the `IN_PROGRESS` status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. \n\nThe result will return the async ID. You can verify the status of your request via this [API request](ref:get-async-action).",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "skus"
            ]
          }
        ],
        "requestBody": {
          "description": "The file path is stored in the form `file` header.",
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/SkusImportCSVRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns ID of the scheduled async action. The response informs you that your request has been accepted and SKUs will be added to the repository asynchronously. To check the import status and result, copy the `async_action_id` from the response and pass it using the [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkusImportCsvCreateResponseBody"
                },
                "examples": {
                  "Async Action": {
                    "value": {
                      "async_action_id": "aa_0a875d56c805df6601"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/product-collections": {
      "get": {
        "operationId": "list-product-collections",
        "tags": [
          "Product Collections"
        ],
        "summary": "List Product Collections",
        "description": "This method returns a list of product collections.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/order"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "product-collections"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary containing a list of product collections and details about each product collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCollectionsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "pc_Dj1qSH7bho4SVh7aSDKjU174",
                          "name": "Products in Poland",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "metadata.product_location": {
                              "conditions": {
                                "$in_location": [
                                  "loc_RcYz537sV07e1t5aG5tIH9FD"
                                ]
                              }
                            }
                          },
                          "created_at": "2022-07-14T16:12:26.377Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_FJdBpaQyvK6Gcdul4D2HRChI",
                          "name": "Price less than 10",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "price": {
                              "conditions": {
                                "$less_than": [
                                  1000
                                ]
                              }
                            }
                          },
                          "created_at": "2022-03-17T07:11:25.406Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_4ndRXAsTOzwSdHcQcxf489uU",
                          "name": "Color is brown",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "metadata.color": {
                              "conditions": {
                                "$is": [
                                  "brown"
                                ]
                              }
                            }
                          },
                          "created_at": "2022-03-16T14:27:49.612Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_BxofAP7pyM9FO7M6iaIzIouy",
                          "name": "Color not brown",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "metadata.color": {
                              "conditions": {
                                "$is_not": [
                                  "brown"
                                ]
                              }
                            }
                          },
                          "created_at": "2022-03-16T13:49:05.697Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_uHpM9ipEQH2yEpm3D8aohkBM",
                          "name": "Price less than 20",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "price": {
                              "conditions": {
                                "$less_than": [
                                  2000
                                ]
                              }
                            }
                          },
                          "created_at": "2022-03-16T13:46:01.102Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_ZgM25PcZAMp6qItKJRtR2mEi",
                          "name": "Name starts with S",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "name": {
                              "conditions": {
                                "$starts_with": [
                                  "S"
                                ]
                              }
                            }
                          },
                          "created_at": "2022-03-16T13:42:35.917Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_41V4DiQQO8YGqj0J2oZD57j4",
                          "name": "Ends with baby",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "source_id": {
                              "conditions": {
                                "$ends_with": [
                                  "baby"
                                ]
                              }
                            }
                          },
                          "created_at": "2022-03-14T12:50:19.885Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_0cRX5wAFt1R1R5Ir6WdTowui",
                          "name": "C start",
                          "type": "AUTO_UPDATE",
                          "filter": {
                            "junction": "and",
                            "name": {
                              "conditions": {
                                "$starts_with": [
                                  "C"
                                ]
                              }
                            }
                          },
                          "created_at": "2022-03-14T12:18:15.588Z",
                          "object": "products_collection"
                        },
                        {
                          "id": "pc_bQ2p9TycbEhd3YzwFCR3JQYA",
                          "name": "Shirts",
                          "type": "STATIC",
                          "products": [
                            {
                              "id": "prod_0a9f9aeddb019a42db",
                              "object": "product"
                            },
                            {
                              "id": "prod_0a9f9ab4ab019a42d5",
                              "object": "product"
                            }
                          ],
                          "created_at": "2022-02-28T11:42:12.484Z",
                          "object": "products_collection"
                        }
                      ],
                      "total": 9
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-product-collection",
        "tags": [
          "Product Collections"
        ],
        "summary": "Create Product Collection",
        "description": "This method creates a new product collection.",
        "responses": {
          "200": {
            "description": "Returns information about the newly created collection, as well as an array containing the products.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCollectionsCreateResponseBody"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "product-collections"
            ]
          }
        ],
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductCollectionsCreateRequestBody"
              }
            }
          }
        }
      }
    },
    "/v1/product-collections/{productCollectionId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProductCollectionId"
          },
          "name": "productCollectionId",
          "in": "path",
          "required": true,
          "description": "A unique product collection ID."
        }
      ],
      "get": {
        "operationId": "get-product-collection",
        "tags": [
          "Product Collections"
        ],
        "summary": "Get Product Collection",
        "description": "Retrieves the product collection.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "product-collections"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a product collection object if a valid identifier was provided in the path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCollectionsGetResponseBody"
                },
                "examples": {
                  "Dynamic": {
                    "value": {
                      "id": "pc_Dj1qSH7bho4SVh7aSDKjU174",
                      "name": "Products in Poland",
                      "type": "AUTO_UPDATE",
                      "filter": {
                        "junction": "and",
                        "metadata.product_location": {
                          "conditions": {
                            "$in_location": [
                              "loc_RcYz537sV07e1t5aG5tIH9FD"
                            ]
                          }
                        }
                      },
                      "created_at": "2022-07-14T16:12:26.377Z",
                      "object": "products_collection"
                    }
                  },
                  "Static": {
                    "value": {
                      "id": "pc_bQ2p9TycbEhd3YzwFCR3JQYA",
                      "name": "Shirts",
                      "type": "STATIC",
                      "products": [
                        {
                          "id": "prod_0a9f9aeddb019a42db",
                          "object": "product"
                        },
                        {
                          "id": "prod_0a9f9ab4ab019a42d5",
                          "object": "product"
                        }
                      ],
                      "created_at": "2022-02-28T11:42:12.484Z",
                      "object": "products_collection"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting a product collection that has been deleted or does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find products_collection with id pc_41V4DiQQO8YGqj0J2oZD57j",
                      "request_id": "v-0b4ec2530e9646cb15",
                      "resource_id": "pc_41V4DiQQO8YGqj0J2oZD57j",
                      "resource_type": "products_collection"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-product-collection",
        "tags": [
          "Product Collections"
        ],
        "summary": "Delete Product Collection",
        "description": "This method deletes a product collection.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "product-collections"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "400": {
            "description": "Returns an error indicating that the product collection with given ID is in use by other resources.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceInUseError"
                },
                "examples": {
                  "Product Colllection In Use": {
                    "value": {
                      "code": 400,
                      "key": "resource_in_use",
                      "message": "Resource in use",
                      "details": "Resource products_collection with id pc_41V4DiQQO8YGqj0J2oZD57j4 is in use by validation_ruless with ids [val_9TB89AjZeVEJ]",
                      "request_id": "v-0ae3a63aff940ed1b2",
                      "related_object_ids": [
                        "val_9TB89AjZeVEJ"
                      ],
                      "related_object_type": "validation_rules"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the product collection with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Product Collection Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find products_collection with id pc_41V4DiQQO8YGqj0J2oZD57j",
                      "request_id": "v-0ae3a49261d027b870",
                      "resource_id": "pc_41V4DiQQO8YGqj0J2oZD57j",
                      "resource_type": "products_collection"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/product-collections/{productCollectionId}/products": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProductCollectionId"
          },
          "name": "productCollectionId",
          "in": "path",
          "required": true,
          "description": "Unique product collection ID."
        }
      ],
      "get": {
        "operationId": "list-products-in-collection",
        "tags": [
          "Product Collections"
        ],
        "summary": "List Products in Collection",
        "description": "Retrieves list of products from a product collection; works for both dynamic and static product collections.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/starting_after"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "product-collections"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of products and/or SKUs grouped in the collection with each product's/SKU's details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCollectionsProductsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "prod_0bae45ffc7003ffc52",
                          "source_id": "second_product",
                          "name": "Samsung Phone 2",
                          "price": 230000,
                          "attributes": [
                            "color",
                            "memory",
                            "processor"
                          ],
                          "metadata": {
                            "test": true,
                            "vendor": "Online Store - 4"
                          },
                          "image_url": "{{internalVoucherifyURL}}",
                          "created_at": "2022-09-12T14:44:13.212Z",
                          "updated_at": null,
                          "object": "product"
                        },
                        {
                          "id": "sku_0bae3b28f610fd0da1",
                          "source_id": "first_product_sku_1",
                          "product_id": "prod_0bae2dc5a090fd0184",
                          "sku": "Samsung phone 256GB",
                          "price": 210000,
                          "attributes": {
                            "color": "vintage-black",
                            "memory": "256",
                            "processor": "Intel"
                          },
                          "image_url": "{{internalVoucherifyURL}}",
                          "metadata": {
                            "test": false,
                            "vendor": "Online Stores",
                            "imported": true
                          },
                          "created_at": "2022-09-12T13:56:51.828Z",
                          "updated_at": "2022-09-12T14:09:40.859Z",
                          "object": "sku",
                          "product": {
                            "id": "prod_0bae2dc5a090fd0184",
                            "source_id": "first_product",
                            "name": "Samsung Phone",
                            "price": null,
                            "attributes": [],
                            "metadata": {},
                            "object": "product"
                          }
                        },
                        {
                          "id": "prod_0bae2dc5a090fd0184",
                          "source_id": "first_product",
                          "name": "Samsung Phone 1",
                          "price": 220000,
                          "attributes": [
                            "color",
                            "memory",
                            "processor"
                          ],
                          "metadata": {
                            "test": true,
                            "vendor": "Online Store - 3"
                          },
                          "image_url": "{{internalVoucherifyURL}}",
                          "created_at": "2022-09-12T12:58:22.232Z",
                          "updated_at": "2022-09-12T14:44:13.208Z",
                          "object": "product"
                        },
                        {
                          "id": "sku_0b7d7dfb090be5c619",
                          "source_id": "ComicBook_1",
                          "product_id": "prod_0b7d7dfb05cbe5c616",
                          "sku": "Comics1",
                          "price": 1700,
                          "attributes": {},
                          "image_url": null,
                          "metadata": {
                            "color": [
                              "golden"
                            ],
                            "vendor": "islands"
                          },
                          "created_at": "2022-08-05T17:23:14.084Z",
                          "updated_at": "2022-09-09T09:24:43.806Z",
                          "object": "sku",
                          "product": {
                            "id": "prod_0b7d7dfb05cbe5c616",
                            "source_id": "Books",
                            "name": "Comic Books1",
                            "price": null,
                            "attributes": [],
                            "metadata": {},
                            "object": "product"
                          }
                        },
                        {
                          "id": "prod_0b7d7dfb05cbe5c616",
                          "source_id": "Books",
                          "name": "Comic Books1",
                          "price": 2100,
                          "attributes": [],
                          "metadata": {
                            "color": [
                              "silver"
                            ],
                            "vendor": "Bookstore1"
                          },
                          "image_url": "https://www.images.com/image1.png",
                          "created_at": "2022-08-05T17:23:14.071Z",
                          "updated_at": "2022-09-09T09:24:43.728Z",
                          "object": "product"
                        },
                        {
                          "id": "prod_0b7d7c4e814be5c502",
                          "source_id": "prod_1",
                          "name": "Apple iPhone 12",
                          "price": 60000,
                          "attributes": [],
                          "metadata": {
                            "color": [
                              "purple"
                            ],
                            "vendor": "mall"
                          },
                          "image_url": null,
                          "created_at": "2022-08-05T17:15:55.270Z",
                          "updated_at": "2022-09-09T09:24:43.704Z",
                          "object": "product"
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting a product collection that has been deleted or does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find products_collection with id pc_M5XgaWPx3Sl4v26atA15zFj",
                      "request_id": "v-0b4ec6429e5646d089",
                      "resource_id": "pc_M5XgaWPx3Sl4v26atA15zFj",
                      "resource_type": "products_collection"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/validation-rules": {
      "get": {
        "operationId": "list-validation-rules",
        "tags": [
          "Validation Rules"
        ],
        "summary": "List Validation Rules",
        "description": "Retrieve validation rules.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListValidationRules"
            },
            "in": "query",
            "name": "order",
            "description": "This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash `-` preceding a sorting option means sorting in a descending order."
          },
          {
            "name": "start_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "description": "Timestamp representing the date and time which results must start on. Represented in ISO 8601 format."
          },
          {
            "name": "end_date",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "description": "Timestamp representing the date and time which results must end on. Represented in ISO 8601 format."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of validation rules.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationRulesListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "val_auLlxlfTR9Ps",
                          "name": "Customer in Segment",
                          "rules": {
                            "1": {
                              "name": "customer.segment",
                              "rules": {},
                              "property": null,
                              "conditions": {
                                "$is": [
                                  "seg_18tD3HR0h8ymPC07rBMLryk3"
                                ]
                              }
                            },
                            "logic": "1"
                          },
                          "applicable_to": {
                            "excluded": [],
                            "included": [],
                            "included_all": false
                          },
                          "created_at": "2021-12-10T11:08:16.499Z",
                          "updated_at": "2021-12-10T12:01:41.665Z",
                          "type": "advanced",
                          "context_type": "earning_rule.order.paid",
                          "assignments_count": 1,
                          "object": "validation_rules"
                        },
                        {
                          "id": "val_AvIe1WWuBXre",
                          "name": "Order Volume - Price of Any Item - = 1500 USD",
                          "rules": {
                            "1": {
                              "name": "order.items.price_any",
                              "rules": {},
                              "property": null,
                              "conditions": {
                                "$is": [
                                  150000
                                ]
                              }
                            },
                            "logic": "1"
                          },
                          "applicable_to": {
                            "excluded": [],
                            "included": [],
                            "included_all": false
                          },
                          "created_at": "2021-12-13T06:54:06.864Z",
                          "type": "advanced",
                          "context_type": "reward_assignment.pay_with_points",
                          "object": "validation_rules"
                        },
                        {
                          "id": "val_aZhPe4tQYMgr",
                          "name": "Business Validation Rule - excluded",
                          "rules": {
                            "logic": ""
                          },
                          "applicable_to": {
                            "excluded": [
                              {
                                "object": "products_collection",
                                "id": "pc_7fVU2RxybhR66YxC7r7BKKRh",
                                "source_id": null
                              },
                              {
                                "object": "sku",
                                "id": "sku_0bae3b28f610fd0da1",
                                "source_id": "first_product_sku_1"
                              }
                            ],
                            "included": [],
                            "included_all": true
                          },
                          "created_at": "2022-09-13T14:38:33.710Z",
                          "type": "basic",
                          "context_type": "campaign.discount_coupons.discount.apply_to_items_by_quantity",
                          "assignments_count": 1,
                          "object": "validation_rules"
                        },
                        {
                          "id": "val_bbJCAXAWtYX0",
                          "name": "Business Validation Rule - Test - Discount Effect - Amount - Items - each unit of matched product",
                          "rules": {
                            "logic": ""
                          },
                          "applicable_to": {
                            "excluded": [],
                            "included": [
                              {
                                "object": "products_collection",
                                "id": "pc_a11pr0dUc75",
                                "source_id": null,
                                "effect": "APPLY_TO_EVERY",
                                "quantity_limit": 1
                              }
                            ],
                            "included_all": false
                          },
                          "created_at": "2022-09-02T17:04:23.814Z",
                          "type": "basic",
                          "context_type": "campaign.discount_coupons.discount.apply_to_items_by_quantity",
                          "assignments_count": 1,
                          "object": "validation_rules"
                        },
                        {
                          "id": "val_BkV21MUJGaiT",
                          "name": "Order Volume -  Total Amount More than 100",
                          "rules": {
                            "1": {
                              "name": "order.amount",
                              "rules": {},
                              "property": null,
                              "conditions": {
                                "$more_than": [
                                  10000
                                ]
                              }
                            },
                            "logic": "1"
                          },
                          "applicable_to": {
                            "excluded": [],
                            "included": [],
                            "included_all": false
                          },
                          "created_at": "2021-12-10T14:01:10.750Z",
                          "type": "advanced",
                          "context_type": "reward_assignment.pay_with_points",
                          "object": "validation_rules"
                        },
                        {
                          "id": "val_BTQg027UGl0v",
                          "name": "Business Validation Rule - Get some $ off",
                          "rules": {
                            "logic": ""
                          },
                          "applicable_to": {
                            "excluded": [],
                            "included": [
                              {
                                "object": "product",
                                "id": "prod_0a41dd45dc85fcab40",
                                "source_id": "10474"
                              }
                            ],
                            "included_all": false
                          },
                          "created_at": "2021-12-07T06:58:23.759Z",
                          "updated_at": "2021-12-22T08:11:18.773Z",
                          "type": "advanced",
                          "context_type": "campaign.discount_coupons.discount.apply_to_items",
                          "assignments_count": 1,
                          "object": "validation_rules"
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-validation-rules",
        "tags": [
          "Validation Rules"
        ],
        "summary": "Create Validation Rules",
        "description": "Create a validation rule.\n> 🚧 Managing validation rules\n>\n> It is recommended to [create validation rules](https://support.voucherify.io/article/148-how-to-build-a-rule) in the Voucherify dashboard. The rule builder in the dashboard helps configuring the desired conditions in a convenient way. The API should not be used as a preferable way to create and manage validation rules.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationRulesCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Set of Validation Rules",
                    "error": {
                      "message": "Your order does not meet at least one of the required criteria."
                    },
                    "applicable_to": {
                      "included_all": false,
                      "excluded": [
                        {
                          "object": "product",
                          "id": "prod_0bae45ffc7003ffc52",
                          "source_id": "second_product",
                          "effect": "APPLY_TO_EVERY"
                        }
                      ],
                      "included": [
                        {
                          "object": "product",
                          "id": "prod_0b72b00ffed198e344",
                          "source_id": null,
                          "effect": "APPLY_TO_MOST_EXPENSIVE",
                          "quantity_limit": 1
                        },
                        {
                          "object": "products_collection",
                          "id": "pc_4ndRXAsTOzwSdHcQcxf489uU",
                          "source_id": null,
                          "effect": "APPLY_TO_EVERY",
                          "quantity_limit": 5
                        }
                      ]
                    },
                    "rules": {
                      "1": {
                        "name": "order.metadata",
                        "property": "location",
                        "rules": {},
                        "conditions": {
                          "$is": [
                            "Santorini"
                          ]
                        },
                        "error": {
                          "message": "Your order must be placed at one of our Santorini shops."
                        }
                      },
                      "2": {
                        "name": "custom_event.metadata",
                        "property": "test",
                        "rules": {},
                        "conditions": {
                          "$greater_than_or_equal": [
                            1
                          ]
                        }
                      },
                      "3": {
                        "name": "order.items.every",
                        "rules": {
                          "1": {
                            "name": "order.items.metadata",
                            "property": "test",
                            "rules": {},
                            "conditions": {
                              "$greater_than_or_equal": [
                                1
                              ]
                            }
                          }
                        },
                        "conditions": {
                          "$is": [
                            {
                              "id": "<PROD_ID>",
                              "effect": "APPLY_TO_EVERY",
                              "object": "product",
                              "source_id": "<SOURCE_ID>"
                            }
                          ]
                        }
                      },
                      "logic": "1 or 2"
                    }
                  }
                }
              }
            }
          },
          "description": "Specify the validation rules parameters."
        },
        "responses": {
          "200": {
            "description": "Returns a validation rule object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationRulesCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "val_eR1c41hu0vUU",
                      "name": "Business Validation Rule",
                      "rules": {
                        "1": {
                          "name": "string",
                          "property": "string",
                          "conditions": {
                            "$one_of_voucherify_conditions": [
                              "string"
                            ]
                          },
                          "rules": {
                            "1": {
                              "name": "string",
                              "property": "string",
                              "conditions": {},
                              "rules": {}
                            },
                            "logic": "string"
                          },
                          "error": {
                            "message": "string"
                          }
                        },
                        "logic": "(1 and 2) and (3)"
                      },
                      "error": {
                        "message": "string"
                      },
                      "applicable_to": {
                        "excluded": [
                          {
                            "object": "product",
                            "id": "string",
                            "source_id": "string",
                            "effect": "APPLY_TO_EVERY"
                          }
                        ],
                        "included": [
                          {
                            "object": "product",
                            "id": "string",
                            "source_id": "string",
                            "effect": "APPLY_TO_EVERY",
                            "quantity_limit": 0
                          }
                        ],
                        "included_all": true
                      },
                      "created_at": "2022-03-23T07:44:00.444Z",
                      "updated_at": "2022-04-26T08:35:54.960Z",
                      "type": "basic",
                      "context_type": "earning_rule.order.paid",
                      "object": "validation_rules"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the request parameters were not specified correctly.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_validation_rules"
                },
                "examples": {
                  "Invalid Validation Rules": {
                    "value": {
                      "code": 400,
                      "key": "invalid_validation_rules",
                      "message": "Invalid Validation Rule Definition",
                      "details": "Rule 'custom_event.metadata' must have a 'property'"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/validation-rules/{validationRuleId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterValidationRuleId"
          },
          "name": "validationRuleId",
          "in": "path",
          "required": true,
          "description": "A unique validation rule ID."
        }
      ],
      "get": {
        "operationId": "get-validation-rule",
        "tags": [
          "Validation Rules"
        ],
        "summary": "Get Validation Rule",
        "description": "Retrieve the details of a validation rule.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the validation rule object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationRulesGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "val_TU4de3EP4dlL",
                      "name": "Order is less than $40",
                      "rules": {
                        "1": {
                          "name": "order.amount",
                          "property": null,
                          "conditions": {
                            "$less_than": [
                              4000
                            ]
                          },
                          "rules": {}
                        },
                        "logic": "1"
                      },
                      "applicable_to": {
                        "excluded": [],
                        "included": [],
                        "included_all": false
                      },
                      "created_at": "2022-08-11T16:42:13.630Z",
                      "type": "advanced",
                      "context_type": "reward_assignment.pay_with_points",
                      "object": "validation_rules"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-validation-rule",
        "tags": [
          "Validation Rules"
        ],
        "summary": "Update Validation Rule",
        "description": "Update validation rule parameters.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the parameters to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationRulesUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Set of Validation Rules Updated",
                    "error": {
                      "message": "Your orders do not meet at least one of the required criteria."
                    },
                    "applicable_to": {
                      "included_all": false,
                      "excluded": [
                        {
                          "object": "product",
                          "id": "prod_0bae45ffc7003ffccc",
                          "source_id": "second_product",
                          "effect": "APPLY_TO_EVERY"
                        }
                      ],
                      "included": [
                        {
                          "object": "product",
                          "id": "prod_0b72b00ffed198e333",
                          "source_id": null,
                          "effect": "APPLY_TO_CHEAPEST",
                          "quantity_limit": 1
                        },
                        {
                          "object": "products_collection",
                          "id": "pc_4ndRXAsTOzwSdHcQcxf489uU",
                          "source_id": null,
                          "effect": "APPLY_TO_EVERY",
                          "quantity_limit": 5
                        }
                      ]
                    },
                    "rules": {
                      "1": {
                        "name": "order.metadata",
                        "property": "place",
                        "rules": {},
                        "conditions": {
                          "$is": [
                            "Santorini"
                          ]
                        },
                        "error": {
                          "message": "Your order must be placed at one of our Santorini shops on the beach."
                        }
                      },
                      "2": {
                        "name": "custom_event.metadata",
                        "property": "lining",
                        "rules": {},
                        "conditions": {
                          "$greater_than_or_equal": [
                            1
                          ]
                        }
                      },
                      "3": {
                        "name": "order.items.every",
                        "rules": {
                          "1": {
                            "name": "order.items.metadata",
                            "property": "test",
                            "rules": {},
                            "conditions": {
                              "$greater_than_or_equal": [
                                1
                              ]
                            }
                          }
                        },
                        "conditions": {
                          "$is": [
                            {
                              "id": "<PRODs_ID>",
                              "effect": "APPLY_TO_EVERY",
                              "object": "product",
                              "source_id": "<SOURCEs_ID>"
                            }
                          ]
                        }
                      },
                      "logic": "1 and 2"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the validation rule object with the updated parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationRulesUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "val_VZ91fqqtoVmw",
                      "name": "Set of Validation Rules Updated",
                      "rules": {
                        "1": {
                          "name": "order.metadata",
                          "property": "place",
                          "conditions": {
                            "$is": [
                              "Santorini"
                            ]
                          },
                          "rules": {},
                          "error": {
                            "message": "Your order must be placed at one of our Santorini shops on the beach."
                          }
                        },
                        "2": {
                          "name": "custom_event.metadata",
                          "property": "lining",
                          "conditions": {
                            "$greater_than_or_equal": [
                              1
                            ]
                          },
                          "rules": {}
                        },
                        "3": {
                          "name": "order.items.every",
                          "conditions": {
                            "$is": [
                              {
                                "id": "<PRODs_ID>",
                                "effect": "APPLY_TO_EVERY",
                                "object": "product",
                                "source_id": "<SOURCEs_ID>"
                              }
                            ]
                          },
                          "rules": {
                            "1": {
                              "name": "order.items.metadata",
                              "property": "test",
                              "conditions": {
                                "$greater_than_or_equal": [
                                  1
                                ]
                              },
                              "rules": {}
                            }
                          }
                        },
                        "logic": "1 and 2"
                      },
                      "error": {
                        "message": "Your orders do not meet at least one of the required criteria."
                      },
                      "applicable_to": {
                        "excluded": [
                          {
                            "object": "product",
                            "id": "prod_0bae45ffc7003ffccc",
                            "source_id": "second_product",
                            "effect": "APPLY_TO_EVERY"
                          }
                        ],
                        "included": [
                          {
                            "object": "product",
                            "id": "prod_0b72b00ffed198e333",
                            "source_id": null,
                            "effect": "APPLY_TO_CHEAPEST",
                            "quantity_limit": 1
                          },
                          {
                            "object": "products_collection",
                            "id": "pc_4ndRXAsTOzwSdHcQcxf489uU",
                            "source_id": null,
                            "effect": "APPLY_TO_EVERY",
                            "quantity_limit": 5
                          }
                        ],
                        "included_all": false
                      },
                      "created_at": "2022-09-14T05:54:51.099Z",
                      "updated_at": "2022-09-14T06:06:32.855Z",
                      "type": "complex",
                      "context_type": "global",
                      "object": "validation_rules"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-validation-rules",
        "tags": [
          "Validation Rules"
        ],
        "summary": "Delete Validation Rule",
        "description": "This method deletes a validation rule.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the validation rule with the given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Validation Rule Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find validation_rules with id val_TGN3rqZ8vEm",
                      "request_id": "v-0ae3b3436346b778be",
                      "resource_id": "val_TGN3rqZ8vEm",
                      "resource_type": "validation_rules"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/validation-rules-assignments": {
      "get": {
        "operationId": "list-validation-rules-assignments",
        "tags": [
          "Validation Rules"
        ],
        "summary": "List Validation Rules' Assignment(s)",
        "description": "List all validation rules' assignments or filter the results using the related object ID or the validation rule ID query parameters. \n\n## How to retrieve specific validation rule assignments(s)\n\n### Related object ID\n\nTo find an assignment for a particular resource, you can use the ID of the object to which the validation rule was assigned. This could be, for example, an ID of a: voucher, campaign, distribution, reward assignment, earning rule, promotion tier.  \n\n\n\n```json\n{\n    \"object\": \"list\",\n    \"data_ref\": \"data\",\n    \"data\": [\n        {\n            \"id\": \"asgm_vef0G6d9Al0rABxq\",\n            \"rule_id\": \"val_ZEZmA9oit8aU\",\n            \"related_object_id\": \"camp_rRsfatlwN7unSeUIJDCYedal\",\n            \"related_object_type\": \"campaign\",\n            \"created_at\": \"2022-06-29T11:43:52.953Z\",\n            \"object\": \"validation_rules_assignment\"\n        },\n        {\n            \"id\": \"asgm_sFV4wEFvldwIvgfb\",\n            \"rule_id\": \"val_ZEZmA9oit8aU\",\n            \"related_object_id\": \"distr_9QKI02wqgjWyvZXeQkFEPmkkYe\",\n            \"related_object_type\": \"distribution\",\n            \"created_at\": \"2022-06-29T11:41:07.680Z\",\n            \"object\": \"validation_rules_assignment\"\n        },\n        {\n            \"id\": \"asgm_69Qifyv6UZynFIIQ\",\n            \"rule_id\": \"val_ZEZmA9oit8aU\",\n            \"related_object_id\": \"promo_g83qUzYZpfX0OMAFOVoQuOYG\",\n            \"related_object_type\": \"promotion_tier\",\n            \"created_at\": \"2022-06-29T11:29:41.906Z\",\n            \"object\": \"validation_rules_assignment\"\n        }\n    ],\n    \"total\": 3\n}\n```\n",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "related_object_id",
            "description": "The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterValidationRuleId"
            },
            "in": "query",
            "name": "rule",
            "description": "Validation rule ID."
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "description": "Sorts the results using one of the filtering options: `-created_at`, `created_at`, where the dash `-` preceding a sorting option means sorting in a descending order.",
            "name": "order"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules-assignments"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with a data property that contains an array of validation rule assignments. Each entry in the array is a separate object. If no more validation rule assignments are available, the resulting array will be empty. The result can be narrowed down according to default filters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationRulesAssignmentsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "asgm_2S7Xm4dab4UvYAgm",
                          "rule_id": "val_5ix74ru7e",
                          "related_object_id": "camp_YDsFdX8TgFtT0RUuKEFyhqs3",
                          "related_object_type": "campaign",
                          "created_at": "2022-02-08T10:49:30.534Z",
                          "object": "validation_rules_assignment"
                        },
                        {
                          "id": "asgm_sFV4wEFvldwIvgfb",
                          "rule_id": "val_ZEZmA9oit8aU",
                          "related_object_id": "distr_9QKI02wqgjWyvZXeQkFEPmkkYe",
                          "related_object_type": "distribution",
                          "created_at": "2022-06-29T11:41:07.680Z",
                          "object": "validation_rules_assignment"
                        },
                        {
                          "id": "asgm_8xelF5R4zB8ue168",
                          "rule_id": "val_ggDODO6fakMs",
                          "related_object_id": "ern_xrRuGEV7EW0X8wtMaze3HOfw",
                          "related_object_type": "earning_rule",
                          "created_at": "2022-02-28T12:25:56.783Z",
                          "object": "validation_rules_assignment"
                        },
                        {
                          "id": "asgm_tZaqxeO8gP4q91jG",
                          "rule_id": "val_WB6ETAiFztw5",
                          "related_object_id": "promo_kJliy076IuJYtuYWSHE9fSuT",
                          "related_object_type": "promotion_tier",
                          "created_at": "2022-08-10T10:30:39.986Z",
                          "object": "validation_rules_assignment"
                        },
                        {
                          "id": "asgm_xTMHiyPGSz3rp5m2",
                          "rule_id": "val_2AxnWmW2ra6X",
                          "related_object_id": "rewa_m9hEAu10KsPcLhGXiHG85aY0",
                          "related_object_type": "reward_assignment",
                          "created_at": "2021-12-10T11:38:35.922Z",
                          "object": "validation_rules_assignment"
                        },
                        {
                          "id": "asgm_DhlDn54JwqVFJzR6",
                          "rule_id": "val_eR1c41hu0vUU",
                          "related_object_id": "v_XuF7icVlUcVpHsSY9nG7n7yJa5wx27Va",
                          "related_object_type": "voucher",
                          "created_at": "2022-03-23T07:50:31.068Z",
                          "object": "validation_rules_assignment"
                        }
                      ],
                      "total": 6
                    }
                  },
                  "No Assignments": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [],
                      "total": 0
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/validation-rules/{validationRuleId}/assignments": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterValidationRuleId"
          },
          "name": "validationRuleId",
          "in": "path",
          "required": true,
          "description": "Unique validation rule ID."
        }
      ],
      "get": {
        "operationId": "list-validation-rule-assignments",
        "tags": [
          "Validation Rules"
        ],
        "summary": "List Validation Rule Assignments",
        "description": "Retrieve validation rule assignments for a specific validation rule.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListValidationRuleAssignments"
            },
            "in": "query",
            "name": "order",
            "description": "This is a property that controls the sorting direction of the results. Sort 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",
              "validation-rules"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of validation rule assignments.  If the validation rule ID provided in the path parameter cannot be found, the endpoint will return an empty `data` array and a total of `0`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationRulesAssignmentsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "asgm_74F7QZoYbUoljwQO",
                          "rule_id": "val_4j7DCRm2IS59",
                          "related_object_id": "v_MBOEmHelKwvykVZ8JcT4TE5Kla5IMJyc",
                          "related_object_type": "voucher",
                          "created_at": "2022-02-17T09:05:34.642Z",
                          "object": "validation_rules_assignment"
                        },
                        {
                          "id": "asgm_zzLBm8mIzGQStXl9",
                          "rule_id": "val_4j7DCRm2IS59",
                          "related_object_id": "v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT",
                          "related_object_type": "voucher",
                          "created_at": "2022-02-17T08:18:15.085Z",
                          "object": "validation_rules_assignment"
                        },
                        {
                          "id": "asgm_JztMAws0e0Qx2Xy6",
                          "rule_id": "val_4j7DCRm2IS59",
                          "related_object_id": "camp_kjja4moiVB7hQKPGOT61026Z",
                          "related_object_type": "campaign",
                          "created_at": "2022-02-15T13:26:34.807Z",
                          "object": "validation_rules_assignment"
                        }
                      ],
                      "total": 3
                    }
                  },
                  "No Assignments": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [],
                      "total": 0
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-validation-rule-assignment",
        "tags": [
          "Validation Rules"
        ],
        "summary": "Create Validation Rules Assignments",
        "description": "Assign validation rule to either one of the following objects: voucher, campaign, promotion tier, earning rule, reward, distribution.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "description": "If this flag is set to `true`, the previous assignment with the same data will be deleted and a new one will be added.",
            "name": "force"
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the resource that you would like to assign the validation rule to.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidationRulesAssignmentsCreateRequestBody"
              },
              "examples": {
                "Voucher": {
                  "value": {
                    "voucher": "v_ssR6vhswwh5odSloN2Vc3O60w7aea018"
                  }
                },
                "Campaign": {
                  "value": {
                    "campaign": "camp_Rv9EuIrkT08YEORb2pUMGSUo"
                  }
                },
                "Distribution": {
                  "value": {
                    "distribution": "distr_2nUIekYnS9L1Vm1I55vmC7kSvd"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a validation rules assignment object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationRulesAssignmentsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "asgm_kPPiNW3smQLRMWiF",
                      "rule_id": "val_ZEZmA9oit8aU",
                      "related_object_id": "camp_Rv9EuIrkT08YEORb2pUMGSUo",
                      "related_object_type": "campaign",
                      "created_at": "2022-09-14T07:06:49.557Z",
                      "object": "validation_rules_assignment"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if an duplicate assignment is found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated validation_rules_assignment exists with id asgm_ixJEwQbUv8hfPlhO",
                      "request_id": "v-0bb06fd1c3478dcb47",
                      "resource_id": "asgm_ixJEwQbUv8hfPlhO",
                      "resource_type": "validation_rules_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/validation-rules/{validationRuleId}/assignments/{assignmentId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterValidationRuleId"
          },
          "name": "validationRuleId",
          "in": "path",
          "required": true,
          "description": "A unique validation rule ID."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRewardAssignmentId"
          },
          "name": "assignmentId",
          "in": "path",
          "required": true,
          "description": "A unique validation rule assignment ID."
        }
      ],
      "delete": {
        "operationId": "delete-validation-rule-assignment",
        "tags": [
          "Validation Rules"
        ],
        "summary": "Delete Validation Rule Assignment",
        "description": "This method deletes a validation rule assignment.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "validation-rules"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the validation rule or validation rule assignment with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Validation Rule Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find validation_rules with id val_4j7DCRm2IS5",
                      "request_id": "v-0ae3b84bac0683f697",
                      "resource_id": "val_4j7DCRm2IS5",
                      "resource_type": "validation_rules"
                    }
                  },
                  "Validation Rule Assignment Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find validation_rules_assignment with id asgm_tDN7MJNayjrf1wy",
                      "request_id": "v-0ae3b87eeb9027c916",
                      "resource_id": "asgm_tDN7MJNayjrf1wy",
                      "resource_type": "validation_rules_assignment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/segments/{segmentId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterSegmentId"
          },
          "name": "segmentId",
          "in": "path",
          "required": true,
          "description": "A unique customer segment ID."
        }
      ],
      "get": {
        "operationId": "get-segment",
        "tags": [
          "Segments"
        ],
        "summary": "Get Segment",
        "description": "Retrieves the segment with given segment ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "segments"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns segment object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentsGetResponseBody"
                },
                "examples": {
                  "Tier Segment": {
                    "value": {
                      "id": "seg_Mv5w1b2FIEbiCCO5ioT8TfI2",
                      "name": "Tiers 2 - Senior",
                      "created_at": "2022-06-09T13:21:26.656Z",
                      "type": "auto-update",
                      "filter": {
                        "junction": "and",
                        "loyalty_points.campaigns.Tiers 2.points": {
                          "conditions": {
                            "$more_than_equal": [
                              41
                            ]
                          }
                        }
                      },
                      "initial_sync_status": "DONE",
                      "object": "segment"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when requesting a segment that has been deleted or does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find segment with id seg_Mv5w1b2FIEbiCCO5ioT8TfI",
                      "request_id": "v-0b4d7a37a105797650",
                      "resource_id": "seg_Mv5w1b2FIEbiCCO5ioT8TfI",
                      "resource_type": "segment"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-segment",
        "tags": [
          "Segments"
        ],
        "summary": "Delete Segment",
        "description": "This method deletes a customer segment.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "segments"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the customer segment with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Customer Segment Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find segment with id seg_DNAOhUtJffvX0f57ajLMFBY",
                      "request_id": "v-0ae3bb40409027cb63",
                      "resource_id": "seg_DNAOhUtJffvX0f57ajLMFBY",
                      "resource_type": "segment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/segments": {
      "post": {
        "operationId": "create-segment",
        "tags": [
          "Segments"
        ],
        "summary": "Create Segment",
        "description": "Create a customer segment.\n\n> 🚧 Limit on Static Segments\n>\n> There is a cap on the number of customers that you can assign to a static segment: **20,000**. If you would like to create a bigger segment, then you can use the unlimited auto-update segment instead and use some customer metadata to build this segment.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "segments"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the boundary conditions for the customer segment.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SegmentsCreateRequestBody"
              },
              "examples": {
                "Static Segment": {
                  "value": {
                    "name": "Customers in a new Segment",
                    "type": "static",
                    "customers": [
                      "cust_iajsExT2QB4sGWzABY85WRqV",
                      "cust_sehkNIi8Uq2qQuRqSr7xn4Zi"
                    ]
                  }
                },
                "Dynamic - customers created after a specific date": {
                  "value": {
                    "name": "Customers in a new Dynamic Segment",
                    "type": "auto-update",
                    "filter": {
                      "junction": "and",
                      "created_at": {
                        "conditions": {
                          "$after": [
                            "2021-12-01T00:00:00.000Z"
                          ]
                        }
                      }
                    }
                  }
                },
                "Dynamic - customers with birthday next month": {
                  "value": {
                    "name": "Customers in a new Dynamic Segment",
                    "type": "auto-update",
                    "filter": {
                      "junction": "and",
                      "birthdate": {
                        "conditions": {
                          "$next_month": [
                            true
                          ]
                        }
                      },
                      "address.country": {
                        "conditions": {
                          "$is": "Poland"
                        }
                      },
                      "metadata.club_level": {
                        "conditions": {
                          "$in": [
                            "Gold",
                            "Silver"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a customer segment object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SegmentsCreateResponseBody"
                },
                "examples": {
                  "Static": {
                    "value": {
                      "id": "seg_vC8iOSCqUG02EsPzsHynLv8i",
                      "name": "Customers in a new Segment",
                      "created_at": "2022-09-13T08:57:15.801Z",
                      "type": "static",
                      "filter": null,
                      "initial_sync_status": "DONE",
                      "object": "segment"
                    }
                  },
                  "Dynamic": {
                    "value": {
                      "id": "seg_nZULMFHhVWIFm9vQ0dytg83Q",
                      "name": "Customers in a new Dynamic Segment",
                      "created_at": "2022-09-13T09:03:32.764Z",
                      "type": "auto-update",
                      "filter": {
                        "junction": "and",
                        "created_at": {
                          "conditions": {
                            "$after": [
                              "2021-12-01T00:00:00.000Z"
                            ]
                          }
                        }
                      },
                      "initial_sync_status": "IN_PROGRESS",
                      "object": "segment"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "post": {
        "operationId": "track-custom-event",
        "tags": [
          "Events"
        ],
        "summary": "Track Custom Event",
        "description": "To track a custom event, you create an event object.  \n\nThe event object must be linked to the customer who performs the action. If a customer doesn't exist in Voucherify, the customer will be created.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "events"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the custom event.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventsCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "event": "event-name",
                    "customer": {
                      "source_id": "referee-source_id"
                    },
                    "referral": {
                      "code": "voucher-code",
                      "referrer_id": "referrer-source_id"
                    }
                  }
                },
                "Referral triggered by custom event": {
                  "value": {
                    "event": "user_subscribed",
                    "customer": {
                      "source_id": "source_customer_event"
                    },
                    "referral": {
                      "code": "46jL0kYI",
                      "referrer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
                    },
                    "metadata": {
                      "login": "bob",
                      "pricing_plan": "PP1",
                      "volume_number": 4
                    }
                  }
                },
                "Earning rule triggered by custom event": {
                  "value": {
                    "event": "cart_abandoned",
                    "customer": {
                      "source_id": "source_customer_event"
                    },
                    "loyalty": {
                      "code": "6CB4KDAu"
                    },
                    "metadata": {
                      "date": "2022-12-01",
                      "flag": true,
                      "text": "Cart abandoned event",
                      "date_time": "2022-12-01T09:24:33.061Z",
                      "number": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the event type if the event was received by the application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "event",
                      "type": "cart_abandoned",
                      "customer": {
                        "id": "cust_ypePCF6IU6fnUvec6RMXZuH4",
                        "name": "John Doe",
                        "email": "john@voucherify.io",
                        "source_id": "source_customer_event",
                        "metadata": {
                          "prop": "value"
                        },
                        "object": "customer"
                      },
                      "referral": null,
                      "loyalty": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the request payload is incomplete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id registered_10055",
                      "request_id": "v-0dc6ead2680056a15a",
                      "resource_id": "registered_10055",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/async-actions": {
      "get": {
        "operationId": "list-async-actions",
        "tags": [
          "Async Actions"
        ],
        "summary": "List Async Actions",
        "description": "Track asynchronous operations scheduled in your project.  \n\nThe table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](https://support.voucherify.io/article/574-data-import).\n\n| **Types by Context** | **Endpoint** |\n|:---|:---|\n| **CAMPAIGN** |  |\n| CAMPAIGN.VOUCHERS_IMPORT | **POST**   [/vouchers/metadata/async](ref:update-vouchers-metadata-in-bulk) | \n| **ORDERS** |  |\n| ORDERS.IMPORT | **POST** [/orders/import](ref:import-orders) |\n| **METADATA KEY PURGE** |  |\n| CAMPAIGNS.METADATA_KEY_PURGE<br>CUSTOMERS.METADATA_KEY_PURGE<br>PRODUCTS.METADATA_KEY_PURGE<br>VOUCHERS.METADATA_KEY_PURGE<br>ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > [Project Settings](https://support.voucherify.io/article/99-schema-validation-metadata#maintenance) |",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimit"
            },
            "in": "query",
            "name": "limit",
            "description": "Limit the number of asynchronous actions that the API returns in the response."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "in": "query",
            "name": "end_date",
            "description": "Limits results to actions scheduled before the `end_date`. The date format needs to be consistent with ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`). "
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "async-actions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a list of all scheduled asynchronous actions and detailed information for each scheduled action. Note that a status `DONE`doesn't include the result of the completed action. If you need more information about the result, use the ID of the respective async action to call the [Get Async Action](ref:get-async-action) endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncActionsListResponseBody"
                },
                "examples": {
                  "List Async Actions": {
                    "value": {
                      "object": "list",
                      "data_ref": "async_actions",
                      "async_actions": [
                        {
                          "id": "aa_0ba518c55290c6fd62",
                          "type": "CUSTOMERS.BULK_UPDATE",
                          "status": "DONE",
                          "created_at": "2022-09-05T11:40:17.098Z",
                          "updated_at": "2022-09-05T11:40:17.887Z",
                          "request_id": "v-0ba518c52bc99858f0",
                          "progress": 100,
                          "object": "async_action"
                        },
                        {
                          "id": "aa_0ba50a7ff4d3574568",
                          "type": "CUSTOMERS.METADATA_UPDATE",
                          "status": "DONE",
                          "created_at": "2022-09-05T10:37:56.051Z",
                          "updated_at": "2022-09-05T10:37:56.862Z",
                          "request_id": "v-0ba50a7feb49984902",
                          "progress": 100,
                          "object": "async_action"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if incorrect query parameters were provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Query Parameters": {
                    "value": {
                      "code": 400,
                      "key": "invalid_query_params",
                      "message": "Invalid query params",
                      "details": "Property .end_date cannot be recognized as a ISO-8601 compliant date",
                      "request_id": "v-0c54493e444b0f61a6"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/async-actions/{asyncActionId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterAsyncActionId"
          },
          "name": "asyncActionId",
          "in": "path",
          "required": true,
          "description": "Unique ID of the asynchronous operation."
        }
      ],
      "get": {
        "operationId": "get-async-action",
        "tags": [
          "Async Actions"
        ],
        "summary": "Get Async Action",
        "description": "Check the result of a scheduled asynchronous operation.  \n\nThe table below lists the possible types of async actions. The types are different for each endpoint generating the async action. If you would like to learn more about importing data into Voucherify, read more [here](https://support.voucherify.io/article/574-data-import).\n\n| **Types by Context** | **Endpoint** |\n|:---|:---|\n| **CAMPAIGN** |  |\n| CAMPAIGN.VOUCHERS_IMPORT | **POST**   [/vouchers/metadata/async](ref:update-vouchers-metadata-in-bulk) | \n| **ORDERS** |  |\n| ORDERS.IMPORT | **POST** [/orders/import](ref:import-orders) |\n| **METADATA KEY PURGE** |  |\n| CAMPAIGNS.METADATA_KEY_PURGE<br>CUSTOMERS.METADATA_KEY_PURGE<br>PRODUCTS.METADATA_KEY_PURGE<br>VOUCHERS.METADATA_KEY_PURGE<br>ORDERS.METADATA_KEY_PURGE | No API endpoint equivalent. You can perform this action through the Dashboard. See Dashboard documentation: Dashboard > [Project Settings](https://support.voucherify.io/article/99-schema-validation-metadata#maintenance) |",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "async-actions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns detailed information about the async action result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncActionGetResponseBody"
                },
                "examples": {
                  "CAMPAIGN.VOUCHERS_IMPORT": {
                    "value": {
                      "id": "aa_0af9b22296cf473a10",
                      "type": "CAMPAIGN.VOUCHERS_IMPORT",
                      "status": "DONE",
                      "result": {
                        "message": "0 voucher(s) imported successfully, 3 failed.",
                        "failed": [
                          {
                            "code": "CODE9",
                            "reason": "unit: must be a number, property is required (actual value is 'EUR')"
                          },
                          {
                            "code": "CODE8",
                            "reason": "unit: must be a number, property is required (actual value is 'EUR')"
                          },
                          {
                            "code": "CODE7",
                            "reason": "unit: must be a number, property is required (actual value is 'EUR')"
                          }
                        ],
                        "done_count": 0,
                        "failed_count": 3
                      },
                      "created_at": "2023-01-20T07:23:43.289Z",
                      "updated_at": "2023-01-20T07:23:44.044Z",
                      "request_id": "v-0c553fdb325688d510",
                      "progress": 100,
                      "processing_time": 755,
                      "object": "async_action"
                    }
                  },
                  "CAMPAIGN.VOUCHERS_IMPORT_CSV": {
                    "value": {
                      "id": "aa_0c5543f00797b6113f",
                      "type": "CUSTOMERS.IMPORT_CSV",
                      "status": "DONE",
                      "result": {
                        "message": "0 customer(s) imported successfully, 2 failed.",
                        "failed": [
                          {
                            "source_id": "test-user@voucherify.io",
                            "row": 1,
                            "reason": "acquisition_channel: must be a string, property is required, must be equal to one of Facebook,Twitter,Website (actual value is 'snap')"
                          },
                          {
                            "source_id": "",
                            "row": 2,
                            "reason": "acquisition_channel: must be a string, property is required, must be equal to one of Facebook,Twitter,Website (actual value is 'insta')"
                          }
                        ],
                        "done_count": 0,
                        "failed_count": 2
                      },
                      "created_at": "2023-01-20T07:41:33.086Z",
                      "updated_at": "2023-01-20T07:41:33.216Z",
                      "request_id": "v-0c5543eff2cb0f547f",
                      "progress": 100,
                      "processing_time": 130,
                      "object": "async_action"
                    }
                  },
                  "CAMPAIGN.VOUCHERS_DELETE": {
                    "value": {
                      "id": "aa_0c553853d957b67bd4",
                      "type": "CAMPAIGN.VOUCHERS_DELETE",
                      "status": "DONE",
                      "result": {
                        "message": "Deleted 2 vouchers.",
                        "done_count": 2
                      },
                      "created_at": "2023-01-20T06:50:49.573Z",
                      "updated_at": "2023-01-20T06:50:50.053Z",
                      "request_id": "v-0c553853b5c418c826",
                      "progress": 100,
                      "processing_time": 480,
                      "object": "async_action"
                    }
                  },
                  "CAMPAIGN.VOUCHERS_UPDATE": {
                    "value": {
                      "id": "aa_0c5440c25c0e5728d0",
                      "type": "CAMPAIGN.VOUCHERS_UPDATE",
                      "status": "DONE",
                      "result": {
                        "message": "Updated 1 vouchers.",
                        "done_count": 1
                      },
                      "created_at": "2023-01-19T12:49:11.024Z",
                      "updated_at": "2023-01-19T12:49:11.852Z",
                      "request_id": "v-0c5440c24304189e44",
                      "progress": 100,
                      "processing_time": 828,
                      "object": "async_action"
                    }
                  },
                  "CAMPAIGN.VOUCHERS_GENERATE": {
                    "value": {
                      "id": "aa_0c54441d14d7b60014",
                      "type": "CAMPAIGN.VOUCHERS_GENERATE",
                      "status": "DONE",
                      "result": {
                        "message": "Generated 2 vouchers.",
                        "done_count": 2
                      },
                      "created_at": "2023-01-19T13:03:50.355Z",
                      "updated_at": "2023-01-19T13:03:51.030Z",
                      "request_id": "v-0c54441d0e4418b647",
                      "progress": 100,
                      "processing_time": 675,
                      "object": "async_action"
                    }
                  },
                  "CAMPAIGNS.METADATA_KEY_PURGE": {
                    "value": {
                      "id": "aa_0c554b22664a0eb5fc",
                      "type": "CAMPAIGNS.METADATA_KEY_PURGE",
                      "status": "DONE",
                      "result": {
                        "message": "Updated 0 campaigns.",
                        "done_count": 0
                      },
                      "created_at": "2023-01-20T08:12:59.673Z",
                      "updated_at": "2023-01-20T08:13:00.638Z",
                      "request_id": "w-0c554b225f8a0eb5fb",
                      "progress": 100,
                      "processing_time": 965,
                      "object": "async_action"
                    }
                  },
                  "CUSTOMERS.IMPORT_CSV": {
                    "value": {
                      "id": "aa_0c5543f00797b6113f",
                      "type": "CUSTOMERS.IMPORT_CSV",
                      "status": "DONE",
                      "result": {
                        "message": "0 customer(s) imported successfully, 2 failed.",
                        "failed": [
                          {
                            "source_id": "test-user@voucherify.io",
                            "row": 1,
                            "reason": "acquisition_channel: must be a string, property is required, must be equal to one of Facebook,Twitter,Website (actual value is 'snap')"
                          },
                          {
                            "source_id": "",
                            "row": 2,
                            "reason": "acquisition_channel: must be a string, property is required, must be equal to one of Facebook,Twitter,Website (actual value is 'insta')"
                          }
                        ],
                        "done_count": 0,
                        "failed_count": 2
                      },
                      "created_at": "2023-01-20T07:41:33.086Z",
                      "updated_at": "2023-01-20T07:41:33.216Z",
                      "request_id": "v-0c5543eff2cb0f547f",
                      "progress": 100,
                      "processing_time": 130,
                      "object": "async_action"
                    }
                  },
                  "CUSTOMERS.BULK_UPDATE": {
                    "value": {
                      "id": "aa_0c5547cc5e17b617b6",
                      "type": "CUSTOMERS.BULK_UPDATE",
                      "status": "DONE",
                      "operation_status": "SUCCESS",
                      "result": {
                        "done_count": 3,
                        "failed_count": 0,
                        "reports": [
                          "{{voucherify-link-to-report}}"
                        ],
                        "reports_available_till": "2024-11-06T08:26:13.304Z",
                        "errors": []
                      },
                      "created_at": "2023-01-20T07:58:25.144Z",
                      "updated_at": "2023-01-20T07:58:25.869Z",
                      "request_id": "v-0c5547cc4d8b0f5be4",
                      "progress": 100,
                      "processing_time": 725,
                      "object": "async_action"
                    }
                  },
                  "CUSTOMERS.METADATA_UPDATE": {
                    "value": {
                      "id": "aa_0c554a92030e576181",
                      "type": "CUSTOMERS.METADATA_UPDATE",
                      "status": "DONE",
                      "operation_status": "SUCCESS",
                      "result": {
                        "done_count": 3,
                        "failed_count": 0,
                        "reports": [
                          "{{voucherify-link-to-report}}"
                        ],
                        "reports_available_till": "2024-11-06T08:26:13.304Z",
                        "errors": []
                      },
                      "created_at": "2023-01-20T08:10:31.821Z",
                      "updated_at": "2023-01-20T08:10:32.564Z",
                      "request_id": "v-0c554a91fb4b0f61a2",
                      "progress": 100,
                      "processing_time": 743,
                      "object": "async_action"
                    }
                  },
                  "CUSTOMERS.METADATA_KEY_PURGE": {
                    "value": {
                      "id": "aa_0c5551f2ab0a0ebf0e",
                      "type": "CUSTOMERS.METADATA_KEY_PURGE",
                      "status": "DONE",
                      "result": {
                        "message": "Updated 0 customers.",
                        "done_count": 0
                      },
                      "created_at": "2023-01-20T08:42:45.804Z",
                      "updated_at": "2023-01-20T08:42:46.079Z",
                      "request_id": "w-0c5551f2a38a0ebf0d",
                      "progress": 100,
                      "processing_time": 275,
                      "object": "async_action"
                    }
                  },
                  "PRODUCTS.BULK_UPDATE": {
                    "value": {
                      "id": "aa_0c5553f0f457b6328e",
                      "type": "PRODUCTS.BULK_UPDATE",
                      "status": "DONE",
                      "operation_status": "SUCCESS",
                      "result": {
                        "done_count": 3,
                        "failed_count": 0,
                        "reports": [
                          "{{voucherify-link-to-report}}"
                        ],
                        "reports_available_till": "2024-11-06T08:26:13.304Z",
                        "errors": []
                      },
                      "created_at": "2023-01-20T08:51:28.337Z",
                      "updated_at": "2023-01-20T08:51:28.439Z",
                      "request_id": "v-0c5553f0e94b0f7502",
                      "progress": 100,
                      "processing_time": 102,
                      "object": "async_action"
                    }
                  },
                  "PRODUCTS.METADATA_UPDATE": {
                    "value": {
                      "id": "aa_0c5554869b97b633b4",
                      "type": "PRODUCTS.METADATA_UPDATE",
                      "status": "DONE",
                      "operation_status": "SUCCESS",
                      "result": {
                        "done_count": 3,
                        "failed_count": 0,
                        "reports": [
                          "{{voucherify-link-to-report}}"
                        ],
                        "reports_available_till": "2024-11-06T08:26:13.304Z",
                        "errors": []
                      },
                      "created_at": "2023-01-20T08:54:01.582Z",
                      "updated_at": "2023-01-20T08:54:02.436Z",
                      "request_id": "v-0c55548694c418f9dd",
                      "progress": 100,
                      "processing_time": 854,
                      "object": "async_action"
                    }
                  },
                  "PRODUCTS.METADATA_KEY_PURGE": {
                    "value": {
                      "id": "aa_0c5552d997ca0ec03a",
                      "type": "PRODUCTS.METADATA_KEY_PURGE",
                      "status": "DONE",
                      "result": {
                        "message": "Updated 2 products.",
                        "done_count": 2
                      },
                      "created_at": "2023-01-20T08:46:42.271Z",
                      "updated_at": "2023-01-20T08:46:43.240Z",
                      "request_id": "w-0c5552d98e8a0ec039",
                      "progress": 100,
                      "processing_time": 969,
                      "object": "async_action"
                    }
                  },
                  "VOUCHERS.IMPORT": {
                    "value": {
                      "id": "aa_0c5559be44d7b63c06",
                      "type": "VOUCHERS.IMPORT",
                      "status": "DONE",
                      "result": {
                        "message": "0 voucher(s) imported successfully, 3 failed.",
                        "failed": [
                          {
                            "code": "PROMO-CODE31",
                            "reason": "unit: must be a number, must be equal to one of 1,2 (actual value is 'EUR')"
                          },
                          {
                            "code": "PROMO-CODE21",
                            "reason": "unit: must be a number, must be equal to one of 1,2 (actual value is 'EUR')"
                          },
                          {
                            "code": "GIFT-CARD-100-1",
                            "reason": "unit: must be a number, must be equal to one of 1,2 (actual value is 'EUR')"
                          }
                        ],
                        "done_count": 0,
                        "failed_count": 3
                      },
                      "created_at": "2023-01-20T09:16:49.299Z",
                      "updated_at": "2023-01-20T09:16:50.238Z",
                      "request_id": "v-0c5559be25c418824a",
                      "progress": 100,
                      "processing_time": 939,
                      "object": "async_action"
                    }
                  },
                  "VOUCHERS.IMPORT_CSV": {
                    "value": {
                      "id": "aa_0c555db3d697b643e1",
                      "type": "VOUCHERS.IMPORT_CSV",
                      "status": "DONE",
                      "result": {
                        "message": "0 voucher(s) imported successfully, 2 failed.",
                        "failed": [
                          {
                            "code": "FALL2023",
                            "row": 1,
                            "reason": "Voucher Type is required"
                          },
                          {
                            "code": "FALL2024",
                            "row": 2,
                            "reason": "Voucher Type is required"
                          }
                        ],
                        "done_count": 0,
                        "failed_count": 2
                      },
                      "created_at": "2023-01-20T09:34:07.194Z",
                      "updated_at": "2023-01-20T09:34:07.367Z",
                      "request_id": "v-0c555db3ba8b0f0767",
                      "progress": 100,
                      "processing_time": 173,
                      "object": "async_action"
                    }
                  },
                  "VOUCHERS.BULK_UPDATE": {
                    "value": {
                      "id": "aa_0c555e8115d7b64504",
                      "type": "VOUCHERS.BULK_UPDATE",
                      "status": "DONE",
                      "operation_status": "SUCCESS",
                      "result": {
                        "done_count": 3,
                        "failed_count": 0,
                        "reports": [
                          "{{voucherify-link-to-report}}"
                        ],
                        "reports_available_till": "2024-11-06T08:26:13.304Z",
                        "errors": []
                      },
                      "created_at": "2023-01-20T09:37:37.367Z",
                      "updated_at": "2023-01-20T09:37:37.520Z",
                      "request_id": "v-0c555e810904188aa4",
                      "progress": 100,
                      "processing_time": 153,
                      "object": "async_action"
                    }
                  },
                  "VOUCHERS.METADATA_UPDATE": {
                    "value": {
                      "id": "aa_0c555ed40857b6463a",
                      "type": "VOUCHERS.METADATA_UPDATE",
                      "status": "DONE",
                      "operation_status": "SUCCESS",
                      "result": {
                        "done_count": 3,
                        "failed_count": 0,
                        "reports": [
                          "{{voucherify-link-to-report}}"
                        ],
                        "reports_available_till": "2024-11-06T08:26:13.304Z",
                        "errors": []
                      },
                      "created_at": "2023-01-20T09:39:02.305Z",
                      "updated_at": "2023-01-20T09:39:02.640Z",
                      "request_id": "v-0c555ed40084188b55",
                      "progress": 100,
                      "processing_time": 335,
                      "object": "async_action"
                    }
                  },
                  "VOUCHERS.METADATA_KEY_PURGE": {
                    "value": {
                      "id": "aa_0c55534bd64a0ec0e0",
                      "type": "VOUCHERS.METADATA_KEY_PURGE",
                      "status": "DONE",
                      "result": {
                        "message": "Updated 9 vouchers.",
                        "done_count": 9
                      },
                      "created_at": "2023-01-20T08:48:39.257Z",
                      "updated_at": "2023-01-20T08:48:40.503Z",
                      "request_id": "w-0c55534bcfca0ec0df",
                      "progress": 100,
                      "processing_time": 1246,
                      "object": "async_action"
                    }
                  },
                  "SKUS.IMPORT_CSV": {
                    "value": {
                      "id": "aa_0c5558728d0e577e67",
                      "type": "SKUS.IMPORT_CSV",
                      "status": "DONE",
                      "result": {
                        "message": "4 sku(s) imported successfully, 0 failed.",
                        "failed": [],
                        "done_count": 4,
                        "failed_count": 0
                      },
                      "created_at": "2023-01-20T09:11:09.620Z",
                      "updated_at": "2023-01-20T09:11:10.270Z",
                      "request_id": "v-0c5558726f0b0f7d82",
                      "progress": 100,
                      "processing_time": 650,
                      "object": "async_action"
                    }
                  },
                  "PRODUCTS.IMPORT_CSV": {
                    "value": {
                      "id": "aa_0c55578e914e577cf1",
                      "type": "PRODUCTS.IMPORT_CSV",
                      "status": "DONE",
                      "result": {
                        "message": "1 product(s) imported successfully, 1 failed.",
                        "failed": [
                          {
                            "row": 1,
                            "reason": "vendor: must be a string, property is required, must be equal to one of Vendor 1,Vendor 2 (actual value is 'Vendor 3')"
                          }
                        ],
                        "done_count": 1,
                        "failed_count": 1
                      },
                      "created_at": "2023-01-20T09:07:16.165Z",
                      "updated_at": "2023-01-20T09:07:17.025Z",
                      "request_id": "v-0c55578e7a0418fef5",
                      "progress": 100,
                      "processing_time": 860,
                      "object": "async_action"
                    }
                  },
                  "ORDERS.METADATA_KEY_PURGE": {
                    "value": {
                      "id": "aa_0c555fda50472c83a8",
                      "type": "ORDERS.METADATA_KEY_PURGE",
                      "status": "DONE",
                      "result": {
                        "message": "Updated 1 orders.",
                        "done_count": 1
                      },
                      "created_at": "2023-01-20T09:43:30.881Z",
                      "updated_at": "2023-01-20T09:43:31.217Z",
                      "request_id": "w-0c555fda45c72c83a7",
                      "progress": 100,
                      "processing_time": 336,
                      "object": "async_action"
                    }
                  },
                  "ORDERS.IMPORT": {
                    "value": {
                      "id": "aa_0c5564b67d0e571534",
                      "type": "ORDERS.IMPORT",
                      "status": "DONE",
                      "result": {
                        "message": "1 order(s) imported successfully, 1 failed.",
                        "failed": [
                          {
                            "source_id": null,
                            "reason": "Internal error"
                          }
                        ],
                        "done_count": 1,
                        "failed_count": 1
                      },
                      "created_at": "2023-01-20T10:04:44.916Z",
                      "updated_at": "2023-01-20T10:04:46.102Z",
                      "request_id": "v-0c5564b6688b0f155d",
                      "progress": 100,
                      "processing_time": 1186,
                      "object": "async_action"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the async action with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Async-Action-Not-Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find async_action with id aa_0aeb82bd55d5beffb",
                      "request_id": "v-0aeb88df54c82af560",
                      "resource_id": "aa_0aeb82bd55d5beffb",
                      "resource_type": "async_action"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports": {
      "post": {
        "operationId": "create-export",
        "tags": [
          "Exports"
        ],
        "summary": "Create Export",
        "description": "Create export object. The export can be any of the following types: `voucher`, `redemption`, `publication`, `customer`, `order`, `points_expiration`, `voucher_transactions`, `product`, or `sku`.  \n\n## Defaults\n\nIf you only specify the object type in the request body without specifying the fields, the API will return the following fields per export object:\n\n| **Export Object** | **Default fields returned** |\n|:---|:---|\n| order | `id`, `source_id`, `status` |\n| voucher | `code`, `voucher_type`, `value`, `discount_type` |\n| publication | `code`, `customer_id`, `date`, `channel` |\n| redemption | `id`, `object`, `voucher_code`, `customer_id`, `date`, `result` |\n| customer | `name`, `source_id` |\n| points_expiration | `id`, `campaign_id`, `voucher_id`, `status`, `expires_at`, `points` |\n| voucher_transactions | `id`, `type`, `source_id`, `status`, `reason`, `source`, `balance`, `amount`, `created_at` |\n| products | `id`, `name`, `price`, `image_url`, `source_id`, `attributes`, `created_at`|\n| SKU | `id`, `sku`, `product_id`, `currency`, `price`, `image_url`, `source_id`, `attributes`, `created_at`|\n\n\n## Fetching particular data sets\n\nUsing the `parameters` body parameter, you can narrow down which fields to export and how to filter the results. The fields are an array of strings containing the data that you would like to export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:\n\n## Orders  \n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique order ID. | ord_A69RIxEdRsPuC6i8gFGVHUft |\n| source_id | Unique order source ID. | 8638 |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the order was created. | 2022-03-09T09:16:32.521Z |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the order was last updated. | 2022-03-09T09:16:33.331Z |\n| status | Order status. | `PAID`, `CREATED`, `FULFILLED`, `CANCELED` |\n| amount | Total amount of order items. | 7700 |\n| discount_amount | Represents total amount of the discount applied to whole cart. | 500 |\n| items_discount_amount | Represents total amount of the discount applied to order line items. | 100 |\n| total_discount_amount | All discounts applied to the order including discounts applied to particular order line items and discounts applied to the whole cart. | 600 |\n| total_amount | Total order amount after applying all discounts. | 7100 |\n| customer_id | Customer unique ID. | cust_2G4fUQdCXUqp35nXNleav7bO |\n| referrer_id | Referrer unique ID. | cust_IkrTR674vvQvr9a4rDMiqglY |\n| metadata | Order metadata; expressed as metadata.X, where X is the name of the custom metadata property. | 1 |\n\n## Vouchers  \n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique voucher ID. | v_HSnGD2vNIHYighTQxwcB4dtVAv8VOmZD |\n| code | Unique voucher code. | WELCOME100 |\n| voucher_type | Type of voucher. | `DISCOUNT_VOUCHER`, `GIFT_VOUCHER`, `LOYALTY_CARD` |\n| value | Value of voucher. | `DISCOUNT_VOUCHER` : amount, percent, unit<br>`GIFT_VOUCHER`: amount left to spend<br>`LOYALTY_CARD`: available usable points |\n| discount_type | The type of discount for a `DISCOUNT_VOUCHER`. | `AMOUNT`, `PERCENT`, `UNIT`, `FIXED` |\n| campaign | Unique campaign name. | Summer Discounts 20% off |\n| category | Tag defining the category that this voucher belongs to. |  |\n| start_date | Start date defines when the code starts to be active. Activation timestamp is presented in the ISO 8601 format. Voucher is _inactive_ before this date. | 2020-12-10T23:00:00.000Z |\n| expiration_date | Expiration date defines when the code expires. Expiration timestamp is presented in the ISO 8601 format. Voucher is _inactive_ after this date. | 2023-12-31T23:00:00.000Z |\n| gift_balance | Amount left to spend. | 1000 |\n| loyalty_balance | Available usable points. | 2000 |\n| redemption_quantity | Maximum number of times a voucher can be redeemed. | 2 |\n| redemption_count | Total redemptions. | 59 |\n| active | Boolean indicating whether the voucher is available for use. | `true`, `false` |\n| qr_code | URL to QR representation of encrypted code. |  |\n| bar_code | URL to barcode representation of encrypted code. |  |\n| metadata | Custom voucher metadata. |  |\n| is_referral_code | Boolean indicating whether the voucher is a referral code. | `true`, `false` |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the voucher was created. | 2022-04-14T09:55:46.814Z |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the voucher was last updated. | 2022-04-14T10:02:18.036Z |\n| validity_timeframe_interval | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of `P2D` will be active every other day. | P2D |\n| validity_timeframe_duration | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of `PT1H` will be valid for a duration of one hour. | PT1H |\n| validity_day_of_week | Array corresponding to the particular days of the week in which the voucher is valid. | \"1,2,3,4,5\" |\n| discount_amount_limit | For `PERCENT` discount type, this is the maximum threshold allowed to be deducted. | 50 |\n| campaign_id | Parent campaign ID. | camp_7s3uXI44aKfIk5IhmeOPr6ic |\n| additional_info | An optional field to keep any extra textual information about the code such as a code description and details. |  |\n| customer_id | Unique customer ID of the assigned owner to whom the voucher was published. | cust_7iUa6ICKyU6gH40dBU25kQU1 |\n| discount_unit_type | For `UNIT` discount type, either a shipping or product ID for a `UNIT` discount with one product. | prod_5h1pp1ng, prod_0a9f9aeddb019a42db |\n| discount_unit_effect | `UNIT` discount effect. | `ADD_MANY_ITEMS`, `ADD_MISSING_ITEMS`,`ADD_NEW_ITEMS` |\n| customer_source_id | Unique customer source id of the assigned owner to whom the voucher was published. | name.lastname@email.com |\n\n\n## Publications\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| voucher_code | Unique voucher code. | WELCOME100 |\n| customer_id | Customer unique ID. | cust_7iUa6ICKyU6gH40dBU25kQU1 |\n| customer_source_id | Unique customer source id of the assigned owner to whom the voucher was published. | name.lastname@email.com |\n| date | Timestamp in ISO 8601 format representing the date and time when the voucher was published. | 2022-04-28T10:19:30.792Z |\n| channel | Publication channel. | voucherify-website |\n| campaign | Unique campaign name. | Summer Discounts 20% off |\n| is_winner |  |  |\n| metadata | Custom publication metadata. |  |\n\n## Redemptions\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique redemption ID. | r_0acf3a6dae00e679c8, rf_0acf3a495740e679b8 |\n| object | Object being exported; by default `redemption`. | redemption |\n| date | Timestamp in ISO 8601 format representing the date and time when the voucher was redeemed. | 2022-03-23T08:52:24.867Z |\n| voucher_code | Unique voucher code redeemed. | WELCOME100 |\n| campaign | Parent campaign name of voucher if applicable. | Summer Discounts 20% off |\n| promotion_tier_id |  | promo_Mwy9XpA0TLctSGriM5kum0qp |\n| customer_id | Unique customer ID of redeeming customer. | cust_nk0N1uNQ1YnupAoJGOgvsODC |\n| customer_source_id | Unique source ID of redeeming customer. | name.lastname@email.com |\n| customer_name | Customer name. | John Smith |\n| tracking_id |  | track_Pw6r3ejnml43kIwNS4Zj09KZ67xOfLUy |\n| order_amount | Total order amount before applying all discounts. | 1000 |\n| gift_amount | Gift credits used for redemption. | 10 |\n| loyalty_points |  | 12 |\n| result | Tells you whether the redemption succeeded. | `SUCCESS`, `FAILURE` |\n| failure_code | Internal Voucherify code for reason why redemption failed. | invalid_customer |\n| failure_message | A human-readable message providing a short description explaining why the redemption failed. | Customer must be a holder of a loyalty card. |\n| metadata | Custom redemption metadata. |  |\n\n## Customers\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| name | Customer name. | John Smith |\n| id | Unique customer ID. | cust_J1CDUdbqn5Exva8ASWk1Fq0j |\n| description | An arbitrary string that you can attach to a customer object. | Customer requesting to be added to VIP tier. |\n| email | Customer's email. | name.lastname@email.com |\n| source_id | Unique custom customer identifier. | name.lastname@email.com |\n| created_at | Timestamp in ISO 8601 format representing the date and time when the customer was created. | 2022-02-03T13:10:11.928Z |\n| address_city | City | Houston |\n| address_state | State | TX |\n| address_line_1 | First line of customer's address. | 72738 Main St |\n| address_line_2 | Second line of customer's address. | Bld 2, Apt 4 |\n| address_country | Country | United States of America |\n| address_postal_code | Postal code (ZIP code) | 77042-4143 |\n| redemptions_total_redeemed | Total customer redemptions. | 5 |\n| redemptions_total_failed | Total customer failed redemptions. | 2 |\n| redemptions_total_succeeded | Total customer succeeded redemptions. | 3 |\n| redemptions_total_rolled_back | Total customer redemptions that were rolled back. | 3 |\n| redemptions_total_rollback_failed | Total customer redemptions that were unsuccessfully rolled back. | 2 |\n| redemptions_total_rollback_succeeded | Total customer redemptions that were successfully rolled back. | 1 |\n| orders_total_amount | Total sum of order amounts over customer lifetime. Value is multiplied by 100 to precisely represent 2 decimal places. | 10000 (represents $100) |\n| orders_total_count | Total number of customer orders. | 2 |\n| orders_average_amount | Average amount spent on orders. Value is multiplied by 100 to precisely represent 2 decimal places. | 5000 (represents $50) |\n| orders_last_order_amount | How much did the customer spend on their last order. Value is multiplied by 100 to precisely represent 2 decimal places. | 5000 (represents $50) |\n| orders_last_order_date | When was the last customer order; timestamp in ISO 8601 format representing the date and time. | 2022-02-03T13:17:30.630Z |\n| loyalty_points | Sum of customer's loyalty points to go across all loyalty cards. | 2000 |\n| loyalty_referred_customers | How many customers were referred by this customer. | 3 |\n| updated_at | Timestamp in ISO 8601 format representing the date and time when the customer was updated. | 2022-02-14T14:10:14.305Z |\n| phone | Customer's phone number. | +1 (294) 752-1846 |\n| birthday | `Deprecated`. ~~Customer's birthday~~. | 2022-01-01 |\n| metadata | Customer metadata. | All metadata fields defined in Metadata Schema for the Customer object. |\n| birthdate | Customer's birthdate. | 2022-01-01 |\n\n## Points Expirations\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 |\n\n ## Gift Card Transactions\n\n| **Field** | **Definition** | **Example Export** |\n|:---|:---|:---|\n| id | Unique transaction ID. | vtx_0cb7811f1c07765800 |\n| type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` |\n| source_id | Unique transaction source ID. | 8638 |\n| reason | Contains the reason for the transaction if one was included originally. |  |\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. | 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 |\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\n ## Loyalty Card Transactions\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",
              "exports"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the export that you would like to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportsCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns export object and URL of CSV file.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportsCreateResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if an invalid payload is provided.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/e_400_invalid_payload"
                    },
                    {
                      "$ref": "#/components/schemas/e_400_invalid_export_fields"
                    }
                  ]
                },
                "examples": {
                  "Invalid Export Fields": {
                    "value": {
                      "code": 400,
                      "key": "invalid_export_fields",
                      "message": "Invalid Export",
                      "details": "Unsupported field used. Allowed fields: id, object, date, voucher_code, campaign, promotion_tier_id, customer_id, customer_source_id, customer_name, tracking_id, order_amount, gift_amount, loyalty_points, result, failure_code, failure_message, metadata",
                      "request_id": "v-0afdb603910a1a14e0"
                    }
                  },
                  "Invalid Payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .exported_object should be equal to one of the allowed values [ voucher, redemption, customer, publication, order, points_expiration ]",
                      "request_id": "v-0afdb5bd68d20bdb81"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-exports",
        "tags": [
          "Exports"
        ],
        "summary": "List Exports",
        "description": "List all exports. ",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListExports"
            },
            "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",
              "exports"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "A dictionary with an exports property that contains an array of exports. Each entry in the array is a separate export object. The list will return the following types of exported objects: `voucher`, `redemption`, `publication`, `customer`, `order`, `points_expiration`, or `voucher_transactions`. \n\nThe `channel` parameter in the response body returns the channel that was used to generate the particular export. The `user_id` identifies the specific user who initiated the export through the Voucherify Dashboard; this `user_id` is returned when the channel value is `WEBSITE`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportsListResponseBody"
                },
                "examples": {
                  "List Exports": {
                    "value": {
                      "object": "list",
                      "data_ref": "exports",
                      "exports": [
                        {
                          "id": "exp_323UOPsH42twhJVaDZXf4UNo",
                          "object": "export",
                          "created_at": "2022-08-04T09:11:25.208Z",
                          "status": "DONE",
                          "channel": "API",
                          "exported_object": "order",
                          "parameters": {
                            "order": "-created_at",
                            "fields": [
                              "id",
                              "source_id",
                              "status"
                            ],
                            "filters": {
                              "junction": "and"
                            }
                          },
                          "result": {
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "user_id": null
                        },
                        {
                          "id": "exp_sPQR0na2gU0pIVUKIz4wdQI9",
                          "object": "export",
                          "created_at": "2022-05-02T06:44:03.186Z",
                          "status": "DONE",
                          "channel": "API",
                          "exported_object": "voucher",
                          "parameters": {
                            "order": "-created_at",
                            "fields": [
                              "id",
                              "code",
                              "voucher_type",
                              "value"
                            ],
                            "filters": {
                              "junction": "and"
                            }
                          },
                          "result": {
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "user_id": null
                        },
                        {
                          "id": "exp_CGnCVltmWjI9V1pGlnunw2Nf",
                          "object": "export",
                          "created_at": "2022-01-13T09:03:18.293Z",
                          "status": "DONE",
                          "channel": "API",
                          "exported_object": "customer",
                          "parameters": {
                            "order": "",
                            "fields": [
                              "name",
                              "id",
                              "email",
                              "source_id",
                              "created_at"
                            ],
                            "filters": {
                              "junction": "and"
                            },
                            "response_format": "CSV"
                          },
                          "result": {
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "user_id": null
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{exportId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterExportId"
          },
          "name": "exportId",
          "in": "path",
          "required": true,
          "description": "Unique export object ID of previously created export. This object can be a: `voucher`, `redemption`, `publication`, `customer`, `order`, `points_expiration`, or `voucher_transactions`."
        }
      ],
      "get": {
        "operationId": "get-export",
        "tags": [
          "Exports"
        ],
        "summary": "Get Export",
        "description": "Retrieves the URL of the downloadable file, which was generated via the [Create Export](ref:create-export) method.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "exports"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the export object if a valid identifier was provided in the path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportsGetResponseBody"
                },
                "examples": {
                  "Get Export": {
                    "value": {
                      "id": "exp_CGnCVltmWjI9V1pGlnunw2Nf",
                      "object": "export",
                      "created_at": "2022-01-13T09:03:18.293Z",
                      "status": "DONE",
                      "channel": "API",
                      "exported_object": "customer",
                      "parameters": {
                        "order": "",
                        "fields": [
                          "name",
                          "id",
                          "email",
                          "source_id",
                          "created_at"
                        ],
                        "filters": {
                          "junction": "and"
                        },
                        "response_format": "CSV"
                      },
                      "result": {
                        "url": "{{internalVoucherifyURL}}"
                      },
                      "user_id": null
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the export with given ID was not found if an incorrect ID is provided in the path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find export with id exp_8fNoLwgVPuhoxNzVsr50kq0",
                      "request_id": "v-0b029305af4524cf42",
                      "resource_id": "exp_8fNoLwgVPuhoxNzVsr50kq0",
                      "resource_type": "export"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-export",
        "tags": [
          "Exports"
        ],
        "summary": "Delete Export",
        "description": "This method deletes a previously created export object.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "exports"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error indicating that the export with given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Export Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find export with id exp_2bYLdY2lQ2886wmYIHyeBWUZ",
                      "request_id": "v-0ae2a97a399027d719",
                      "resource_id": "exp_2bYLdY2lQ2886wmYIHyeBWUZ",
                      "resource_type": "export"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/exports/{export_Id}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "example": "exp_ex6zq0x0EEa9S0N68QcqhxcQ"
          },
          "name": "export_Id",
          "in": "path",
          "required": true,
          "description": "Unique export object ID."
        },
        {
          "name": "token",
          "in": "query",
          "required": false,
          "schema": {
            "type": "string"
          },
          "description": "Token that was issued to the export, to get this token, get the export first"
        }
      ],
      "get": {
        "operationId": "download-export",
        "tags": [
          "Exports"
        ],
        "summary": "Download Export",
        "description": "Download the contents of the exported CSV file. \n\n[Get Export](ref:get-export) method response.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "exports"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns contents of CSV file.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                },
                "examples": {
                  "CSV file contents": {
                    "value": "ID,Code,Voucher Type,Value v_mKNYXWf5168jyW3EvwnAf73d7vnTiXaa,iuCvt3BT,GIFT_VOUCHER,2000.00 v_xb5KuIw90ViUY7NrNbDZzf1JwFmyTUi0,M3X8IwW8,GIFT_VOUCHER,2000.00 v_flCSHFGOfjxuM582jhriJTWQuetb2xHX,6vpzmKaC,GIFT_VOUCHER,2050.00 v_YtzZG4UJaWm9DNCY3AvIqVbc7Dt5WToU,lRvBOUPl,LOYALTY_CARD,0"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/categories": {
      "get": {
        "operationId": "list-categories",
        "tags": [
          "Categories"
        ],
        "summary": "List Categories",
        "description": "List all categories.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "categories"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of category objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "cat_0b5f49fb31c3bf6ab0",
                          "name": "Sixth",
                          "hierarchy": 6,
                          "created_at": "2022-07-13T06:21:36.852Z",
                          "object": "category"
                        },
                        {
                          "id": "cat_0b5f49e6e1ce5bd2ba",
                          "name": "Fifth",
                          "hierarchy": 5,
                          "created_at": "2022-07-13T06:21:16.039Z",
                          "object": "category"
                        },
                        {
                          "id": "cat_0b5f49deafce5bd2b5",
                          "name": "Fourth",
                          "hierarchy": 4,
                          "created_at": "2022-07-13T06:21:07.662Z",
                          "object": "category"
                        },
                        {
                          "id": "cat_0b5f49d45c43bf6a99",
                          "name": "Third",
                          "hierarchy": 3,
                          "created_at": "2022-07-13T06:20:57.094Z",
                          "object": "category"
                        },
                        {
                          "id": "cat_0b5f3f9881ce5bccb6",
                          "name": "Second",
                          "hierarchy": 2,
                          "created_at": "2022-07-13T05:36:14.355Z",
                          "object": "category"
                        },
                        {
                          "id": "cat_0b53bc388dc2f108ba",
                          "name": "First",
                          "hierarchy": 1,
                          "created_at": "2022-07-04T06:58:57.734Z",
                          "object": "category"
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-category",
        "tags": [
          "Categories"
        ],
        "summary": "Create Category",
        "description": "Create category with a specific name and hierarchy.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "categories"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the category that you would like to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoriesCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Eighth",
                    "hierarchy": 8
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a newly created category object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "cat_0b8b5a427a0283c854",
                      "name": "Eighth",
                      "hierarchy": 8,
                      "created_at": "2022-08-16T11:45:54.171Z",
                      "object": "category"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is incomplete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Missing name": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload should have required property 'name'",
                      "request_id": "v-0b8b5b960990210b25"
                    }
                  },
                  "Missing hierarchy": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload should have required property 'hierarchy'",
                      "request_id": "v-0b8b5bf9d9c6824a2f"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/categories/{categoryId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCategoryId"
          },
          "name": "categoryId",
          "in": "path",
          "required": true,
          "description": "Unique category ID assigned by Voucherify."
        }
      ],
      "get": {
        "operationId": "get-category",
        "tags": [
          "Categories"
        ],
        "summary": "Get Category",
        "description": "Retrieve a category by the category ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "categories"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a category object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "cat_0b5f49fb31c3bf6ab0",
                      "name": "Sixth",
                      "hierarchy": 6,
                      "created_at": "2022-07-13T06:21:36.852Z",
                      "object": "category"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-category",
        "tags": [
          "Categories"
        ],
        "summary": "Delete Category",
        "description": "Delete a category by the category ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "categories"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "No content is returned."
          },
          "404": {
            "description": "Returns an error indicating that the category with given ID was 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 category with id example_category",
                      "request_id": "v-0b8b49205f902176c9",
                      "resource_id": "example_category",
                      "resource_type": "category"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-category",
        "tags": [
          "Categories"
        ],
        "summary": "Update Category",
        "description": "Update category using the category ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "categories"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the category that you would like to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoriesUpdateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Summer",
                    "hierarchy": 1
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a category object with a refreshed `updated_at` property.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "cat_0b60cfe7d0d7ddbb55",
                      "name": "Update",
                      "hierarchy": 1,
                      "created_at": "2022-07-14T10:45:13.156Z",
                      "updated_at": "2022-08-16T11:03:54.727Z",
                      "object": "category"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error indicating an invalid payload if the required request body parameters were not included in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Missing hierarchy": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload should have required property 'hierarchy'",
                      "request_id": "v-0b8b4e6b6210217c93"
                    }
                  },
                  "Missing name": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload should have required property 'name'",
                      "request_id": "v-0b8b4f418390217d82"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/metadata-schemas": {
      "get": {
        "operationId": "list-metadata-schemas",
        "tags": [
          "Metadata Schemas"
        ],
        "summary": "List Metadata Schemas",
        "description": "Retrieve metadata schema definitions.\n\n>📘 Management API\n>\n>If you have Management API enabled, you can also use the [List Metadata Schemas](ref:list-metadata-schemas-1) endpoint to list all metadata schemas.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "metadata-schemas"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an array of metadata schema definitions. The response does not include unknown metadata properties in the response, i.e. those that have been defined outside of the **Project Settings** > **Metadata Schema** definitions. For example, an unknown metadata property can be defined in the campaign manager while creating a campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataSchemasListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "schemas",
                      "schemas": [
                        {
                          "id": "ms_yqMHRHH6S1KYIHPmQHealNf4",
                          "related_object": "Payment",
                          "properties": {
                            "payment_tax": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "payment_method": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": true,
                          "created_at": "2022-03-07T11:01:01.747Z",
                          "updated_at": "2022-03-07T11:01:44.785Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_DwUjpX32sY3fJEoQELpS7bN3",
                          "related_object": "campaign",
                          "properties": {
                            "Store": {
                              "type": "string",
                              "array": false,
                              "deleted": true,
                              "optional": true,
                              "objectType": null
                            },
                            "locale": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "date_tag": {
                              "type": "date",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "store_names": {
                              "eq": [
                                "Store 1 - New York - Broadway",
                                "Store 2 - Florida - Miami",
                                "Store 3 - London - Heathrow",
                                "Store 4 - Berlin - Alexanderplatz"
                              ],
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "date_time_tag": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "favorite_brands": {
                              "type": "string",
                              "array": true,
                              "deleted": true,
                              "optional": true,
                              "objectType": null
                            },
                            "height_customer_number": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "location_country_string": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2021-12-03T13:33:44.556Z",
                          "updated_at": "2022-07-26T13:57:42.288Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_f0r4hm3ta6a4a5ch3ma",
                          "related_object": "customer",
                          "properties": {
                            "birth_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "CRM_created_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "customer_location": {
                              "type": "geopoint",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "acquisition_channel": {
                              "eq": [
                                "Facebook",
                                "Twitter",
                                "Website"
                              ],
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "customer_life_time_value": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2021-12-03T06:33:45.894Z",
                          "updated_at": "2022-07-14T15:15:34.928Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_7X7krsG84H6MeNuIaKkb4LXN",
                          "related_object": "earning_rule",
                          "properties": {
                            "Type": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "minLength": 6,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2022-07-27T08:54:07.980Z",
                          "updated_at": null,
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_OF36L2rk4EqhdxvZs56IW9iE",
                          "related_object": "loyalty_tier",
                          "properties": {
                            "has_funds": {
                              "type": "boolean",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2022-03-30T06:22:16.685Z",
                          "updated_at": "2022-07-27T08:55:01.628Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                          "related_object": "order",
                          "properties": {
                            "Payment": {
                              "type": "object",
                              "array": false,
                              "deleted": true,
                              "optional": true,
                              "objectType": "Payment"
                            },
                            "day_of_week": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "location_id": {
                              "eq": [
                                "L1",
                                "L2",
                                "L3"
                              ],
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "objectType": null
                            },
                            "payment_mean": {
                              "eq": [
                                "credit-card",
                                "wire-transfer",
                                "paypal"
                              ],
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "objectType": null
                            },
                            "booking_end_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "booking_start_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "number_of_store_visits": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2021-12-03T06:33:45.798Z",
                          "updated_at": "2022-04-20T06:47:10.350Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_0qgIlxP7bYb8H59DqpnWBCUN",
                          "related_object": "order_item",
                          "properties": {
                            "Size": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "Color": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "Thickness": {
                              "eq": [
                                "Thin",
                                "Medium",
                                "Thick"
                              ],
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2022-03-11T13:32:55.029Z",
                          "updated_at": "2022-05-23T13:46:01.463Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_s3c0N6m3ta6a4a5ch3ma",
                          "related_object": "product",
                          "properties": {
                            "color": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "objectType": null
                            },
                            "origin": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "minLength": 1,
                              "objectType": null
                            },
                            "product_location": {
                              "type": "geopoint",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "metadata_attribute_name_with_date_property": {
                              "type": "date",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "metadata_attribute_name_with_number_property": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "metadata_attribute_name_with_boolean_property": {
                              "type": "boolean",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "metadata_attribute_name_with_datetime_property": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2021-12-03T06:33:45.880Z",
                          "updated_at": "2022-07-14T15:46:47.994Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_th8YHt9yFYY1yAA99XOasT5W",
                          "related_object": "promotion_tier",
                          "properties": {
                            "has_budget": {
                              "type": "boolean",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2022-01-24T07:22:21.523Z",
                          "updated_at": "2022-07-27T08:54:42.909Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_Z7niydc0OpGjDRL4yB40niXn",
                          "related_object": "publication",
                          "properties": {
                            "year": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2022-03-30T06:23:49.715Z",
                          "updated_at": "2022-04-19T10:28:24.568Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_t4ir0Dm3ta6a4a5ch3ma",
                          "related_object": "redemption",
                          "properties": {
                            "location_id": {
                              "eq": [
                                "L1",
                                "L2",
                                "L3"
                              ],
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "objectType": null
                            },
                            "store_names": {
                              "eq": [
                                "Store 1 - New York - Broadway",
                                "Store 2 - Florida - Miami",
                                "Store 3 - London - Heathrow",
                                "Store 4 - Berlin - Alexanderplatz"
                              ],
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2021-12-03T06:33:45.890Z",
                          "updated_at": "2022-07-26T14:58:24.546Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_EnSASZVEIDsZAYa8Z0nG8Rlg",
                          "related_object": "reward",
                          "properties": {
                            "Type": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null,
                              "exactLength": 4
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2022-07-27T08:53:32.257Z",
                          "updated_at": "2022-07-27T08:53:48.542Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_xUHvkRBPvVJAlWcTkVzufKx4",
                          "related_object": "voucher",
                          "properties": {
                            "unit": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "Region": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "Season": {
                              "eq": [
                                "Spring",
                                "Summer",
                                "Fall",
                                "Winter"
                              ],
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "CATEGORY": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            },
                            "active_on_calendar_month": {
                              "eq": [
                                1,
                                2,
                                3,
                                5,
                                7,
                                9,
                                10,
                                11,
                                12
                              ],
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "objectType": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2022-01-24T07:22:01.281Z",
                          "updated_at": "2022-06-22T07:22:09.577Z",
                          "object": "metadata_schema"
                        }
                      ],
                      "total": 13
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/vouchers/qualification": {
      "post": {
        "operationId": "examine-vouchers-qualification",
        "deprecated": true,
        "tags": [
          "Vouchers"
        ],
        "summary": "Examine Qualification [Deprecated]",
        "description": "\n| **Case** | **Order-Level Parameter Included** | **Item-Level Parameter Included** | **Precedence** | **Calculation Result** | **Parameter included in payload accounts for checks against requirements in these validation rules** |\n|:---:|:---:|:---:|:---:|---|---|\n| **1** | `amount` | `amount` | Order-level | Uses order-level `amount` | - Total order amount |\n| **2** |  | `amount` | Item-level | Sums each item-level `amount` | - Total order amount  <br>- subtotal of matched items |\n| **3** |  | `price`<br>`quantity` | Item-level | Multiplies each item's (`price` x `quantity`) to get item `amount` and then adds each item's `amount` to get total order `amount`  | - Total order amount<br>- Subtotal of matched items<br>- Unit price of any matching order line<br>- Price of each item/Price of any item |\n| **4** |  | `amount`  <br>`price`    <br>`quantity` | Item-level `amount` | Uses item-level `amount` for  total order `amount` calculation, ignores (`price` x `quantity`) calculation | - Total order amount (uses item `amount` if provided or `price` x `quantity` for items without `amount` property; `amount` takes precedence in case all 3 properties are provided for an item)<br>- Subtotal of matched items (uses item `amount`, takes precedence if all 3 properties are provided)<br>- Unit price of any matching order line<br>- Price of each item/Price of any item |\n| **5** | `amount` | `amount`  <br>`price`  <br>`quantity` | Order-level  | Uses order-level `amount` for total order `amount` | - Total order amount (uses order-level `amount`). <br>- Subtotal of matched items (see case **4** for details). <br>- Unit price of any matching order line  <br>- Price of each item/Price of any item |\n  \n\n## Reward\n\n ## Gift Card",
        "parameters": [
          {
            "$ref": "#/components/parameters/audienceRulesOnly"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimitExamineVouchersQualification"
            },
            "in": "query",
            "name": "limit",
            "description": "The number of vouchers to be qualified."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderExamineVouchersQualification"
            },
            "in": "query",
            "name": "order",
            "description": "Sorts the results using one of the filtering options, where the dash `-` means sorting in a descending order."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "vouchers"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "Should contain given customer and context such as an order.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/1_req_vouchers_qualification"
              },
              "examples": {
                "Example": {
                  "value": {
                    "customer": {
                      "source_id": "source-id",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "order": {
                      "amount": 10000,
                      "items": [
                        {
                          "product_id": "product-id",
                          "quantity": "1",
                          "price": 10000,
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ]
                    },
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Qualify product using product_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify product using source_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify SKU using sku_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify SKU using source_id": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify redemption metadata": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                },
                "Qualify order line item metadata": {
                  "value": {
                    "customer": {
                      "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                      "source_id": "firstname.lastname@mycompany.com",
                      "name": "FirstName LastName",
                      "email": "firstname.lastname@mycompany.com",
                      "phone": "string",
                      "address": {
                        "city": "New York",
                        "country": "United States of America",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {},
                      "birthdate": "YYYY-MM-DD"
                    },
                    "order": {
                      "id": "ord_gqj1QYW2j2A1E3Ula2YjdPf4",
                      "source_id": "string",
                      "amount": 10000,
                      "items": [
                        {
                          "source_id": "product_1234",
                          "product_id": "prod_0a9f9aeddb019a42db",
                          "amount": 10000,
                          "quantity": 1,
                          "price": 10000,
                          "metadata": {},
                          "related_object": "product",
                          "product": {
                            "source_id": "product_1234",
                            "name": "Phone",
                            "price": 10000,
                            "metadata": {}
                          }
                        }
                      ],
                      "customer": {
                        "id": "cust_J1CDUdbqn5Exva8ASWk1Fq0j",
                        "source_id": "firstname.lastname@mycompany.com",
                        "name": "FirstName LastName",
                        "email": "firstname.lastname@mycompany.com",
                        "phone": "string",
                        "address": {
                          "city": "New York",
                          "country": "United States of America",
                          "postal_code": "10001",
                          "state": "NY"
                        },
                        "metadata": {},
                        "birthdate": "YYYY-MM-DD"
                      },
                      "referrer": {},
                      "metadata": "string"
                    },
                    "reward": {
                      "points": 0,
                      "assignment_id": "string",
                      "id": "string"
                    },
                    "metadata": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This operation returns the list of valid and active vouchers based on the qualification of given context (e.g., customer profile, redemptions metadata, order).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/1_res_vouchers_qualification"
                }
              }
            }
          }
        }
      }
    },
    "/v1/metadata-schemas/{resource}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterString"
          },
          "name": "resource",
          "in": "path",
          "required": true,
          "description": "There is an infinite number of possibilities for retrieving metadata schemas by the resource type because you can define custom metadata schemas."
        }
      ],
      "get": {
        "operationId": "get-metadata-schema",
        "tags": [
          "Metadata Schemas"
        ],
        "summary": "Get Metadata Schema",
        "description": "Retrieves a metadata schema per resource type.\n\n## Resource types\n\n### Standard\n\nYou can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter.\n\n- `campaign`\n- `customer`\n- `earning_rule`\n- `loyalty_tier`\n- `order`\n- `order_item`\n- `product`\n- `promotion_tier`\n- `publication`\n- `redemption`\n- `reward`\n- `voucher`\n\n### Custom\n\nIf you have defined a [custom metadata schema](https://support.voucherify.io/article/99-schema-validation-metadata#add-metadata), provide its name in the `\"resource\"` field to retrieve its details.\n\n>📘 Management API\n>\n>If you have Management API enabled, you can also use the [Get Metadata Schemas](ref:get-metadata-schema-1) endpoint to retrieve a metadata schema using its ID.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "metadata-schemas"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "The response does not include unknown metadata properties in the response, i.e. those that have been defined outside of the **Project Settings** > **Metadata Schema** definitions. For example, an unknown metadata property can be defined in the campaign manager.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetadataSchemasGetResponseBody"
                },
                "examples": {
                  "earning_rule": {
                    "value": {
                      "id": "ms_27vMXZqBAkkqBoOuw8EYTRLn",
                      "related_object": "earning_rule",
                      "properties": {
                        "channel_id": {
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "objectType": null,
                          "exactLength": 5
                        },
                        "channel_name": {
                          "eq": [
                            "instagram",
                            "facebook",
                            "google",
                            "twitter",
                            "linkedin",
                            "website"
                          ],
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2022-08-25T13:09:59.970Z",
                      "updated_at": "2022-08-25T13:11:15.704Z",
                      "object": "metadata_schema"
                    }
                  },
                  "campaign": {
                    "value": {
                      "id": "ms_psGSDpVl6JcPilPA7toZ83Kj",
                      "related_object": "campaign",
                      "properties": {
                        "region": {
                          "eq": [
                            "EMEA",
                            "AMER",
                            "APAC"
                          ],
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2022-08-25T13:12:58.447Z",
                      "updated_at": "2022-08-25T13:16:03.167Z",
                      "object": "metadata_schema"
                    }
                  },
                  "customer": {
                    "value": {
                      "id": "ms_f0r4hm3ta6a4a5ch3ma",
                      "related_object": "customer",
                      "properties": {
                        "age": {
                          "type": "number",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "city_id": {
                          "type": "number",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "location": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "favorite_brands": {
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "objectType": null
                        },
                        "acquisition_channel": {
                          "eq": [
                            "Facebook",
                            "Twitter",
                            "Website"
                          ],
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "customer_life_time_value": {
                          "type": "number",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2021-12-01T08:00:48.889Z",
                      "updated_at": "2022-09-12T07:34:49.163Z",
                      "object": "metadata_schema"
                    }
                  },
                  "loyalty_tier": {
                    "value": {
                      "id": "ms_jHUoFlgepKVEftxK1pKPGZlO",
                      "related_object": "loyalty_tier",
                      "properties": {
                        "level_name": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "audience_restricted": {
                          "type": "boolean",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2022-08-25T13:14:54.954Z",
                      "updated_at": "2022-08-25T13:15:24.436Z",
                      "object": "metadata_schema"
                    }
                  },
                  "order": {
                    "value": {
                      "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                      "related_object": "order",
                      "properties": {
                        "card": {
                          "eq": [
                            "Visa",
                            "MasterCard",
                            "Other"
                          ],
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "objectType": null
                        },
                        "currency": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "location": {
                          "ne": [
                            1,
                            2,
                            18,
                            22
                          ],
                          "type": "number",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "store_city": {
                          "eq": [
                            "Hampden",
                            "San Francisco",
                            "Warsaw"
                          ],
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "location_id": {
                          "eq": [
                            "L1",
                            "L2",
                            "L3"
                          ],
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "objectType": null
                        },
                        "payment_mean": {
                          "eq": [
                            "credit-card",
                            "wire-transfer",
                            "paypal"
                          ],
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "objectType": null
                        },
                        "booking_end_date": {
                          "type": "datetime",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "booking_start_date": {
                          "type": "datetime",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2021-12-01T08:00:47.575Z",
                      "updated_at": "2022-10-25T10:05:18.978Z",
                      "object": "metadata_schema"
                    }
                  },
                  "order_item": {
                    "value": {
                      "id": "ms_7ux44AEnt82bqo8ww5V1SXzV",
                      "related_object": "order_item",
                      "properties": {
                        "manufacturer_id": {
                          "gte": 15,
                          "type": "number",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2022-08-25T13:16:03.167Z",
                      "updated_at": "2022-08-25T13:16:03.167Z",
                      "object": "metadata_schema"
                    }
                  },
                  "product": {
                    "value": {
                      "id": "ms_s3c0N6m3ta6a4a5ch3ma",
                      "related_object": "product",
                      "properties": {
                        "vendor": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "category": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "location": {
                          "type": "geopoint",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2021-12-01T08:00:48.298Z",
                      "updated_at": "2022-07-14T15:53:29.226Z",
                      "object": "metadata_schema"
                    }
                  },
                  "promotion_tier": {
                    "value": {
                      "id": "ms_dNb5aLMzU0VBCiRuxLOeMNwn",
                      "related_object": "promotion_tier",
                      "properties": {
                        "level": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2022-01-24T10:42:04.937Z",
                      "updated_at": "2022-09-23T08:51:46.266Z",
                      "object": "metadata_schema"
                    }
                  },
                  "publication": {
                    "value": {
                      "id": "ms_fzvWNh7sU4LeykEQ2Abpg6jG",
                      "related_object": "publication",
                      "properties": {
                        "file_uploaded": {
                          "type": "image_url",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "publication_method": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2022-08-25T13:16:35.534Z",
                      "updated_at": "2022-09-12T10:26:31.135Z",
                      "object": "metadata_schema"
                    }
                  },
                  "redemption": {
                    "value": {
                      "id": "ms_t4ir0Dm3ta6a4a5ch3ma",
                      "related_object": "redemption",
                      "properties": {
                        "location_id": {
                          "eq": [
                            "L1",
                            "L2",
                            "L3"
                          ],
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "objectType": null
                        },
                        "redemption_location": {
                          "type": "object",
                          "array": false,
                          "optional": true,
                          "objectType": "Location"
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2021-12-01T08:00:48.794Z",
                      "updated_at": "2022-08-25T13:19:50.497Z",
                      "object": "metadata_schema"
                    }
                  },
                  "reward": {
                    "value": {
                      "id": "ms_PwrAtwqCFXeH4Qix22gEkqhl",
                      "related_object": "reward",
                      "properties": {
                        "reward_type": {
                          "eq": [
                            "MATERIAL",
                            "PAY-WITH-POINTS",
                            "DISCOUNT-COUPON",
                            "GIFT-CARD-CREDITS",
                            "LOYALTY POINTS"
                          ],
                          "type": "string",
                          "array": false,
                          "optional": false,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": true,
                      "created_at": "2022-08-25T13:07:13.689Z",
                      "updated_at": "2022-08-25T13:08:26.696Z",
                      "object": "metadata_schema"
                    }
                  },
                  "voucher": {
                    "value": {
                      "id": "ms_9uE6eP17Jvoxl46mCqL6Q3Ut",
                      "related_object": "voucher",
                      "properties": {
                        "lang": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "Season": {
                          "eq": [
                            "Spring",
                            "Summer",
                            "Fall",
                            "Winter"
                          ],
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "marketing_text": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "objectType": null
                        },
                        "ProductionVoucherCodeMetaData": {
                          "type": "string",
                          "array": false,
                          "deleted": true,
                          "optional": true,
                          "objectType": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2022-01-24T10:42:23.994Z",
                      "updated_at": "2022-09-19T14:13:30.590Z",
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the resource provided in the path 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 metadata schema with id earning_rules",
                      "request_id": "v-0c1b9ce0098a391421",
                      "resource_id": "earning_rules",
                      "resource_type": "metadata schema"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/locations": {
      "get": {
        "operationId": "list-locations",
        "tags": [
          "Locations"
        ],
        "summary": "List Locations",
        "description": "Returns a list of your locations.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListLocations"
            },
            "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",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListLocations"
            },
            "description": "Filter the locations using one of the available filters.",
            "style": "deepObject",
            "explode": true
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterDate"
            },
            "description": "A filter on the list based on the end date. This will filter out all locations whose end date falls before the specified date and time. A date value must be presented in the ISO 8601 format (`2016-11-16T14:14:31Z` or `2016-11-16`)."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "locations"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary that contains an array of locations. Each entry in the array is a separate location object.  If no more locations are available, the resulting array will be empty. The result can be narrowed down according to specified (or default) filters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "loc_NoMGXmHO9OUs7iz9mGWpamma",
                          "object": "location",
                          "name": "Belleville",
                          "shape": {
                            "type": "circle",
                            "format": "distance",
                            "distance": {
                              "center": "geo:40.79372699823857,-74.15092132694554",
                              "radius": "1.54 km"
                            }
                          },
                          "created_at": "2022-07-15T06:04:36.924Z",
                          "updated_at": null
                        },
                        {
                          "id": "loc_ae2gKWpAFMsuRhyMqGx2FZFF",
                          "object": "location",
                          "name": "New York",
                          "shape": {
                            "type": "polygon",
                            "format": "geojson",
                            "geojson": {
                              "type": "Polygon",
                              "coordinates": [
                                [
                                  [
                                    -74.016167,
                                    40.703186
                                  ],
                                  [
                                    -74.008687,
                                    40.750656
                                  ],
                                  [
                                    -73.943597,
                                    40.851838
                                  ],
                                  [
                                    -73.928559,
                                    40.845285
                                  ],
                                  [
                                    -73.936152,
                                    40.8356
                                  ],
                                  [
                                    -73.934298,
                                    40.810015
                                  ],
                                  [
                                    -73.92711,
                                    40.795145
                                  ],
                                  [
                                    -73.978623,
                                    40.710432
                                  ],
                                  [
                                    -74.013201,
                                    40.701619
                                  ],
                                  [
                                    -74.016167,
                                    40.703186
                                  ]
                                ]
                              ]
                            }
                          },
                          "created_at": "2022-07-15T05:37:45.299Z",
                          "updated_at": null
                        },
                        {
                          "id": "loc_f5HqjVaiq7g9ISlmivpytxSf",
                          "object": "location",
                          "name": "Germany",
                          "shape": {
                            "type": "circle",
                            "format": "distance",
                            "distance": {
                              "center": "geo:51.303908897065064,10.222253628401518",
                              "radius": "192.37 km"
                            }
                          },
                          "created_at": "2022-07-14T15:51:39.265Z",
                          "updated_at": null
                        },
                        {
                          "id": "loc_RcYz537sV07e1t5aG5tIH9FD",
                          "object": "location",
                          "name": "Poland",
                          "shape": {
                            "type": "polygon",
                            "format": "geojson",
                            "geojson": {
                              "type": "Polygon",
                              "coordinates": [
                                [
                                  [
                                    18.553923,
                                    50.559107
                                  ],
                                  [
                                    18.528805,
                                    51.087437
                                  ],
                                  [
                                    19.591667,
                                    50.832424
                                  ],
                                  [
                                    19.425109,
                                    50.497984
                                  ],
                                  [
                                    19.375814,
                                    50.330652
                                  ],
                                  [
                                    19.398107,
                                    50.111652
                                  ],
                                  [
                                    18.73906,
                                    49.981498
                                  ],
                                  [
                                    18.272477,
                                    50.088707
                                  ],
                                  [
                                    18.553923,
                                    50.559107
                                  ]
                                ]
                              ]
                            }
                          },
                          "created_at": "2022-07-14T15:21:55.085Z",
                          "updated_at": null
                        }
                      ],
                      "total": 4,
                      "has_more": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/locations/{locationId}": {
      "get": {
        "operationId": "get-location",
        "tags": [
          "Locations"
        ],
        "summary": "Get Location",
        "description": "Returns a location object.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLocationId"
            },
            "name": "locationId",
            "in": "path",
            "required": true,
            "description": "The unique location ID."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "locations"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a location object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocationsGetResponseBody"
                },
                "examples": {
                  "Circle Example": {
                    "value": {
                      "id": "loc_NoMGXmHO9OUs7iz9mGWpamma",
                      "object": "location",
                      "name": "Belleville",
                      "shape": {
                        "type": "circle",
                        "format": "distance",
                        "distance": {
                          "center": "geo:40.79372699823857,-74.15092132694554",
                          "radius": "1.54 km"
                        }
                      },
                      "created_at": "2022-07-15T06:04:36.924Z",
                      "updated_at": null
                    }
                  },
                  "Polygon Example": {
                    "value": {
                      "id": "loc_RcYz537sV07e1t5aG5tIH9FD",
                      "object": "location",
                      "name": "Poland",
                      "shape": {
                        "type": "polygon",
                        "format": "geojson",
                        "geojson": {
                          "type": "Polygon",
                          "coordinates": [
                            [
                              [
                                18.553923,
                                50.559107
                              ],
                              [
                                18.528805,
                                51.087437
                              ],
                              [
                                19.591667,
                                50.832424
                              ],
                              [
                                19.425109,
                                50.497984
                              ],
                              [
                                19.375814,
                                50.330652
                              ],
                              [
                                19.398107,
                                50.111652
                              ],
                              [
                                18.73906,
                                49.981498
                              ],
                              [
                                18.272477,
                                50.088707
                              ],
                              [
                                18.553923,
                                50.559107
                              ]
                            ]
                          ]
                        }
                      },
                      "created_at": "2022-07-14T15:21:55.085Z",
                      "updated_at": null
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/referrals/{campaignId}/members/{memberId}/holders": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a referral program campaign."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique referral code or its identifier."
        }
      ],
      "post": {
        "operationId": "referrals-add-holders-1",
        "tags": [
          "Referrals"
        ],
        "summary": "Add Referral Code Holders",
        "description": "Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data.\n\nIf the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct.\n\nTo use this endpoint, you must have the following permissions:\n- Create and modify Customers and Segments (`customers.modify`)\n- Publish Voucher (`vouchers.publish`)\n\n> 👍\n>To add a holder as a referer, use the [Create Publication](ref:create-publication) endpoint.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "referrals"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the customer data to be upserted as redeemable holders.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralsMembersHoldersCreateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "holders": [
                      {
                        "source_id": "cst-prsn01",
                        "name": "Alex Doe",
                        "email": "alex-doe@your.domain.com",
                        "country": "England"
                      },
                      {
                        "source_id": "cst-prsn02",
                        "name": "Alex Joe",
                        "email": "alex-joe@your.domain.com",
                        "country": "Wales"
                      }
                    ],
                    "metadata": {
                      "influencer_code": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a list of redeemable holder objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralsMembersHoldersCreateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "holders": [
                        {
                          "id": "rh_0f198761748966ffab",
                          "created_at": "2024-07-23T10:40:48.579Z",
                          "redeemable_id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9lS",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_r8yoJtgAAF2pqU1yuICtk9bv",
                          "holder_role": "REFEREE",
                          "object": "redeemable_holder",
                          "metadata": {
                            "influencer_code": true
                          }
                        },
                        {
                          "id": "rh_0f198761748966ffac",
                          "created_at": "2024-07-23T10:40:48.579Z",
                          "redeemable_id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9lS",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_uCLPtbQkQayw6t40O9IMPQzV",
                          "holder_role": "REFEREE",
                          "object": "redeemable_holder",
                          "metadata": {
                            "influencer_code": true
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is incorrect or the referral card has not been published yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .holders must NOT have fewer than 1 items",
                      "request_id": "v-0f19a8ee60d0ae80a6"
                    }
                  },
                  "Voucher Not Published Yet": {
                    "value": {
                      "code": 400,
                      "key": "not_published",
                      "message": "Voucher is not published",
                      "details": "Referral code must be first published to Referrer before assigning it to Referee",
                      "request_id": "v-0f19a97f5d50ae817c"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if the user is missing permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing Permissions": {
                    "value": {
                      "code": 403,
                      "message": "Missing permission",
                      "details": "User does not have a required permission to perform this operation.",
                      "key": "missing_required_permission"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the referral code with a given ID or the campaign with a given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Voucher Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id REFAPI-mk",
                      "request_id": "v-0f19a95d5610ae8144",
                      "resource_id": "REFAPI-mk",
                      "resource_type": "voucher"
                    }
                  },
                  "Campaign Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_v1mxc6sGDlXzQygz8wBc8HVU",
                      "request_id": "v-0f1ab4f0f1425cd8dc",
                      "resource_id": "camp_v1mxc6sGDlXzQygz8wBc8HVU",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a voucher code already exists, the customer has been already assigned as a referrer or referee, or the `source_id` and `id` of the same customer has been used in two different objects in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate Customer ID or Source ID": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated customer exists with id tst-prsn10",
                      "request_id": "v-0f19adcc3c50ae87a4",
                      "resource_id": "tst-prsn10",
                      "resource_type": "customer"
                    }
                  },
                  "Customer Already Assigned": {
                    "value": {
                      "code": 409,
                      "key": "holder_assignement_duplication",
                      "message": "Customer is already assigned to given redeemable",
                      "request_id": "v-0f19ae50d750ae886b"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "referrals-code-holders",
        "tags": [
          "Referrals"
        ],
        "summary": "List Referral Code Holders",
        "description": "Retrieves all the redeemables that have been assigned to the customer.\n\nTo use this endpoint, you must have the following permissions:\n\n- Read Customers (`customers.details.read`)",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListRedeemables"
            },
            "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 events starting after an event with the given ID."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListReferralsRedeemableHolders"
            },
            "description": "Filters for listing customer redeemables.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "referrals"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the holders of the redeemable that is assigned to the referral campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralsMembersHoldersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "rh_0e7213a6bc407b8639",
                          "created_at": "2024-03-15T09:08:50.529Z",
                          "redeemable_id": "v_jFVcN1f5ofg707z2G3GYWtMyKJ4usss4",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_td1gcD4feTAjUKQYfg40kWhN",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_XDwHXVBSZZAJgjpHvrgUHx3J",
                          "holder_role": "REFERRER",
                          "object": "redeemable_holder"
                        },
                        {
                          "id": "rh_0e6d0b84960f447f52",
                          "created_at": "2024-03-11T11:20:54.093Z",
                          "redeemable_id": "v_jFVcN1f5ofg707z2G3GYWtMyKJ4usss4",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_td1gcD4feTAjUKQYfg40kWhN",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_1B9wkAcSz5O1Y4Zn8JPfKQm6",
                          "holder_role": "REFEREE",
                          "object": "redeemable_holder"
                        }
                      ],
                      "total": 2,
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id v_wnd4fslUpkLnZH0KthYDxouBSgn24Yr",
                      "request_id": "v-0eed8b989da91a1622",
                      "resource_id": "v_wnd4fslUpkLnZH0KthYDxouBSgn24Yr",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/referrals/{campaignId}/members/{memberId}/holders/{holderId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignId"
          },
          "name": "campaignId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a referral program campaign."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique referral code or its identifier."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRedeemableHolderId"
          },
          "name": "holderId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a redeemable holder."
        }
      ],
      "delete": {
        "operationId": "referrals-remove-holder-1",
        "tags": [
          "Referrals"
        ],
        "summary": "Remove Referral Card Holder",
        "description": "Removes the holder from a referral card. You can remove a referee only.\n\nTo use this endpoint, you must have the following permissions:\n- Create and modify Customers and Segments (`customers.modify`)\n- Publish Voucher (`vouchers.publish`)",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "referrals"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if removal is successful."
          },
          "403": {
            "description": "Returns an error if the user is missing permissions or is trying to remove the referrer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing Permissions": {
                    "value": {
                      "code": 403,
                      "message": "Missing permission",
                      "details": "User does not have a required permission to perform this operation.",
                      "key": "missing_required_permission"
                    }
                  },
                  "Removing the Referrer": {
                    "value": {
                      "code": 403,
                      "key": "forbidden",
                      "message": "Can not remove assignment",
                      "details": "You can not remove Referrer assignment",
                      "request_id": "v-0f1ab7abf6d2a9d353"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource cannot 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_vVk4unz3k4gA023fk9XoSiT",
                      "request_id": "v-0f1ac3876112a9bd5e",
                      "resource_id": "camp_vVk4unz3k4gA023fk9XoSiT",
                      "resource_type": "campaign"
                    }
                  },
                  "Redeemable Holder Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find redeemable_holder with id rh_0f1ab744ce8277d0dc",
                      "request_id": "v-0f1abf8769d2a9b8be",
                      "resource_id": "rh_0f1ab744ce8277d0dc",
                      "resource_type": "redeemable_holder"
                    }
                  },
                  "Referral Card Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id v_uOrG9tQresN9X51gbAoo0a2vY4MLV9l",
                      "request_id": "v-0f1ac03b4cc25cca6b",
                      "resource_id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9l",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/referrals/members/{memberId}/holders": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique referral code or its identifier."
        }
      ],
      "post": {
        "operationId": "referrals-add-holders",
        "tags": [
          "Referrals"
        ],
        "summary": "Add Referral Code Holders",
        "description": "Adds new holders to a referral code as **referees**. The data sent in the request is upserted into the customer data.\n\nIf the request returns an error even for one customer, you have to resend the whole request. Customer data is upserted if the data for all customers is correct.\n\nTo use this endpoint, you must have the following permissions:\n- Create and modify Customers and Segments (`customers.modify`)\n- Publish Voucher (`vouchers.publish`)\n\n> 👍\n>To add a holder as a referer, use the [Create Publication](ref:create-publication) endpoint.\n\n> 📘 Alternative endpoint\n>\n>This endpoint is an alternative to the [Add Referral Code Holders endpoint](ref:referrals-add-holders-1). The URL was re-designed to retrieve the referral member holders without providing the `campaignId` as a path paremeter.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "referrals"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the customer data to be upserted as redeemable holders.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralsMembersHoldersCreateInBulkRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "holders": [
                      {
                        "source_id": "cst-prsn01",
                        "name": "Alex Doe",
                        "email": "alex-doe@your.domain.com",
                        "country": "England"
                      },
                      {
                        "source_id": "cst-prsn02",
                        "name": "Alex Joe",
                        "email": "alex-joe@your.domain.com",
                        "country": "Wales"
                      }
                    ],
                    "metadata": {
                      "influencer_code": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a list of redeemable holder objects.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralsMembersHoldersCreateInBulkResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "holders": [
                        {
                          "id": "rh_0f198761748966ffab",
                          "created_at": "2024-07-23T10:40:48.579Z",
                          "redeemable_id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9lS",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_r8yoJtgAAF2pqU1yuICtk9bv",
                          "holder_role": "REFEREE",
                          "object": "redeemable_holder",
                          "metadata": {
                            "influencer_code": true
                          }
                        },
                        {
                          "id": "rh_0f198761748966ffac",
                          "created_at": "2024-07-23T10:40:48.579Z",
                          "redeemable_id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9lS",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_vVk4unz3k4gA023fk9XoSiTh",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_uCLPtbQkQayw6t40O9IMPQzV",
                          "holder_role": "REFEREE",
                          "object": "redeemable_holder",
                          "metadata": {
                            "influencer_code": true
                          }
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is incorrect or the referral card has not been published yet.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid Payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .holders must NOT have fewer than 1 items",
                      "request_id": "v-0f19a8ee60d0ae80a6"
                    }
                  },
                  "Voucher Not Published Yet": {
                    "value": {
                      "code": 400,
                      "key": "not_published",
                      "message": "Voucher is not published",
                      "details": "Referral code must be first published to Referrer before assigning it to Referee",
                      "request_id": "v-0f19a97f5d50ae817c"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if the user is missing permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing Permissions": {
                    "value": {
                      "code": 403,
                      "message": "Missing permission",
                      "details": "User does not have a required permission to perform this operation.",
                      "key": "missing_required_permission"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error indicating that the referral code with a given ID was not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Voucher Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id REFAPI-mk",
                      "request_id": "v-0f19a95d5610ae8144",
                      "resource_id": "REFAPI-mk",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a voucher code already exists, the customer has been already assigned as a referrer or referee, or the `source_id` and `id` of the same customer has been used in two different objects in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate Customer ID or Source ID": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated customer exists with id tst-prsn10",
                      "request_id": "v-0f19adcc3c50ae87a4",
                      "resource_id": "tst-prsn10",
                      "resource_type": "customer"
                    }
                  },
                  "Customer Already Assigned": {
                    "value": {
                      "code": 409,
                      "key": "holder_assignement_duplication",
                      "message": "Customer is already assigned to given redeemable",
                      "request_id": "v-0f19ae50d750ae886b"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "referrals-code-holders-1",
        "tags": [
          "Referrals"
        ],
        "summary": "List Referral Code Holders",
        "description": "Retrieves the holders of the referral code from a referral campaign.\n\nTo use this endpoint, you must have the following permissions:\n\n- Read Customers (`customers.details.read`)\n\n> 📘 Alternative endpoint\n>\n>This endpoint is an alternative to the [List Member Holders endpoint](ref:referrals-member-holders). The URL was re-designed to retrieve the referral member holders without providing the `campaignId` as a path paremeter.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListRedeemables"
            },
            "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 events starting after an event with the given ID."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListReferralsRedeemableHolders"
            },
            "description": "Filters for listing customer redeemables.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "referrals"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the holders of the redeemable that is assigned to the referral campaign.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralsMembersHoldersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "rh_0e7213a6bc407b8639",
                          "created_at": "2024-03-15T09:08:50.529Z",
                          "redeemable_id": "v_jFVcN1f5ofg707z2G3GYWtMyKJ4usss4",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_td1gcD4feTAjUKQYfg40kWhN",
                          "campaign_type": "REFERRAL_PROGRAM",
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_XDwHXVBSZZAJgjpHvrgUHx3J",
                          "holder_role": "REFERRER",
                          "object": "redeemable_holder"
                        },
                        {
                          "id": "rh_0e6d0b84960f447f52",
                          "created_at": "2024-03-11T11:20:54.093Z",
                          "redeemable_id": "v_jFVcN1f5ofg707z2G3GYWtMyKJ4usss4",
                          "redeemable_object": "voucher",
                          "campaign_id": "camp_td1gcD4feTAjUKQYfg40kWhN",
                          "campaign_type": null,
                          "voucher_type": "DISCOUNT_VOUCHER",
                          "customer_id": "cust_1B9wkAcSz5O1Y4Zn8JPfKQm6",
                          "holder_role": "OWNER",
                          "object": "redeemable_holder"
                        }
                      ],
                      "total": 2,
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id v_wnd4fslUpkLnZH0KthYDxouBSgn24Yr",
                      "request_id": "v-0eed8b989da91a1622",
                      "resource_id": "v_wnd4fslUpkLnZH0KthYDxouBSgn24Yr",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/referrals/members/{memberId}/holders/{holderId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMemberId"
          },
          "name": "memberId",
          "in": "path",
          "required": true,
          "description": "Unique referral code or its identifier."
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterRedeemableHolderId"
          },
          "name": "holderId",
          "in": "path",
          "required": true,
          "description": "Unique identifier of a redeemable holder."
        }
      ],
      "delete": {
        "operationId": "referrals-remove-holder",
        "tags": [
          "Referrals"
        ],
        "summary": "Remove Referral Card Holder",
        "description": "Removes the holder from a referral card. You can remove a referee only.\n\nTo use this endpoint, you must have the following permissions:\n- Create and modify Customers and Segments (`customers.modify`)\n- Publish Voucher (`vouchers.publish`)\n\n> 📘 Alternative endpoint\n>\n>This endpoint is an alternative to the [Remove Referral Card Holder endpoint](ref:referrals-remove-holder-1). The URL was re-designed to retrieve the referral member holders without providing the `campaignId` as a path paremeter.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "referrals"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if removal is successful."
          },
          "403": {
            "description": "Returns an error if the user is missing permissions or is trying to remove the referrer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing Permissions": {
                    "value": {
                      "code": 403,
                      "message": "Missing permission",
                      "details": "User does not have a required permission to perform this operation.",
                      "key": "missing_required_permission"
                    }
                  },
                  "Removing the Referrer": {
                    "value": {
                      "code": 403,
                      "key": "forbidden",
                      "message": "Can not remove assignment",
                      "details": "You can not remove Referrer assignment",
                      "request_id": "v-0f1ab7abf6d2a9d353"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource cannot be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Redeemable Holder Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find redeemable_holder with id rh_0f1ab744ce8277d0dc",
                      "request_id": "v-0f1abf8769d2a9b8be",
                      "resource_id": "rh_0f1ab744ce8277d0dc",
                      "resource_type": "redeemable_holder"
                    }
                  },
                  "Referral Card Not Found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find voucher with id v_uOrG9tQresN9X51gbAoo0a2vY4MLV9l",
                      "request_id": "v-0f1ac03b4cc25cca6b",
                      "resource_id": "v_uOrG9tQresN9X51gbAoo0a2vY4MLV9l",
                      "resource_type": "voucher"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/trash-bin": {
      "get": {
        "operationId": "list-bin-entries",
        "tags": [
          "Bin"
        ],
        "summary": "List Bin Entries",
        "description": "Retrieves a list of resources moved to the bin. The following resources can be moved to the bin:\n- campaigns\n- vouchers\n- products\n- SKUs\n\nTo use this endpoint, you must have the following permissions:\n- `vouchers.read`\n- `campaigns.read`\n- `products.read`",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListBin"
            },
            "in": "query",
            "name": "order",
            "description": "Orders the bin entries according to the bin 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."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListBin"
            },
            "in": "query",
            "name": "filters",
            "description": "Filters for listing bin entries.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "trash-bin"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of all the bin entries matching the query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrashBinListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "tbe_0eb6515f758ae37126",
                          "created_at": "2024-05-07T09:15:13.218Z",
                          "deleted_by_user_id": "user_JjB45t4Rpl4t1n0oMRlj6trzXKsh7FGX7",
                          "resource_id": "v_JPfnb5ChY1HdNnaMkA0ikra4gIg0dja6",
                          "resource_type": "voucher",
                          "resource_name": "Trash-Discount-123",
                          "resource_parent_id": "camp_ITQtKkrPOxL1a55uSU7tqbCL",
                          "object": "voucher"
                        },
                        {
                          "id": "tbe_0eb651ca7b8ae37184",
                          "created_at": "2024-05-07T09:17:02.827Z",
                          "deleted_by_user_id": "user_JjB45t4Rpl4t1n0oMRlj6trzXKsh7FGX7",
                          "resource_id": "sku_0eb651c09e0ae37178",
                          "resource_type": "sku",
                          "resource_name": "Trash container icy blue",
                          "resource_parent_id": "prod_0eb651c04395147085",
                          "object": "sku"
                        }
                      ],
                      "total": 2,
                      "has_more": true,
                      "more_starting_after": "tbe_0eb651ca7b8ae37184"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if the user is missing required permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "message": "Missing permission",
                      "details": "User does not have a required permission to perform this operation.",
                      "key": "missing_required_permission"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/trash-bin/{binEntryId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterBinEntryId"
          },
          "in": "path",
          "name": "binEntryId",
          "description": "Provide the unique identifier of the bin entry.",
          "required": true
        }
      ],
      "delete": {
        "operationId": "delete-bin-entry",
        "tags": [
          "Bin"
        ],
        "summary": "Delete Bin Entry",
        "description": "Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted:\n- campaigns\n- vouchers\n- products\n- SKUs\n\n\n\nTo use this endpoint and delete a given resource type, you must have the following permissions:\n- `vouchers.delete` to delete a voucher,\n- `campaigns.delete` to delete a campaign,\n- `products.delete` to delete a product or SKU.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "trash-bin"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "403": {
            "description": "Returns an error if the user is missing required permissions.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "message": "Missing permission",
                      "details": "User does not have a required permission to perform this operation.",
                      "key": "missing_required_permission"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates/campaigns": {
      "get": {
        "operationId": "list-campaign-templates",
        "tags": [
          "Templates"
        ],
        "summary": "List Campaign Templates",
        "description": "Lists all campaign templates available in the project.\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the campaign templates created after a template with the given ID."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterTemplatesList"
            },
            "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/ParameterBoolean"
            },
            "in": "query",
            "name": "include_total",
            "description": "If set to `true`, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to `false` by default."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListTemplates"
            },
            "description": "Filters for listing templates.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "templates"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of campaign template objects. The templates are returned by creation date by default. The most recent objects appear last unless specified otherwise with the `order` parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatesCampaignsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "campaign_templates",
                      "campaign_templates": [
                        {
                          "id": "camp_tpl_hFK6hpVc9WKsWaBv4mz7uZn8",
                          "name": "DISCOUNT-CAMPAIGN-TEMPLATE",
                          "description": "New discount for Q4",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "created_at": "2024-06-21T13:03:09.431Z",
                          "object": "campaign_template"
                        },
                        {
                          "id": "camp_tpl_cR8va5Ga2nAi4Nxoi1I1qR8S",
                          "name": "GIFT-CAMPAIGN-TEMPLATE",
                          "campaign_type": "GIFT_VOUCHERS",
                          "created_at": "2024-07-05T14:26:31.600Z",
                          "updated_at": "2024-07-05T14:27:02.905Z",
                          "object": "campaign_template"
                        }
                      ],
                      "total": 14,
                      "has_more": true
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "create-campaign-template",
        "tags": [
          "Templates"
        ],
        "summary": "Create Campaign Template",
        "description": "Creates a template for a discount or gift campaign, or a promotion tier.\n\nA template stores campaign configuration **without** the following details:\n- Campaign name\n- Category\n- Code count\n\nThe following elements are not supported by campaign templates:\n- Redeeming API keys\n- Redeeming users\n- Customer loyalty tier\n- Static segments\n\n> 👍 Promotion Tiers and Campaign Templates\n>\n>You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the `DISCOUNT_COUPON` type. You can use this template to create:\n>- Discount campaign,\n>- Promotion tier.\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "templates"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide details for a campaign template",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplatesCampaignsCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details of a created campaign template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatesCampaignsCreateTemplateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_tpl_0f887664cfe19f2162",
                      "name": "Template Halloween Campaigns",
                      "description": "Reuse every October",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "created_at": "2024-10-17T14:37:59.488Z",
                      "object": "campaign_template"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is missing required properties in the request or the campaign includes features not supported by campaign templates.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Missing Name": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload must have required property 'name'",
                      "request_id": "v-0f77b9c5b95c094937"
                    }
                  },
                  "Invalid Campaign Type": {
                    "value": {
                      "code": 400,
                      "key": "campaign_type_is_not_supported_by_campaign_template",
                      "message": "Campaign of the given type is not supported by campaign template",
                      "request_id": "v-0f3d6a65bb929f94f1"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign with id camp_Tq8OnIpBAeHNY7KMM0rE5MB",
                      "request_id": "v-0f3eed5a090c0fdf45",
                      "resource_id": "camp_Tq8OnIpBAeHNY7KMM0rE5MB",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates/campaigns/{campaignTemplateId}": {
      "parameters": [
        {
          "in": "path",
          "name": "campaignTemplateId",
          "description": "Pass the campaign template ID that was assigned by Voucherify.",
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignTemplateId"
          },
          "required": true
        }
      ],
      "get": {
        "operationId": "get-campaign-template",
        "tags": [
          "Templates"
        ],
        "summary": "Get Campaign Template",
        "description": "Retrieves a campaign template available in the project.\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "templates"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about a campaign template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatesCampaignsGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHcq",
                      "name": "Happy Hours Template",
                      "description": "Template for a Happy Hours campaign with discount coupons.",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "created_at": "2019-09-09T09:09:09.009Z",
                      "object": "campaign_template"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign_template with id camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "request_id": "v-0f6d3efe61099b2824",
                      "resource_id": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "resource_type": "campaign_template"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-campaign-template",
        "tags": [
          "Templates"
        ],
        "summary": "Update Campaign Template",
        "description": "Updates the name or description of the campaign template.\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "templates"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the new name or description for the campaign template",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplatesCampaignsUpdateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details of an updated campaign template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatesCampaignsUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHcq",
                      "name": "Happy Hours Winter Template",
                      "description": "Template for a Happy Hours campaign with discount coupons for the winter season.",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "created_at": "2019-09-09T09:09:09.009Z",
                      "updated_at": "2019-09-09T19:09:09.009Z",
                      "object": "campaign_template"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .description must be string,null",
                      "request_id": "v-0f6d3eda91c99b27ed"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign_template with id camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "request_id": "v-0f6d3efe61099b2824",
                      "resource_id": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "resource_type": "campaign_template"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a campaign template with the same name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated campaign_template exists with name Campaign_Template_01",
                      "request_id": "v-0f7610d229c04a0bd9",
                      "resource_id": "Campaign_Template_01",
                      "resource_type": "campaign_template"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-campaign-template",
        "tags": [
          "Templates"
        ],
        "summary": "Delete Campaign Template",
        "description": "Deletes the campaign template permanently.\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "templates"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign_template with id camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "request_id": "v-0f6d3efe61099b2824",
                      "resource_id": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "resource_type": "campaign_template"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates/campaigns/{campaignTemplateId}/campaign-setup": {
      "parameters": [
        {
          "in": "path",
          "name": "campaignTemplateId",
          "description": "Pass the campaign template ID that was assigned by Voucherify.",
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignTemplateId"
          },
          "required": true
        }
      ],
      "post": {
        "operationId": "create-campaign-from-template",
        "tags": [
          "Templates"
        ],
        "summary": "Create Campaign From Template",
        "description": "Creates a campaign out of a campaign template.\n\nTo create a campaign, you need to provide the name in the request, while other fields are optional. If no other fields are sent, the configuration from the template will be used.\n\nYou can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the campaign. When the campaign has been created, then you can:\n- [Update the validation rule](ref:update-validation-rule),\n- [Unassign the validation rule](ref:delete-validation-rule-assignment),\n- [Assign an existing validation rule](ref:create-validation-rule-assignment).\n\n> 👍 Promotion Tiers and Campaign Templates\n>\n>You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the `DISCOUNT_COUPON` type. You can use this template to create:\n>- Discount campaign\n>- [Promotion tier](ref:add-tier-from-template)\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "templates"
            ]
          }
        ],
        "requestBody": {
          "description": "Only `name` is required. The rest of the fields will overwrite the template configuration.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplatesCampaignsCampaignSetupCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "name": "Campaign-out-of-template",
                    "description": "Created out of a template",
                    "auto_join": true,
                    "join_once": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the created campaign and about the resources that have been created out of the template and added to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatesCampaignsCampaignSetupCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "created_resources": [
                        {
                          "id": "val_3LBFw25WTmAK",
                          "object": "validation_rules"
                        }
                      ],
                      "campaign": {
                        "id": "camp_txDwyDPeLvBEq490bfV2nLwo",
                        "name": "Campaign-out-of-template",
                        "campaign_type": "DISCOUNT_COUPONS",
                        "type": "AUTO_UPDATE",
                        "is_referral_code": false,
                        "voucher": {
                          "type": "DISCOUNT_VOUCHER",
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 2500,
                            "aggregated_amount_limit": 25000,
                            "units": null,
                            "effect": "APPLY_TO_ITEMS"
                          },
                          "gift": null,
                          "loyalty_card": null,
                          "redemption": {
                            "quantity": 4,
                            "redeemed_quantity": 0
                          },
                          "code_config": {
                            "pattern": "##",
                            "length": 2,
                            "charset": "xD",
                            "prefix": "U-",
                            "postfix": "-WOT"
                          }
                        },
                        "auto_join": true,
                        "join_once": true,
                        "use_voucher_metadata_schema": true,
                        "description": "Winter 2024-25",
                        "start_date": null,
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_hours": null,
                        "validity_day_of_week": null,
                        "activity_duration_after_publishing": null,
                        "vouchers_count_invalid": null,
                        "vouchers_count": 0,
                        "active": true,
                        "metadata": null,
                        "created_at": "2024-09-26T17:14:56.226Z",
                        "updated_at": null,
                        "category": null,
                        "creation_status": "DONE",
                        "protected": false,
                        "validation_rules_assignments": {
                          "data": [
                            {
                              "id": "asgm_BLgJYmo64rnAK5eB",
                              "rule_id": "val_3LBFw25WTmAK",
                              "related_object_id": "camp_txDwyDPeLvBEq490bfV2nLwo",
                              "related_object_type": "campaign",
                              "created_at": "2024-09-26T17:14:56.226Z",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        },
                        "object": "campaign",
                        "deleted": false,
                        "deleted_at": null,
                        "category_id": null,
                        "voucher_type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 2500,
                          "aggregated_amount_limit": 25000,
                          "units": null,
                          "effect": "APPLY_TO_ITEMS"
                        },
                        "gift": null,
                        "loyalty_card": null,
                        "voucher_code_config": {
                          "pattern": "##",
                          "length": 2,
                          "charset": "xD",
                          "prefix": "Your-",
                          "postfix": "-Voucher"
                        },
                        "default_voucher_redemption": {
                          "quantity": 4
                        }
                      },
                      "object": "campaign_setup"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign_template with id camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "request_id": "v-0f6d3efe61099b2824",
                      "resource_id": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "resource_type": "campaign_template"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a campaign with the same name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated campaign exists with name CampaignFromTemplate-01",
                      "request_id": "v-0f754b9c091c095e33",
                      "resource_id": "CampaignFromTemplate-01",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/templates/campaigns/{campaignTemplateId}/tier-setup": {
      "parameters": [
        {
          "in": "path",
          "name": "campaignTemplateId",
          "description": "Pass the campaign template ID that was assigned by Voucherify.",
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignTemplateId"
          },
          "required": true
        }
      ],
      "post": {
        "operationId": "add-tier-from-template",
        "tags": [
          "Templates"
        ],
        "summary": "Add Promotion Tier From Template",
        "description": "Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign.\n\nTo add a promotion tier to a campaign, you need to provide the name in the request and the campaign ID. Other fields are optional. If no other fields are sent, the configuration from the template will be used.\n\nYou can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an action or an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the promotion tier. When the promotion tier has been created, then you can:\n- [Update the validation rule](ref:update-validation-rule),\n- [Unassign the validation rule](ref:delete-validation-rule-assignment),\n- [Assign an existing validation rule](ref:create-validation-rule-assignment).\n\n> 👍 Promotion Tiers and Campaign Templates\n>\n>You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the `DISCOUNT_COUPON` type. You can use this template to create:\n>- [Discount campaign](ref:create-campaign-from-template)\n>- Promotion tier\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "api",
              "templates"
            ]
          }
        ],
        "requestBody": {
          "description": "Only `name` and `campaign_id` are required. The rest of the fields will overwrite the template configuration.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TemplatesCampaignsTierSetupCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the added promotion tier and about the resources that have been created out of the template and added to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatesCampaignsTierSetupCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "created_resources": [
                        {
                          "id": "val_Z2QPKZhfIlW1",
                          "object": "validation_rules"
                        }
                      ],
                      "promotion_tier": {
                        "id": "promo_FHRjE8g5Cu2C1C5voqjijl5I",
                        "created_at": "2024-10-07T14:40:20.125Z",
                        "name": "metadata-test-template-02",
                        "banner": null,
                        "action": {
                          "discount": {
                            "type": "AMOUNT",
                            "amount_off": 300,
                            "aggregated_amount_limit": 900,
                            "units": null,
                            "effect": "APPLY_TO_ITEMS"
                          }
                        },
                        "metadata": {},
                        "hierarchy": 9,
                        "campaign": {
                          "id": "camp_1oOwcEGaNELf8G5sVN77z0ou",
                          "start_date": null,
                          "expiration_date": null,
                          "active": true,
                          "object": "campaign",
                          "name": "Promotion request test",
                          "created_at": "2024-07-26T11:00:51.278Z",
                          "campaign_type": "PROMOTION",
                          "category_id": "cat_0d75bdfe4c9030a732",
                          "categories": []
                        },
                        "campaign_id": "camp_1oOwcEGaNELf8G5sVN77z0ou",
                        "summary": {
                          "redemptions": {
                            "total_redeemed": 0
                          },
                          "orders": {
                            "total_amount": 0,
                            "total_discount_amount": 0
                          }
                        },
                        "active": true,
                        "validity_day_of_week": null,
                        "category_id": null,
                        "categories": [],
                        "object": "promotion_tier",
                        "validation_rules_assignments": [
                          {
                            "id": "asgm_n1ILxyVhKjyACbVL",
                            "rule_id": "val_Z2QPKZhfIlW1",
                            "related_object_id": "promo_FHRjE8g5Cu2C1C5voqjijl5I",
                            "related_object_type": "promotion_tier",
                            "created_at": "2024-10-07T14:40:20.125Z",
                            "object": "validation_rules_assignment"
                          }
                        ]
                      },
                      "object": "promotion_tier_setup"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find campaign_template with id camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "request_id": "v-0f6d3efe61099b2824",
                      "resource_id": "camp_tpl_zLtn2H9fgcG3NwO7t4PAfHc",
                      "resource_type": "campaign_template"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects": {
      "post": {
        "operationId": "create-project",
        "tags": [
          "Management"
        ],
        "summary": "Create Project",
        "description": "Creates a new project. You can add users, specify the cluster, timezone, currency, and other details.\n\nAll owners are added to the project by default.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Define project details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details of a created project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "proj_V0uCh3RiFy",
                      "name": "Voucherify Team Project",
                      "currency": "EUR",
                      "timezone": "UTC",
                      "cluster_id": "eu1",
                      "api_version": "v2018-08-01",
                      "case_sensitive_codes": true,
                      "client_trusted_domains": [],
                      "client_redeem_enabled": false,
                      "client_publish_enabled": false,
                      "client_list_vouchers_enabled": false,
                      "client_create_customer_enabled": false,
                      "client_loyalty_events_enabled": false,
                      "client_set_voucher_expiration_date_enabled": false,
                      "api_usage_notifications": {
                        "messages": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "cycle_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "redemptions": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "webhook_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "bulk_api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        }
                      },
                      "webhooks_callout_notifications": {
                        "webhooks": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        },
                        "distributions": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        }
                      },
                      "is_sandbox": false,
                      "webhook_version": "v2024-01-01"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is missing required properties in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload must have required property 'name'",
                      "request_id": "v-0e9389ccac8da56f55"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Returns an error if the project is to be created in a cluster that is unavailable to the user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectBoundError"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 403,
                      "key": "forbidden",
                      "message": "Forbidden",
                      "details": "Project is bound to different region",
                      "request_id": "v-0e938b8738000cc714"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-projects",
        "tags": [
          "Management"
        ],
        "summary": "List Projects",
        "description": "Lists all projects for the organization.\n\nThe endpoint does not require any query parameters.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of all projects with their details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "proj_TrlkLiH4",
                          "name": "Test-project-01",
                          "currency": "EUR",
                          "timezone": "UTC",
                          "cluster_id": "dev",
                          "api_version": "v2018-08-01",
                          "case_sensitive_codes": true,
                          "client_trusted_domains": [],
                          "client_redeem_enabled": false,
                          "client_publish_enabled": false,
                          "client_list_vouchers_enabled": false,
                          "client_create_customer_enabled": false,
                          "client_loyalty_events_enabled": false,
                          "client_set_voucher_expiration_date_enabled": false,
                          "api_usage_notifications": {
                            "messages": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "cycle_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "redemptions": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "webhook_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "bulk_api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            }
                          },
                          "webhooks_callout_notifications": {
                            "webhooks": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            },
                            "distributions": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            }
                          },
                          "is_sandbox": false,
                          "webhook_version": "v2024-01-01"
                        },
                        {
                          "id": "proj_yTNl0NT6",
                          "name": "Test-project-01",
                          "currency": "EUR",
                          "timezone": "UTC",
                          "cluster_id": "dev",
                          "api_version": "v2018-08-01",
                          "case_sensitive_codes": true,
                          "client_trusted_domains": [],
                          "client_redeem_enabled": false,
                          "client_publish_enabled": false,
                          "client_list_vouchers_enabled": false,
                          "client_create_customer_enabled": false,
                          "client_loyalty_events_enabled": false,
                          "client_set_voucher_expiration_date_enabled": false,
                          "api_usage_notifications": {
                            "messages": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "cycle_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "redemptions": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "webhook_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "bulk_api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            }
                          },
                          "webhooks_callout_notifications": {
                            "webhooks": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            },
                            "distributions": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            }
                          },
                          "is_sandbox": false,
                          "webhook_version": "v2024-01-01"
                        },
                        {
                          "id": "sand_CvFGa2LX",
                          "name": "Sandbox Project",
                          "currency": "EUR",
                          "timezone": "Europe/Vienna",
                          "cluster_id": "eu1",
                          "api_version": "v2018-08-01",
                          "description": "",
                          "case_sensitive_codes": true,
                          "client_trusted_domains": [],
                          "client_redeem_enabled": false,
                          "client_publish_enabled": false,
                          "client_list_vouchers_enabled": false,
                          "client_create_customer_enabled": false,
                          "client_loyalty_events_enabled": false,
                          "client_set_voucher_expiration_date_enabled": false,
                          "api_usage_notifications": {
                            "messages": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "cycle_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "redemptions": {
                              "value": 80,
                              "emails": [],
                              "in_app": false,
                              "enabled": false
                            },
                            "webhook_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            },
                            "bulk_api_calls": {
                              "value": 80,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true,
                              "enabled": true
                            }
                          },
                          "webhooks_callout_notifications": {
                            "webhooks": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            },
                            "distributions": {
                              "email": true,
                              "emails": [
                                "your-email@domain.com"
                              ],
                              "in_app": true
                            }
                          },
                          "is_sandbox": true,
                          "limits": {
                            "api_calls": [
                              {
                                "value": 100,
                                "duration": "PT1H"
                              }
                            ],
                            "bulk_api_calls": [
                              {
                                "value": 1,
                                "duration": "PT1H"
                              }
                            ]
                          },
                          "default_code_config": {
                            "charset": "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                          },
                          "webhook_version": "v2024-01-01"
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-project",
        "tags": [
          "Management"
        ],
        "summary": "Get Project",
        "description": "Retrieves an existing project.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details of a project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "proj_V0uCh3RiFy",
                      "name": "Voucherify Team Project",
                      "currency": "EUR",
                      "timezone": "Etc/GMT+1",
                      "cluster_id": "eu1",
                      "api_version": "v2018-08-01",
                      "description": "Project for testing.",
                      "case_sensitive_codes": true,
                      "client_trusted_domains": [],
                      "client_redeem_enabled": false,
                      "client_publish_enabled": false,
                      "client_list_vouchers_enabled": false,
                      "client_create_customer_enabled": false,
                      "client_loyalty_events_enabled": false,
                      "client_set_voucher_expiration_date_enabled": false,
                      "api_usage_notifications": {
                        "messages": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "cycle_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "redemptions": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "webhook_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "bulk_api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        }
                      },
                      "webhooks_callout_notifications": {
                        "webhooks": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        },
                        "distributions": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        }
                      },
                      "is_sandbox": false,
                      "default_code_config": {
                        "charset": "0123456789"
                      },
                      "webhook_version": "v2024-01-01"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-project",
        "tags": [
          "Management"
        ],
        "summary": "Update Project",
        "description": "Updates an existing project.\n\nYou can add or modify settings for timezone, currency, notifications, and other details.\n\nOnly the fields sent in the request will be updated.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Define the project details to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUpdateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details of an updated project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "proj_V0uCh3RiFy",
                      "name": "Voucherify Team Project",
                      "currency": "EUR",
                      "timezone": "Etc/GMT+1",
                      "cluster_id": "eu1",
                      "api_version": "v2018-08-01",
                      "description": "Project for testing.",
                      "case_sensitive_codes": true,
                      "client_trusted_domains": [],
                      "client_redeem_enabled": false,
                      "client_publish_enabled": false,
                      "client_list_vouchers_enabled": false,
                      "client_create_customer_enabled": false,
                      "client_loyalty_events_enabled": false,
                      "client_set_voucher_expiration_date_enabled": false,
                      "api_usage_notifications": {
                        "messages": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "cycle_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "redemptions": {
                          "value": 80,
                          "emails": [],
                          "in_app": false,
                          "enabled": false
                        },
                        "webhook_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        },
                        "bulk_api_calls": {
                          "value": 80,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true,
                          "enabled": true
                        }
                      },
                      "webhooks_callout_notifications": {
                        "webhooks": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        },
                        "distributions": {
                          "email": true,
                          "emails": [
                            "your.email@your.domain"
                          ],
                          "in_app": true
                        }
                      },
                      "is_sandbox": false,
                      "default_code_config": {
                        "charset": "0123456789"
                      },
                      "webhook_version": "v2024-01-01"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is invalid in the request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequest"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-project",
        "tags": [
          "Management"
        ],
        "summary": "Delete Project",
        "description": "Deletes an existing project.\n\nThe users currently using the deleted project will be automatically logged out.\n\n> 🚧 Sandbox Project\n>\n>The sandbox project cannot be deleted.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if deletion is successful."
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/users": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "assign-user",
        "tags": [
          "Management"
        ],
        "summary": "Assign User",
        "description": "Assigns a user to a given project. The user must be an existing user in Voucherify.\n\n> 🚧 Correct Use of Data\n>\n>To avoid errors, use the `\"role\"` key with either `\"id\"` or `\"login\"` keys.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the user details.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUsersAssignRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the user assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersAssignResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "login": "name@youremaildomain.com",
                      "email": "name@youremaildomain.com",
                      "first_name": "Sammy",
                      "last_name": "Jones",
                      "projects": {
                        "proj_9KeAhZB1": "USER",
                        "proj_npnFzPr9": "USER",
                        "proj_pEP3NO9s": "USER",
                        "proj_zsPdrUIw": "ADMIN"
                      },
                      "is_owner": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes all three keys or the required data is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload must have required property 'name'",
                      "request_id": "v-0e9389ccac8da56f55"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-users",
        "tags": [
          "Management"
        ],
        "summary": "List Users",
        "description": "Lists all users assigned to the project.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the list of all the users assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "user_FgEAjOw6riObJdy81s2yZXdqZNiAV1pM",
                          "login": "name@youremaildomain.com",
                          "email": "name@youremaildomain.com",
                          "first_name": "Sammy",
                          "last_name": "Jones",
                          "projects": {
                            "proj_9KeAhZB1": "USER",
                            "proj_npnFzPr9": "USER",
                            "proj_pEP3NO9s": "USER",
                            "proj_zsPdrUIw": "ADMIN"
                          },
                          "is_owner": false
                        },
                        {
                          "id": "user_11sYvPrOj3XE573FO1cAzzk1p4k92wLL",
                          "login": "name@youremaildomain.com",
                          "email": "name@youremaildomain.com",
                          "first_name": "Alex",
                          "last_name": "Smith",
                          "projects": {
                            "proj_3CNHbOe0": "ADMIN"
                          },
                          "is_owner": true
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/users/{userId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterUserId"
          },
          "in": "path",
          "name": "userId",
          "description": "Provide the unique identifier of the user. Alternatively, provide the user's login.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-user",
        "tags": [
          "Management"
        ],
        "summary": "Get User",
        "description": "Retrieves the project user's details.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the project user's details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersGetUserResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "login": "name@youremaildomain.com",
                      "email": "name@youremaildomain.com",
                      "first_name": "Sammy",
                      "last_name": "Jones",
                      "projects": {
                        "proj_9KeAhZB1": "USER",
                        "proj_npnFzPr9": "USER",
                        "proj_pEP3NO9s": "USER",
                        "proj_zsPdrUIw": "ADMIN"
                      },
                      "is_owner": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find user 'user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM' assigned to the project 'proj_5iQ0m7zw'",
                      "request_id": "v-0e9a2019cf4fc6a3bd",
                      "resource_id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-user",
        "tags": [
          "Management"
        ],
        "summary": "Update User",
        "description": "Updates the user's role.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the user's new role.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUsersUpdateRoleRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the user assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsUsersUpdateRoleResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
                      "login": "name@youremaildomain.com",
                      "email": "name@youremaildomain.com",
                      "first_name": "Sammy",
                      "last_name": "Jones",
                      "projects": {
                        "proj_9KeAhZB1": "USER",
                        "proj_npnFzPr9": "USER",
                        "proj_pEP3NO9s": "USER",
                        "proj_zsPdrUIw": "ADMIN"
                      },
                      "is_owner": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect `\"role\"` details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Payload must have required property 'name'",
                      "request_id": "v-0e9389ccac8da56f55"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not 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 user with id user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "request_id": "v-0e9a191986c0a98d46",
                      "resource_id": "user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "unassign-user",
        "tags": [
          "Management"
        ],
        "summary": "Unassign User",
        "description": "Unassigns the user from the project. If the user is currently logged in, they are automatically logged out. If the user is assigned to only one project, they cannot be unassigned from that project.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the user has been successfully unnassigned."
          },
          "400": {
            "description": "Returns an error if the user is not assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 400,
                      "key": "user_not_assigned",
                      "message": "User is not assigned",
                      "details": "User is not assigned to the project",
                      "request_id": "v-0e9a1b979a80a99053"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not 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 user with id user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "request_id": "v-0e9a1b4b98c0a98ffc",
                      "resource_id": "user_VNBwrq3d4OaxJjoykkwIRTbqgnYgjCl",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/users/invite": {
      "parameters": [],
      "post": {
        "operationId": "invite-user",
        "tags": [
          "Management"
        ],
        "summary": "Invite a New User",
        "description": "Sends an invitation to an email address that has not been used yet as a Voucherify user login.\n\nYou can specify the projects to which the invited user will be assigned and define their roles.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the details of the invitation, the project, and roles to which the user will be assigned.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsUsersInviteCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Returns no content if the invitation has been sent successfully."
          },
          "400": {
            "description": "Returns an error if the payload includes an incorrect role.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "used_incorrect_role",
                      "message": "Used incorrect role",
                      "details": "The role 'VICE_ADMIN' is incorrect",
                      "request_id": "v-0f0f63a9f00cdbd981"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if the project 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 project with id proj_4r3Ul0St",
                      "request_id": "v-0f0f62fe19ccdbd8bc",
                      "resource_id": "proj_4r3Ul0St",
                      "resource_type": "project"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the email address belongs to a Voucherify user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate Code": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated user exists with email your.email@domain.com",
                      "resource_id": "your.email@domain.com",
                      "resource_type": "user"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/templates/campaigns": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "get": {
        "operationId": "management-list-campaign-templates",
        "tags": [
          "Management"
        ],
        "summary": "List Campaign Templates",
        "description": "Lists all campaign templates available in the project.\n\n> 👍 List Campaign Templates\n>\n> This endpoint works in the same way as the [List Campaign Templates endpoint](ref:list-campaign-templates).\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "starting_after_id",
            "description": "A cursor for pagination. It retrieves the campaign templates created after a template with the given ID."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterTemplatesList"
            },
            "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/ParameterBoolean"
            },
            "in": "query",
            "name": "include_total",
            "description": "If set to `true`, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to `false` by default."
          },
          {
            "name": "filters",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ParameterFiltersListTemplates"
            },
            "description": "Filters for listing templates.",
            "style": "deepObject",
            "explode": true
          }
        ],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary of campaign template objects. The templates are returned by creation date by default. The most recent objects appear last unless specified otherwise with the `order` parameter.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsTemplatesCampaignsListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "campaign_templates",
                      "campaign_templates": [
                        {
                          "id": "camp_tpl_hFK6hpVc9WKsWaBv4mz7uZn8",
                          "name": "DISCOUNT-CAMPAIGN-TEMPLATE",
                          "description": "New discount for Q4",
                          "campaign_type": "DISCOUNT_COUPONS",
                          "created_at": "2024-06-21T13:03:09.431Z",
                          "object": "campaign_template"
                        },
                        {
                          "id": "camp_tpl_cR8va5Ga2nAi4Nxoi1I1qR8S",
                          "name": "GIFT-CAMPAIGN-TEMPLATE",
                          "campaign_type": "GIFT_VOUCHERS",
                          "created_at": "2024-07-05T14:26:31.600Z",
                          "updated_at": "2024-07-05T14:27:02.905Z",
                          "object": "campaign_template"
                        }
                      ],
                      "total": 14,
                      "has_more": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/templates/campaigns/{campaignTemplateId}/copy": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCampaignTemplateId"
          },
          "in": "path",
          "name": "campaignTemplateId",
          "description": "Provide the unique identifier of the campaign template.",
          "required": true
        }
      ],
      "post": {
        "operationId": "management-copy-campaign-template",
        "tags": [
          "Management"
        ],
        "summary": "Copy Campaign Template to a Project",
        "description": "Copies a campaign template to another project.\n\nThe resources, like validation rules or products, will not be copied to the destination project yet. When the template is used to create a new campaign or add a new promotion tier, the resources will be created in the destination project.\n\n> 📘 Campaign Templates – Documentation\n>\n>Read the [Campaign Templates documentation](https://support.voucherify.io/article/620-campaign-templates) to learn more about this feature.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Determines the details about the template in the destination project as well as the destination project itself.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsTemplatesCampaignsCopyCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the copied campaign template.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsTemplatesCampaignsCopyCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "camp_tpl_0f7e3ac98f04d00ab9",
                      "name": "Item_Discount_Campaign_Template",
                      "description": "To be reused in the future",
                      "campaign_type": "DISCOUNT_COUPONS",
                      "created_at": "2024-10-09T15:52:45.414Z",
                      "object": "campaign_template"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if a campaign template with the same name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Duplicate": {
                    "value": {
                      "code": 409,
                      "message": "Duplicated resource found",
                      "details": "Duplicated campaign_template exists with name Template copy"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/stacking-rules": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Create Stacking Rules",
        "description": "Overwrites the default stacking rules.\n\nIf new stacking rules have been created for the project earlier (e.g. in the user interface), it returns an error. Use [Update stacking rules](ref:update-stacking-rules) endpoint to change the rules.\n\n> 📘 Stacking rules documentation\n>\n> Read [the Stacking rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the stacking rule parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsStackingRulesCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the stacking rules assigned to the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stk_0e9b71a0be48e967f3",
                      "exclusive_categories": [],
                      "joint_categories": [],
                      "redeemables_limit": 30,
                      "applicable_redeemables_limit": 15,
                      "applicable_exclusive_redeemables_limit": 1,
                      "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                      "initial_amount_mode_categories": [],
                      "discounted_amount_mode_categories": [],
                      "redeemables_application_mode": "ALL",
                      "redeemables_sorting_rule": "REQUESTED_ORDER",
                      "created_at": "2024-04-16T12:17:09.368Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values, e.g. integer limits.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .applicable_exclusive_redeemables_limit must be <= 30",
                      "request_id": "v-0e9b7334154228a45f"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find customer with id cust_xqA7DGj5eYPHg6PHVKwYRWiA",
                      "request_id": "v-0c8b6b35294af6f192",
                      "resource_id": "cust_xqA7DGj5eYPHg6PHVKwYRWiA",
                      "resource_type": "customer"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the stacking rules have been already created for the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "stacking_rules_exist",
                      "message": "Stacking rules exist",
                      "details": "Cannot exist more stacking rules for given project",
                      "request_id": "v-0e9b5f39f550e070c4"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "List Stacking Rules",
        "description": "Lists all stacking rules.\n\nReturns always a list with one item.\n\nThis endpoint can be used to retrieve the default stacking rules. The default stacking rules do not have an ID that could be used with the [Get Stacking Rules](ref:get-stacking-rules) or [Update Stacking Rules](ref:update-stacking-rules) endpoints.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the stacking rules assigned to the project. These can be either the default stacking rules or the created ones.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "stk_0d6264108617006147",
                          "exclusive_categories": [
                            "cat_0d75bdfe4c9030a732",
                            "cat_0d74559c3e9030da13",
                            "cat_0d7455f93c1030da4a"
                          ],
                          "joint_categories": [
                            "cat_0d507a4d6e8a1b7b97"
                          ],
                          "redeemables_limit": 29,
                          "applicable_redeemables_limit": 28,
                          "applicable_redeemables_per_category_limit": 27,
                          "applicable_exclusive_redeemables_limit": 4,
                          "applicable_exclusive_redeemables_per_category_limit": 3,
                          "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                          "initial_amount_mode_categories": [
                            "cat_0d75bdfe4c9030a732",
                            "cat_0d74559c3e9030da13"
                          ],
                          "discounted_amount_mode_categories": [
                            "cat_0d7455f93c1030da4a"
                          ],
                          "redeemables_application_mode": "PARTIAL",
                          "redeemables_sorting_rule": "CATEGORY_HIERARCHY",
                          "created_at": "2023-08-17T08:33:19.399Z",
                          "updated_at": "2024-04-16T10:38:27.028Z"
                        }
                      ],
                      "total": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/stacking-rules/{stackingRulesId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterStackingRulesId"
          },
          "in": "path",
          "name": "stackingRulesId",
          "description": "Provide the unique identifier of the stacking rules.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Get Stacking Rules",
        "description": "Retrieves the stacking rules for the project.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the stacking rules for the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stk_0d6264108617006147",
                      "exclusive_categories": [
                        "cat_0d75bdfe4c9030a732",
                        "cat_0d74559c3e9030da13",
                        "cat_0d7455f93c1030da4a"
                      ],
                      "joint_categories": [
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "redeemables_limit": 29,
                      "applicable_redeemables_limit": 28,
                      "applicable_redeemables_per_category_limit": 27,
                      "applicable_exclusive_redeemables_limit": 4,
                      "applicable_exclusive_redeemables_per_category_limit": 3,
                      "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                      "initial_amount_mode_categories": [
                        "cat_0d75bdfe4c9030a732",
                        "cat_0d74559c3e9030da13"
                      ],
                      "discounted_amount_mode_categories": [
                        "cat_0d7455f93c1030da4a"
                      ],
                      "redeemables_application_mode": "PARTIAL",
                      "redeemables_sorting_rule": "CATEGORY_HIERARCHY",
                      "created_at": "2023-08-17T08:33:19.399Z",
                      "updated_at": "2024-04-16T10:38:27.028Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find stacking_rules with id stk_0d626410861700614",
                      "request_id": "v-0e9bd7a49fd0e00ea3",
                      "resource_id": "stk_0d626410861700614",
                      "resource_type": "stacking_rules"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Update Stacking Rules",
        "description": "Updates the stacking rules.\n\nOnly the provided fields will be updated. However, if you update an array, the content of the array is overwritten. This means that if you want to add new values to an array and retain existing ones, you need to provide both the existing and new values in the request.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the stacking rules to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsStackingRulesUpdateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated stacking rules.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsStackingRulesUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "stk_0d6264108617006147",
                      "exclusive_categories": [],
                      "joint_categories": [
                        "cat_0d507a4d6e8a1b7b97"
                      ],
                      "redeemables_limit": 30,
                      "applicable_redeemables_limit": 28,
                      "applicable_redeemables_per_category_limit": 27,
                      "applicable_exclusive_redeemables_limit": 4,
                      "applicable_exclusive_redeemables_per_category_limit": 3,
                      "discount_calculation_mode": "DISCOUNTED_AMOUNT",
                      "initial_amount_mode_categories": [
                        "cat_0d75bdfe4c9030a732",
                        "cat_0d74559c3e9030da13"
                      ],
                      "discounted_amount_mode_categories": [
                        "cat_0d7455f93c1030da4a"
                      ],
                      "redeemables_application_mode": "PARTIAL",
                      "redeemables_sorting_rule": "CATEGORY_HIERARCHY",
                      "created_at": "2023-08-17T08:33:19.399Z",
                      "updated_at": "2024-04-16T19:52:24.792Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .redeemables_limit must be <= 30",
                      "request_id": "v-0e9bd9f0628228aa93"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not 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 stacking_rules with id stk_0d626410861700614",
                      "request_id": "v-0e9bd9b3cd4228aa3e",
                      "resource_id": "stk_0d626410861700614",
                      "resource_type": "stacking_rules"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-stacking-rules",
        "tags": [
          "Management"
        ],
        "summary": "Delete Stacking Rules",
        "description": "Deletes permanently the current settings for the stacking rules.\n\nThe stacking rules are restored to default values.\n\n> 📘 Stacking Rules Documentation\n>\n> Read [the Stacking Rules article](https://support.voucherify.io/article/604-stacking-rules) to learn how they work.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the stacking rules have been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/metadata-schemas": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-metadata-schema",
        "tags": [
          "Management"
        ],
        "summary": "Create Metadata Schema",
        "description": "Creates a new metadata (custom attribute) schema for a given resource.\n\nThe schema consists of a set of key-value pairs to customize Voucherify resources. \n\nYou can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object can't include another nested object. The standard metadata schemas are:\n- Campaign\n- Voucher\n- Publication\n- Redemption\n- Product\n- Customer\n- Order\n- Order line item\n- Loyalty Tier\n- Promotion Tier\n- Earning rule\n- Reward\n\nUse this endpoint to define a metadata schema of a given resource for the first time. Once you configure a metadata schema for a given `related_object`, use the PUT [Update metadata schema](ref:update-metadata-schema) endpoint to either update or add new metadata key-value pairs. For example, use this endpoint to define a metadata schema for `related_object: campaign` for the first time. If you want define a new metadata property for `campaign`, use the [PUT Update metadata schema](ref:update-metadata-schema) endpoint.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](https://support.voucherify.io/article/99-schema-validation-metadata) and [Metadata Mapping](doc:metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the metadata schema.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the metadata schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
                      "related_object": "reward",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": true,
                          "optional": false,
                          "object_type": null,
                          "eq": [
                            "EMEA",
                            "APAC",
                            "LATAM",
                            "NA"
                          ]
                        }
                      },
                      "allow_defined_only": null,
                      "created_at": "2024-04-29T12:03:55.991Z",
                      "updated_at": null,
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the resource has a duplicate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated metadata schema exists with related_object customer",
                      "request_id": "v-0ea5a7618fc0293d81",
                      "resource_id": "customer",
                      "resource_type": "metadata schema"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-metadata-schemas-1",
        "tags": [
          "Management"
        ],
        "summary": "List Metadata Schemas",
        "description": "Lists all metadata schemas available in the project.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](https://support.voucherify.io/article/99-schema-validation-metadata) and [Metadata Mapping](doc:metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the metadata schemas created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ms_bwBVnq2YHcbsfCMfdqfCi4zl",
                          "related_object": "Test-MANAPI-custom-schema-01",
                          "properties": {
                            "Test-manAPI-01": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Test-01",
                                "Test-02",
                                "Test-03",
                                "Test-04"
                              ]
                            },
                            "Test-manAPI-02": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                1,
                                2,
                                3,
                                4
                              ]
                            },
                            "Test-manAPI-03": {
                              "type": "object",
                              "array": false,
                              "optional": true,
                              "object_type": "unknown"
                            },
                            "Test-manAPI-04": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Value-01",
                                "Value-02",
                                "Value-03"
                              ]
                            }
                          },
                          "allow_defined_only": true,
                          "created_at": "2024-04-18T17:24:46.980Z",
                          "updated_at": "2024-04-18T18:17:20.108Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_ctw7O05ZLsMb1zFCGMRQ8qnP",
                          "related_object": "campaign",
                          "properties": {
                            "Test-manAPI": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Test1",
                                "Test2",
                                "Test3"
                              ],
                              "max_length": 5,
                              "min_length": 2
                            },
                            "Test-manAPI-08": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                105.5
                              ],
                              "lt": 9.5,
                              "lte": 10.5
                            },
                            "Test-manAPI-09": {
                              "type": "object",
                              "array": true,
                              "optional": false,
                              "object_type": "Test-MANAPI-custom-schema-01",
                              "deleted": true
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2024-04-18T17:21:13.555Z",
                          "updated_at": "2024-04-19T06:43:09.218Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_f0r4hm3ta6a4a5ch3ma",
                          "related_object": "customer",
                          "properties": {
                            "age": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "Test-MANAPI-06": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Class-01,",
                                "Class-02",
                                "Class-03"
                              ]
                            },
                            "Test-manAPI-07": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Tick",
                                "Tack",
                                "Toe"
                              ]
                            },
                            "acquisition_channel": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "Portal-01",
                                "Portal-02",
                                "Portal-03"
                              ]
                            },
                            "customer_life_time_value": {
                              "type": "number",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2023-08-03T10:37:48.696Z",
                          "updated_at": "2024-04-18T18:23:58.380Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                          "related_object": "order",
                          "properties": {
                            "region": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "EU",
                                "US",
                                "EMEA",
                                "APAC"
                              ]
                            },
                            "location_id": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "L1",
                                "L2",
                                "L3"
                              ]
                            },
                            "payment_mean": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "credit-card",
                                "wire-transfer",
                                "paypal"
                              ]
                            },
                            "booking_end_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "booking_start_date": {
                              "type": "datetime",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2023-08-03T10:37:48.662Z",
                          "updated_at": "2023-08-28T11:24:43.518Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_s3c0N6m3ta6a4a5ch3ma",
                          "related_object": "product",
                          "properties": {
                            "brand": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "vendor": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            },
                            "category": {
                              "type": "string",
                              "array": false,
                              "optional": true,
                              "object_type": null
                            }
                          },
                          "allow_defined_only": false,
                          "created_at": "2023-08-03T10:37:48.670Z",
                          "updated_at": "2023-09-14T09:30:26.314Z",
                          "object": "metadata_schema"
                        },
                        {
                          "id": "ms_t4ir0Dm3ta6a4a5ch3ma",
                          "related_object": "redemption",
                          "properties": {
                            "location_id": {
                              "type": "string",
                              "array": true,
                              "optional": true,
                              "object_type": null,
                              "eq": [
                                "L1",
                                "L2",
                                "L3"
                              ]
                            }
                          },
                          "allow_defined_only": null,
                          "created_at": "2023-08-03T10:37:48.692Z",
                          "updated_at": null,
                          "object": "metadata_schema"
                        }
                      ],
                      "total": 6
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/metadata-schemas/{metadataSchemaId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterMetadataSchemaId"
          },
          "in": "path",
          "name": "metadataSchemaId",
          "description": "Provide the unique identifier of the metadata schema.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-metadata-schema-1",
        "tags": [
          "Management"
        ],
        "summary": "Get Metadata Schema",
        "description": "Retrieves a metadata schema.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](https://support.voucherify.io/article/99-schema-validation-metadata) and [Metadata Mapping](doc:metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the metadata schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                      "related_object": "order",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": false,
                          "optional": true,
                          "object_type": null,
                          "eq": [
                            "EU",
                            "US",
                            "EMEA",
                            "APAC"
                          ]
                        },
                        "location_id": {
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "object_type": null,
                          "eq": [
                            "L1",
                            "L2",
                            "L3"
                          ]
                        },
                        "payment_mean": {
                          "type": "string",
                          "array": true,
                          "optional": true,
                          "object_type": null,
                          "eq": [
                            "credit-card",
                            "wire-transfer",
                            "paypal"
                          ]
                        },
                        "booking_end_date": {
                          "type": "datetime",
                          "array": false,
                          "optional": true,
                          "object_type": null
                        },
                        "booking_start_date": {
                          "type": "datetime",
                          "array": false,
                          "optional": true,
                          "object_type": null
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2023-08-03T10:37:48.662Z",
                      "updated_at": "2023-08-28T11:24:43.518Z",
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-metadata-schema",
        "tags": [
          "Management"
        ],
        "summary": "Update Metadata Schema",
        "description": "Updates a metadata schema.\n\nWith this request, you can:\n- Add a nonexistent attribute definition to the metadata schema.\n- Update an existing attribute definition by overwriting its current values.\n\nIn the request, you can provide only those definitions you want to add or update. Definitions omitted in the request remain unchanged.\n\nHowever, if you want to update a definition, you will have to add all its current key-value pairs as well. Only the pairs sent in the request are saved for this definition. This means that the key-value pairs that are not sent in a request are restored to default values. For example, if your definition has an array with values and it is not sent in an update request, the array values will be deleted.\n\n> 👍 Additional Notes\n>\n>- You cannot change the type of an existing schema, e.g. from `\"string\"` to `\"number\"`.\n>\n>- You can remove a definition with this endpoint by providing `\"deleted\": true` in the request. It will be moved to the Removed definitions section in the user interface. However, you cannot permanently remove a definition with this endpoint.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](https://support.voucherify.io/article/99-schema-validation-metadata) and [Metadata Mapping](doc:metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the metadata schema to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasUpdateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated metadata schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsMetadataSchemasUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
                      "related_object": "reward",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": true,
                          "optional": false,
                          "object_type": null,
                          "eq": [
                            "EMEA",
                            "APAC",
                            "LATAM",
                            "NA"
                          ]
                        }
                      },
                      "allow_defined_only": null,
                      "created_at": "2024-04-29T12:03:55.991Z",
                      "updated_at": null,
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-metadata-schema",
        "tags": [
          "Management"
        ],
        "summary": "Delete Metadata Schema",
        "description": "Deletes permanently the metadata schema.\n\nIn standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are:\n- Campaign\n- Voucher\n- Publication\n- Redemption\n- Product\n- Customer\n- Order\n- Order line item\n- Loyalty Tier\n- Promotion Tier\n- Earning rule\n- Reward\n\nIf you want to delete only one definition, use the [Update Metadata Schema](ref:update-metadata-schema) endpoint. In the request, provide the `\"deleted\": true` pair in the definition object. This definition will be moved to Removed definitions.\n\nIf you want to create a new standard metadata schema, use the [Create Metadata Schema](ref:create-metadata-schema) endpoint.\n\n> 🚧 Metadata Purging\n>\n>This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain.\n>\n>If you want to purge metadata from the entities:\n>1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the [Update Metadata Schema](ref:update-metadata-schema) endpoint.\n>2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema.\n>3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities.\n>Note:\n>- This is an asynchronous action. You will be notified when it has been completed.\n>- You cannot purge metadata for the Redemption and Publication schemas.\n>4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify.\n\n> 📘 Metadata Documentation\n>\n> Read [the Getting Started with Metadata](https://support.voucherify.io/article/99-schema-validation-metadata) and [Metadata Mapping](doc:metadata-mapping) articles to learn how metadata work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the metadata schema has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/custom-event-schemas": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Create Custom Event Schema",
        "description": "Creates a custom event schema.\n\nThe `\"properties\"` object is required, but it can be empty, however. This object is for optional custom properties (metadata).\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](ref:track-custom-event) endpoint and the [Custom Event Object](ref:custom-event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the custom event schema.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the custom event schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_GgjUlnCmbNV5z1pajU11NtnT",
                      "name": "review",
                      "schema": {
                        "properties": {
                          "published": {
                            "type": "boolean",
                            "optional": true
                          }
                        }
                      },
                      "created_at": "2024-04-29T11:25:44.458Z",
                      "object": "custom-event-schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the resource has a duplicate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 409,
                      "key": "duplicate_found",
                      "message": "Duplicated resource found",
                      "details": "Duplicated custom_event_schema exists with name sign-up",
                      "request_id": "v-0ead453c10ec031067",
                      "resource_id": "sign-up",
                      "resource_type": "custom_event_schema"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-custom-event-schemas",
        "tags": [
          "Management"
        ],
        "summary": "List Custom Event Schemas",
        "description": "Lists all custom event schemas available in the project.\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](ref:track-custom-event) endpoint and the [Custom Event Object](ref:custom-event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the custom event schemas created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "ms_t4ir0Dcu5T0m3v3nT5ch3ma",
                          "name": "newsletter_subscribed",
                          "schema": {
                            "properties": {}
                          },
                          "created_at": "2023-08-03T10:37:48.716Z",
                          "object": "custom-event-schema"
                        },
                        {
                          "id": "ms_s3c0N6cu5T0m3v3nT5ch3ma",
                          "name": "review_left",
                          "schema": {
                            "properties": {}
                          },
                          "created_at": "2023-08-03T10:37:48.710Z",
                          "updated_at": "2024-04-26T14:35:03.463Z",
                          "object": "custom-event-schema"
                        },
                        {
                          "id": "ms_f1r5Tcu5T0m3v3nT5ch3ma",
                          "name": "sign_up",
                          "schema": {
                            "properties": {}
                          },
                          "created_at": "2023-08-03T10:37:48.705Z",
                          "object": "custom-event-schema"
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/custom-event-schemas/{customEventSchemaId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterCustomEventSchemaId"
          },
          "in": "path",
          "name": "customEventSchemaId",
          "description": "Provide the unique identifier of the custom event schema.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Get Custom Event Schema",
        "description": "Retrieves a custom event schema.\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](ref:track-custom-event) endpoint and the [Custom Event Object](ref:custom-event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the custom event schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_f1r5Tm3ta6a4a5ch3ma",
                      "related_object": "order",
                      "properties": {
                        "published": {
                          "type": "boolean",
                          "optional": true
                        }
                      },
                      "created_at": "2024-04-29T11:25:44.458Z",
                      "object": "custom-event-schema"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Update Custom Event Schema",
        "description": "Updates a custom event schema.\n\nWith this request, you can:\n- Add a nonexistent property to a custom event schema.\n- Update an existing property.\n\nIn the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged.\n\n> 👍 Additional Notes\n>\n>- You can change the type of an existing property, e.g. from `\"string\"` to `\"number\"`.\n>\n>- You can remove a custom property with this endpoint by providing `\"deleted\": true` in the request. However, you cannot permanently remove an event definition or its property with this endpoint.\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](ref:track-custom-event) endpoint and the [Custom Event Object](ref:custom-event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the custom event schema to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasUpdateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated custom event schema.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsCustomEventSchemasUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "ms_u3bIQLbdU0fi3rhqpTLiF26T",
                      "related_object": "reward",
                      "properties": {
                        "region": {
                          "type": "string",
                          "array": true,
                          "optional": false,
                          "object_type": null,
                          "eq": [
                            "EMEA",
                            "APAC",
                            "LATAM",
                            "NA",
                            "EU"
                          ]
                        }
                      },
                      "allow_defined_only": false,
                      "created_at": "2024-04-29T12:03:55.991Z",
                      "updated_at": "2024-04-29T12:06:20.866Z",
                      "object": "metadata_schema"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-custom-event-schema",
        "tags": [
          "Management"
        ],
        "summary": "Delete Custom Event Schema",
        "description": "Deletes permanently the custom event schema with its custom properties (metadata).\n\n> 📘 Custom Event Documentation\n>\n> Read [Custom Events](https://support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify.\n>\n>Read also the details about the [Track Custom Event](ref:track-custom-event) endpoint and the [Custom Event Object](ref:custom-event-object).",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the custom event schema has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Not Found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_2F3txY7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/webhooks": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Create Webhook",
        "description": "Creates a new webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Webhooks v2024-01-01](ref:introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines a webhook configuration.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsWebhooksCreateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the webhook configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "webhook",
                      "created_at": "2024-04-30T08:13:55.789Z",
                      "id": "wh_ekFHVL6lqC4lDuIFxpETSGa3",
                      "events": [
                        "redemption.succeeded"
                      ],
                      "target_url": "your_url",
                      "active": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-webhooks",
        "tags": [
          "Management"
        ],
        "summary": "List Webhooks",
        "description": "Lists all webhook configurations for the project.\n\n> 📘 Webhook Documentation\n>\n> Read [Webhooks v2024-01-1](ref:introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about webhook configurations created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "object": "webhook",
                          "created_at": "2024-01-02T08:31:46.562Z",
                          "id": "wh_i45Uez369zzXgh6PXC0eyGmb",
                          "events": [
                            "redemption.succeeded",
                            "redemption.failed",
                            "redemption.rollback.succeeded",
                            "redemption.rollback.failed",
                            "publication.succeeded",
                            "voucher.published",
                            "voucher.updated",
                            "voucher.deleted",
                            "voucher.created",
                            "voucher.enabled",
                            "voucher.disabled",
                            "voucher.loyalty_card.points_added",
                            "voucher.gift.balance_added",
                            "campaign.enabled",
                            "campaign.deleted",
                            "campaign.created",
                            "campaign.updated",
                            "campaign.disabled",
                            "campaign.vouchers.generation.completed",
                            "business_validation_rule.assignment.created",
                            "business_validation_rule.assignment.deleted",
                            "business_validation_rule.created",
                            "business_validation_rule.deleted",
                            "business_validation_rule.updated",
                            "customer.created",
                            "customer.deleted",
                            "customer.rewarded",
                            "customer.rewarded.loyalty_points"
                          ],
                          "target_url": "your_url",
                          "active": true
                        },
                        {
                          "object": "webhook",
                          "created_at": "2024-04-29T14:13:27.764Z",
                          "id": "wh_x2YxoHtQdBlP7zfk5KZ8m5WX",
                          "events": [
                            "redemption.succeeded",
                            "redemption.failed",
                            "redemption.rollback.succeeded",
                            "redemption.rollback.failed",
                            "publication.succeeded",
                            "voucher.published",
                            "voucher.updated",
                            "voucher.deleted",
                            "voucher.created",
                            "voucher.enabled"
                          ],
                          "target_url": "your_url",
                          "active": false
                        }
                      ],
                      "total": 2
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/webhooks/{webhookId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterWebhookId"
          },
          "in": "path",
          "name": "webhookId",
          "description": "Provide the unique identifier of the webhook configuration.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Get Webhook",
        "description": "Retrieves a webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Webhooks v2024-01-1](ref:introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the webhook configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "webhook",
                      "created_at": "2024-04-30T08:13:55.789Z",
                      "id": "wh_Fk1HzL9lqC1lpuIFxp3TShB4",
                      "events": [
                        "redemption.succeeded"
                      ],
                      "target_url": "your_url",
                      "active": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find webhook with id wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "request_id": "v-0ead4423d55b6996f2",
                      "resource_id": "wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "resource_type": "webhook"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Update Webhook",
        "description": "Updates a webhook configuration.\n\nThe `\"events\"` listed in the request are overwritten. If you want to add more events, provide also the events that are already in the webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Webhooks v2024-01-1](ref:introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the webhook configuration to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsWebhooksUpdateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated webhook configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsWebhooksUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "webhook",
                      "created_at": "2024-04-30T08:13:55.789Z",
                      "id": "wh_Fk1HzL9lqC1lpuIFxp3TShB4",
                      "events": [
                        "redemption.failed"
                      ],
                      "target_url": "your_url",
                      "active": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not 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 webhook with id wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "request_id": "v-0ead4423d55b6996f2",
                      "resource_id": "wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "resource_type": "webhook"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-webhook",
        "tags": [
          "Management"
        ],
        "summary": "Delete Webhook",
        "description": "Deletes a webhook configuration.\n\n> 📘 Webhook Documentation\n>\n> Read [Webhooks v2024-01-1](ref:introduction-to-webhooks) article to learn how webhooks work in Voucherify.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the webhook configuration has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not 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 webhook with id wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "request_id": "v-0ead4423d55b6996f2",
                      "resource_id": "wh_ekFHVL6lqC4lDuIFxpETSGa",
                      "resource_type": "webhook"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/branding": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        }
      ],
      "post": {
        "operationId": "create-brand",
        "tags": [
          "Management"
        ],
        "summary": "Create Brand",
        "description": "Creates a new brand configuration.\n\nYou can have only one brand configured for a project.\n\n> 📘 White Labelling\n>\n> The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines a brand configuration.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsBrandingCreateRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "brand": {
                      "name": "Voucherify PSA",
                      "privacy_policy_url": null,
                      "terms_of_use_url": null,
                      "permission_reminder": "You are receiving this email because you opted in at our website.",
                      "website_url": "voucherify.io"
                    },
                    "address": {
                      "street": "Porcelanowa 23",
                      "city": "Katowice",
                      "postal": "43-246",
                      "state": null,
                      "country": "Poland"
                    },
                    "contact": {
                      "email": "support@voucherify.io",
                      "phone": null
                    },
                    "cockpits": {
                      "campaigns_overview_enabled": false,
                      "loyalty_enabled": true,
                      "gift_cards_enabled": true,
                      "coupons_enabled": true,
                      "referrals_enabled": true,
                      "theme": "default",
                      "use_custom_double_opt_in_redirect_url": false,
                      "custom_double_opt_in_redirect_url": null
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the brand configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "brd_0eb55234024e226d9d",
                      "brand": {
                        "name": "Voucherify PSA",
                        "privacy_policy_url": null,
                        "terms_of_use_url": null,
                        "permission_reminder": "You are receiving this email because you opted in at our website.",
                        "website_url": "voucherify.io"
                      },
                      "address": {
                        "street": "Porcelanowa 23",
                        "city": "Katowice",
                        "postal": "43-246",
                        "state": null,
                        "country": "Poland"
                      },
                      "contact": {
                        "email": "support@voucherify.io",
                        "phone": null
                      },
                      "cockpits": {
                        "campaigns_overview_enabled": false,
                        "loyalty_enabled": true,
                        "gift_cards_enabled": true,
                        "coupons_enabled": true,
                        "referrals_enabled": true,
                        "theme": "default",
                        "use_custom_double_opt_in_redirect_url": false,
                        "custom_double_opt_in_redirect_url": null
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload has incorrect values.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "statusCode": 400,
                      "error": "Bad Request",
                      "message": "Invalid request payload JSON format"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvmU7"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Returns an error if the brand has been already configured.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 409,
                      "key": "branding_exist",
                      "message": "Branding exist",
                      "details": "Cannot exist more than one branding for given project",
                      "request_id": "v-0ead51b4ff49d9319d"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-brands",
        "tags": [
          "Management"
        ],
        "summary": "List Brands",
        "description": "Lists all brand configurations.\n\nBecause a project can have only one brand, it always returns a list with one item.\n\nThis endpoint can be used to retrieve the brand configuration created with the Voucherify Dashboard and the ID.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the details about the brand created in the project.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "data",
                      "data": [
                        {
                          "id": "brd_0E603421F0a2fL1814",
                          "brand": {
                            "name": "Voucherify PSA",
                            "privacy_policy_url": null,
                            "terms_of_use_url": null,
                            "permission_reminder": "You are receiving this email because you opted in at our website.",
                            "website_url": "voucherify.io"
                          },
                          "address": {
                            "street": "Porcelanowa 23",
                            "city": "Katowice",
                            "postal": "40-246",
                            "state": null,
                            "country": "Poland"
                          },
                          "contact": {
                            "email": "support@voucherify.io",
                            "phone": null
                          },
                          "cockpits": {
                            "campaigns_overview_enabled": false,
                            "loyalty_enabled": true,
                            "gift_cards_enabled": true,
                            "coupons_enabled": true,
                            "referrals_enabled": true,
                            "theme": "default",
                            "use_custom_double_opt_in_redirect_url": false,
                            "custom_double_opt_in_redirect_url": null
                          }
                        }
                      ],
                      "total": 1
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "message": "Resource not found",
                      "details": "Cannot find project with id proj_5itvDU7"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/management/v1/projects/{projectId}/branding/{brandingId}": {
      "parameters": [
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterProjectId"
          },
          "in": "path",
          "name": "projectId",
          "description": "Provide the unique identifier of the project.",
          "required": true
        },
        {
          "schema": {
            "$ref": "#/components/schemas/ParameterBrandingId"
          },
          "in": "path",
          "name": "brandingId",
          "description": "Provide the unique identifier of the brand configuration.",
          "required": true
        }
      ],
      "get": {
        "operationId": "get-brand",
        "tags": [
          "Management"
        ],
        "summary": "Get Brand",
        "description": "Retrieves a brand configuration.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "200": {
            "description": "Returns the brand configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingGetResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "brd_0E603421F0a2fL1814",
                      "brand": {
                        "name": "Voucherify PSA",
                        "privacy_policy_url": null,
                        "terms_of_use_url": null,
                        "permission_reminder": "You are receiving this email because you opted in at our website.",
                        "website_url": null
                      },
                      "address": {
                        "street": "Porcelanowa 23",
                        "city": "Katowice",
                        "postal": "40-246",
                        "state": null,
                        "country": "Poland"
                      },
                      "contact": {
                        "email": "support@voucherify.io",
                        "phone": null
                      },
                      "cockpits": {
                        "campaigns_overview_enabled": false,
                        "loyalty_enabled": true,
                        "gift_cards_enabled": true,
                        "coupons_enabled": true,
                        "referrals_enabled": true,
                        "theme": "default",
                        "use_custom_double_opt_in_redirect_url": false,
                        "custom_double_opt_in_redirect_url": null
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not be found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Resource not found": {
                    "value": {
                      "code": 404,
                      "key": "not_found",
                      "message": "Resource not found",
                      "details": "Cannot find branding_details with id brd_0e603885e0c5fc180",
                      "request_id": "v-0ead68aa7c56588378",
                      "resource_id": "brd_0e603885e0c5fc180",
                      "resource_type": "branding_details"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "update-brand",
        "tags": [
          "Management"
        ],
        "summary": "Update Brand",
        "description": "Updates a brand configuration.\n\nOnly the fields sent in the request will be updated. The fields omitted in the request will remain unchanged.\n\n> 📘 White Labelling\n>\n> The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "requestBody": {
          "description": "Defines the brand configuration to be updated.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManagementProjectsBrandingUpdateRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the details about the updated brand configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManagementProjectsBrandingUpdateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "brd_0ead90c940a9deef09",
                      "brand": {
                        "name": "Voucherify PSA",
                        "privacy_policy_url": null,
                        "terms_of_use_url": null,
                        "permission_reminder": "You are receiving this email because you opted in at our website.",
                        "website_url": null
                      },
                      "address": {
                        "street": "Porcelanowa 23",
                        "city": "Katowice",
                        "postal": "43-246",
                        "state": null,
                        "country": "Poland"
                      },
                      "contact": {
                        "email": "your_email@your-domain.com",
                        "phone": null
                      },
                      "cockpits": {
                        "campaigns_overview_enabled": false,
                        "loyalty_enabled": true,
                        "gift_cards_enabled": true,
                        "coupons_enabled": true,
                        "referrals_enabled": true,
                        "theme": "default",
                        "use_custom_double_opt_in_redirect_url": false,
                        "custom_double_opt_in_redirect_url": null
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload includes incorrect details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .properties.Size.eq.0 must be number",
                      "request_id": "v-0ea5a9b9b3402940a9"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not 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 branding_details with id brd_0e603885e0c5fc180",
                      "request_id": "v-0ead68aa7c56588378",
                      "resource_id": "brd_0e603885e0c5fc180",
                      "resource_type": "branding_details"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-brand",
        "tags": [
          "Management"
        ],
        "summary": "Delete Brand",
        "description": "Deletes permanently a brand configuration.",
        "parameters": [],
        "security": [
          {
            "X-Management-Id": [],
            "X-Management-Token": []
          }
        ],
        "responses": {
          "204": {
            "description": "Returns no content if the brand configuration has been successfully deleted."
          },
          "401": {
            "description": "Returns an error if an invalid token was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Unauthorized": {
                    "value": {
                      "code": 401,
                      "message": "Unauthorized",
                      "key": "unauthorized"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Returns an error if the current plan does not include the Management API feature.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorPaymentRequired"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "code": 402,
                      "message": "Payment required",
                      "details": "Your current plan does not include a feature required to perform this operation.",
                      "key": "missing_required_feature"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error when a resource could not 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 branding_details with id brd_0e603885e0c5fc180",
                      "request_id": "v-0ead68aa7c56588378",
                      "resource_id": "brd_0e603885e0c5fc180",
                      "resource_type": "branding_details"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/oauth/token": {
      "parameters": [],
      "post": {
        "operationId": "generate-oauth-token",
        "tags": [
          "OAuth"
        ],
        "summary": "Generate OAuth 2.0 Token",
        "description": "Generate an OAuth 2.0 token for an API client. The token can be used to authorize access to the Voucherify API. The token inherits the permissions and IP whitelists of the API key that is used to generate the OAuth token. You can define the scope that limits its usage. You can generate up to 1000 OAuth tokens per project. The token expires in 900 seconds (15 minutes).\n\nIf the API key that is used to generate the OAuth token is deleted or blocked, you cannot generate new OAuth tokens and the existing ones will stop working within one minute.\n\nIf the API key used to generate an OAuth token is regenerated, the OAuth token can still be used.\n\n>🚧 Format of scope values\n>\n>Separate the values of the `scope` property with spaces.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          }
        ],
        "requestBody": {
          "description": "Send the request as `x-www-form-urlencoded`. Separate `scope` values with spaces, not commas.",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OAuthTokenGenerateRequestBody"
              },
              "examples": {
                "Request example": {
                  "value": {
                    "grant_type": "client_credentials",
                    "scope": "qualifications validations redemptions"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns details about the token to be used and its expiration times.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthTokenGenerateResponseBody"
                },
                "examples": {
                  "OAuth response": {
                    "value": {
                      "access_token": "1ABCde2FGHijKl3m4NO5pqR6STUv7wxYzAbc8dE90FgH1IJkLm",
                      "client_id": "a1Bcdefg2HI3Jkl4m5nOP",
                      "expires_at": 1738945086,
                      "expires_in": 900,
                      "scope": "api",
                      "token_type": "Bearer"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if an invalid request body is provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid scope": {
                    "value": {
                      "code": 400,
                      "key": "invalid_scope",
                      "message": "Invalid scope: vouchers,campaigns"
                    }
                  },
                  "Invalid grant type": {
                    "value": {
                      "code": 400,
                      "key": "invalid_grant_type",
                      "message": "Invalid grant_type"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/oauth/introspect": {
      "parameters": [],
      "post": {
        "operationId": "introspect-oauth-token",
        "tags": [
          "OAuth"
        ],
        "summary": "Introspect OAuth 2.0 Token",
        "description": "Introspect an OAuth 2.0 token for an API client.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          }
        ],
        "requestBody": {
          "description": "Send the request as `x-www-form-urlencoded`.",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OAuthTokenIntrospectRequestBody"
              },
              "examples": {
                "Request example": {
                  "value": {
                    "access_token": "1ABCde2FGHijKl3m4NO5pqR6STUv7wxYzAbc8dE90FgH1IJkLm"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns details about an existing token and its expiration times. If an nonexistent token is sent in the request, the response returns that it is inactive.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthTokenIntrospectResponseBody"
                },
                "examples": {
                  "OAuth active token": {
                    "value": {
                      "access_token": "1ABCde2FGHijKl3m4NO5pqR6STUv7wxYzAbc8dE90FgH1IJkLm",
                      "client_id": "a1Bcdefg2HI3Jkl4m5nOP",
                      "expires_at": 1738945086,
                      "expires_in": 555,
                      "scope": "api",
                      "token_type": "Bearer",
                      "active": true
                    }
                  },
                  "OAuth inactive token": {
                    "value": {
                      "active": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if an invalid request body is provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing parameters": {
                    "value": {
                      "code": 400,
                      "key": "missing_parameters",
                      "message": "Missing parameters"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/oauth/token/revoke": {
      "parameters": [],
      "post": {
        "operationId": "revoke-oauth-token",
        "tags": [
          "OAuth"
        ],
        "summary": "Revoke OAuth 2.0 Token",
        "description": "Revoke an OAuth 2.0 token for an API client. Once revoked, the token cannot be used anymore.",
        "parameters": [],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": []
          }
        ],
        "requestBody": {
          "description": "Send the request as `x-www-form-urlencoded`.",
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/OAuthTokenRevokeRequestBody"
              },
              "examples": {
                "Request example": {
                  "value": {
                    "access_token": "1ABCde2FGHijKl3m4NO5pqR6STUv7wxYzAbc8dE90FgH1IJkLm"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Returns no content if the OAuth 2.0 token is revoked successfully."
          },
          "404": {
            "description": "Returns an empty error if a token was not found or it was inactive."
          }
        }
      }
    },
    "/client/v1/qualifications": {
      "post": {
        "operationId": "check-eligibility-client-side",
        "tags": [
          "Client-side"
        ],
        "summary": "Check Eligibility (client-side)",
        "description": "Generate a list of redeemables that are applicable in the context of the customer and order.\n\nThe new qualifications method is an improved version of [Campaign Qualifications](ref:examine-campaigns-qualification), [Voucher Qualifications](ref:examine-vouchers-qualification), and [Promotions Validation](ref:validate-promotions) API requests. The new qualification method introduces the following improvements:\n\n- Qualification results are returned faster\n- No limit on the number of returned redeemables\n- Introduces new qualification scenarios, not available in the previous version\n\n> 👍 Scenario Guide\n>\n> Read our dedicated guide to learn about some use cases this endpoint can cover [here](doc:checking-eligibility).\n\n## Paging \n\nThe Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the `starting_after` cursor.\n\nTo process of paging the redeemables works in the following manner:\n\n- You send the first API request for Qualifications without the `starting_after` parameter.\n- The response will contain a parameter named `has_more`. If the parameter's value is set to `true`, then more redeemables are available.\n- Get the value of the `created_at` parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables.\n- Send another API request for Qualification with the `starting_after` parameter set to the value taken from the `created_at` parameter from the last returned redeemable.\n- Voucherify will return the next page of redeemables.\n- If the `has_more` parameter is set to `true`, apply steps 3-5 to get the next page of redeemables.",
        "parameters": [],
        "security": [
          {
            "X-Client-Application-Id": [],
            "X-Client-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_qualifications"
            ]
          }
        ],
        "requestBody": {
          "description": "Define order and customer context.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientQualificationsCheckEligibilityRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a qualifications object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientQualificationsCheckEligibilityResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/client/v1/promotions/tiers": {
      "get": {
        "operationId": "list-promotion-tiers-client-side",
        "tags": [
          "Client-side"
        ],
        "summary": "List Promotion Tiers (client-side)",
        "description": "This method enables you to list promotion tiers.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "is_available",
            "description": "This parameter allows filtering promotions that are only available at the moment. When set to `true`, it selects only non-expired and active promotions."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterLimit"
            },
            "in": "query",
            "name": "limit",
            "description": "Limits the number of objects to be returned. The limit can range between 1 and 100 items."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterInteger"
            },
            "in": "query",
            "description": "Which page of results to return. The lowest value is `1`.",
            "name": "page"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderListPromotionTiersClientSide"
            },
            "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."
          },
          {
            "$ref": "#/components/parameters/origin"
          }
        ],
        "security": [
          {
            "X-Client-Application-Id": [],
            "X-Client-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_promotions"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns a dictionary with a `tiers` property that contains an array of promotion tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientPromotionsTiersListResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "list",
                      "data_ref": "tiers",
                      "tiers": [
                        {
                          "id": "promo_NzjTc3ZXTe7md5SziK3uYtei",
                          "created_at": "2022-09-21T11:38:34.962Z",
                          "name": "Order more than $100",
                          "banner": "Order more than $100",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 3000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {},
                          "hierarchy": 1,
                          "promotion_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                          "campaign": {
                            "id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                            "start_date": "2022-09-21T00:00:00.000Z",
                            "expiration_date": "2022-09-30T00:00:00.000Z",
                            "validity_timeframe": {
                              "interval": "P3D",
                              "duration": "P2D"
                            },
                            "validity_day_of_week": [
                              1,
                              2,
                              3,
                              4,
                              5
                            ],
                            "active": true,
                            "category_id": "cat_0bb81a481615a37b5e",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_VEL7UX0jZjrvLx3hfNZBVzpq",
                          "active": true,
                          "start_date": "2022-09-21T00:00:00.000Z",
                          "expiration_date": "2022-09-30T00:00:00.000Z",
                          "validity_timeframe": {
                            "interval": "P3D",
                            "duration": "P2D"
                          },
                          "validity_day_of_week": [
                            1,
                            2
                          ],
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 0
                            },
                            "orders": {
                              "total_amount": 0,
                              "total_discount_amount": 0
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": null
                        },
                        {
                          "id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
                          "created_at": "2021-12-15T11:34:01.358Z",
                          "updated_at": "2022-02-09T09:20:08.619Z",
                          "name": "Hot Promotion - Tier 2",
                          "banner": "Get Tier 2 Discount $20 Off",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 2000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {},
                          "hierarchy": 2,
                          "promotion_id": "camp_5h0wc453_5",
                          "campaign": {
                            "id": "camp_5h0wc453_5",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "category_id": "cat_0b688929a2476386a6",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_5h0wc453_5",
                          "active": true,
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 33
                            },
                            "orders": {
                              "total_amount": 519200,
                              "total_discount_amount": 66000
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": {
                            "object": "list",
                            "data_ref": "data",
                            "data": [
                              {
                                "id": "asgm_pEe1inoYSfmO12p7",
                                "rule_id": "val_5h0wc453_5",
                                "related_object_id": "promo_RaYHtUBre5jU8frUXOvYBtlN",
                                "related_object_type": "promotion_tier",
                                "created_at": "2021-12-15T11:34:01.358Z",
                                "object": "validation_rules_assignment"
                              }
                            ],
                            "total": 1
                          }
                        },
                        {
                          "id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
                          "created_at": "2021-12-15T11:34:01.333Z",
                          "updated_at": "2022-02-09T09:20:05.603Z",
                          "name": "Hot Promotion - Tier 1",
                          "banner": "Get Tier 1 Discount 10zl",
                          "action": {
                            "discount": {
                              "type": "AMOUNT",
                              "amount_off": 1000,
                              "effect": "APPLY_TO_ORDER"
                            }
                          },
                          "metadata": {
                            "ProductionMetaData": "Hot Promotion - Tier 1"
                          },
                          "hierarchy": 1,
                          "promotion_id": "camp_5h0wc453_5",
                          "campaign": {
                            "id": "camp_5h0wc453_5",
                            "start_date": null,
                            "expiration_date": null,
                            "active": true,
                            "category_id": "cat_0b688929a2476386a6",
                            "object": "campaign"
                          },
                          "campaign_id": "camp_5h0wc453_5",
                          "active": true,
                          "summary": {
                            "redemptions": {
                              "total_redeemed": 11
                            },
                            "orders": {
                              "total_amount": 1414979,
                              "total_discount_amount": 11000
                            }
                          },
                          "object": "promotion_tier",
                          "validation_rule_assignments": {
                            "object": "list",
                            "data_ref": "data",
                            "data": [
                              {
                                "id": "asgm_QqYs7GGVy7cuh3L9",
                                "rule_id": "val_5h0wc453_4",
                                "related_object_id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
                                "related_object_type": "promotion_tier",
                                "created_at": "2021-12-15T11:34:01.333Z",
                                "object": "validation_rules_assignment"
                              }
                            ],
                            "total": 1
                          }
                        }
                      ],
                      "total": 3
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/client/v1/redemptions": {
      "post": {
        "operationId": "redeem-stacked-discounts-client-side",
        "tags": [
          "Client-side"
        ],
        "summary": "Redeem Stackable Discounts (client-side)",
        "description": "This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.\n\n## How API returns calculated discounts and order amounts in the response\n\nIn the table below, you can see the logic the API follows to calculate discounts and amounts:\n\n| **Field** | **Calculation** | **Description** |\n|:---|:---|:---|\n| amount | N/A | This field shows the order amount before applying any discount |\n| total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts |\n| discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. |\n| items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts |\n| total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts |\n| applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request |\n| items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request |\n| total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request |\n\n[rollback request](ref:rollback-stacked-redemptions).",
        "parameters": [
          {
            "$ref": "#/components/parameters/origin"
          }
        ],
        "security": [
          {
            "X-Client-Application-Id": [],
            "X-Client-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_redemptions"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientRedemptionsRedeemRequestBody"
              },
              "examples": {
                "Example": {
                  "value": {
                    "customer": {
                      "source_id": "sample_customer",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "voucher-code"
                      }
                    ],
                    "session": {
                      "type": "LOCK",
                      "key": "session_key"
                    },
                    "order": {
                      "amount": 55000,
                      "status": "PAID",
                      "items": [
                        {
                          "quantity": 2,
                          "price": 20000,
                          "source_id": "sample product1",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        },
                        {
                          "quantity": 1,
                          "price": 15000,
                          "source_id": "sample product2",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ],
                      "metadata": {
                        "key": "value"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid redemption. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientRedemptionsRedeemResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/client/v1/validations": {
      "post": {
        "operationId": "validate-stacked-discounts-client-side",
        "tags": [
          "Client-side"
        ],
        "summary": "Validate Stackable Discounts (client-side)",
        "description": "Verify redeemables provided in the request. This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.",
        "parameters": [
          {
            "$ref": "#/components/parameters/origin"
          }
        ],
        "security": [
          {
            "X-Client-Application-Id": [],
            "X-Client-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_validations"
            ]
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientValidationsValidateRequestBody"
              },
              "examples": {
                "1 Redeemable": {
                  "value": {
                    "customer": {
                      "source_id": "sample_customer",
                      "metadata": {
                        "key": "value"
                      }
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "voucher-code"
                      }
                    ],
                    "session": {
                      "type": "LOCK"
                    },
                    "order": {
                      "amount": 55000,
                      "status": "PAID",
                      "items": [
                        {
                          "quantity": 2,
                          "price": 20000,
                          "source_id": "sample product1",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        },
                        {
                          "quantity": 1,
                          "price": 15000,
                          "source_id": "sample product2",
                          "related_object": "product",
                          "product": {
                            "metadata": {
                              "key": "value"
                            }
                          }
                        }
                      ],
                      "metadata": {
                        "key": "value"
                      }
                    }
                  }
                },
                "5 Redeemables": {
                  "value": {
                    "customer": {
                      "source_id": "36_bob"
                    },
                    "options": {
                      "expand": [
                        "order",
                        "redeemable",
                        "category"
                      ]
                    },
                    "redeemables": [
                      {
                        "object": "voucher",
                        "id": "GNcuPKGe"
                      },
                      {
                        "object": "voucher",
                        "id": "AnsvocvP",
                        "reward": {
                          "id": "rew_EPx1hCTpqzF0HW1z9NKckZH4"
                        }
                      },
                      {
                        "object": "voucher",
                        "id": "M3X8IwW8",
                        "gift": {
                          "credits": 100
                        }
                      },
                      {
                        "object": "promotion_tier",
                        "id": "promo_DE1N30D731Tg2F6NoMwNas2W"
                      },
                      {
                        "object": "promotion_tier",
                        "id": "promo_NDHgTg4VnOLYNjk9r7WOmQxf"
                      }
                    ],
                    "session": {
                      "type": "LOCK"
                    },
                    "order": {
                      "items": [
                        {
                          "sku_id": "sku_0a3efc90375d1217e2",
                          "quantity": 1
                        },
                        {
                          "product_id": "prod_0bc3bd8a4e072c5275",
                          "quantity": 1
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Depending on your project settings: all redeemables must be valid or just one must be valid to result as valid validation. Read more in the [Stacking Rule Documentation](https://support.voucherify.io/article/604-stacking-rules).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientValidationsValidateResponseBody"
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the payload is missing an `\"object\"` or `\"id\"` property in the redeemables array, if you add more than one promotion stack or attempt to join stacks with vouchers/promotion tiers.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_400_invalid_payload"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .redeemables[1] should have required property 'id'",
                      "request_id": "v-0b4ff38ab8c8164573"
                    }
                  },
                  "Duplicated Redeemables": {
                    "value": {
                      "code": 400,
                      "key": "duplicated_redeemables",
                      "message": "Duplicated redeemables detected",
                      "details": "Duplicated redeemables detected in one redemption",
                      "request_id": "v-0b4ffecfb408165300"
                    }
                  },
                  "Invalid Redeemables": {
                    "value": {
                      "code": 400,
                      "key": "invalid_redeemables",
                      "message": "Invalid redeemables",
                      "details": "Promotion Stack cannot be use with other redeemables",
                      "request_id": "v-0b5007812f48165d6b"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/client/v1/events": {
      "post": {
        "operationId": "track-custom-event-client-side",
        "tags": [
          "Client-side"
        ],
        "summary": "Track Custom Event (client-side)",
        "description": "To track a custom event, you create an event object.  \n\nThe event object must be linked to the customer who performs the action. If a customer doesn't exist in Voucherify, the customer will be created.",
        "parameters": [
          {
            "$ref": "#/components/parameters/origin"
          }
        ],
        "security": [
          {
            "X-Client-Application-Id": [],
            "X-Client-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_events"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the details of the custom event.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientEventsCreateRequestBody"
              },
              "examples": {
                "Referral triggered by custom event": {
                  "value": {
                    "event": "user_subscribed",
                    "customer": {
                      "source_id": "source_customer_event"
                    },
                    "referral": {
                      "code": "46jL0kYI",
                      "referrer_id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
                    },
                    "metadata": {
                      "login": "bob",
                      "pricing_plan": "PP1",
                      "volume_number": 4
                    }
                  }
                },
                "Earning rule triggered by custom event": {
                  "value": {
                    "event": "cart_abandoned",
                    "customer": {
                      "source_id": "source_customer_event"
                    },
                    "loyalty": {
                      "code": "6CB4KDAu"
                    },
                    "metadata": {
                      "date": "2022-12-01",
                      "flag": true,
                      "text": "Cart abandoned event",
                      "date_time": "2022-12-01T09:24:33.061Z",
                      "number": 1
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns the event type if the event was received by the application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientEventsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "object": "event",
                      "type": "cart_abandoned",
                      "customer": {
                        "id": "cust_ypePCF6IU6fnUvec6RMXZuH4",
                        "name": "John Doe",
                        "email": "john@voucherify.io",
                        "source_id": "source_customer_event",
                        "metadata": {
                          "prop": "value"
                        },
                        "object": "customer"
                      },
                      "referral": null,
                      "loyalty": null
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if the request payload is incomplete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Invalid payload": {
                    "value": {
                      "code": 400,
                      "key": "invalid_payload",
                      "message": "Invalid payload",
                      "details": "Property .referral should have required property 'code'",
                      "request_id": "v-0c15694e0e022146dd"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/client/v1/validate": {
      "get": {
        "operationId": "validate-voucher-client-side",
        "deprecated": true,
        "tags": [
          "Client-side"
        ],
        "summary": "Validate Voucher (client-side) [Deprecated]",
        "description": "[disabled vouchers](ref:disable-voucher)\n* `customer does not match segment rules` - learn more customer tracking LINK\n* `order does not match validation rules` - learn more about validation rules LINK",
        "parameters": [
          {
            "$ref": "#/components/parameters/origin"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCode"
            },
            "in": "query",
            "name": "code",
            "description": "A code that identifies the voucher."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "A tracking identifier of a user that validated the voucher. This identifier is generated during voucher validation based on your internal ID (e.g., email, database ID) during the first request. This is a hashed customer source ID. If the request is performed for the first time, pass the internal ID to track the customer. **Although not all information is required, the extra information helps prevent fraud.**"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "amount",
            "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."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterSessionKey"
            },
            "in": "query",
            "name": "session_key",
            "description": "The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterInteger"
            },
            "in": "query",
            "name": "session_ttl",
            "description": "Value for the period of time that the session is active. Units for this parameter are defined by the `session_ttl_unit` parameter."
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterSessionTtlUnit"
            },
            "in": "query",
            "name": "session_ttl_unit",
            "description": "Defines the type of unit in which the session time is counted."
          },
          {
            "$ref": "#/components/parameters/metadata"
          },
          {
            "$ref": "#/components/parameters/item"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "session_type",
            "description": "The session is required to establish a session between multiple parallel validation and redemption requests. This parameter is required to establish a new session. The session locks the **redemption quantity by 1** and additionally the redemption **gift credits** specified within the request for a gift card and the **loyalty points** for a loyalty card."
          },
          {
            "name": "customer",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterCustomerValidateVoucherClientSide"
            },
            "description": "Customer details."
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/ParameterOrderMetadata"
            },
            "style": "deepObject",
            "explode": true,
            "description": "Order details."
          }
        ],
        "security": [
          {
            "X-Client-Application-Id": [],
            "X-Client-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_validate"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Returns information whether the voucher is valid in the context of the parameter values provided in the query parameters. Moreover, it returns a hashed source identifier which can be used as tracking ID in future calls. If a validation session is established, then the session details will be returned as well. Read more on [validation sessions](doc:locking-validation-session).",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/6_res_validate_voucher"
                    },
                    {
                      "$ref": "#/components/schemas/6_res_validate_voucher_false"
                    }
                  ]
                },
                "examples": {
                  "Wrong customer": {
                    "value": {
                      "valid": false,
                      "reason": "customer does not match validation rules",
                      "error": {
                        "message": "Only the gift card owner can apply credits from the gift card to the order."
                      },
                      "tracking_id": "track_0nmdnu/6xIb6NTN0Ea40oFmM4wD5QYlxAgKdSn6wh+o",
                      "code": "GIFT-CARD-kW4aEsfB",
                      "metadata": {}
                    }
                  },
                  "Validation Rule Not Satisfied": {
                    "value": {
                      "valid": false,
                      "reason": "redemption does not match validation rules",
                      "error": {
                        "code": 400,
                        "key": "redemption_rules_violated",
                        "message": "redemption does not match validation rules",
                        "details": "Discount Coupon cannot be redeemed because of violated validation rules: val_WuupvE7OVXyo",
                        "request_id": "v-0be54f4afa0357c12f"
                      },
                      "tracking_id": "track_0nmdnu/6xIb6NTN0Ea40oFmM4wD5QYlxAgKdSn6wh+oychk",
                      "code": "PAYINEUROS",
                      "metadata": {
                        "shoutout": "Pay in euros to get 10 Euros off, any other currency to get 5 off in that currency."
                      }
                    }
                  },
                  "Validate Discount Coupon": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_rynPcKGW2z7+kd2Vry4p12+Rx2NtyXZyiApdGWEXPrdX+44Fg6LRBQ==",
                      "session": {
                        "key": "A",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "amount": 13000,
                        "discount_amount": 1000,
                        "total_discount_amount": 1000,
                        "total_amount": 12000,
                        "applied_discount_amount": 1000,
                        "total_applied_discount_amount": 1000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 13000,
                            "price": 6500,
                            "subtotal_amount": 13000,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          }
                        ],
                        "metadata": {
                          "currency": "EUR"
                        },
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "PAYINEUROS",
                      "discount": {
                        "type": "AMOUNT",
                        "effect": "APPLY_TO_ORDER",
                        "amount_off": 1000
                      },
                      "metadata": {
                        "shoutout": "Pay in euros to get 10 Euros off, any other currency to get 5 off in that currency."
                      }
                    }
                  },
                  "Validate Loyalty Card": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "session": {
                        "key": "A",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "amount": 121700,
                        "discount_amount": 5000,
                        "total_discount_amount": 5000,
                        "total_amount": 116700,
                        "applied_discount_amount": 5000,
                        "total_applied_discount_amount": 5000,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 13000,
                            "price": 6500,
                            "subtotal_amount": 13000,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bd76bb4aa003890cb",
                            "quantity": 2,
                            "amount": 9000,
                            "price": 4500,
                            "subtotal_amount": 9000,
                            "product": {
                              "id": "prod_0bd76bb4aa003890cb",
                              "source_id": "webinar_BF_pants_black_sweat_pants",
                              "name": "Black Sweat Pants",
                              "price": 4500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "M0E20000000ELDH",
                            "related_object": "sku",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "quantity": 3,
                            "amount": 89700,
                            "price": 29900,
                            "subtotal_amount": 89700,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f8",
                              "source_id": "M0E20000000ELDH",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          }
                        ],
                        "metadata": {
                          "currency": "EUR"
                        },
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "LOYALTY-CARD-ng3Kb9tM",
                      "loyalty": {
                        "points_cost": 1000
                      },
                      "reward": {
                        "id": "rew_4ZF6Y69U2PXE3GLIZxfozgg1",
                        "assignment_id": "rewa_WkeBlLhj0sRae70J5AAvLbmy"
                      },
                      "metadata": {},
                      "campaign": "Loyalty Campaign",
                      "campaign_id": "camp_ZNb23Xtw1WuGCm7gdax84PUi"
                    }
                  },
                  "Validate Gift Card": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==",
                      "session": {
                        "key": "A",
                        "type": "LOCK",
                        "ttl": 1,
                        "ttl_unit": "NANOSECONDS"
                      },
                      "order": {
                        "amount": 165700,
                        "discount_amount": 21500,
                        "total_discount_amount": 21500,
                        "total_amount": 144200,
                        "applied_discount_amount": 21500,
                        "total_applied_discount_amount": 21500,
                        "items": [
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_sweater_pink_sweater",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 13000,
                            "price": 6500,
                            "subtotal_amount": 13000,
                            "product": {
                              "id": "prod_0bd76ca337954ca116",
                              "source_id": "webinar_BF_sweater_pink_sweater",
                              "name": "Pink Sweater",
                              "price": 6500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "webinar_BF_pants_gray_sweat_pants",
                            "related_object": "product",
                            "quantity": 2,
                            "amount": 10000,
                            "price": 5000,
                            "subtotal_amount": 10000,
                            "product": {
                              "id": "prod_0bd76b8656956a183f",
                              "source_id": "webinar_BF_pants_gray_sweat_pants",
                              "name": "Gray Sweat Pants",
                              "price": 5000
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0bd76bb4aa003890cb",
                            "quantity": 2,
                            "amount": 9000,
                            "price": 4500,
                            "subtotal_amount": 9000,
                            "product": {
                              "id": "prod_0bd76bb4aa003890cb",
                              "source_id": "webinar_BF_pants_black_sweat_pants",
                              "name": "Black Sweat Pants",
                              "price": 4500
                            }
                          },
                          {
                            "object": "order_item",
                            "source_id": "M0E20000000ELDH",
                            "related_object": "sku",
                            "product_id": "prod_0b661d4bd2c7ec7d1f",
                            "quantity": 3,
                            "amount": 89700,
                            "price": 29900,
                            "subtotal_amount": 89700,
                            "product": {
                              "id": "prod_0b661d4bd2c7ec7d1f",
                              "source_id": "facdc58f-ff7c-40c4-a22f-ab0a084a9107",
                              "name": "Casual jacket Michael Kors beige"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc8d35a8f8",
                              "source_id": "M0E20000000ELDH",
                              "sku": "Casual jacket Michael Kors beige",
                              "price": 29900
                            }
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0b661d4bd347ec7d26",
                            "sku_id": "sku_0b661e41fc0d35a8f1",
                            "quantity": 4,
                            "amount": 44000,
                            "price": 11000,
                            "subtotal_amount": 44000,
                            "product": {
                              "id": "prod_0b661d4bd347ec7d26",
                              "source_id": "975193eb-1911-444a-a0f0-f567efce1a8b",
                              "name": "Pumps ”Flex” Michael Kors black"
                            },
                            "sku": {
                              "id": "sku_0b661e41fc0d35a8f1",
                              "source_id": "M0E20000000DMVX",
                              "sku": "Pumps ”Flex” Michael Kors black",
                              "price": 11000
                            }
                          }
                        ],
                        "metadata": {
                          "currency": "EUR"
                        },
                        "customer_id": null,
                        "referrer_id": null,
                        "object": "order"
                      },
                      "code": "GIFT-CARD-kW4aEsfB",
                      "gift": {
                        "amount": 32000,
                        "balance": 21500,
                        "effect": "APPLY_TO_ORDER"
                      },
                      "metadata": {},
                      "campaign": "Gift Card Campaign",
                      "campaign_id": "camp_ZjoZEdmnyUCPYwMPN0IVbvDK"
                    }
                  },
                  "Validate Referral Code": {
                    "value": {
                      "valid": true,
                      "applicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "inapplicable_to": {
                        "data": [],
                        "total": 0,
                        "data_ref": "data",
                        "object": "list"
                      },
                      "tracking_id": "track_p6hPsnZj2VSvyXDjH9o6aQ==",
                      "order": {
                        "amount": 10000,
                        "discount_amount": 3000,
                        "total_discount_amount": 3000,
                        "total_amount": 7000,
                        "applied_discount_amount": 3000,
                        "total_applied_discount_amount": 3000,
                        "items": [],
                        "metadata": {},
                        "referrer": {
                          "id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                          "object": "customer"
                        },
                        "customer_id": null,
                        "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
                        "object": "order"
                      },
                      "code": "REFERRAL-CODE-OxBakPYf",
                      "discount": {
                        "type": "PERCENT",
                        "effect": "APPLY_TO_ORDER",
                        "percent_off": 30
                      },
                      "metadata": {},
                      "campaign": "Referral Campaign",
                      "campaign_id": "camp_TnOf5NB4Jtjxwoq38WckMJfy"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if missing required parameters or tracking IDs come from the same origin.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing customer": {
                    "value": {
                      "code": 400,
                      "key": "missing_customer",
                      "message": "Missing customer",
                      "details": "Customer is required to validate rules",
                      "request_id": "v-0be548ae620abb0a73"
                    }
                  },
                  "Ambiguous tracking ID": {
                    "value": {
                      "code": 400,
                      "key": "ambiguous_tracking_id",
                      "message": "Ambiguous trackingId ('track_0nmdnu/6xIb6NTN0Ea40oFmM4wD5QYlxAgKdSn6wh+oychkbEcMNB5RhcTj+zcKBEcGnUZkAXxg=' vs. 'track_Mcg5qK0jIStHAopLoM+nM6ua9crMFQrLt+qSe2YCbmTrTT8932kSlg==')",
                      "details": "The customer cannot be identified as two different identifiers have been used between requests from same origin.",
                      "request_id": "v-0be550a5a84abb30f8"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/client/v1/redeem": {
      "post": {
        "operationId": "redeem-voucher-client-side",
        "deprecated": true,
        "tags": [
          "Client-side"
        ],
        "summary": "Redeem Voucher (client-side) [Deprecated]",
        "description": "\n> ❗️ Security Threat  \n>\n> Be careful if you want to include the voucher redemption functionality directly on your client side (website or mobile app). In this configuration, there is a chance that discounts can be modified before being sent to the server.\n\n### Expand Response\nYou may expand the response by adding the following object to your request body. The expanded response will include the category details of the voucher.\n\n```json\n{\n    \"options\": {\n        \"expand\": [\n            \"category\"\n        ]\n    }\n}\n```",
        "parameters": [
          {
            "$ref": "#/components/parameters/origin"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterCode"
            },
            "in": "query",
            "name": "code",
            "description": "Voucher code being redeemed.",
            "required": true
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterString"
            },
            "in": "query",
            "name": "tracking_id",
            "description": "A tracking identifier of a user that redeemed a voucher. Identifier generated during voucher validation based on your internal id (e.g., email, database ID). This is a hashed customer source ID. If you also pass a customer ID, the tracking ID must be the ID of a source of the customer object. Otherwise, if you do not pass a customer ID, the tracking you provide must either be a token, like the ones returned by [voucher validation](ref:validate-voucher), or a string identifying customer, with the options described below. Although not all information is required, the extra info helps prevent fraud."
          }
        ],
        "security": [
          {
            "X-Client-Application-Id": [],
            "X-Client-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_redeem"
            ]
          }
        ],
        "requestBody": {
          "description": "Provide the redemption context in the request body.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/7_req_redeem_voucher"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a redemption object if the redeem operation succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/7_res_redeem_voucher"
                },
                "examples": {
                  "Gift Voucher": {
                    "value": {
                      "id": "r_0c5e8a38730ccec0d5",
                      "object": "redemption",
                      "date": "2023-01-27T12:34:57.100Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 2000,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_S4BvUj64TlGqVZDOeud7z3rU",
                        "source_id": null,
                        "created_at": "2023-01-27T12:34:57.086Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "discount_amount": 2000,
                        "total_discount_amount": 2000,
                        "total_amount": 4000,
                        "applied_discount_amount": 2000,
                        "total_applied_discount_amount": 2000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8a38730ccec0d5": {
                            "date": "2023-01-27T12:34:57.100Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                            "related_object_parent_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6"
                          }
                        }
                      },
                      "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_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                      "voucher": {
                        "id": "v_UFAc7FTVO0HtJV2hWZls4O7eqHMyn62g",
                        "code": "CODE14",
                        "campaign": "Gift Card Campaign",
                        "campaign_id": "camp_B2Gx83JsSbmvj05MOwxYbNm6",
                        "category": "Second",
                        "category_id": "cat_0bb343dee3cdb5ec0c",
                        "categories": [],
                        "type": "GIFT_VOUCHER",
                        "discount": null,
                        "gift": {
                          "amount": 2000,
                          "balance": 0,
                          "effect": null
                        },
                        "loyalty_card": null,
                        "start_date": "2020-08-16T00:00:00.000Z",
                        "expiration_date": null,
                        "validity_timeframe": null,
                        "validity_day_of_week": null,
                        "active": true,
                        "additional_info": "secret-code1",
                        "metadata": {
                          "region": "APAC",
                          "season": "Fall"
                        },
                        "assets": {
                          "qr": {
                            "id": "U2FsdGVkX1+VibJ6VGxrSVw5qmdbPMP3aP8HfcngMxtQc9Bm649CK1dK36e8YR820Ct26IkvDemEDzV8ozhB3F2BpazbgvCmhAo2Gvmo2WtwBwPh2ISAPJiXQCHRjwmKiqogjqQaNKWLxwDIBUc2jQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX1/GVIi0p5fL5hxAY/ZBmuAU7nYYS03umjd30dwI5v5ZbpNc3Q5MiYbMuIOIT0H2fUTTwd//S4R9AB+60T/x4kSKu3lgfa9KgJmbyrzXm7Ggly06/qph4/asJaZVZIXEba4WJCeHqXCEgg==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-23T11:05:42.164Z",
                        "updated_at": "2023-01-27T12:34:57.102Z",
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [],
                          "total": 0
                        },
                        "redemption": {
                          "quantity": 18,
                          "redeemed_quantity": 1,
                          "redeemed_amount": 2000,
                          "object": "list",
                          "url": "/v1/vouchers/CODE14/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/CODE14/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"
                        }
                      },
                      "gift": {
                        "amount": 2000
                      }
                    }
                  },
                  "Discount Coupon": {
                    "value": {
                      "id": "r_0c5e8ef10842da0aad",
                      "object": "redemption",
                      "date": "2023-01-27T12:55:34.689Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_J5ogV1Gkk2yfxmBEhYIg4O65",
                        "source_id": null,
                        "created_at": "2023-01-27T12:55:34.673Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "items_discount_amount": 300,
                        "total_discount_amount": 300,
                        "total_amount": 5700,
                        "items_applied_discount_amount": 300,
                        "total_applied_discount_amount": 300,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "discount_amount": 148,
                            "applied_discount_amount": 148,
                            "price": 3000,
                            "subtotal_amount": 3152
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "discount_amount": 152,
                            "applied_discount_amount": 152,
                            "price": 3000,
                            "subtotal_amount": 3248
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8ef10842da0aad": {
                            "date": "2023-01-27T12:55:34.689Z",
                            "related_object_type": "voucher",
                            "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u"
                          }
                        }
                      },
                      "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_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                      "voucher": {
                        "id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                        "code": "2CpRCE2c",
                        "campaign": null,
                        "campaign_id": null,
                        "category": null,
                        "category_id": null,
                        "categories": [],
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 300,
                          "effect": "APPLY_TO_ITEMS_PROPORTIONALLY"
                        },
                        "gift": null,
                        "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": "U2FsdGVkX1+ro/6HLsfI9E/rz0QEoYv+rcVIEERdbV3gB4104zYyGfpydtSxS1WfpbuiDUfMizQAl1EMzoYsud5XTKBBwUkGkI5IPl84lPz+WQtg4nKpjUS0wcA7AuIbz2zb870YfJO/r5UBS5gCqQ==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX19SWjP3ZUbFh26gCGb4xm3K95jhzfk1XXlKcYlHPtDTYR3/4dYbig4xxRmkgpQLa93Woz9Hq3h4JBQ+aTlftkEzL4D4OSAWi1aWlfxVikrJd6TMFLh9mmbmskodjs4MIdOFlluDWyarlw==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-19T10:06:07.932Z",
                        "updated_at": "2023-01-27T12:55:34.690Z",
                        "validation_rules_assignments": {
                          "object": "list",
                          "data_ref": "data",
                          "data": [
                            {
                              "id": "asgm_HesdqEzt5e9c0T56",
                              "rule_id": "val_gZft0NKZSUWK",
                              "related_object_id": "v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u",
                              "related_object_type": "voucher",
                              "object": "validation_rules_assignment"
                            }
                          ],
                          "total": 1
                        },
                        "redemption": {
                          "quantity": null,
                          "redeemed_quantity": 2,
                          "object": "list",
                          "url": "/v1/vouchers/2CpRCE2c/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 0,
                          "url": "/v1/vouchers/2CpRCE2c/publications?page=1&limit=10"
                        },
                        "object": "voucher",
                        "applicable_to": {
                          "data": [
                            {
                              "object": "product",
                              "id": "prod_0a9f9ab4ab019a42d5",
                              "source_id": "prod_0a9f9ab4ab019a42d5",
                              "effect": "APPLY_TO_EVERY"
                            },
                            {
                              "object": "product",
                              "id": "prod_0a9f9aeddb019a42db",
                              "source_id": "prod_0a9f9aeddb019a42db",
                              "effect": "APPLY_TO_EVERY"
                            }
                          ],
                          "total": 2,
                          "data_ref": "data",
                          "object": "list"
                        },
                        "inapplicable_to": {
                          "data": [],
                          "total": 0,
                          "data_ref": "data",
                          "object": "list"
                        }
                      }
                    }
                  },
                  "Loyalty Card": {
                    "value": {
                      "id": "r_0c5e8f2cd78497a372",
                      "object": "redemption",
                      "date": "2023-01-27T12:56:35.934Z",
                      "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                      "tracking_id": "track_9B0kB92+bJa8a+PegaWREw==",
                      "metadata": null,
                      "amount": 300,
                      "result": "SUCCESS",
                      "order": {
                        "id": "ord_MGTimoN4VtSj7iT75bP01FsH",
                        "source_id": null,
                        "created_at": "2023-01-27T12:56:35.923Z",
                        "updated_at": null,
                        "status": "PAID",
                        "amount": 6000,
                        "discount_amount": 6000,
                        "total_discount_amount": 6000,
                        "total_amount": 0,
                        "applied_discount_amount": 6000,
                        "total_applied_discount_amount": 6000,
                        "items": [
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9ab4ab019a42d5",
                            "quantity": 1,
                            "amount": 3300,
                            "price": 3000,
                            "subtotal_amount": 3300
                          },
                          {
                            "object": "order_item",
                            "product_id": "prod_0a9f9aeddb019a42db",
                            "quantity": 2,
                            "amount": 3400,
                            "price": 3000,
                            "subtotal_amount": 3400
                          }
                        ],
                        "metadata": {},
                        "customer": {
                          "id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                          "object": "customer"
                        },
                        "customer_id": "cust_eWgXlBBiY6THFRJwX45Iakv4",
                        "referrer_id": null,
                        "object": "order",
                        "redemptions": {
                          "r_0c5e8f2cd78497a372": {
                            "date": "2023-01-27T12:56:35.934Z",
                            "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": 6500,
                          "balance": 5086
                        },
                        "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-01-27T12:56:35.935Z",
                        "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": 1414,
                          "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": 300
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if something goes wrong. A common source of error is an invalid or expired voucher, or a valid gift card with insufficient available balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/e_error_expanded"
                },
                "examples": {
                  "Voucher disabled": {
                    "value": {
                      "code": 400,
                      "key": "voucher_disabled",
                      "message": "voucher is disabled",
                      "details": "AnsvocvP",
                      "request_id": "v-0c5d710a63c4110ae9",
                      "resource_id": "rf_0c5d710a87c8a31f86",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The voucher has been disabled and cannot be used."
                      }
                    }
                  },
                  "Invalid Customer": {
                    "value": {
                      "code": 400,
                      "key": "invalid_customer",
                      "message": "Customer must be a holder of a loyalty card.",
                      "details": "AnsvocvP",
                      "request_id": "v-0c5e628bd14411244b",
                      "resource_id": "rf_0c5e628bf841c7f248",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The customer is invalid."
                      }
                    }
                  },
                  "Voucher Inactive": {
                    "value": {
                      "code": 400,
                      "key": "voucher_not_active_now",
                      "message": "voucher not active now",
                      "details": "CODE14",
                      "request_id": "v-0c5e89b9300d820994",
                      "resource_id": "rf_0c5e89b945d33b9c02",
                      "resource_type": "redemption",
                      "error": {
                        "message": "The voucher is not active in the given timeframe."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/client/v1/publish": {
      "post": {
        "operationId": "create-publication-client-side",
        "tags": [
          "Client-side"
        ],
        "summary": "Create Publication (client-side)",
        "description": "This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.\n\nA voucher is suitable for publication when it's active and hasn't been published yet.  \n\n\n\n> 📘 Auto-update campaign\n>\n> In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.",
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ParameterBoolean"
            },
            "in": "query",
            "name": "join_once",
            "description": "Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer."
          }
        ],
        "security": [
          {
            "X-App-Id": [],
            "X-App-Token": [],
            "X-Voucherify-OAuth": [
              "client_api",
              "client_publish"
            ]
          }
        ],
        "requestBody": {
          "description": "Specify the publication parameters.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientPublicationsCreateRequestBody"
              },
              "examples": {
                "Example - Specific Voucher": {
                  "value": {
                    "campaign": {
                      "name": "campaign-name"
                    },
                    "customer": {
                      "source_id": "source-id",
                      "Name": "Customer Name",
                      "email": "customer email"
                    },
                    "voucher": "voucher-code",
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Example - Random Voucher": {
                  "value": {
                    "campaign": {
                      "name": "campaign-name",
                      "count": 1
                    },
                    "customer": {
                      "source_id": "source-id",
                      "Name": "Customer Name",
                      "email": "customer email"
                    },
                    "voucher": "voucher-code",
                    "metadata": {
                      "key": "value"
                    }
                  }
                },
                "Example 3": {
                  "value": {
                    "source_id": "publication_source_ID_10",
                    "campaign": "Test - Discount Effect - Amount - Items",
                    "channel": "myown",
                    "customer": {
                      "source_id": "pub_source_customer_5",
                      "name": "Bob Jones",
                      "description": "A frequent customer",
                      "email": "bob.smith@email.com",
                      "phone": "+1 933 222 3333",
                      "address": {
                        "city": "New York",
                        "country": "United States",
                        "line_1": "123 Main St.",
                        "line_2": "APT 3 BLG 5",
                        "postal_code": "10001",
                        "state": "NY"
                      },
                      "metadata": {
                        "lang": "en",
                        "test": true
                      },
                      "birthday": "1901-12-01"
                    },
                    "metadata": {
                      "year": 2022
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Returns a publication object if a valid identifier was provided.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClientPublicationsCreateResponseBody"
                },
                "examples": {
                  "Example": {
                    "value": {
                      "id": "pub_ocaXCa023ayJ3WL1ARxUeKgIvg3JcEGh",
                      "object": "publication",
                      "created_at": "2022-09-30T16:30:32.924Z",
                      "customer_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                      "tracking_id": "pub_source_customer_5",
                      "metadata": {
                        "year": 2022
                      },
                      "channel": "myown",
                      "source_id": "publication_source_ID_10",
                      "result": "SUCCESS",
                      "customer": {
                        "id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                        "name": "Bob Jones",
                        "email": "bob.smith@email.com",
                        "source_id": "pub_source_customer_5",
                        "metadata": {
                          "lang": "en",
                          "test": true
                        },
                        "object": "customer"
                      },
                      "voucher": {
                        "id": "v_6Hy5FdNlu3dP65fJu5BgXma31Sl3rgkf",
                        "code": "cEsMn0uA",
                        "campaign": "Test - Discount Effect - Amount - Items",
                        "campaign_id": "camp_dphuwqH7BOVkgh4JmpDtS32l",
                        "category": null,
                        "category_id": null,
                        "type": "DISCOUNT_VOUCHER",
                        "discount": {
                          "type": "AMOUNT",
                          "amount_off": 300,
                          "effect": "APPLY_TO_ITEMS"
                        },
                        "gift": null,
                        "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": "U2FsdGVkX188XVmOotyCyR2j3G8sJR8HzS3DQ+6J1OElPWSmjlEnthuJc7rkc7WIVxjT4pTl1JVVkHEuGXNXdzRik11H8S18HQeQFJFiuwLZ2mzEC2zZitEinyUxtZwhnEHoi0eGAgYCG7iVMNuOQA==",
                            "url": "{{internalVoucherifyURL}}"
                          },
                          "barcode": {
                            "id": "U2FsdGVkX18wDd9CcLM0Ef7aBfUSXZUoCQpuNpk4CHGOipbn+wFkfzcIZGBtUlxrI2KsXciCqF+c93AKzsymq5Yw8eEAFF/FK5f94z4/sgzaLDvyBmPCXHuS11Ew9S4ZEMjdTkUJftER2IlxWaCARA==",
                            "url": "{{internalVoucherifyURL}}"
                          }
                        },
                        "is_referral_code": false,
                        "created_at": "2022-09-30T16:30:32.956Z",
                        "updated_at": null,
                        "holder_id": "cust_BB6F97yf0XqCe7hxVUV7M4sS",
                        "redemption": {
                          "quantity": 1,
                          "redeemed_quantity": 0,
                          "object": "list",
                          "url": "/v1/vouchers/cEsMn0uA/redemptions?page=1&limit=10"
                        },
                        "publish": {
                          "object": "list",
                          "count": 1,
                          "url": "/v1/vouchers/cEsMn0uA/publications?page=1&limit=10"
                        },
                        "object": "voucher"
                      },
                      "vouchers_id": [
                        "v_6Hy5FdNlu3dP65fJu5BgXma31Sl3rgkf"
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Returns an error if a publication with the same source ID already exists in the system or some request body parameter is missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "Missing Parameters": {
                    "value": {
                      "code": 400,
                      "key": "missing_vouchers",
                      "message": "Missing vouchers",
                      "details": "Either Campaign or Voucher is required"
                    }
                  },
                  "Already published": {
                    "value": {
                      "code": 400,
                      "key": "voucher_already_published",
                      "message": "Voucher already published",
                      "details": "Voucher 'v_Y5P4UZ1yilkiYOIJmAAgWazUi1wfkNwF' has already been published",
                      "request_id": "v-0bc40bb800d5651137"
                    }
                  },
                  "Duplicate Source ID": {
                    "value": {
                      "code": 400,
                      "key": "duplicate_source_id",
                      "message": "Duplicate source_id",
                      "details": "Publication with source_id: 'publication_source_ID_1' already exists",
                      "request_id": "v-0bc40bf81555651191"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Returns an error if a resource is 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 1",
                      "request_id": "v-0bc40546e5d56508e5",
                      "resource_id": "1",
                      "resource_type": "campaign"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}