{
  "openapi": "3.1.1",
  "info": { "title": "LoyaltyLion Headless API", "version": "2025-06" },
  "servers": [{ "url": "https://api.loyaltylion.com" }],
  "paths": {
    "/headless/2025-06/{site_id}/configuration": {
      "get": {
        "tags": ["configuration"],
        "security": [
          { "ProgramApiKey": ["read_customers"] },
          { "CustomerSessionToken": ["read"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "configuration.getConfiguration",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "example": {
                    "channel": "web",
                    "currency": "usd",
                    "language": "en",
                    "program": { "name": "Lion Rewards" },
                    "tier_configuration": {
                      "boundary_mode": "spend",
                      "tiers": [
                        {
                          "id": 1,
                          "name": "Silver",
                          "benefit_ids": [1],
                          "hidden": false,
                          "kind": "spend",
                          "position": 1,
                          "lower_bound": { "amount": 0, "formatted": "$0" },
                          "upper_bound": {
                            "amount": 99.99,
                            "formatted": "$99.99"
                          }
                        },
                        {
                          "id": 2,
                          "name": "Gold",
                          "benefit_ids": [1, 2],
                          "hidden": false,
                          "kind": "spend",
                          "position": 2,
                          "lower_bound": { "amount": 100, "formatted": "$100" },
                          "upper_bound": null
                        }
                      ],
                      "tier_benefits": [
                        {
                          "id": 1,
                          "label": "Early access to new products",
                          "secret": false,
                          "details": null
                        },
                        {
                          "id": 2,
                          "label": "Free makeup classes",
                          "secret": false,
                          "details": {
                            "plaintext": "Email classes@example.com to sign up to a class\n",
                            "html": "<p>Email classes@example.com to sign up to a class</p>"
                          }
                        }
                      ],
                      "membership": { "mode": "rolling", "duration_months": 12 }
                    },
                    "referee_incentive": {
                      "minimum_spend": { "amount": 100, "formatted": "$100" },
                      "incentive_text": "Get a 10% discount on your order with this code when you spend over $100",
                      "kind": "cart_discount_voucher",
                      "discount_kind": "percentage",
                      "discount": { "percentage": 10, "formatted": "10%" }
                    },
                    "rules": [
                      {
                        "id": 1,
                        "kind": "purchase",
                        "variants": [
                          {
                            "tier_id": 1,
                            "enabled": true,
                            "title": "Make a purchase",
                            "description": "Earn points every time you shop with us",
                            "result": {
                              "kind": "points",
                              "per_currency_unit": 1,
                              "points": 5
                            },
                            "result_short_text": "5 points per $1"
                          },
                          {
                            "tier_id": 2,
                            "enabled": true,
                            "title": "Make a purchase",
                            "description": "Earn points every time you shop with us",
                            "result": {
                              "kind": "points",
                              "per_currency_unit": 1,
                              "points": 10
                            },
                            "result_short_text": "10 points per $1"
                          }
                        ],
                        "limit": null
                      },
                      {
                        "id": 2,
                        "kind": "pageview",
                        "variants": [
                          {
                            "tier_id": 1,
                            "enabled": true,
                            "title": "Visit our online store",
                            "description": null,
                            "result": {
                              "kind": "points",
                              "per_currency_unit": null,
                              "points": 100
                            },
                            "result_short_text": "100 points"
                          },
                          {
                            "tier_id": 2,
                            "enabled": true,
                            "title": "Visit our online store",
                            "description": null,
                            "result": {
                              "kind": "points",
                              "per_currency_unit": null,
                              "points": 200
                            },
                            "result_short_text": "200 points"
                          }
                        ],
                        "limit": { "count": 1, "interval": "week" }
                      },
                      {
                        "id": 3,
                        "kind": "review",
                        "variants": [
                          {
                            "tier_id": 1,
                            "enabled": true,
                            "title": "Leave a review",
                            "description": "Tell us what you think of your purchase",
                            "result": {
                              "kind": "points",
                              "per_currency_unit": null,
                              "points": 50
                            },
                            "result_short_text": "50 points",
                            "requirements": [
                              {
                                "kind": "text_length",
                                "min_length": 50,
                                "text": "Review must be at least 50 characters"
                              }
                            ],
                            "modifiers": [
                              {
                                "kind": "includes_photo",
                                "min_count": 1,
                                "bonus": {
                                  "kind": "per_count",
                                  "points": 10,
                                  "max_points": 30
                                },
                                "text": "Include photos for 10 bonus points per photo (up to 30)"
                              },
                              {
                                "kind": "text_length",
                                "min_length": 200,
                                "bonus": { "kind": "fixed", "points": 10 },
                                "text": "Write at least 200 characters for 10 bonus points"
                              }
                            ]
                          },
                          {
                            "tier_id": 2,
                            "enabled": true,
                            "title": "Leave a review",
                            "description": "Tell us what you think of your purchase",
                            "result": {
                              "kind": "points",
                              "per_currency_unit": null,
                              "points": 100
                            },
                            "result_short_text": "100 points",
                            "requirements": [
                              {
                                "kind": "text_length",
                                "min_length": 50,
                                "text": "Review must be at least 50 characters"
                              }
                            ],
                            "modifiers": [
                              {
                                "kind": "includes_photo",
                                "min_count": 1,
                                "bonus": {
                                  "kind": "per_count",
                                  "points": 20,
                                  "max_points": 60
                                },
                                "text": "Include photos for 20 bonus points per photo (up to 60)"
                              },
                              {
                                "kind": "text_length",
                                "min_length": 200,
                                "bonus": { "kind": "fixed", "points": 20 },
                                "text": "Write at least 200 characters for 20 bonus points"
                              }
                            ]
                          }
                        ],
                        "limit": null
                      }
                    ],
                    "rewards": [
                      {
                        "id": 1,
                        "kind": "cart_discount_voucher",
                        "properties": {
                          "discount_type": "fixed",
                          "discount": { "amount": 5, "formatted": "$5" },
                          "applies_to_order_type": "one_time",
                          "recurring_cycle_limit": 1,
                          "supports_active_subscriptions": false,
                          "minimum_spend": { "amount": 10, "formatted": "$10" }
                        },
                        "variants": [
                          {
                            "tier_id": 1,
                            "enabled": true,
                            "title": "$5 discount",
                            "description": "Spend your points on $5 off your next order",
                            "cost": { "kind": "fixed", "points": 500 },
                            "cost_text": "500 points"
                          },
                          {
                            "tier_id": 2,
                            "enabled": true,
                            "title": "$5 discount",
                            "description": "Spend your points on $5 off your next order",
                            "cost": { "kind": "fixed", "points": 400 },
                            "cost_text": "400 points"
                          }
                        ],
                        "limit": null
                      },
                      {
                        "id": 2,
                        "kind": "cart_variable_discount_voucher",
                        "properties": {
                          "minimum_discount": {
                            "amount": 1,
                            "formatted": "$1"
                          },
                          "maximum_discount": {
                            "amount": 100,
                            "formatted": "$100"
                          },
                          "applies_to_order_type": "all",
                          "minimum_spend_before_discount": null,
                          "minimum_spend_after_discount": null
                        },
                        "variants": [
                          {
                            "tier_id": 1,
                            "enabled": false,
                            "title": "Redeem points at checkout",
                            "description": null,
                            "cost": {
                              "kind": "variable",
                              "unit": "discount_amount",
                              "points_per_unit": 100
                            },
                            "cost_text": "100 points per $1"
                          },
                          {
                            "tier_id": 2,
                            "enabled": true,
                            "title": "Redeem points at checkout",
                            "description": null,
                            "cost": {
                              "kind": "variable",
                              "unit": "discount_amount",
                              "points_per_unit": 100
                            },
                            "cost_text": "100 points per $1"
                          }
                        ],
                        "limit": null
                      }
                    ]
                  },
                  "$ref": "#/components/schemas/SiteConfiguration"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": { "message": { "type": "string" } },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": { "message": { "type": "string" } },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": { "message": { "type": "string" } },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/customers/{merchant_id}": {
      "get": {
        "tags": ["customers"],
        "security": [
          { "ProgramApiKey": ["read_customers"] },
          { "CustomerSessionToken": ["read"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "merchant_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "minLength": 1 },
            "description": "The ID of the customer in your platform or ecommerce store. \n\nFor Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. If you do pass a GID you must encode it as a URL parameter, e.g. `gid%3A%2F%2Fshopify%2FCustomer%2F1001`"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "customers.getCustomer",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersGetCustomerResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/customers/{merchant_id}/sessions": {
      "post": {
        "tags": ["customers"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID. If a new customer is created from this API call, they'll be created in this Site, which is relevant for multi-site programs"
          },
          {
            "name": "merchant_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "minLength": 1 },
            "description": "The ID of the customer in your platform or ecommerce store. \n\nFor Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. If you do pass a GID you must encode it as a URL parameter, e.g. `gid%3A%2F%2Fshopify%2FCustomer%2F1001`"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "customers.initializeSession",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomersInitializeSessionRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersInitializeSessionResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/InitializeSessionErrorEmailAlreadyInUse"
                        },
                        {
                          "$ref": "#/components/schemas/InitializeSessionErrorEmailMismatch"
                        },
                        {
                          "$ref": "#/components/schemas/InitializeSessionErrorCustomerDeleted"
                        },
                        {
                          "$ref": "#/components/schemas/InitializeSessionErrorInvalidPhone"
                        },
                        {
                          "$ref": "#/components/schemas/InitializeSessionErrorPhoneRequiresApiToken"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "email_already_in_use": "#/components/schemas/InitializeSessionErrorEmailAlreadyInUse",
                          "email_mismatch": "#/components/schemas/InitializeSessionErrorEmailMismatch",
                          "customer_deleted": "#/components/schemas/InitializeSessionErrorCustomerDeleted",
                          "invalid_phone": "#/components/schemas/InitializeSessionErrorInvalidPhone",
                          "phone_requires_api_token": "#/components/schemas/InitializeSessionErrorPhoneRequiresApiToken"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/customers/{merchant_id}/birthday": {
      "post": {
        "tags": ["customers"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "merchant_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "minLength": 1 },
            "description": "The ID of the customer in your platform or ecommerce store. \n\nFor Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. If you do pass a GID you must encode it as a URL parameter, e.g. `gid%3A%2F%2Fshopify%2FCustomer%2F1001`\n\nThis must be a customer whose state is `enrolled`"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "customers.setBirthday",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomersSetBirthdayRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersSetBirthdayResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/UpdateCustomerNotEnrolledError"
                        },
                        {
                          "$ref": "#/components/schemas/UpdateCustomerBlockedError"
                        },
                        {
                          "$ref": "#/components/schemas/SetBirthdayErrorInvalidDate"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/UpdateCustomerNotEnrolledError",
                          "customer_blocked": "#/components/schemas/UpdateCustomerBlockedError",
                          "invalid_date": "#/components/schemas/SetBirthdayErrorInvalidDate"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/customers/{merchant_id}/enroll": {
      "post": {
        "tags": ["customers"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "merchant_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "minLength": 1 },
            "description": "The ID of the customer in your platform or ecommerce store. \n\nFor Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. If you do pass a GID you must encode it as a URL parameter, e.g. `gid%3A%2F%2Fshopify%2FCustomer%2F1001`"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "customers.enroll",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersEnrollResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/EnrollCustomerBlockedError"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_blocked": "#/components/schemas/EnrollCustomerBlockedError"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/customers/{merchant_id}/email_marketing/subscribe": {
      "post": {
        "tags": ["customers"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "merchant_id",
            "in": "path",
            "required": true,
            "schema": { "type": "string", "minLength": 1 },
            "description": "The ID of the customer in your platform or ecommerce store. \n\nFor Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. If you do pass a GID you must encode it as a URL parameter, e.g. `gid%3A%2F%2Fshopify%2FCustomer%2F1001`\n\nThis must be a customer whose state is `enrolled`"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "customers.emailMarketingSubscribe",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomersEmailMarketingSubscribeResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/UpdateCustomerNotEnrolledError"
                        },
                        {
                          "$ref": "#/components/schemas/UpdateCustomerBlockedError"
                        },
                        {
                          "$ref": "#/components/schemas/EmailMarketingSubscribeErrorSubscriptionFailed"
                        },
                        {
                          "$ref": "#/components/schemas/EmailMarketingSubscribeErrorUnsupportedPlatform"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/UpdateCustomerNotEnrolledError",
                          "customer_blocked": "#/components/schemas/UpdateCustomerBlockedError",
                          "subscription_failed": "#/components/schemas/EmailMarketingSubscribeErrorSubscriptionFailed",
                          "unsupported_platform": "#/components/schemas/EmailMarketingSubscribeErrorUnsupportedPlatform"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/referrals/referee_incentive": {
      "post": {
        "tags": ["referrals"],
        "security": [{ "ProgramApiKey": ["write_customers"] }],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          }
        ],
        "operationId": "referrals.claimRefereeIncentive",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralsClaimRefereeIncentiveRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The incentive was claimed. Repeating the request with the same `referral_id` and `referee_email` returns the same code. `kind` discriminates this from any further success outcome added later — switch on it rather than assuming a code is present",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimRefereeIncentiveIncentive"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorRefereeEmailRequired"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorInvalidReferee"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorReferralsNotEnabled"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorGuestReferralsDisabled"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorInvalidReferralId"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorReferralCapReached"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorFraudDetected"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorNoVouchersAvailable"
                        },
                        {
                          "$ref": "#/components/schemas/ClaimRefereeIncentiveErrorVoucherAllocationFailed"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "referee_email_required": "#/components/schemas/ClaimRefereeIncentiveErrorRefereeEmailRequired",
                          "invalid_referee": "#/components/schemas/ClaimRefereeIncentiveErrorInvalidReferee",
                          "referrals_not_enabled": "#/components/schemas/ClaimRefereeIncentiveErrorReferralsNotEnabled",
                          "guest_referrals_disabled": "#/components/schemas/ClaimRefereeIncentiveErrorGuestReferralsDisabled",
                          "invalid_referral_id": "#/components/schemas/ClaimRefereeIncentiveErrorInvalidReferralId",
                          "referral_cap_reached": "#/components/schemas/ClaimRefereeIncentiveErrorReferralCapReached",
                          "fraud_detected": "#/components/schemas/ClaimRefereeIncentiveErrorFraudDetected",
                          "no_vouchers_available": "#/components/schemas/ClaimRefereeIncentiveErrorNoVouchersAvailable",
                          "voucher_allocation_failed": "#/components/schemas/ClaimRefereeIncentiveErrorVoucherAllocationFailed"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/referrals/shares": {
      "post": {
        "tags": ["referrals"],
        "security": [{ "ProgramApiKey": ["write_customers"] }],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          }
        ],
        "operationId": "referrals.trackShare",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralsTrackShareRequestBody"
              }
            }
          }
        },
        "responses": {
          "204": { "description": "204" },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/TrackReferralShareErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/TrackReferralShareErrorCustomerBlocked"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/TrackReferralShareErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/TrackReferralShareErrorCustomerBlocked"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/referrals/guest_registrations": {
      "post": {
        "tags": ["referrals"],
        "security": [{ "ProgramApiKey": ["write_customers"] }],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          }
        ],
        "operationId": "referrals.registerGuestReferrer",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReferralsRegisterGuestReferrerRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The shopper holds referral links. The response is the same whether the address was new or already belonged to a customer, and says nothing about which — a shopper who is already a member keeps the membership they have, and is not enrolled or re-enrolled by this",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralsRegisterGuestReferrerResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RegisterGuestReferrerErrorGuestReferralsNotEnabled"
                        },
                        {
                          "$ref": "#/components/schemas/RegisterGuestReferrerErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RegisterGuestReferrerErrorMerchantCustomerPushFailed"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "guest_referrals_not_enabled": "#/components/schemas/RegisterGuestReferrerErrorGuestReferralsNotEnabled",
                          "customer_blocked": "#/components/schemas/RegisterGuestReferrerErrorCustomerBlocked",
                          "merchant_customer_push_failed": "#/components/schemas/RegisterGuestReferrerErrorMerchantCustomerPushFailed"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Too many registrations. On top of your program's API rate limit, this route limits registrations per shopper IP address and caps how many one site can take at once, so a request can be rejected here while the rest of your integration is well inside its limit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false,
                  "description": "Too many registrations. On top of your program's API rate limit, this route limits registrations per shopper IP address and caps how many one site can take at once, so a request can be rejected here while the rest of your integration is well inside its limit"
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/cart_discount_voucher/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemCartDiscountVoucher",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemCartDiscountVoucherRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemCartDiscountVoucherResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/free_shipping_voucher/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemFreeShippingVoucher",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemFreeShippingVoucherRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemFreeShippingVoucherResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/collection_discount_voucher/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemCollectionDiscountVoucher",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemCollectionDiscountVoucherRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemCollectionDiscountVoucherResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/product_discount_voucher/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemProductDiscountVoucher",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemProductDiscountVoucherRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemProductDiscountVoucherResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/gift_card/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemGiftCard",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemGiftCardRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemGiftCardResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/active_subscription_discount_voucher/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemActiveSubscriptionDiscountVoucher",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemActiveSubscriptionDiscountVoucherRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemActiveSubscriptionDiscountVoucherResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorNoSubscriptionIntegrationConfigured"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached",
                          "no_subscription_integration_configured": "#/components/schemas/RedeemRewardErrorNoSubscriptionIntegrationConfigured"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/active_subscription_product/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemActiveSubscriptionProduct",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemActiveSubscriptionProductRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemActiveSubscriptionProductResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorNoSubscriptionIntegrationConfigured"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorNoActiveSubscriptions"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInvalidShippingAddress"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInvalidVariantId"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached",
                          "no_subscription_integration_configured": "#/components/schemas/RedeemRewardErrorNoSubscriptionIntegrationConfigured",
                          "no_active_subscriptions": "#/components/schemas/RedeemRewardErrorNoActiveSubscriptions",
                          "invalid_shipping_address": "#/components/schemas/RedeemRewardErrorInvalidShippingAddress",
                          "invalid_variant_id": "#/components/schemas/RedeemRewardErrorInvalidVariantId"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/custom/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemCustom",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemCustomRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemCustomResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/product_cart/redeem": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.redeemProductCart",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRedeemProductCartRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRedeemProductCartResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInsufficientPoints"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardOutOfStock"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorRewardLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorInvalidVariantId"
                        },
                        {
                          "$ref": "#/components/schemas/RedeemRewardErrorMaxCartRedemptionsReached"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "insufficient_points": "#/components/schemas/RedeemRewardErrorInsufficientPoints",
                          "customer_not_enrolled": "#/components/schemas/RedeemRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RedeemRewardErrorCustomerBlocked",
                          "reward_not_enabled_for_customer": "#/components/schemas/RedeemRewardErrorRewardNotEnabledForCustomer",
                          "reward_out_of_stock": "#/components/schemas/RedeemRewardErrorRewardOutOfStock",
                          "reward_kind_mismatch": "#/components/schemas/RedeemRewardErrorRewardInvalidKind",
                          "reward_limit_reached": "#/components/schemas/RedeemRewardErrorRewardLimitReached",
                          "invalid_variant_id": "#/components/schemas/RedeemRewardErrorInvalidVariantId",
                          "max_cart_redemptions_reached": "#/components/schemas/RedeemRewardErrorMaxCartRedemptionsReached"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rewards/product_cart/refund": {
      "post": {
        "tags": ["rewards"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rewards.refundProductCart",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RewardsRefundProductCartRequestBody"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RewardsRefundProductCartResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/RefundRewardErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/RefundRewardErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/RefundRewardErrorRewardInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/RefundRewardErrorRewardAlreadyRefunded"
                        },
                        {
                          "$ref": "#/components/schemas/RefundRewardErrorRewardAlreadyUsed"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/RefundRewardErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/RefundRewardErrorCustomerBlocked",
                          "reward_kind_mismatch": "#/components/schemas/RefundRewardErrorRewardInvalidKind",
                          "reward_already_refunded": "#/components/schemas/RefundRewardErrorRewardAlreadyRefunded",
                          "reward_already_used": "#/components/schemas/RefundRewardErrorRewardAlreadyUsed"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rules/clickthrough/complete": {
      "post": {
        "tags": ["rules"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rules.completeClickthrough",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RulesCompleteClickthroughRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesCompleteClickthroughResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/CompleteRuleErrorCustomerBlocked",
                          "rule_not_enabled_for_customer": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer",
                          "rule_kind_mismatch": "#/components/schemas/CompleteRuleErrorRuleInvalidKind",
                          "rule_limit_reached": "#/components/schemas/CompleteRuleErrorRuleLimitReached",
                          "rule_requirements_not_met": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rules/facebook_like/complete": {
      "post": {
        "tags": ["rules"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rules.completeFacebookLike",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RulesCompleteFacebookLikeRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesCompleteFacebookLikeResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/CompleteRuleErrorCustomerBlocked",
                          "rule_not_enabled_for_customer": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer",
                          "rule_kind_mismatch": "#/components/schemas/CompleteRuleErrorRuleInvalidKind",
                          "rule_limit_reached": "#/components/schemas/CompleteRuleErrorRuleLimitReached",
                          "rule_requirements_not_met": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rules/twitter_follow/complete": {
      "post": {
        "tags": ["rules"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rules.completeTwitterFollow",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RulesCompleteTwitterFollowRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesCompleteTwitterFollowResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/CompleteRuleErrorCustomerBlocked",
                          "rule_not_enabled_for_customer": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer",
                          "rule_kind_mismatch": "#/components/schemas/CompleteRuleErrorRuleInvalidKind",
                          "rule_limit_reached": "#/components/schemas/CompleteRuleErrorRuleLimitReached",
                          "rule_requirements_not_met": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rules/instagram_follow/complete": {
      "post": {
        "tags": ["rules"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rules.completeInstagramFollow",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RulesCompleteInstagramFollowRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesCompleteInstagramFollowResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/CompleteRuleErrorCustomerBlocked",
                          "rule_not_enabled_for_customer": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer",
                          "rule_kind_mismatch": "#/components/schemas/CompleteRuleErrorRuleInvalidKind",
                          "rule_limit_reached": "#/components/schemas/CompleteRuleErrorRuleLimitReached",
                          "rule_requirements_not_met": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rules/tiktok_follow/complete": {
      "post": {
        "tags": ["rules"],
        "security": [
          { "ProgramApiKey": ["write_customers"] },
          { "CustomerSessionToken": ["write"] }
        ],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rules.completeTiktokFollow",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RulesCompleteTiktokFollowRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesCompleteTiktokFollowResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/CompleteRuleErrorCustomerBlocked",
                          "rule_not_enabled_for_customer": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer",
                          "rule_kind_mismatch": "#/components/schemas/CompleteRuleErrorRuleInvalidKind",
                          "rule_limit_reached": "#/components/schemas/CompleteRuleErrorRuleLimitReached",
                          "rule_requirements_not_met": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    },
    "/headless/2025-06/{site_id}/rules/custom/complete": {
      "post": {
        "tags": ["rules"],
        "security": [{ "ProgramApiKey": ["write_customers"] }],
        "parameters": [
          {
            "name": "site_id",
            "in": "path",
            "required": true,
            "schema": { "type": "number" },
            "description": "Your LoyaltyLion Site ID"
          },
          {
            "name": "channel",
            "in": "query",
            "description": "The sales channel from which this request is made. Must be provided as this query parameter, or the `X-LoyaltyLion-Channel` header",
            "schema": { "$ref": "#/components/schemas/SupportedChannel" }
          },
          {
            "name": "language",
            "in": "query",
            "description": "The language to use for the request. If not provided, the site's default language will be used",
            "schema": {}
          },
          {
            "name": "country",
            "in": "query",
            "description": "ISO 3166-1 alpha-2 country code for the customer. Used to filter rewards by country availability. If not provided, the site default is used",
            "schema": { "type": "string" }
          }
        ],
        "operationId": "rules.completeCustom",
        "requestBody": {
          "description": "Body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RulesCompleteCustomRequestBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RulesCompleteCustomResponseBody"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/ClientErrorBadRequest" },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": { "type": "string" },
                        "code": { "type": "string" },
                        "details": {
                          "type": "object",
                          "propertyNames": { "type": "string" },
                          "additionalProperties": { "type": "string" }
                        }
                      },
                      "required": ["message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["not_found"] },
                        "message": { "type": "string" }
                      },
                      "required": ["code", "message"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "oneOf": [
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorCustomerBlocked"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleInvalidKind"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleLimitReached"
                        },
                        {
                          "$ref": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "code",
                        "mapping": {
                          "customer_not_enrolled": "#/components/schemas/CompleteRuleErrorCustomerNotEnrolled",
                          "customer_blocked": "#/components/schemas/CompleteRuleErrorCustomerBlocked",
                          "rule_not_enabled_for_customer": "#/components/schemas/CompleteRuleErrorRuleNotEnabledForCustomer",
                          "rule_kind_mismatch": "#/components/schemas/CompleteRuleErrorRuleInvalidKind",
                          "rule_limit_reached": "#/components/schemas/CompleteRuleErrorRuleLimitReached",
                          "rule_requirements_not_met": "#/components/schemas/CompleteRuleErrorRuleRequirementsNotMet"
                        }
                      }
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": { "type": "string", "enum": ["rate_limited"] }
                      },
                      "required": ["code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["error"],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    { "name": "configuration" },
    { "name": "customers" },
    { "name": "referrals" },
    { "name": "rewards" },
    { "name": "rules" }
  ],
  "components": {
    "schemas": {
      "SupportedChannel": {
        "type": "string",
        "enum": ["web", "pos", "mobile"],
        "description": "The sales channel from which this request is made"
      },
      "PointsTier": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "name": {
            "type": "string",
            "description": "The name of the tier",
            "example": "Gold"
          },
          "position": {
            "type": "number",
            "description": "The position of the tier, where `1` is the first and default tier"
          },
          "hidden": {
            "type": "boolean",
            "description": "If true, this is a hidden tier and is only shown to shoppers who are in it"
          },
          "benefit_ids": {
            "description": "Ordered list of tier benefit IDs that are associated with this tier",
            "type": "array",
            "items": { "type": "integer" }
          },
          "kind": { "type": "string", "const": "points" },
          "lower_bound": {
            "type": "integer",
            "example": 0,
            "description": "The lower bound of the tier in points"
          },
          "upper_bound": {
            "example": 99,
            "description": "The upper bound of the tier in points, or `null` if there is no upper bound",
            "type": ["integer", "null"]
          }
        },
        "required": [
          "id",
          "name",
          "position",
          "hidden",
          "benefit_ids",
          "kind",
          "lower_bound",
          "upper_bound"
        ],
        "additionalProperties": false,
        "title": "Points"
      },
      "SpendTier": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "name": {
            "type": "string",
            "description": "The name of the tier",
            "example": "Gold"
          },
          "position": {
            "type": "number",
            "description": "The position of the tier, where `1` is the first and default tier"
          },
          "hidden": {
            "type": "boolean",
            "description": "If true, this is a hidden tier and is only shown to shoppers who are in it"
          },
          "benefit_ids": {
            "description": "Ordered list of tier benefit IDs that are associated with this tier",
            "type": "array",
            "items": { "type": "integer" }
          },
          "kind": { "type": "string", "const": "spend" },
          "lower_bound": {
            "type": "object",
            "properties": {
              "amount": { "type": "number" },
              "formatted": { "type": "string" }
            },
            "required": ["amount", "formatted"],
            "additionalProperties": false,
            "description": "The lower bound of the tier as a currency amount. For example, $10.50 would be \"10.50\", ¥100 would be \"100\""
          },
          "upper_bound": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "The upper bound of the tier as a currency amount, or `null` if there is no upper bound. For example, $150.50 USD would be \"150.50\", ¥500 would be \"500\""
          }
        },
        "required": [
          "id",
          "name",
          "position",
          "hidden",
          "benefit_ids",
          "kind",
          "lower_bound",
          "upper_bound"
        ],
        "additionalProperties": false,
        "title": "Spend"
      },
      "OrdersTier": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "name": {
            "type": "string",
            "description": "The name of the tier",
            "example": "Gold"
          },
          "position": {
            "type": "number",
            "description": "The position of the tier, where `1` is the first and default tier"
          },
          "hidden": {
            "type": "boolean",
            "description": "If true, this is a hidden tier and is only shown to shoppers who are in it"
          },
          "benefit_ids": {
            "description": "Ordered list of tier benefit IDs that are associated with this tier",
            "type": "array",
            "items": { "type": "integer" }
          },
          "kind": { "type": "string", "const": "orders" },
          "lower_bound": {
            "type": "integer",
            "example": 0,
            "description": "The lower bound of the tier in number of orders"
          },
          "upper_bound": {
            "example": 4,
            "description": "The upper bound of the tier in number of orders, or `null` if there is no upper bound",
            "type": ["integer", "null"]
          }
        },
        "required": [
          "id",
          "name",
          "position",
          "hidden",
          "benefit_ids",
          "kind",
          "lower_bound",
          "upper_bound"
        ],
        "additionalProperties": false,
        "title": "Orders"
      },
      "ConditionalTier": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "name": {
            "type": "string",
            "description": "The name of the tier",
            "example": "Gold"
          },
          "position": {
            "type": "number",
            "description": "The position of the tier, where `1` is the first and default tier"
          },
          "hidden": {
            "type": "boolean",
            "description": "If true, this is a hidden tier and is only shown to shoppers who are in it"
          },
          "benefit_ids": {
            "description": "Ordered list of tier benefit IDs that are associated with this tier",
            "type": "array",
            "items": { "type": "integer" }
          },
          "kind": { "type": "string", "const": "conditional" }
        },
        "required": ["id", "name", "position", "hidden", "benefit_ids", "kind"],
        "additionalProperties": false,
        "title": "Conditional"
      },
      "TierMembershipRolling": {
        "type": "object",
        "properties": {
          "mode": { "type": "string", "const": "rolling" },
          "duration_months": {
            "type": "number",
            "example": 12,
            "description": "The number of months after which a membership in this tier will expire"
          }
        },
        "required": ["mode", "duration_months"],
        "additionalProperties": false,
        "title": "Rolling"
      },
      "TierMembershipCalendar": {
        "type": "object",
        "properties": {
          "mode": { "type": "string", "const": "calendar" },
          "evaluation_period": {
            "type": "object",
            "properties": {
              "starts_on": {
                "type": "object",
                "properties": {
                  "month": { "type": "number" },
                  "day": { "type": "number" }
                },
                "required": ["month", "day"],
                "additionalProperties": false,
                "description": "The month and day the evaluation period for this tier begins",
                "example": { "month": 1, "day": 1 }
              },
              "duration": {
                "type": "object",
                "properties": { "months": { "type": "number" } },
                "required": ["months"],
                "additionalProperties": false,
                "description": "The number of months in the evaluation period",
                "example": { "months": 12 }
              }
            },
            "required": ["starts_on", "duration"],
            "additionalProperties": false
          },
          "duration": {
            "type": "object",
            "properties": {
              "windows": {
                "type": "number",
                "description": "The number of evaluation windows the membership lasts for, e.g. for a Jan 1 - Dec 31 window, a value of 1 means the membership lasts for the rest of the current year and to the end of the following year. A value of 0 means the membership only lasts until the end of the current year.",
                "example": 1
              }
            },
            "required": ["windows"],
            "additionalProperties": false
          }
        },
        "required": ["mode", "evaluation_period", "duration"],
        "additionalProperties": false,
        "title": "Calendar"
      },
      "TierMembershipLifetime": {
        "type": "object",
        "properties": { "mode": { "type": "string", "const": "lifetime" } },
        "required": ["mode"],
        "additionalProperties": false,
        "title": "Lifetime"
      },
      "TierMembershipEnrollmentAnniversary": {
        "type": "object",
        "properties": {
          "mode": { "type": "string", "const": "enrollment_anniversary" },
          "duration": {
            "type": "object",
            "properties": {
              "windows": {
                "type": "number",
                "description": "The number of evaluation windows the membership lasts for, e.g. for a Jan 1 - Dec 31 window, a value of 1 means the membership lasts for the rest of the current year and to the end of the following year. A value of 0 means the membership only lasts until the end of the current year.",
                "example": 1
              }
            },
            "required": ["windows"],
            "additionalProperties": false
          }
        },
        "required": ["mode", "duration"],
        "additionalProperties": false,
        "title": "Enrollment Anniversary"
      },
      "RefereeIncentiveCartDiscount": {
        "type": "object",
        "properties": {
          "minimum_spend": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "The minimum spend, if any, for the incentive to apply",
            "example": { "amount": 50, "formatted": "$50" }
          },
          "incentive_text": {
            "type": "string",
            "description": "Short localized text explaining the incentive",
            "example": "Get a 10% discount on your order with this code when you spend over $50"
          },
          "kind": { "type": "string", "const": "cart_discount_voucher" },
          "discount_kind": {
            "type": "string",
            "enum": ["fixed", "percentage"],
            "description": "The type of discount this voucher will apply to the cart",
            "example": "percentage"
          },
          "discount": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "percentage": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["percentage", "formatted"],
                "additionalProperties": false
              }
            ],
            "description": "The discount that will apply to the cart. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a percentage from `1-100`",
            "example": { "percentage": 10, "formatted": "10%" }
          },
          "maximum_discount": {
            "description": "The largest discount this voucher can apply. Only present when the incentive is a capped `percentage` discount. `incentive_text` already states the cap",
            "example": { "amount": 30, "formatted": "$30" },
            "type": "object",
            "properties": {
              "amount": { "type": "number" },
              "formatted": { "type": "string" }
            },
            "required": ["amount", "formatted"],
            "additionalProperties": false
          },
          "collection_restriction_text": {
            "description": "Merchant-authored text naming the products this voucher applies to, when the incentive is restricted to a collection. Unlike `incentive_text` this is not part of the offer sentence — display it alongside, or the offer reads as unrestricted",
            "example": "Valid on full-price skincare only",
            "type": "string"
          }
        },
        "required": [
          "minimum_spend",
          "incentive_text",
          "kind",
          "discount_kind",
          "discount"
        ],
        "additionalProperties": false
      },
      "RefereeIncentiveFreeShipping": {
        "type": "object",
        "properties": {
          "minimum_spend": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "The minimum spend, if any, for the incentive to apply",
            "example": { "amount": 50, "formatted": "$50" }
          },
          "incentive_text": {
            "type": "string",
            "description": "Short localized text explaining the incentive",
            "example": "Get a 10% discount on your order with this code when you spend over $50"
          },
          "kind": { "type": "string", "const": "free_shipping_voucher" }
        },
        "required": ["minimum_spend", "incentive_text", "kind"],
        "additionalProperties": false
      },
      "RuleBirthday": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "birthday" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Birthday"
      },
      "RuleResultPoints": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "points" },
          "per_currency_unit": {
            "description": "Indicates if the points value is per currency unit. For example, if a rule provides 5 points for every $1 spent, this will be `1`. If `null`, the points value is exact",
            "example": 1,
            "type": ["number", "null"]
          },
          "points": {
            "type": "number",
            "description": "The number of points provided when this rule variant is completed. If `per_currency_unit` is not null, this will be the number of points per currency unit (e.g. 5 points per $1)",
            "example": 5
          }
        },
        "required": ["kind", "per_currency_unit", "points"],
        "additionalProperties": false
      },
      "RuleResultReward": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "reward" },
          "reward": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "gift_card",
                  "cart_discount_voucher",
                  "cart_variable_discount_voucher",
                  "free_shipping_voucher",
                  "product_discount_voucher",
                  "collection_discount_voucher",
                  "product_cart",
                  "active_subscription_discount_voucher",
                  "active_subscription_product",
                  "custom"
                ]
              },
              "title": { "type": "string" }
            },
            "required": ["kind", "title"],
            "additionalProperties": false
          }
        },
        "required": ["kind", "reward"],
        "additionalProperties": false
      },
      "RuleLoyaltyPassInstall": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "loyalty_pass_install" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Loyalty pass install"
      },
      "RuleCollectionPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "collection_purchase" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Collection purchase"
      },
      "RuleNewsletterSignup": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "newsletter_signup" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Newsletter signup"
      },
      "RulePageview": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "pageview" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Pageview"
      },
      "RuleProductPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "product_purchase" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Product purchase"
      },
      "RulePurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "purchase" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Purchase"
      },
      "RuleJoinProgram": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "join_program" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Join program"
      },
      "RuleReview": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "review" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                },
                "requirements": {
                  "description": "Conditions the review must meet for this rule variant to be completed. Empty when any review counts",
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RuleReviewRequirement"
                  }
                },
                "modifiers": {
                  "description": "Extra points available for a review that meets each modifier condition, added to the result of this rule variant. A review earns the bonus of every modifier it meets. Only modifiers that award points are listed, and the list is always empty when the result is a `reward`",
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/RuleReviewModifier" }
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text",
                "requirements",
                "modifiers"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Review"
      },
      "RuleReviewRequirement": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "includes_photo" },
              "min_count": {
                "type": "number",
                "description": "The minimum number of photos the review must include",
                "example": 1
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this requirement to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Review must be at least 50 characters"
              }
            },
            "required": ["kind", "min_count", "text"],
            "additionalProperties": false,
            "title": "Includes photo"
          },
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "includes_video" },
              "min_count": {
                "type": "number",
                "description": "The minimum number of videos the review must include",
                "example": 1
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this requirement to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Review must be at least 50 characters"
              }
            },
            "required": ["kind", "min_count", "text"],
            "additionalProperties": false,
            "title": "Includes video"
          },
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "text_length" },
              "min_length": {
                "type": "number",
                "description": "The minimum number of characters the review text must contain",
                "example": 100
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this requirement to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Review must be at least 50 characters"
              }
            },
            "required": ["kind", "min_length", "text"],
            "additionalProperties": false,
            "title": "Text length"
          },
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "matching_product" },
              "product_ids": {
                "description": "The reviewed product must be one of these products. Each ID is the product's ID in the store's ecommerce platform",
                "example": ["8146810290418"],
                "type": "array",
                "items": { "type": "string" }
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this requirement to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Review must be at least 50 characters"
              }
            },
            "required": ["kind", "product_ids", "text"],
            "additionalProperties": false,
            "title": "Matching product"
          }
        ],
        "description": "A condition the review must meet for this rule to be completed. A review that fails any requirement earns nothing from this rule",
        "type": "object"
      },
      "RuleReviewModifier": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "includes_photo" },
              "min_count": {
                "type": "number",
                "description": "The minimum number of photos the review must include",
                "example": 1
              },
              "bonus": {
                "$ref": "#/components/schemas/RuleReviewModifierBonus"
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this modifier to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Include a photo for 10 bonus points"
              }
            },
            "required": ["kind", "min_count", "bonus", "text"],
            "additionalProperties": false,
            "title": "Includes photo"
          },
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "includes_video" },
              "min_count": {
                "type": "number",
                "description": "The minimum number of videos the review must include",
                "example": 1
              },
              "bonus": {
                "$ref": "#/components/schemas/RuleReviewModifierBonus"
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this modifier to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Include a photo for 10 bonus points"
              }
            },
            "required": ["kind", "min_count", "bonus", "text"],
            "additionalProperties": false,
            "title": "Includes video"
          },
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "text_length" },
              "min_length": {
                "type": "number",
                "description": "The minimum number of characters the review text must contain",
                "example": 100
              },
              "bonus": {
                "$ref": "#/components/schemas/RuleReviewModifierBonus"
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this modifier to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Include a photo for 10 bonus points"
              }
            },
            "required": ["kind", "min_length", "bonus", "text"],
            "additionalProperties": false,
            "title": "Text length"
          },
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "matching_product" },
              "product_ids": {
                "description": "The reviewed product must be one of these products. Each ID is the product's ID in the store's ecommerce platform",
                "example": ["8146810290418"],
                "type": "array",
                "items": { "type": "string" }
              },
              "bonus": {
                "$ref": "#/components/schemas/RuleReviewModifierBonus"
              },
              "text": {
                "type": "string",
                "description": "Short, localized text describing this modifier to the shopper, in the requested language and including any wording the store has customized. Where the text has no translation in the requested language, the English text is returned",
                "example": "Include a photo for 10 bonus points"
              }
            },
            "required": ["kind", "product_ids", "bonus", "text"],
            "additionalProperties": false,
            "title": "Matching product"
          }
        ],
        "description": "Extra points awarded when the review meets a condition, such as including a photo",
        "type": "object"
      },
      "RuleReviewModifierBonus": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "fixed" },
              "points": {
                "type": "number",
                "description": "The number of extra points awarded",
                "example": 10
              }
            },
            "required": ["kind", "points"],
            "additionalProperties": false,
            "title": "Fixed"
          },
          {
            "type": "object",
            "properties": {
              "kind": { "type": "string", "const": "per_count" },
              "points": {
                "type": "number",
                "description": "The number of extra points awarded for each photo, video or character in the review, depending on the modifier `kind`. A `matching_product` modifier counts a matching product as one",
                "example": 5
              },
              "max_points": {
                "description": "The most extra points this modifier can award for one review. `null` means there is no cap",
                "example": 20,
                "type": ["number", "null"]
              }
            },
            "required": ["kind", "points", "max_points"],
            "additionalProperties": false,
            "title": "Per count"
          }
        ],
        "description": "The extra points awarded, on top of the rule variant result, when the review meets the modifier condition. Either a `fixed` number of points, or a number of points `per_count` of photos, videos or characters, where a matching product counts as one",
        "type": "object"
      },
      "RuleCustom": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "custom" },
          "properties": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of this custom rule, as set by the merchant"
              }
            },
            "required": ["name"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Custom"
      },
      "RuleFacebookLike": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "facebook_like" },
          "properties": {
            "type": "object",
            "properties": { "facebook_like_url": { "type": "string" } },
            "required": ["facebook_like_url"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Facebook Like"
      },
      "RuleTwitterFollow": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "twitter_follow" },
          "properties": {
            "type": "object",
            "properties": { "twitter_handle": { "type": "string" } },
            "required": ["twitter_handle"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Twitter follow"
      },
      "RuleInstagramFollow": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "instagram_follow" },
          "properties": {
            "type": "object",
            "properties": { "instagram_handle": { "type": "string" } },
            "required": ["instagram_handle"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Instagram follow"
      },
      "RuleInstagramMention": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "instagram_mention" },
          "properties": {
            "type": "object",
            "properties": { "instagram_handle": { "type": "string" } },
            "required": ["instagram_handle"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Instagram mention"
      },
      "RuleInstagramPostHashtag": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "instagram_post_hashtag" },
          "properties": {
            "type": "object",
            "properties": {
              "instagram_handle": { "type": "string" },
              "hashtag": { "type": "string" }
            },
            "required": ["instagram_handle", "hashtag"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Instagram post hashtag"
      },
      "RuleTiktokFollow": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "tiktok_follow" },
          "properties": {
            "type": "object",
            "properties": { "tiktok_handle": { "type": "string" } },
            "required": ["tiktok_handle"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Tiktok follow"
      },
      "RuleTiktokPostHashtag": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "tiktok_post_hashtag" },
          "properties": {
            "type": "object",
            "properties": { "hashtag": { "type": "string" } },
            "required": ["hashtag"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Tiktok post hashtag"
      },
      "RuleReferral": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "referral" },
          "properties": {
            "type": "object",
            "properties": {
              "trigger": {
                "type": "string",
                "enum": ["any_purchase", "qualifying_purchase"]
              }
            },
            "required": ["trigger"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Referral"
      },
      "RuleClickthrough": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "clickthrough" },
          "properties": {
            "type": "object",
            "properties": { "destination_url": { "type": "string" } },
            "required": ["destination_url"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Clickthrough"
      },
      "RuleRetailPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "retail_purchase" },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "variants"],
        "additionalProperties": false,
        "title": "Retail purchase"
      },
      "RuleSubtotalLink": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "subtotal_link" },
          "properties": {
            "type": "object",
            "properties": {
              "retailers": {
                "description": "The retailers the store lists for linking, in the order the store has them. A store can set this rule to pay for an account at any retailer, so linking one that is not listed can also earn",
                "type": "array",
                "items": { "$ref": "#/components/schemas/RuleSubtotalRetailer" }
              }
            },
            "required": ["retailers"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Link a retailer account"
      },
      "RuleSubtotalRetailer": {
        "type": "object",
        "properties": {
          "retailer_id": {
            "type": "string",
            "description": "The retailer's ID in Subtotal"
          },
          "name": {
            "type": "string",
            "description": "The display name of the retailer",
            "example": "Walmart"
          },
          "link_url": {
            "type": "string",
            "description": "Where to send the customer to link their account at this retailer. Points only reach the customer when they link with the same email address as their loyalty account"
          },
          "logo": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "light": {
                    "type": "string",
                    "description": "Logo URL for use on a light background"
                  },
                  "dark": {
                    "type": "string",
                    "description": "Logo URL for use on a dark background"
                  }
                },
                "required": ["light", "dark"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "`null` when no logo is available for this retailer"
          }
        },
        "required": ["retailer_id", "name", "link_url", "logo"],
        "additionalProperties": false
      },
      "RuleSubtotalPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "subtotal_purchase" },
          "properties": {
            "type": "object",
            "properties": {
              "retailers": {
                "description": "The retailers the store lists for this rule, in the order the store has them. A purchase only earns once the customer has linked their account at that retailer. A store can set this rule to pay for purchases at any retailer, including ones not listed",
                "type": "array",
                "items": { "$ref": "#/components/schemas/RuleSubtotalRetailer" }
              }
            },
            "required": ["retailers"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this rule. Some aspects of a rule, such as its outcome and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                  "example": "Make a purchase"
                },
                "description": {
                  "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Earn points every time you shop with us",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
                },
                "result": {
                  "oneOf": [
                    {
                      "title": "Points",
                      "$ref": "#/components/schemas/RuleResultPoints"
                    },
                    {
                      "title": "Reward",
                      "$ref": "#/components/schemas/RuleResultReward"
                    }
                  ],
                  "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points": "#/components/schemas/RuleResultPoints",
                      "reward": "#/components/schemas/RuleResultReward"
                    }
                  }
                },
                "result_short_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                  "example": "5 points per $1"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "result",
                "result_short_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Purchase at a linked retailer"
      },
      "RewardGiftCard": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "gift_card" },
          "properties": {
            "type": "object",
            "properties": {
              "initial_balance": {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false,
                "description": "The initial balance of the gift card"
              }
            },
            "required": ["initial_balance"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Gift card",
        "description": "A gift card that can be used for future orders until its balance runs out"
      },
      "RewardCartDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "cart_discount_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "discount_type": {
                "type": "string",
                "enum": ["fixed", "percentage"],
                "description": "The type of discount this voucher will apply to the cart"
              },
              "discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "percentage": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["percentage", "formatted"],
                    "additionalProperties": false
                  }
                ],
                "description": "The discount that will apply to the cart. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
              },
              "applies_to_order_type": {
                "type": "string",
                "enum": ["all", "one_time", "subscription"],
                "description": "The type of order that this voucher will apply to. One of: `all` (applies to all types of order), `one_time` (applies to one-time orders), `subscription` (applies to subscription orders)",
                "example": "one_time"
              },
              "recurring_cycle_limit": {
                "description": "The number of orders this discount will apply to, for discounts that can apply to subscription orders. If it's `1`, it means the discount will apply only to the first order with which it is used. If `null`, the discount will be applied to any number of orders for as long as it is active",
                "example": 1,
                "type": ["number", "null"]
              },
              "supports_active_subscriptions": {
                "description": "Whether or not this discount will also be able to be applied to active subscriptions in Recharge. If true, we will create a Recharge discount in addition to a Shopify discount whenever this reward is claimed.",
                "type": "boolean"
              },
              "minimum_spend": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "The minimum spend, if any, for the voucher to apply to the cart",
                "example": { "amount": 10, "formatted": "$10" }
              }
            },
            "required": [
              "discount_type",
              "discount",
              "applies_to_order_type",
              "recurring_cycle_limit",
              "minimum_spend"
            ],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Cart discount voucher",
        "description": "A discount voucher that applies a reduction to the total cost of an order"
      },
      "RewardCartVariableDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": {
            "type": "string",
            "const": "cart_variable_discount_voucher"
          },
          "properties": {
            "type": "object",
            "properties": {
              "minimum_discount": {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false,
                "description": "The minimum discount that can be selected, e.g. 1 for a minimum of $1"
              },
              "maximum_discount": {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false,
                "description": "The maximum discount that can be selected, e.g. 5 for a maximum of $5"
              },
              "minimum_spend_before_discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "The required minimum spend in cart before the reward can be redeemed",
                "example": { "amount": 10, "formatted": "$10" }
              },
              "minimum_spend_after_discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "Only allow redemption of a discount value that would leave the cart total above this amount",
                "example": { "amount": 10, "formatted": "$10" }
              },
              "applies_to_order_type": {
                "type": "string",
                "enum": ["all", "one_time", "subscription"],
                "description": "The type of order that this voucher will apply to. One of: `all` (applies to all types of order), `one_time` (applies to one-time orders), `subscription` (applies to subscription orders)",
                "example": "one_time"
              }
            },
            "required": [
              "minimum_discount",
              "maximum_discount",
              "minimum_spend_before_discount",
              "minimum_spend_after_discount",
              "applies_to_order_type"
            ],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Cart variable discount",
        "description": "A variable-amount discount, e.g. 100 points per $1 discount. This is typically used during checkout to allow shoppers to use points to apply a discount to their cart"
      },
      "RewardFreeShippingVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "free_shipping_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "max_shipping": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "Free shipping will only be applied if the shipping rate is equal to or less than this amount, or `null` if there is no maximum"
              }
            },
            "required": ["max_shipping"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Free shipping voucher",
        "description": "A voucher that applies free shipping to an order"
      },
      "RewardProductDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "product_discount_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "image_url": { "type": ["string", "null"] },
                  "variant_id": {
                    "description": "The variant ID to apply the discount to. If `null`, the discount can be applied to all this product's variants",
                    "type": ["string", "null"]
                  }
                },
                "required": ["id", "image_url", "variant_id"],
                "additionalProperties": false,
                "description": "The product that this discount applies to"
              },
              "discount": {
                "type": "object",
                "properties": {
                  "percentage": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["percentage", "formatted"],
                "additionalProperties": false,
                "description": "The discount that will apply to the product. Product discounts are always percentage based, so this will be a number from `1-100`"
              }
            },
            "required": ["product", "discount"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Product discount voucher",
        "description": "A discount voucher that applies a reduction to a specific product"
      },
      "RewardCollectionDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "collection_discount_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "collection": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "title": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] }
                },
                "required": ["id", "title", "url"],
                "additionalProperties": false,
                "description": "The collection that this discount applies to"
              },
              "discount_type": {
                "type": "string",
                "enum": ["fixed", "percentage"],
                "description": "The type of discount this voucher will apply to items in the collection"
              },
              "discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "percentage": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["percentage", "formatted"],
                    "additionalProperties": false
                  }
                ],
                "description": "The discount that will apply to items in the collection. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
              },
              "minimum_spend": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "The minimum spend, if any, for the voucher to apply to the cart",
                "example": { "amount": 10, "formatted": "$10" }
              }
            },
            "required": [
              "collection",
              "discount_type",
              "discount",
              "minimum_spend"
            ],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Collection discount voucher",
        "description": "A discount voucher that applies a reduction to one or more items in a collection"
      },
      "RewardProductCart": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "product_cart" },
          "properties": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "handle": { "type": ["string", "null"] },
                  "title": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] },
                  "image_url": { "type": ["string", "null"] },
                  "variants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": { "type": "string" },
                        "title": { "type": ["string", "null"] },
                        "inventory_count": {
                          "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                          "type": ["integer", "null"]
                        },
                        "sort_key": { "type": "number" }
                      },
                      "required": [
                        "id",
                        "title",
                        "inventory_count",
                        "sort_key"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "handle",
                  "title",
                  "url",
                  "image_url",
                  "variants"
                ],
                "additionalProperties": false,
                "description": "The product that can be added to the cart. If the product has more than one variant, the shopper should be able to choose which one to redeem"
              },
              "max_redemptions_per_cart": {
                "description": "The maximum number of times this product can be redeemed per cart, or `null` if there is no limit",
                "type": ["integer", "null"]
              },
              "cart_requirements": {
                "type": "object",
                "properties": {
                  "minimum_cart_total": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "The cart total must be equal to or greater than this amount, or `null` if there is no minimum total"
                  },
                  "minimum_line_item_count": {
                    "description": "The cart must contain at least this number of line items, or `null` if there is no required line item count",
                    "type": ["number", "null"]
                  }
                },
                "required": ["minimum_cart_total", "minimum_line_item_count"],
                "additionalProperties": false,
                "description": "Cart requirements that must be met before the reward can be redeemed"
              }
            },
            "required": [
              "product",
              "max_redemptions_per_cart",
              "cart_requirements"
            ],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Product cart",
        "description": "A free product that is added to the cart"
      },
      "RewardActiveSubscriptionDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": {
            "type": "string",
            "const": "active_subscription_discount_voucher"
          },
          "properties": {
            "type": "object",
            "properties": {
              "discount_type": {
                "type": "string",
                "enum": ["fixed", "percentage"],
                "description": "The type of discount this voucher will apply to next order"
              },
              "discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "percentage": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["percentage", "formatted"],
                    "additionalProperties": false
                  }
                ],
                "description": "The discount that will apply to the next order. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
              },
              "recurring_cycle_limit": {
                "description": "The number of recurring orders this discount will apply to. If `null`, the discount will be applied to any number of orders for as long as it is active",
                "type": ["number", "null"]
              }
            },
            "required": ["discount_type", "discount", "recurring_cycle_limit"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Active subscription discount voucher",
        "description": "A discount that is applied to one or more upcoming recurring subscription orders"
      },
      "RewardActiveSubscriptionProduct": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "active_subscription_product" },
          "properties": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "handle": { "type": ["string", "null"] },
                  "title": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] },
                  "image_url": { "type": ["string", "null"] },
                  "variants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": { "type": "string" },
                        "title": { "type": ["string", "null"] },
                        "inventory_count": {
                          "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                          "type": ["integer", "null"]
                        },
                        "sort_key": { "type": "number" }
                      },
                      "required": [
                        "id",
                        "title",
                        "inventory_count",
                        "sort_key"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "handle",
                  "title",
                  "url",
                  "image_url",
                  "variants"
                ],
                "additionalProperties": false,
                "description": "The product that can be added to an active subscription. If the product has more than one variant, the shopper should be able to choose which one to redeem"
              }
            },
            "required": ["product"],
            "additionalProperties": false
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Active subscription product",
        "description": "A free product that is added to the next recurring subscription order"
      },
      "RewardCustom": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "custom" },
          "properties": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "fulfillment_type": {
                    "type": "string",
                    "const": "store_fulfillment",
                    "description": "Fulfilled by the merchant — manually or via webhook (see `fulfillment_method`)."
                  },
                  "fulfillment_method": {
                    "type": "string",
                    "enum": ["manual", "webhook"],
                    "description": "How the merchant fulfils this custom reward."
                  },
                  "fulfillment_webhook_url": {
                    "description": "The URL to which we'll send a webhook for reward fulfillment, if one is configured",
                    "type": ["string", "null"]
                  }
                },
                "required": [
                  "fulfillment_type",
                  "fulfillment_method",
                  "fulfillment_webhook_url"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "fulfillment_type": {
                    "type": "string",
                    "const": "voucher",
                    "description": "Fulfilled by issuing a code from a merchant-uploaded pool to the customer at claim time."
                  }
                },
                "required": ["fulfillment_type"],
                "additionalProperties": false
              }
            ],
            "type": "object"
          },
          "variants": {
            "description": "A list of variants for this reward. Some aspects of a reward, such as its cost and whether it's enabled, can vary based on tier",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tier_id": {
                  "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                  "type": ["number", "null"]
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                  "example": "$5 voucher"
                },
                "description": {
                  "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                  "example": "Spend your points on $5 off your next order",
                  "type": ["string", "null"]
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
                },
                "cost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "fixed" },
                        "points": { "type": "number" }
                      },
                      "required": ["kind", "points"],
                      "additionalProperties": false,
                      "title": "Fixed cost"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": { "type": "string", "const": "variable" },
                        "unit": {
                          "type": "string",
                          "const": "discount_amount"
                        },
                        "points_per_unit": { "type": "number" }
                      },
                      "required": ["kind", "unit", "points_per_unit"],
                      "additionalProperties": false,
                      "title": "Variable cost"
                    }
                  ],
                  "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
                },
                "cost_text": {
                  "type": "string",
                  "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                  "example": "100 points"
                }
              },
              "required": [
                "tier_id",
                "title",
                "description",
                "enabled",
                "cost",
                "cost_text"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["id", "limit", "kind", "properties", "variants"],
        "additionalProperties": false,
        "title": "Custom",
        "description": "A custom reward that is fulfilled by the merchant manually or using a webhook, or by issuing a code from a merchant-uploaded pool"
      },
      "SiteConfiguration": {
        "type": "object",
        "properties": {
          "channel": {
            "description": "The sales channel for which this response was generated",
            "$ref": "#/components/schemas/SupportedChannel"
          },
          "currency": {
            "type": "string",
            "description": "`ISO 4217` code indicating the currency for any financial values in this response",
            "example": "usd"
          },
          "language": {
            "description": "`ISO 639-1` code indicating the language used for any text in this response"
          },
          "program": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of the program",
                "example": "Lion Rewards"
              }
            },
            "required": ["name"],
            "additionalProperties": false
          },
          "tier_configuration": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "boundary_mode": {
                    "type": "string",
                    "enum": ["points", "spend", "orders"]
                  },
                  "tiers": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        { "$ref": "#/components/schemas/PointsTier" },
                        { "$ref": "#/components/schemas/SpendTier" },
                        { "$ref": "#/components/schemas/OrdersTier" },
                        { "$ref": "#/components/schemas/ConditionalTier" }
                      ],
                      "type": "object",
                      "discriminator": {
                        "propertyName": "kind",
                        "mapping": {
                          "points": "#/components/schemas/PointsTier",
                          "spend": "#/components/schemas/SpendTier",
                          "orders": "#/components/schemas/OrdersTier",
                          "conditional": "#/components/schemas/ConditionalTier"
                        }
                      }
                    }
                  },
                  "tier_benefits": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": { "type": "integer" },
                        "label": {
                          "type": "string",
                          "description": "A short label explaining what this tier benefit is",
                          "example": "Early access to new collections"
                        },
                        "secret": {
                          "type": "boolean",
                          "description": "Indicates if this is a 'secret' tier benefit. Such benefits should only be shown if the current customer is already in the associated tier",
                          "example": false
                        },
                        "details": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "plaintext": {
                                  "type": "string",
                                  "description": "More information about this benefit as basic plaintext string with line breaks",
                                  "example": "Please email us (store@example.com) to receive this benefit\n"
                                },
                                "html": {
                                  "type": "string",
                                  "description": "More information about this benefit. This can include simple HTML tags such as formatting, lists, and links",
                                  "example": "<p>Please <a href='mailto:store@example.com'>email us</a> to receive this benefit</p>"
                                }
                              },
                              "required": ["plaintext", "html"],
                              "additionalProperties": false
                            },
                            { "type": "null" }
                          ],
                          "description": "More details about this tier benefit as HTML and plaintext strings. Will be `null` if there are no additional details for this benefit"
                        }
                      },
                      "required": ["id", "label", "secret", "details"],
                      "additionalProperties": false
                    }
                  },
                  "membership": {
                    "oneOf": [
                      { "$ref": "#/components/schemas/TierMembershipRolling" },
                      { "$ref": "#/components/schemas/TierMembershipCalendar" },
                      { "$ref": "#/components/schemas/TierMembershipLifetime" },
                      {
                        "$ref": "#/components/schemas/TierMembershipEnrollmentAnniversary"
                      }
                    ],
                    "description": "Tier membership mode. Will be one of `rolling` (memberships expire after a duration) , `lifetime` (memberships don't expire), `calendar` (memberships expire according to a fixed calendar schedule), or `enrollment_anniversary` (memberships expire according to the customer's enrollment anniversary)",
                    "type": "object",
                    "discriminator": {
                      "propertyName": "mode",
                      "mapping": {
                        "rolling": "#/components/schemas/TierMembershipRolling",
                        "calendar": "#/components/schemas/TierMembershipCalendar",
                        "lifetime": "#/components/schemas/TierMembershipLifetime",
                        "enrollment_anniversary": "#/components/schemas/TierMembershipEnrollmentAnniversary"
                      }
                    }
                  }
                },
                "required": [
                  "boundary_mode",
                  "tiers",
                  "tier_benefits",
                  "membership"
                ],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "The tier configuration for the program, or `null` if tiers are not enabled",
            "example": {
              "boundary_mode": "spend",
              "tiers": [
                {
                  "id": 1,
                  "name": "Silver",
                  "benefit_ids": [1],
                  "hidden": false,
                  "kind": "spend",
                  "position": 1,
                  "lower_bound": { "amount": 0, "formatted": "$0" },
                  "upper_bound": { "amount": 99.99, "formatted": "$99.99" }
                },
                {
                  "id": 2,
                  "name": "Gold",
                  "benefit_ids": [1, 2],
                  "hidden": false,
                  "kind": "spend",
                  "position": 2,
                  "lower_bound": { "amount": 100, "formatted": "$100" },
                  "upper_bound": null
                }
              ],
              "tier_benefits": [
                {
                  "id": 1,
                  "label": "Early access to new products",
                  "secret": false,
                  "details": null
                },
                {
                  "id": 2,
                  "label": "Free makeup classes",
                  "secret": false,
                  "details": {
                    "plaintext": "Email classes@example.com to sign up to a class\n",
                    "html": "<p>Email classes@example.com to sign up to a class</p>"
                  }
                }
              ],
              "membership": { "mode": "rolling", "duration_months": 12 }
            }
          },
          "referee_incentive": {
            "description": "The referee incentive for the program, included only if one is enabled. This is a description of the incentive and does not include an actual voucher code, which is available through the referee incentive endpoint instead",
            "oneOf": [
              {
                "title": "Cart Discount Voucher",
                "$ref": "#/components/schemas/RefereeIncentiveCartDiscount"
              },
              {
                "title": "Free Shipping Voucher",
                "$ref": "#/components/schemas/RefereeIncentiveFreeShipping"
              }
            ],
            "type": "object"
          },
          "rules": {
            "description": "Ordered list of rules that belong to this site. Each rule will have  one or more variants that indicate its configuration and if it is enabled per tier. Rules have a `kind` property, and some kinds of rules will have `properties` that are specific to that rule kind",
            "type": "array",
            "items": {
              "oneOf": [
                { "$ref": "#/components/schemas/RuleBirthday" },
                { "$ref": "#/components/schemas/RuleLoyaltyPassInstall" },
                { "$ref": "#/components/schemas/RuleCollectionPurchase" },
                { "$ref": "#/components/schemas/RuleNewsletterSignup" },
                { "$ref": "#/components/schemas/RulePageview" },
                { "$ref": "#/components/schemas/RuleProductPurchase" },
                { "$ref": "#/components/schemas/RulePurchase" },
                { "$ref": "#/components/schemas/RuleJoinProgram" },
                { "$ref": "#/components/schemas/RuleReview" },
                { "$ref": "#/components/schemas/RuleCustom" },
                { "$ref": "#/components/schemas/RuleFacebookLike" },
                { "$ref": "#/components/schemas/RuleTwitterFollow" },
                { "$ref": "#/components/schemas/RuleInstagramFollow" },
                { "$ref": "#/components/schemas/RuleInstagramMention" },
                { "$ref": "#/components/schemas/RuleInstagramPostHashtag" },
                { "$ref": "#/components/schemas/RuleTiktokFollow" },
                { "$ref": "#/components/schemas/RuleTiktokPostHashtag" },
                { "$ref": "#/components/schemas/RuleReferral" },
                { "$ref": "#/components/schemas/RuleClickthrough" },
                { "$ref": "#/components/schemas/RuleRetailPurchase" },
                { "$ref": "#/components/schemas/RuleSubtotalLink" },
                { "$ref": "#/components/schemas/RuleSubtotalPurchase" }
              ],
              "type": "object",
              "discriminator": {
                "propertyName": "kind",
                "mapping": {
                  "birthday": "#/components/schemas/RuleBirthday",
                  "loyalty_pass_install": "#/components/schemas/RuleLoyaltyPassInstall",
                  "collection_purchase": "#/components/schemas/RuleCollectionPurchase",
                  "newsletter_signup": "#/components/schemas/RuleNewsletterSignup",
                  "pageview": "#/components/schemas/RulePageview",
                  "product_purchase": "#/components/schemas/RuleProductPurchase",
                  "purchase": "#/components/schemas/RulePurchase",
                  "join_program": "#/components/schemas/RuleJoinProgram",
                  "review": "#/components/schemas/RuleReview",
                  "custom": "#/components/schemas/RuleCustom",
                  "facebook_like": "#/components/schemas/RuleFacebookLike",
                  "twitter_follow": "#/components/schemas/RuleTwitterFollow",
                  "instagram_follow": "#/components/schemas/RuleInstagramFollow",
                  "instagram_mention": "#/components/schemas/RuleInstagramMention",
                  "instagram_post_hashtag": "#/components/schemas/RuleInstagramPostHashtag",
                  "tiktok_follow": "#/components/schemas/RuleTiktokFollow",
                  "tiktok_post_hashtag": "#/components/schemas/RuleTiktokPostHashtag",
                  "referral": "#/components/schemas/RuleReferral",
                  "clickthrough": "#/components/schemas/RuleClickthrough",
                  "retail_purchase": "#/components/schemas/RuleRetailPurchase",
                  "subtotal_link": "#/components/schemas/RuleSubtotalLink",
                  "subtotal_purchase": "#/components/schemas/RuleSubtotalPurchase"
                }
              }
            }
          },
          "rewards": {
            "description": "Ordered list of rewards that belong to this site. Each reward will have  one or more variants that indicate its configuration and if it is enabled per tier. Rewards have a `kind` property, and some kinds of rewards will have `properties` that are specific to that reward kind",
            "type": "array",
            "items": {
              "oneOf": [
                { "$ref": "#/components/schemas/RewardGiftCard" },
                { "$ref": "#/components/schemas/RewardCartDiscountVoucher" },
                {
                  "$ref": "#/components/schemas/RewardCartVariableDiscountVoucher"
                },
                { "$ref": "#/components/schemas/RewardFreeShippingVoucher" },
                { "$ref": "#/components/schemas/RewardProductDiscountVoucher" },
                {
                  "$ref": "#/components/schemas/RewardCollectionDiscountVoucher"
                },
                { "$ref": "#/components/schemas/RewardProductCart" },
                {
                  "$ref": "#/components/schemas/RewardActiveSubscriptionDiscountVoucher"
                },
                {
                  "$ref": "#/components/schemas/RewardActiveSubscriptionProduct"
                },
                { "$ref": "#/components/schemas/RewardCustom" }
              ],
              "type": "object",
              "discriminator": {
                "propertyName": "kind",
                "mapping": {
                  "gift_card": "#/components/schemas/RewardGiftCard",
                  "cart_discount_voucher": "#/components/schemas/RewardCartDiscountVoucher",
                  "cart_variable_discount_voucher": "#/components/schemas/RewardCartVariableDiscountVoucher",
                  "free_shipping_voucher": "#/components/schemas/RewardFreeShippingVoucher",
                  "product_discount_voucher": "#/components/schemas/RewardProductDiscountVoucher",
                  "collection_discount_voucher": "#/components/schemas/RewardCollectionDiscountVoucher",
                  "product_cart": "#/components/schemas/RewardProductCart",
                  "active_subscription_discount_voucher": "#/components/schemas/RewardActiveSubscriptionDiscountVoucher",
                  "active_subscription_product": "#/components/schemas/RewardActiveSubscriptionProduct",
                  "custom": "#/components/schemas/RewardCustom"
                }
              }
            }
          }
        },
        "required": [
          "channel",
          "currency",
          "language",
          "program",
          "tier_configuration",
          "rules",
          "rewards"
        ],
        "additionalProperties": false
      },
      "TierProgressPoints": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "points" },
          "valid_until": {
            "description": "`ISO 8601` timestamp representing the date at which the calculated progress is no longer accurate. Tier evaluation uses a sliding evaluation window, so as time passes, contributing points, spend, or qualifying orders will no longer be counted if they are outside of the evaluation window. This will be `null` for lifetime tiers",
            "type": ["string", "null"]
          },
          "points_needed_for_renewal": {
            "description": "The number of additional points required to renew the current tier when the current membership expires. This will be `null` if the membership does not expire (e.g. a lifetime tier), or if the current membership is already for the bottom (default) tier",
            "type": ["number", "null"]
          },
          "upgrade_tier_id": {
            "description": "The ID of the next tier that this customer could upgrade to from their current tier. Will be `null` if the customer's current tier is already the highest tier in the program, a conditional tier, or a hidden tier",
            "type": ["number", "null"]
          },
          "points_needed_for_upgrade": {
            "description": "The number of additional points required to move into the next tier. Will be `null` if there is no eligible next tier (see `upgrade_tier_id`)",
            "type": ["number", "null"]
          },
          "tier_points": {
            "type": "object",
            "properties": {
              "now": {
                "type": "number",
                "description": "The number of points contributing to tier progress as of right now. This is equivalent to the number of eligible points from now, back to the start of the evaluation window."
              },
              "at_expiration": {
                "description": "The predicted number of points contributing to tier progress as of the current tier's expiration date. This is similar to the `now` value, but instead of the window ending at `now`, it ends at the current tier expiration date. This can be used to determine if a customer would be able to renew their current tier when it expires This will be `null` if the membership never expires (e.g. lifetime tiers)",
                "type": ["number", "null"]
              }
            },
            "required": ["now", "at_expiration"],
            "additionalProperties": false
          },
          "forecasted_tier_id": {
            "description": "The ID of the tier the customer is forecasted to be in at their membership expiration, based on their predicted progress at that time. This can be used to warn customers if they are at risk of being downgraded. Will be `null` if the membership never expires (e.g. lifetime tiers, default tier memberships, or conditional tier memberships)",
            "type": ["number", "null"]
          }
        },
        "required": [
          "kind",
          "valid_until",
          "points_needed_for_renewal",
          "upgrade_tier_id",
          "points_needed_for_upgrade",
          "tier_points",
          "forecasted_tier_id"
        ],
        "additionalProperties": false,
        "title": "Points"
      },
      "TierProgressSpend": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "spend" },
          "valid_until": {
            "description": "`ISO 8601` timestamp representing the date at which the calculated progress is no longer accurate. Tier evaluation uses a sliding evaluation window, so as time passes, contributing points, spend, or qualifying orders will no longer be counted if they are outside of the evaluation window. This will be `null` for lifetime tiers",
            "type": ["string", "null"]
          },
          "spend_needed_for_renewal": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "The amount of additional spend required to renew the current tier when the current membership expires. Will be `null` if the membership does not expire (e.g. a lifetime tier), or if the current membership is already for the bottom (default) tier"
          },
          "upgrade_tier_id": {
            "description": "The ID of the next tier that this customer could upgrade to from their current tier. Will be `null` if the customer's current tier is already the highest tier in the program, a conditional tier, or a hidden tier",
            "type": ["number", "null"]
          },
          "spend_needed_for_upgrade": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "The amount of additional spend required to move into the next tier. Will be `null` if there is no eligible next tier (see `upgrade_tier_id`)"
          },
          "tier_spend": {
            "type": "object",
            "properties": {
              "now": {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false,
                "description": "The amount of spend contributing to tier progress as of right now. This is equivalent to the amount of eligible spend from now, back to the start of the evaluation window."
              },
              "at_expiration": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "The predicted amount of spend contributing to tier progress as of the current tier's expiration date. This is similar to the `now` value, but instead of the window ending at `now`, it ends at the current tier expiration date. This can be used to determine if a customer would be able to renew their current tier when it expires This will be `null` if the membership never expires (e.g. lifetime tiers)"
              }
            },
            "required": ["now", "at_expiration"],
            "additionalProperties": false
          },
          "forecasted_tier_id": {
            "description": "The ID of the tier the customer is forecasted to be in at their membership expiration, based on their predicted progress at that time. This can be used to warn customers if they are at risk of being downgraded. Will be `null` if the membership never expires (e.g. lifetime tiers, default tier memberships, or conditional tier memberships)",
            "type": ["number", "null"]
          }
        },
        "required": [
          "kind",
          "valid_until",
          "spend_needed_for_renewal",
          "upgrade_tier_id",
          "spend_needed_for_upgrade",
          "tier_spend",
          "forecasted_tier_id"
        ],
        "additionalProperties": false,
        "title": "Spend"
      },
      "TierProgressOrders": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "orders" },
          "valid_until": {
            "description": "`ISO 8601` timestamp representing the date at which the calculated progress is no longer accurate. Tier evaluation uses a sliding evaluation window, so as time passes, contributing points, spend, or qualifying orders will no longer be counted if they are outside of the evaluation window. This will be `null` for lifetime tiers",
            "type": ["string", "null"]
          },
          "orders_needed_for_renewal": {
            "description": "The number of additional orders required to renew the current tier when the current membership expires. This will be `null` if the membership does not expire (e.g. a lifetime tier), or if the current membership is already for the bottom (default) tier",
            "type": ["number", "null"]
          },
          "upgrade_tier_id": {
            "description": "The ID of the next tier that this customer could upgrade to from their current tier. Will be `null` if the customer's current tier is already the highest tier in the program, a conditional tier, or a hidden tier",
            "type": ["number", "null"]
          },
          "orders_needed_for_upgrade": {
            "description": "The number of additional orders required to move into the next tier. Will be `null` if there is no eligible next tier (see `upgrade_tier_id`)",
            "type": ["number", "null"]
          },
          "tier_orders": {
            "type": "object",
            "properties": {
              "now": {
                "type": "number",
                "description": "The number of orders contributing to tier progress as of right now. This is equivalent to the number of eligible orders from now, back to the start of the evaluation window."
              },
              "at_expiration": {
                "description": "The predicted number of orders contributing to tier progress as of the current tier's expiration date. This is similar to the `now` value, but instead of the window ending at `now`, it ends at the current tier expiration date. This can be used to determine if a customer would be able to renew their current tier when it expires This will be `null` if the membership never expires (e.g. lifetime tiers)",
                "type": ["number", "null"]
              }
            },
            "required": ["now", "at_expiration"],
            "additionalProperties": false
          },
          "forecasted_tier_id": {
            "description": "The ID of the tier the customer is forecasted to be in at their membership expiration, based on their predicted progress at that time. This can be used to warn customers if they are at risk of being downgraded. Will be `null` if the membership never expires (e.g. lifetime tiers, default tier memberships, or conditional tier memberships)",
            "type": ["number", "null"]
          }
        },
        "required": [
          "kind",
          "valid_until",
          "orders_needed_for_renewal",
          "upgrade_tier_id",
          "orders_needed_for_upgrade",
          "tier_orders",
          "forecasted_tier_id"
        ],
        "additionalProperties": false,
        "title": "Orders"
      },
      "ClaimedRewardSourcePointsRedemption": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "points_redemption" },
          "points_cost": {
            "type": "number",
            "description": "The number of points the customer used to claim this reward"
          }
        },
        "required": ["kind", "points_cost"],
        "additionalProperties": false,
        "title": "Points redemption",
        "description": "The customer used points to claim this reward"
      },
      "ClaimedRewardSourceRuleCompletion": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "rule_completion" },
          "rule_id": { "type": "number" }
        },
        "required": ["kind", "rule_id"],
        "additionalProperties": false,
        "title": "Rule completion",
        "description": "This reward was provided directly when the customer completed a rule"
      },
      "ClaimedRewardSourceTierEntry": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "tier_entry" },
          "tier_id": { "type": "number" }
        },
        "required": ["kind", "tier_id"],
        "additionalProperties": false,
        "title": "Tier entry",
        "description": "This reward was awarded directly when the customer entered a tier"
      },
      "ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "recharge" },
          "address_id": {
            "type": "number",
            "description": "The ID of the address in ReCharge that this free product will be sent to"
          },
          "onetime_id": {
            "type": "number",
            "description": "The ID of the \"onetime\" line item created for this free product in ReCharge"
          },
          "next_subscription_scheduled_at": {
            "type": "string",
            "description": "`ISO 8601` timestamp indicating when the next subscription containing this free product is scheduled"
          }
        },
        "required": [
          "kind",
          "address_id",
          "onetime_id",
          "next_subscription_scheduled_at"
        ],
        "additionalProperties": false
      },
      "ActiveCartRedemptionCartLineShopify": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "shopify" },
          "merchandise_id": {
            "type": "string",
            "description": "The merchandise (variant) ID to add to the cart",
            "example": "gid://shopify/ProductVariant/1001"
          },
          "product_id": {
            "type": "string",
            "description": "The product ID to add to the cart",
            "example": "gid://shopify/Product/100"
          },
          "quantity": {
            "type": "number",
            "description": "The quantity of the cart line to add",
            "example": 1
          },
          "attributes": {
            "description": "An array of key-value attributes that should be included with the cart line",
            "example": [{ "key": "__lion_sfp_id", "value": "19fdf4cb" }],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": { "type": "string" },
                "value": { "type": "string" }
              },
              "required": ["key", "value"],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "kind",
          "merchandise_id",
          "product_id",
          "quantity",
          "attributes"
        ],
        "additionalProperties": false,
        "title": "Shopify cart line",
        "description": "Details of the cart line that should be added to the Shopify cart. When using the Storefront API, these should be passed into the [cartLinesAdd mutation](https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesAdd)"
      },
      "CartRequirementsDetailMinimumCartTotalNoRequirement": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "no_requirement" }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "No requirement"
      },
      "CartRequirementsDetailMinimumCartTotalRequirementMet": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "requirement_met" }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Requirement met"
      },
      "CartRequirementsDetailMinimumCartTotalRequirementNotMet": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "requirement_not_met" },
          "additional_amount_required": {
            "type": "object",
            "properties": {
              "amount": { "type": "number" },
              "formatted": { "type": "string" }
            },
            "required": ["amount", "formatted"],
            "additionalProperties": false
          }
        },
        "required": ["state", "additional_amount_required"],
        "additionalProperties": false,
        "title": "Requirement not met"
      },
      "CartRequirementsDetailMinimumLineItemQuantityNoRequirement": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "no_requirement" }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "No requirement"
      },
      "CartRequirementsDetailMinimumLineItemQuantityRequirementMet": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "requirement_met" }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Requirement met"
      },
      "CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "requirement_not_met" },
          "additional_quantity_required": {
            "type": "number",
            "description": "The number of additional line items required before this requirement is met"
          }
        },
        "required": ["state", "additional_quantity_required"],
        "additionalProperties": false,
        "title": "Requirement not met"
      },
      "CustomerAvailableRewardGiftCard": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "gift_card" },
          "properties": {
            "type": "object",
            "properties": {
              "initial_balance": {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false,
                "description": "The initial balance of the gift card"
              }
            },
            "required": ["initial_balance"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Gift card",
        "description": "A gift card that can be used for future orders until its balance runs out"
      },
      "RewardContextCanRedeemRedeemable": {
        "type": "object",
        "properties": { "state": { "type": "string", "const": "redeemable" } },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Redeemable"
      },
      "RewardContextCanRedeemInsufficientPoints": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "insufficient_points" },
          "additional_points_required": {
            "type": "number",
            "description": "The number of additional points required before this customer can afford the reward"
          }
        },
        "required": ["state", "additional_points_required"],
        "additionalProperties": false,
        "title": "Insufficient points"
      },
      "RewardContextCanRedeemClaimLimitReached": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "claim_limit_reached" }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Claim limit reached"
      },
      "RewardContextCanRedeemCartRequirementsNotMet": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "cart_requirements_not_met" },
          "cart_requirements_detail": {
            "type": "object",
            "properties": {
              "minimum_cart_total": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement"
                  },
                  {
                    "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet"
                  },
                  {
                    "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                  }
                ],
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement",
                    "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet",
                    "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                  }
                }
              },
              "minimum_line_item_quantity": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement"
                  },
                  {
                    "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet"
                  },
                  {
                    "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                  }
                ],
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement",
                    "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet",
                    "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                  }
                }
              }
            },
            "required": ["minimum_cart_total", "minimum_line_item_quantity"],
            "additionalProperties": false
          }
        },
        "required": ["state", "cart_requirements_detail"],
        "additionalProperties": false,
        "title": "Cart requirements not met",
        "description": "For rewards that have requirements based on the customer's current cart, this indicates that the customer's current cart does not meet the requirements. This can only be determined if the request included a serialized `cart` object"
      },
      "RewardContextCanRedeemMaxRedemptionsForCartReached": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "max_redemptions_for_cart_reached"
          }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Max redemptions for cart reached",
        "description": "For rewards that have limits on how many times they can be redeemed per cart, this indicates that the customer has reached the maximum number of redemptions for the current cart"
      },
      "RewardContextCanRedeemOutOfStock": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "out_of_stock" }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Out of stock",
        "description": "For rewards that have managed inventory, or are linked to an external inventory, this indicates that the reward is out of stock. For rewards with multiple options (e.g. product variants), this means that all options are out of stock"
      },
      "RewardContextCanRedeemUnknown": {
        "type": "object",
        "properties": { "state": { "type": "string", "const": "unknown" } },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Unknown",
        "description": "The redeemable state of this reward cannot be determined. For example, `product_cart` rewards where the request does not include a current cart will have this state, since we cannot determine if applicable cart requirements are met. It may be safe to treat this reward as redeemable if you perform your own checks"
      },
      "RewardContextClaimLimitNoLimit": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "no_limit",
            "description": "The associated reward has no limit, so this customer can claim it any number of times"
          }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "No limit"
      },
      "RewardContextClaimLimitLimitNotReached": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "limit_not_reached",
            "description": "The associated reward has a claim limit, but this customer has not yet reached it"
          },
          "interval": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["day", "week", "month", "year"],
                "description": "The calendar interval for this limit"
              },
              { "type": "null" }
            ],
            "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
          },
          "allowed_claims_within_interval": {
            "type": "integer",
            "description": "The number of times this reward can be claimed by the customer in the current limit interval"
          },
          "claim_count_within_interval": {
            "type": "integer",
            "description": "The number of times this reward has been claimed by the customer in the current limit interval"
          },
          "remaining_claims_within_interval": {
            "type": "integer",
            "description": "The number of times this reward can still be claimed by the customer in the current limit interval"
          }
        },
        "required": [
          "state",
          "interval",
          "allowed_claims_within_interval",
          "claim_count_within_interval",
          "remaining_claims_within_interval"
        ],
        "additionalProperties": false,
        "title": "Limit not reached"
      },
      "RewardContextClaimLimitLimitReachedForever": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "limit_reached_forever",
            "description": "The associated reward has a limit, the customer has reached it, and the limit will never reset. This means the reward can never be claimed again by this customer"
          }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Limit reached forever"
      },
      "RewardContextClaimLimitLimitReachedUntilReset": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "limit_reached_until_reset",
            "description": "The associated reward has a limit and the customer has reached it. The customer will be able to claim the reward again once the limit resets, which will be at the specified `reset_at` date"
          },
          "interval": {
            "type": "string",
            "enum": ["day", "week", "month", "year"],
            "description": "The calendar interval for this limit"
          },
          "resets_at": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when the limit will reset and the customer can claim the reward again. This will usually be the start of the next calendar interval"
          },
          "resets_at_relative_to_now": {
            "type": "string",
            "description": "Localized text indicating when the limit will reset relative to now",
            "example": "3 days"
          }
        },
        "required": [
          "state",
          "interval",
          "resets_at",
          "resets_at_relative_to_now"
        ],
        "additionalProperties": false,
        "title": "Limit reached until reset"
      },
      "CustomerAvailableRewardCartDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "cart_discount_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "discount_type": {
                "type": "string",
                "enum": ["fixed", "percentage"],
                "description": "The type of discount this voucher will apply to the cart"
              },
              "discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "percentage": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["percentage", "formatted"],
                    "additionalProperties": false
                  }
                ],
                "description": "The discount that will apply to the cart. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
              },
              "applies_to_order_type": {
                "type": "string",
                "enum": ["all", "one_time", "subscription"],
                "description": "The type of order that this voucher will apply to. One of: `all` (applies to all types of order), `one_time` (applies to one-time orders), `subscription` (applies to subscription orders)",
                "example": "one_time"
              },
              "recurring_cycle_limit": {
                "description": "The number of orders this discount will apply to, for discounts that can apply to subscription orders. If it's `1`, it means the discount will apply only to the first order with which it is used. If `null`, the discount will be applied to any number of orders for as long as it is active",
                "example": 1,
                "type": ["number", "null"]
              },
              "supports_active_subscriptions": {
                "description": "Whether or not this discount will also be able to be applied to active subscriptions in Recharge. If true, we will create a Recharge discount in addition to a Shopify discount whenever this reward is claimed.",
                "type": "boolean"
              },
              "minimum_spend": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "The minimum spend, if any, for the voucher to apply to the cart",
                "example": { "amount": 10, "formatted": "$10" }
              }
            },
            "required": [
              "discount_type",
              "discount",
              "applies_to_order_type",
              "recurring_cycle_limit",
              "minimum_spend"
            ],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Cart discount voucher",
        "description": "A discount voucher that applies a reduction to the total cost of an order"
      },
      "CustomerAvailableRewardCartVariableDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": {
            "type": "string",
            "const": "cart_variable_discount_voucher"
          },
          "properties": {
            "type": "object",
            "properties": {
              "minimum_discount": {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false,
                "description": "The minimum discount that can be selected, e.g. 1 for a minimum of $1"
              },
              "maximum_discount": {
                "type": "object",
                "properties": {
                  "amount": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["amount", "formatted"],
                "additionalProperties": false,
                "description": "The maximum discount that can be selected, e.g. 5 for a maximum of $5"
              },
              "minimum_spend_before_discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "The required minimum spend in cart before the reward can be redeemed",
                "example": { "amount": 10, "formatted": "$10" }
              },
              "minimum_spend_after_discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "Only allow redemption of a discount value that would leave the cart total above this amount",
                "example": { "amount": 10, "formatted": "$10" }
              },
              "applies_to_order_type": {
                "type": "string",
                "enum": ["all", "one_time", "subscription"],
                "description": "The type of order that this voucher will apply to. One of: `all` (applies to all types of order), `one_time` (applies to one-time orders), `subscription` (applies to subscription orders)",
                "example": "one_time"
              }
            },
            "required": [
              "minimum_discount",
              "maximum_discount",
              "minimum_spend_before_discount",
              "minimum_spend_after_discount",
              "applies_to_order_type"
            ],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Cart variable discount",
        "description": "A variable-amount discount, e.g. 100 points per $1 discount. This is typically used during checkout to allow shoppers to use points to apply a discount to their cart"
      },
      "CustomerAvailableRewardFreeShippingVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "free_shipping_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "max_shipping": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "Free shipping will only be applied if the shipping rate is equal to or less than this amount, or `null` if there is no maximum"
              }
            },
            "required": ["max_shipping"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Free shipping voucher",
        "description": "A voucher that applies free shipping to an order"
      },
      "CustomerAvailableRewardProductDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "product_discount_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "image_url": { "type": ["string", "null"] },
                  "variant_id": {
                    "description": "The variant ID to apply the discount to. If `null`, the discount can be applied to all this product's variants",
                    "type": ["string", "null"]
                  }
                },
                "required": ["id", "image_url", "variant_id"],
                "additionalProperties": false,
                "description": "The product that this discount applies to"
              },
              "discount": {
                "type": "object",
                "properties": {
                  "percentage": { "type": "number" },
                  "formatted": { "type": "string" }
                },
                "required": ["percentage", "formatted"],
                "additionalProperties": false,
                "description": "The discount that will apply to the product. Product discounts are always percentage based, so this will be a number from `1-100`"
              }
            },
            "required": ["product", "discount"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Product discount voucher",
        "description": "A discount voucher that applies a reduction to a specific product"
      },
      "CustomerAvailableRewardCollectionDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "collection_discount_voucher" },
          "properties": {
            "type": "object",
            "properties": {
              "collection": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "title": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] }
                },
                "required": ["id", "title", "url"],
                "additionalProperties": false,
                "description": "The collection that this discount applies to"
              },
              "discount_type": {
                "type": "string",
                "enum": ["fixed", "percentage"],
                "description": "The type of discount this voucher will apply to items in the collection"
              },
              "discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "percentage": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["percentage", "formatted"],
                    "additionalProperties": false
                  }
                ],
                "description": "The discount that will apply to items in the collection. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
              },
              "minimum_spend": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "The minimum spend, if any, for the voucher to apply to the cart",
                "example": { "amount": 10, "formatted": "$10" }
              }
            },
            "required": [
              "collection",
              "discount_type",
              "discount",
              "minimum_spend"
            ],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Collection discount voucher",
        "description": "A discount voucher that applies a reduction to one or more items in a collection"
      },
      "CustomerAvailableRewardProductCart": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "product_cart" },
          "properties": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "handle": { "type": ["string", "null"] },
                  "title": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] },
                  "image_url": { "type": ["string", "null"] },
                  "variants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": { "type": "string" },
                        "title": { "type": ["string", "null"] },
                        "inventory_count": {
                          "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                          "type": ["integer", "null"]
                        },
                        "sort_key": { "type": "number" }
                      },
                      "required": [
                        "id",
                        "title",
                        "inventory_count",
                        "sort_key"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "handle",
                  "title",
                  "url",
                  "image_url",
                  "variants"
                ],
                "additionalProperties": false,
                "description": "The product that can be added to the cart. If the product has more than one variant, the shopper should be able to choose which one to redeem"
              },
              "max_redemptions_per_cart": {
                "description": "The maximum number of times this product can be redeemed per cart, or `null` if there is no limit",
                "type": ["integer", "null"]
              },
              "cart_requirements": {
                "type": "object",
                "properties": {
                  "minimum_cart_total": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "The cart total must be equal to or greater than this amount, or `null` if there is no minimum total"
                  },
                  "minimum_line_item_count": {
                    "description": "The cart must contain at least this number of line items, or `null` if there is no required line item count",
                    "type": ["number", "null"]
                  }
                },
                "required": ["minimum_cart_total", "minimum_line_item_count"],
                "additionalProperties": false,
                "description": "Cart requirements that must be met before the reward can be redeemed"
              }
            },
            "required": [
              "product",
              "max_redemptions_per_cart",
              "cart_requirements"
            ],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Product cart",
        "description": "A free product that is added to the cart"
      },
      "CustomerAvailableRewardActiveSubscriptionDiscountVoucher": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": {
            "type": "string",
            "const": "active_subscription_discount_voucher"
          },
          "properties": {
            "type": "object",
            "properties": {
              "discount_type": {
                "type": "string",
                "enum": ["fixed", "percentage"],
                "description": "The type of discount this voucher will apply to next order"
              },
              "discount": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "percentage": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["percentage", "formatted"],
                    "additionalProperties": false
                  }
                ],
                "description": "The discount that will apply to the next order. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
              },
              "recurring_cycle_limit": {
                "description": "The number of recurring orders this discount will apply to. If `null`, the discount will be applied to any number of orders for as long as it is active",
                "type": ["number", "null"]
              }
            },
            "required": ["discount_type", "discount", "recurring_cycle_limit"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Active subscription discount voucher",
        "description": "A discount that is applied to one or more upcoming recurring subscription orders"
      },
      "CustomerAvailableRewardActiveSubscriptionProduct": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "active_subscription_product" },
          "properties": {
            "type": "object",
            "properties": {
              "product": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "handle": { "type": ["string", "null"] },
                  "title": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] },
                  "image_url": { "type": ["string", "null"] },
                  "variants": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": { "type": "string" },
                        "title": { "type": ["string", "null"] },
                        "inventory_count": {
                          "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                          "type": ["integer", "null"]
                        },
                        "sort_key": { "type": "number" }
                      },
                      "required": [
                        "id",
                        "title",
                        "inventory_count",
                        "sort_key"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "id",
                  "handle",
                  "title",
                  "url",
                  "image_url",
                  "variants"
                ],
                "additionalProperties": false,
                "description": "The product that can be added to an active subscription. If the product has more than one variant, the shopper should be able to choose which one to redeem"
              }
            },
            "required": ["product"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Active subscription product",
        "description": "A free product that is added to the next recurring subscription order"
      },
      "CustomerAvailableRewardCustom": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this reward can be claimed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the reward can only ever be claimed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this reward, which is applied per customer. Rewards with a limit set may only be claimed a set number of times in a given interval. The limit may be `null` if the reward has no limit and can therefore be claimed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this reward, when the merchant has set one: either an image they uploaded or chose for the reward itself, or the reward's product or collection catalog image. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "custom" },
          "properties": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "fulfillment_type": {
                    "type": "string",
                    "const": "store_fulfillment",
                    "description": "Fulfilled by the merchant — manually or via webhook (see `fulfillment_method`)."
                  },
                  "fulfillment_method": {
                    "type": "string",
                    "enum": ["manual", "webhook"],
                    "description": "How the merchant fulfils this custom reward."
                  },
                  "fulfillment_webhook_url": {
                    "description": "The URL to which we'll send a webhook for reward fulfillment, if one is configured",
                    "type": ["string", "null"]
                  }
                },
                "required": [
                  "fulfillment_type",
                  "fulfillment_method",
                  "fulfillment_webhook_url"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "fulfillment_type": {
                    "type": "string",
                    "const": "voucher",
                    "description": "Fulfilled by issuing a code from a merchant-uploaded pool to the customer at claim time."
                  }
                },
                "required": ["fulfillment_type"],
                "additionalProperties": false
              }
            ],
            "type": "object"
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this reward variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this reward. For example, '$5 voucher', 'Free Water Bottle', or '$5 off next 3 subscription orders'",
                "example": "$5 voucher"
              },
              "description": {
                "description": "Longer, localized description for this reward, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Spend your points on $5 off your next order",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this reward variant is enabled. For example, some rewards are only available for certain tiers"
              },
              "cost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "fixed" },
                      "points": { "type": "number" }
                    },
                    "required": ["kind", "points"],
                    "additionalProperties": false,
                    "title": "Fixed cost"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": { "type": "string", "const": "variable" },
                      "unit": { "type": "string", "const": "discount_amount" },
                      "points_per_unit": { "type": "number" }
                    },
                    "required": ["kind", "unit", "points_per_unit"],
                    "additionalProperties": false,
                    "title": "Variable cost"
                  }
                ],
                "description": "The cost of this reward in points. Will be one of `fixed` (costs a fixed number of points) or `variable` (cost is multiplied by unit, e.g. 100 points per $1 discount)"
              },
              "cost_text": {
                "type": "string",
                "description": "Short, localized text indicating the cost of this reward. For example, '100 points' or '10 points per $1'",
                "example": "100 points"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "cost",
              "cost_text"
            ],
            "additionalProperties": false,
            "description": "The reward variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "can_redeem": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemRedeemable"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemInsufficientPoints"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemClaimLimitReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemOutOfStock"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                ],
                "description": "An object that indicates if this reward can be redeemed by this customer. The `state` property indicates if it can be redeemed. If `state == \"redeemable\"`, the reward can be redeemed by the customer",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "redeemable": "#/components/schemas/RewardContextCanRedeemRedeemable",
                    "insufficient_points": "#/components/schemas/RewardContextCanRedeemInsufficientPoints",
                    "claim_limit_reached": "#/components/schemas/RewardContextCanRedeemClaimLimitReached",
                    "cart_requirements_not_met": "#/components/schemas/RewardContextCanRedeemCartRequirementsNotMet",
                    "max_redemptions_for_cart_reached": "#/components/schemas/RewardContextCanRedeemMaxRedemptionsForCartReached",
                    "out_of_stock": "#/components/schemas/RewardContextCanRedeemOutOfStock",
                    "unknown": "#/components/schemas/RewardContextCanRedeemUnknown"
                  }
                }
              },
              "last_claimed_at": {
                "description": "`ISO 8601` timestamp representing when this reward was last claimed by the customer, or `null` if the reward has never been claimed by the customer",
                "type": ["string", "null"]
              },
              "claim_count": {
                "type": "number",
                "description": "The number of times this reward has been claimed by the customer"
              },
              "claim_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this reward's claim limit specific to this customer. When rewards are limited, they can only be claimed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RewardContextClaimLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RewardContextClaimLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RewardContextClaimLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RewardContextClaimLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "can_redeem",
              "last_claimed_at",
              "claim_count",
              "claim_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this reward, such as the number of times they have claimed it, or any limit that is in effect, and if they are currently able to redeem it"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Custom",
        "description": "A custom reward that is fulfilled by the merchant manually or using a webhook, or by issuing a code from a merchant-uploaded pool"
      },
      "CustomerAvailableRuleBirthday": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "birthday" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Birthday"
      },
      "RuleContextCompletionLimitNoLimit": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "no_limit",
            "description": "The associated rule has no limit, so this customer can complete it any number of times"
          }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "No limit",
        "description": "no limit"
      },
      "RuleContextCompletionLimitLimitNotReached": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "limit_not_reached",
            "description": "The associated rule has a limit, but this customer has not yet reached it"
          },
          "interval": {
            "anyOf": [
              {
                "type": "string",
                "enum": ["day", "week", "month", "year"],
                "description": "The calendar interval for this limit"
              },
              { "type": "null" }
            ],
            "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
          },
          "allowed_completions_within_interval": {
            "type": "integer",
            "description": "The number of times this rule can be completed by the customer in the current limit interval"
          },
          "completion_count_within_interval": {
            "type": "integer",
            "description": "The number of times this rule has been completed by the customer in the current limit interval"
          },
          "remaining_completions_within_interval": {
            "type": "integer",
            "description": "The number of times this rule can still be completed by the customer in the current limit interval"
          }
        },
        "required": [
          "state",
          "interval",
          "allowed_completions_within_interval",
          "completion_count_within_interval",
          "remaining_completions_within_interval"
        ],
        "additionalProperties": false,
        "title": "Limit not reached"
      },
      "RuleContextCompletionLimitLimitReachedForever": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "limit_reached_forever",
            "description": "The associated rule has a limit, the customer has reached it, and the limit will never reset. This means the rule can never be completed again by this customer"
          }
        },
        "required": ["state"],
        "additionalProperties": false,
        "title": "Limit reached forever"
      },
      "RuleContextCompletionLimitLimitReachedUntilReset": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "const": "limit_reached_until_reset",
            "description": "The associated rule has a limit and the customer has reached it. The customer will be able to complete the rule again once the limit resets, which will be at the specified `reset_at` date"
          },
          "interval": {
            "type": "string",
            "enum": ["day", "week", "month", "year"],
            "description": "The calendar interval for this limit"
          },
          "resets_at": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when the limit will reset and the customer can complete the rule again. This will usually be the start of the next calendar interval"
          },
          "resets_at_relative_to_now": {
            "type": "string",
            "description": "Localized text indicating when the limit will reset relative to now",
            "example": "3 days"
          }
        },
        "required": [
          "state",
          "interval",
          "resets_at",
          "resets_at_relative_to_now"
        ],
        "additionalProperties": false,
        "title": "Limit reached until reset"
      },
      "CustomerAvailableRuleLoyaltyPassInstall": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "loyalty_pass_install" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Loyalty pass install"
      },
      "CustomerAvailableRuleCollectionPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "collection_purchase" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Collection purchase"
      },
      "CustomerAvailableRuleNewsletterSignup": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "newsletter_signup" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Newsletter signup"
      },
      "CustomerAvailableRulePageview": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "pageview" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Pageview"
      },
      "CustomerAvailableRuleProductPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "product_purchase" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Product purchase"
      },
      "CustomerAvailableRulePurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "purchase" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Purchase"
      },
      "CustomerAvailableRuleJoinProgram": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "join_program" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Join program"
      },
      "CustomerAvailableRuleReview": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "review" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              },
              "requirements": {
                "description": "Conditions the review must meet for this rule variant to be completed. Empty when any review counts",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/RuleReviewRequirement"
                }
              },
              "modifiers": {
                "description": "Extra points available for a review that meets each modifier condition, added to the result of this rule variant. A review earns the bonus of every modifier it meets. Only modifiers that award points are listed, and the list is always empty when the result is a `reward`",
                "type": "array",
                "items": { "$ref": "#/components/schemas/RuleReviewModifier" }
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text",
              "requirements",
              "modifiers"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Review"
      },
      "CustomerAvailableRuleCustom": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "custom" },
          "properties": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "The name of this custom rule, as set by the merchant"
              }
            },
            "required": ["name"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Custom"
      },
      "CustomerAvailableRuleFacebookLike": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "facebook_like" },
          "properties": {
            "type": "object",
            "properties": { "facebook_like_url": { "type": "string" } },
            "required": ["facebook_like_url"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Facebook Like"
      },
      "CustomerAvailableRuleTwitterFollow": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "twitter_follow" },
          "properties": {
            "type": "object",
            "properties": { "twitter_handle": { "type": "string" } },
            "required": ["twitter_handle"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Twitter follow"
      },
      "CustomerAvailableRuleInstagramFollow": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "instagram_follow" },
          "properties": {
            "type": "object",
            "properties": { "instagram_handle": { "type": "string" } },
            "required": ["instagram_handle"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Instagram follow"
      },
      "CustomerAvailableRuleInstagramMention": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "instagram_mention" },
          "properties": {
            "type": "object",
            "properties": { "instagram_handle": { "type": "string" } },
            "required": ["instagram_handle"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Instagram mention"
      },
      "CustomerAvailableRuleInstagramPostHashtag": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "instagram_post_hashtag" },
          "properties": {
            "type": "object",
            "properties": {
              "instagram_handle": { "type": "string" },
              "hashtag": { "type": "string" }
            },
            "required": ["instagram_handle", "hashtag"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Instagram post hashtag"
      },
      "CustomerAvailableRuleTiktokFollow": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "tiktok_follow" },
          "properties": {
            "type": "object",
            "properties": { "tiktok_handle": { "type": "string" } },
            "required": ["tiktok_handle"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Tiktok follow"
      },
      "CustomerAvailableRuleTiktokPostHashtag": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "tiktok_post_hashtag" },
          "properties": {
            "type": "object",
            "properties": { "hashtag": { "type": "string" } },
            "required": ["hashtag"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Tiktok post hashtag"
      },
      "CustomerAvailableRuleReferral": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "referral" },
          "properties": {
            "type": "object",
            "properties": {
              "trigger": {
                "type": "string",
                "enum": ["any_purchase", "qualifying_purchase"]
              }
            },
            "required": ["trigger"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Referral"
      },
      "CustomerAvailableRuleClickthrough": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "clickthrough" },
          "properties": {
            "type": "object",
            "properties": { "destination_url": { "type": "string" } },
            "required": ["destination_url"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Clickthrough"
      },
      "CustomerAvailableRuleRetailPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "retail_purchase" },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "variant", "context"],
        "additionalProperties": false,
        "title": "Retail purchase"
      },
      "CustomerAvailableRuleSubtotalLink": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "subtotal_link" },
          "properties": {
            "type": "object",
            "properties": {
              "retailers": {
                "description": "The retailers the store lists for linking, in the order the store has them. A store can set this rule to pay for an account at any retailer, so linking one that is not listed can also earn",
                "type": "array",
                "items": { "$ref": "#/components/schemas/RuleSubtotalRetailer" }
              }
            },
            "required": ["retailers"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Link a retailer account"
      },
      "CustomerAvailableRuleSubtotalPurchase": {
        "type": "object",
        "properties": {
          "id": { "type": "number" },
          "limit": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "description": "The number of times this rule can be completed for a customer in the specified calendar `interval`, e.g. once a week"
                  },
                  "interval": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": ["day", "week", "month", "year"],
                        "description": "The calendar interval for this limit"
                      },
                      { "type": "null" }
                    ],
                    "description": "The calendar interval for this limit. If `null`, it means the limit will never reset and the rule can only ever be completed for a customer a set number of times"
                  }
                },
                "required": ["count", "interval"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "A limit for this rule, which is applied per customer. Rules with a limit set may only be completed a set number of times in a given interval. The limit may be `null` if the rule has no limit and can therefore be completed any number of times by the same customer"
          },
          "image_url": {
            "description": "A display image for this rule, when the merchant has set one: either an image they uploaded or an external image URL. `null` when no image is set",
            "type": ["string", "null"]
          },
          "kind": { "type": "string", "const": "subtotal_purchase" },
          "properties": {
            "type": "object",
            "properties": {
              "retailers": {
                "description": "The retailers the store lists for this rule, in the order the store has them. A purchase only earns once the customer has linked their account at that retailer. A store can set this rule to pay for purchases at any retailer, including ones not listed",
                "type": "array",
                "items": { "$ref": "#/components/schemas/RuleSubtotalRetailer" }
              }
            },
            "required": ["retailers"],
            "additionalProperties": false
          },
          "variant": {
            "type": "object",
            "properties": {
              "tier_id": {
                "description": "The tier ID to which this rule variant applies. This will always be `null` if the program does not have tiers enabled",
                "type": ["number", "null"]
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this rule. For example, 'Make a purchase' or 'Refer a friend'",
                "example": "Make a purchase"
              },
              "description": {
                "description": "Longer, localized description for this rule, giving the shopper more detail than the title. Where no description is set in the requested language, one from another language is returned in preference to nothing, matching how the title resolves. `null` means no description is set in any language",
                "example": "Earn points every time you shop with us",
                "type": ["string", "null"]
              },
              "enabled": {
                "type": "boolean",
                "description": "Indicates if this rule variant is enabled. For example, some rules are only available for certain tiers"
              },
              "result": {
                "oneOf": [
                  {
                    "title": "Points",
                    "$ref": "#/components/schemas/RuleResultPoints"
                  },
                  {
                    "title": "Reward",
                    "$ref": "#/components/schemas/RuleResultReward"
                  }
                ],
                "description": "The result of completing this rule. Will be one of `points` (points are awarded to the customer), or `reward` (a reward is immediately granted, such as a cart discount voucher)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points": "#/components/schemas/RuleResultPoints",
                    "reward": "#/components/schemas/RuleResultReward"
                  }
                }
              },
              "result_short_text": {
                "type": "string",
                "description": "Short, localized text indicating the result of completing this rule variant. For example: '100 points', '5 points per $1', or '$5 voucher'",
                "example": "5 points per $1"
              }
            },
            "required": [
              "tier_id",
              "title",
              "description",
              "enabled",
              "result",
              "result_short_text"
            ],
            "additionalProperties": false,
            "description": "The rule variant that is applicable to this customer and their tier"
          },
          "context": {
            "type": "object",
            "properties": {
              "last_completed_at": {
                "description": "`ISO 8601` timestamp representing when this rule was last completed by the customer, or `null` if the rule has never been completed by the customer",
                "type": ["string", "null"]
              },
              "completion_count": {
                "type": "number",
                "description": "The number of times this rule has been completed by the customer in total"
              },
              "completion_limit": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitNoLimit"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitNotReached"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever"
                  },
                  {
                    "$ref": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                ],
                "description": "An object indicating the state of this rule's completion limit specific to this customer. When rules are limited, they can only be completed by a customer a set number of times in a given interval (or forever). The `state` property indicates what limit, if any, is currently in effect",
                "type": "object",
                "discriminator": {
                  "propertyName": "state",
                  "mapping": {
                    "no_limit": "#/components/schemas/RuleContextCompletionLimitNoLimit",
                    "limit_not_reached": "#/components/schemas/RuleContextCompletionLimitLimitNotReached",
                    "limit_reached_forever": "#/components/schemas/RuleContextCompletionLimitLimitReachedForever",
                    "limit_reached_until_reset": "#/components/schemas/RuleContextCompletionLimitLimitReachedUntilReset"
                  }
                }
              }
            },
            "required": [
              "last_completed_at",
              "completion_count",
              "completion_limit"
            ],
            "additionalProperties": false,
            "description": "Information about this customer's interaction with this rule, such as the number of times they have completed it, or any limit that is in effect"
          }
        },
        "required": ["id", "limit", "kind", "properties", "variant", "context"],
        "additionalProperties": false,
        "title": "Purchase at a linked retailer"
      },
      "CustomerHistoryActionEarnedPointsFromRule": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "earned_points_from_rule",
            "description": "Represents points that the customer earned as the result of completing a rule."
          },
          "label": {
            "type": "string",
            "description": "Short text describing the history action. This will typically be the name of the associated rule",
            "example": "Join our program"
          },
          "date": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when this history action occurred. Note that actions may change over time, such as points being approved or voided, but this timestamp will always represent when the action originally happened"
          },
          "points": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of points earned from the rule. This will always be 0 or higher"
          },
          "points_text": {
            "type": "string",
            "description": "Short, localized text indicating the number of points earned",
            "example": "500 points"
          },
          "rule": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the rule whose completion earned the points. If this does not match a `rule` in the current Site Configuration, it means the associated rule has been deleted"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "birthday",
                  "loyalty_pass_install",
                  "collection_purchase",
                  "newsletter_signup",
                  "pageview",
                  "product_purchase",
                  "purchase",
                  "join_program",
                  "review",
                  "custom",
                  "facebook_like",
                  "twitter_follow",
                  "instagram_follow",
                  "instagram_mention",
                  "instagram_post_hashtag",
                  "tiktok_follow",
                  "tiktok_post_hashtag",
                  "referral",
                  "clickthrough",
                  "retail_purchase",
                  "subtotal_link",
                  "subtotal_purchase"
                ]
              }
            },
            "required": ["id", "kind"],
            "additionalProperties": false
          },
          "points_will_approve_at": {
            "description": "If the state of this action is `pending`, this will be an `ISO 8601` timestamp representing the date at which the points will become approved, unless they are declined in the meantime",
            "type": ["string", "null"]
          },
          "points_will_expire_at": {
            "description": "If 'Earned date' or 'Calendar' point expiration is enabled, this will be an `ISO 8601` timestamp representing the date at which these points will expire",
            "type": ["string", "null"]
          },
          "state": {
            "type": "string",
            "enum": ["pending", "declined", "approved", "void", "expired"],
            "description": "The state of the points earned from this rule.\n\n- `pending` - the points cannot be redeemed yet, and will be declined or approved at a later date\n\n- `declined` - pending points were declined and cannot be used\n\n- `approved` - points that can be redeemed\n\n- `void` - approved points that have been voided and cannot be used\n\n- `expired` - points that have expired and cannot be used"
          }
        },
        "required": [
          "kind",
          "label",
          "date",
          "points",
          "points_text",
          "rule",
          "points_will_approve_at",
          "points_will_expire_at",
          "state"
        ],
        "additionalProperties": false,
        "title": "Earned points from rule"
      },
      "CustomerHistoryActionRedeemedPointsForReward": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "redeemed_points_for_reward",
            "description": "Represents a reward that the customer redeemed using points"
          },
          "label": {
            "type": "string",
            "description": "Short text describing the history action. This will typically be the name of the redeemed reward",
            "example": "$5 voucher"
          },
          "date": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when this history action occurred. Note that actions may change over time, such as points being approved or voided, but this timestamp will always represent when the action originally happened"
          },
          "points": {
            "type": "integer",
            "maximum": 0,
            "description": "The number of points redeemed. This will always be 0 or lower"
          },
          "points_text": {
            "type": "string",
            "description": "Short, localized text indicating the number of points redeemed",
            "example": "-500 points"
          },
          "reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the reward redeemed for the points. If this does not match a `reward` in the current Site Configuration, it means the associated reward has been deleted, that it is a `private_product` or `tiktok_coupon` placeholder, which is never listed, or that it is a `collection_product`, which the Site Configuration does not list"
              },
              "kind": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "gift_card",
                      "cart_discount_voucher",
                      "cart_variable_discount_voucher",
                      "free_shipping_voucher",
                      "product_discount_voucher",
                      "collection_discount_voucher",
                      "product_cart",
                      "active_subscription_discount_voucher",
                      "active_subscription_product",
                      "custom"
                    ]
                  },
                  { "type": "string", "const": "collection_product" },
                  { "type": "string", "const": "private_product" },
                  { "type": "string", "const": "tiktok_coupon" }
                ]
              }
            },
            "required": ["id", "kind"],
            "additionalProperties": false
          },
          "claimed_reward_id": {
            "type": "number",
            "description": "The ID of the associated claimed reward for the customer"
          },
          "state": {
            "type": "string",
            "enum": ["pending", "declined", "approved", "void", "expired"],
            "description": "The state of the redeemed reward.\n\n- `pending` - the reward cannot be used yet, and will be declined or approved at a later date\n\n- `declined` - the reward was declined and cannot be used\n\n- `approved` - the reward can be used\n\n- `void` - the reward was voided and cannot be used\n\n- `expired` - the reward has expired and cannot be used"
          }
        },
        "required": [
          "kind",
          "label",
          "date",
          "points",
          "points_text",
          "reward",
          "claimed_reward_id",
          "state"
        ],
        "additionalProperties": false,
        "title": "Redeemed points for reward"
      },
      "CustomerHistoryActionReceivedReward": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "received_reward",
            "description": "Represents a reward that the customer received without redeeming their points, such as from completing a rule or entering a new tier"
          },
          "label": {
            "type": "string",
            "description": "Short text describing the history action. This will typically be the name of the received reward",
            "example": "$5 voucher"
          },
          "date": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when this history action occurred. Note that actions may change over time, such as points being approved or voided, but this timestamp will always represent when the action originally happened"
          },
          "reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the received reward. If this does not match a `reward` in the current Site Configuration, it means the associated reward has been deleted"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "gift_card",
                  "cart_discount_voucher",
                  "cart_variable_discount_voucher",
                  "free_shipping_voucher",
                  "product_discount_voucher",
                  "collection_discount_voucher",
                  "product_cart",
                  "active_subscription_discount_voucher",
                  "active_subscription_product",
                  "custom"
                ]
              }
            },
            "required": ["id", "kind"],
            "additionalProperties": false
          },
          "claimed_reward_id": {
            "type": "number",
            "description": "The ID of the associated claimed reward for the customer"
          },
          "rule": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "number",
                    "description": "The ID of the rule whose completion resulted in the reward. If this does not match a `rule` in the current Site Configuration, it means the associated rule has been deleted"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "birthday",
                      "loyalty_pass_install",
                      "collection_purchase",
                      "newsletter_signup",
                      "pageview",
                      "product_purchase",
                      "purchase",
                      "join_program",
                      "review",
                      "custom",
                      "facebook_like",
                      "twitter_follow",
                      "instagram_follow",
                      "instagram_mention",
                      "instagram_post_hashtag",
                      "tiktok_follow",
                      "tiktok_post_hashtag",
                      "referral",
                      "clickthrough",
                      "retail_purchase",
                      "subtotal_link",
                      "subtotal_purchase"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "description": "Localized display title for the rule (the merchant-configured title for the shopper-facing locale, falling back to the default title for the rule kind). Useful for surfacing the rule context alongside the reward — e.g. \"Refer a friend — $5 voucher\"."
                  }
                },
                "required": ["id", "kind", "title"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "If this reward was received as a result of completing a rule, this will include the ID and kind of the related rule. It will be `null` if the reward some other way, such as from entering a new tier"
          },
          "state": {
            "type": "string",
            "enum": ["pending", "declined", "approved", "void", "expired"],
            "description": "The state of the reward received from the rule.\n\n- `pending` - the reward cannot be used yet, and will be declined or approved at a later date\n\n- `declined` - the reward was declined and cannot be used\n\n- `approved` - the reward can be used\n\n- `void` - the reward was voided and cannot be used\n\n- `expired` - the reward has expired and cannot be used"
          }
        },
        "required": [
          "kind",
          "label",
          "date",
          "reward",
          "claimed_reward_id",
          "rule",
          "state"
        ],
        "additionalProperties": false,
        "title": "Received reward"
      },
      "CustomerHistoryActionPointsAdded": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "points_added",
            "description": "Represents points that were added to the customer, typically by a store administrator or an automated import"
          },
          "label": {
            "type": "string",
            "description": "Short text describing the history action. This will typically be the administrator note associated with the adjustment",
            "example": "Points imported"
          },
          "date": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when this history action occurred. Note that actions may change over time, such as points being approved or voided, but this timestamp will always represent when the action originally happened"
          },
          "points": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of points added. This will always be 0 or higher"
          },
          "points_text": {
            "type": "string",
            "description": "Short, localized text indicating the number of points added",
            "example": "1,000 points"
          },
          "points_will_expire_at": {
            "description": "If 'Earned date' or 'Calendar' point expiration is enabled, this will be an `ISO 8601` timestamp representing the date at which these points will expire",
            "type": ["string", "null"]
          },
          "state": {
            "type": "string",
            "enum": ["approved", "void", "expired"],
            "description": "The state of the points that were added.\n\n- `approved` - the points can be used\n\n- `void` - the points were voided and cannot be used\n\n- `expired` - the points have expired and cannot be used"
          }
        },
        "required": [
          "kind",
          "label",
          "date",
          "points",
          "points_text",
          "points_will_expire_at",
          "state"
        ],
        "additionalProperties": false,
        "title": "Points added"
      },
      "CustomerHistoryActionPointsRemoved": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "points_removed",
            "description": "Represents points that were removed from the customer, typically by a store administrator or an automated import. By default, removed points have the `applied` state. If the removal is voided (reverted), they will have the `void` state which adds the points back to the customer"
          },
          "label": {
            "type": "string",
            "description": "Short text describing the history action. This will typically be the administrator note associated with the adjustment",
            "example": "Duplicate points removed"
          },
          "date": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when this history action occurred. Note that actions may change over time, such as points being approved or voided, but this timestamp will always represent when the action originally happened"
          },
          "points": {
            "type": "integer",
            "maximum": 0,
            "description": "The number of points removed. This will always be 0 or lower"
          },
          "points_text": {
            "type": "string",
            "description": "Short, localized text indicating the number of points removed",
            "example": "-1,000 points"
          },
          "state": {
            "type": "string",
            "enum": ["applied", "void"],
            "description": "The state of the points removal.\n\n- `applied` - the points have been removed\n\n- `void` - the removal has been voided and the points were added back"
          }
        },
        "required": ["kind", "label", "date", "points", "points_text", "state"],
        "additionalProperties": false,
        "title": "Points removed"
      },
      "CustomerHistoryActionPointsExpired": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "points_expired",
            "description": "Represents a set of points that have expired and been removed from the customer. Points can expire due to inactivity, or a set amount of time after they are earned."
          },
          "label": {
            "type": "string",
            "description": "Short text describing the history action. This will typically be a localized message indicating the expiry",
            "example": "Points expired due to inactivity"
          },
          "date": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when this history action occurred. Note that actions may change over time, such as points being approved or voided, but this timestamp will always represent when the action originally happened"
          },
          "points": {
            "type": "integer",
            "maximum": 0,
            "description": "The number of points that expired. This will always be 0 or lower"
          },
          "points_text": {
            "type": "string",
            "description": "Short, localized text indicating the number of points expired",
            "example": "-500 points"
          }
        },
        "required": ["kind", "label", "date", "points", "points_text"],
        "additionalProperties": false,
        "title": "Points expired"
      },
      "CustomerHistoryActionEnteredTier": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "entered_tier",
            "description": "Represents the customer entering a new tier"
          },
          "label": {
            "type": "string",
            "description": "Short text describing the history action. This will typically be a localized message referencing the tier",
            "example": "Entered Gold tier"
          },
          "date": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when this history action occurred. Note that actions may change over time, such as points being approved or voided, but this timestamp will always represent when the action originally happened"
          },
          "tier": {
            "type": "object",
            "properties": {
              "id": { "type": "number", "description": "The ID of the tier" },
              "name": {
                "type": "string",
                "description": "The name of the tier"
              }
            },
            "required": ["id", "name"],
            "additionalProperties": false
          }
        },
        "required": ["kind", "label", "date", "tier"],
        "additionalProperties": false,
        "title": "Entered tier"
      },
      "CustomerEnrolled": {
        "type": "object",
        "properties": {
          "state": { "type": "string", "const": "enrolled" },
          "id": {
            "type": "number",
            "description": "The ID of the customer in LoyaltyLion"
          },
          "merchant_id": {
            "type": "string",
            "description": "The ID of the customer in your platform or ecommerce store"
          },
          "email": {
            "description": "The email address of the customer. May be `null`, e.g. for POS customers who have never provided an email address",
            "type": ["string", "null"]
          },
          "phone": {
            "description": "The customer's phone number in E.164 format, or `null` if we don't have one",
            "example": "+447700900123",
            "type": ["string", "null"]
          },
          "first_name": {
            "description": "The first name of the customer, if available",
            "type": ["string", "null"]
          },
          "last_name": {
            "description": "The last name of the customer, if available",
            "type": ["string", "null"]
          },
          "points_approved": {
            "type": "number",
            "description": "The number of approved points the customer can redeem for rewards"
          },
          "points_pending": {
            "type": "number",
            "description": "The number of pending points the customer has. Pending points will be approved or declined at a later date"
          },
          "points_spent": {
            "type": "number",
            "description": "The number of points the customer has spent to date"
          },
          "enrolled_at": {
            "type": "string",
            "description": "`ISO 8601` timestamp representing when the customer enrolled in the program"
          },
          "tier_membership": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "tier_id": {
                    "type": "number",
                    "description": "The ID of the tier this customer is currently in"
                  },
                  "started_at": {
                    "type": "string",
                    "description": "`ISO 8601` timestamp when this tier membership started",
                    "example": "2025-01-01T12:00:00Z"
                  },
                  "expires_at": {
                    "description": "`ISO 8601` timestamp when this tier membership expires. Will be `null` if the membership never expires",
                    "example": "2026-01-01T12:00:00Z",
                    "type": ["string", "null"]
                  },
                  "progress": {
                    "oneOf": [
                      { "$ref": "#/components/schemas/TierProgressPoints" },
                      { "$ref": "#/components/schemas/TierProgressSpend" },
                      { "$ref": "#/components/schemas/TierProgressOrders" }
                    ],
                    "description": "Information about the customer's tier progress, which can be used to inform a customer how close they are to reaching the next tier, or what they they need to do to maintain their current tier when it expires. Note that tier progress changes over time, as we use a sliding evaluation window to calculate progress, so it is only guaranteed to be correct as of the time of the response",
                    "type": "object",
                    "discriminator": {
                      "propertyName": "kind",
                      "mapping": {
                        "points": "#/components/schemas/TierProgressPoints",
                        "spend": "#/components/schemas/TierProgressSpend",
                        "orders": "#/components/schemas/TierProgressOrders"
                      }
                    }
                  }
                },
                "required": ["tier_id", "started_at", "expires_at", "progress"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "Details about this customer's current tier membership, or `null` if tiers are not enabled"
          },
          "birthday": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "month": { "type": "number", "example": 9 },
                  "day": { "type": "number", "example": 20 },
                  "year": { "example": 1993, "type": "number" }
                },
                "required": ["month", "day"],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "The customer's birthday, if one has been provided. Depending on how the program is configured, the `year` may or may not be included",
            "example": { "month": 6, "day": 25 }
          },
          "next_birthday": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
              },
              { "type": "null" }
            ],
            "description": "If the customer has provided their birthday, this will be an `ISO 8601` timestamp representing the date of their next (upcoming) birthday",
            "example": "2025-06-25"
          },
          "claimed_rewards": {
            "description": "The most recent 20 claimed rewards that belong to this customer. Claimed rewards can include a `redeemable`, which can be used to provide the reward to the customer. For example, voucher-based rewards will include a voucher code that could be displayed to the customer so they can apply it during checkout",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "The ID of the claimed reward resource in LoyaltyLion"
                },
                "claimed_at": {
                  "type": "string",
                  "description": "`ISO 8601` timestamp indicating when this reward was claimed"
                },
                "reward_id": {
                  "type": "number",
                  "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
                },
                "title": {
                  "type": "string",
                  "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                  "example": "$5 voucher"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "approved",
                    "declined",
                    "expired",
                    "pending",
                    "void"
                  ],
                  "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
                },
                "source": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                    },
                    {
                      "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                    },
                    {
                      "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                    }
                  ],
                  "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                      "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                      "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                    }
                  }
                },
                "redeemable": {
                  "description": "The redeemable linked to this claimed reward, if any. If present, the redeemable can usually be used to provide the reward to the customer. For example, it may include a voucher code that can be shown to the customer, or details of a free product that can be added to the customer's cart directly. A free product granted to the customer, rather than redeemed with points, has no redeemable until they add it to their cart on a storefront running the LoyaltyLion SDK, which the Headless API cannot do",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": { "type": "string", "const": "gift_card" },
                        "code_last_characters": {
                          "type": "string",
                          "description": "The last few characters of the gift card code. Note that the full gift card code is only shown once when the gift card reward is redeemed"
                        },
                        "initial_balance": {
                          "type": "object",
                          "properties": {
                            "amount": { "type": "number" },
                            "formatted": { "type": "string" }
                          },
                          "required": ["amount", "formatted"],
                          "additionalProperties": false,
                          "description": "The initial balance of the gift card"
                        },
                        "current_balance": {
                          "type": "object",
                          "properties": {
                            "amount": { "type": "number" },
                            "formatted": { "type": "string" }
                          },
                          "required": ["amount", "formatted"],
                          "additionalProperties": false,
                          "description": "The current balance of the gift card"
                        },
                        "expires_at": {
                          "description": "`ISO 8601` timestamp representing when the gift card will expire, or `null` if it does not expire",
                          "type": ["string", "null"]
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "code_last_characters",
                        "initial_balance",
                        "current_balance",
                        "expires_at"
                      ],
                      "additionalProperties": false,
                      "title": "Gift card",
                      "description": "A gift card that can be used for future orders until its balance runs out"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": {
                          "type": "string",
                          "const": "cart_discount_voucher"
                        },
                        "code": {
                          "type": "string",
                          "description": "The discount voucher code"
                        },
                        "discount_type": {
                          "type": "string",
                          "enum": ["fixed", "percentage"],
                          "description": "The type of discount this voucher will apply to the cart"
                        },
                        "discount": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "amount": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["amount", "formatted"],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "percentage": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["percentage", "formatted"],
                              "additionalProperties": false
                            }
                          ],
                          "description": "The discount that will apply to the cart. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
                        },
                        "applies_to_order_type": {
                          "type": "string",
                          "enum": ["all", "one_time", "subscription"],
                          "description": "The type of order that this voucher will apply to. One of: `all` (applies to all types of order), `one_time` (applies to one-time orders), `subscription` (applies to subscription orders)",
                          "example": "one_time"
                        },
                        "recurring_cycle_limit": {
                          "description": "The number of orders this discount will apply to, for discounts that can apply to subscription orders. If it's `1`, it means the discount will apply only to the first order with which it is used. If `null`, the discount will be applied to any number of orders for as long as it is active",
                          "example": 1,
                          "type": ["number", "null"]
                        },
                        "supports_active_subscriptions": {
                          "description": "Whether or not this discount will also be able to be applied to active subscriptions in Recharge. If true, we will create a Recharge discount in addition to a Shopify discount whenever this reward is claimed.",
                          "type": "boolean"
                        },
                        "minimum_spend": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "amount": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["amount", "formatted"],
                              "additionalProperties": false
                            },
                            { "type": "null" }
                          ],
                          "description": "The minimum spend, if any, for the voucher to apply to the cart",
                          "example": { "amount": 10, "formatted": "$10" }
                        },
                        "expires_at": {
                          "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                          "type": ["string", "null"]
                        },
                        "used_at": {
                          "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                          "type": ["string", "null"]
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "code",
                        "discount_type",
                        "discount",
                        "applies_to_order_type",
                        "recurring_cycle_limit",
                        "minimum_spend",
                        "expires_at",
                        "used_at"
                      ],
                      "additionalProperties": false,
                      "title": "Cart discount voucher",
                      "description": "A discount voucher that applies a reduction to the total cost of an order"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": {
                          "type": "string",
                          "const": "cart_variable_discount_voucher"
                        },
                        "discount": {
                          "type": "object",
                          "properties": {
                            "amount": { "type": "number" },
                            "formatted": { "type": "string" }
                          },
                          "required": ["amount", "formatted"],
                          "additionalProperties": false,
                          "description": "The discount amount that was redeemed"
                        },
                        "code": {
                          "type": "string",
                          "description": "The discount voucher code"
                        },
                        "applies_to_order_type": {
                          "type": "string",
                          "enum": ["all", "one_time", "subscription"],
                          "description": "The type of order that this voucher will apply to. One of: `all` (applies to all types of order), `one_time` (applies to one-time orders), `subscription` (applies to subscription orders)",
                          "example": "one_time"
                        },
                        "expires_at": {
                          "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                          "type": ["string", "null"]
                        },
                        "used_at": {
                          "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                          "type": ["string", "null"]
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "discount",
                        "code",
                        "applies_to_order_type",
                        "expires_at",
                        "used_at"
                      ],
                      "additionalProperties": false,
                      "title": "Cart variable discount",
                      "description": "A variable-amount discount. This is usually a voucher code that was created dynamically based on the number of points the customer redeemed"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": {
                          "type": "string",
                          "const": "product_discount_voucher"
                        },
                        "code": {
                          "type": "string",
                          "description": "The discount voucher code"
                        },
                        "product": {
                          "type": "object",
                          "properties": {
                            "id": { "type": "string" },
                            "image_url": { "type": ["string", "null"] },
                            "variant_id": {
                              "description": "The variant ID to apply the discount to. If `null`, the discount can be applied to all this product's variants",
                              "type": ["string", "null"]
                            }
                          },
                          "required": ["id", "image_url", "variant_id"],
                          "additionalProperties": false,
                          "description": "The product that this discount applies to"
                        },
                        "discount": {
                          "type": "object",
                          "properties": {
                            "percentage": { "type": "number" },
                            "formatted": { "type": "string" }
                          },
                          "required": ["percentage", "formatted"],
                          "additionalProperties": false,
                          "description": "The discount that will apply to the product. Product discounts are always percentage based, so this will be a number from `1-100`"
                        },
                        "expires_at": {
                          "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                          "type": ["string", "null"]
                        },
                        "used_at": {
                          "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                          "type": ["string", "null"]
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "code",
                        "product",
                        "discount",
                        "expires_at",
                        "used_at"
                      ],
                      "additionalProperties": false,
                      "title": "Product discount voucher",
                      "description": "A discount voucher that applies a reduction to a specific product"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": {
                          "type": "string",
                          "const": "free_shipping_voucher"
                        },
                        "code": {
                          "type": "string",
                          "description": "The discount voucher code"
                        },
                        "max_shipping": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "amount": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["amount", "formatted"],
                              "additionalProperties": false
                            },
                            { "type": "null" }
                          ],
                          "description": "Free shipping will only be applied if the shipping rate is equal to or less than this amount, or `null` if there is no maximum"
                        },
                        "expires_at": {
                          "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                          "type": ["string", "null"]
                        },
                        "used_at": {
                          "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                          "type": ["string", "null"]
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "code",
                        "max_shipping",
                        "expires_at",
                        "used_at"
                      ],
                      "additionalProperties": false,
                      "title": "Free shipping voucher",
                      "description": "A voucher that applies free shipping to an order"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": {
                          "type": "string",
                          "const": "collection_discount_voucher"
                        },
                        "code": {
                          "type": "string",
                          "description": "The discount voucher code"
                        },
                        "collection": {
                          "type": "object",
                          "properties": {
                            "id": { "type": "string" },
                            "title": { "type": ["string", "null"] },
                            "url": { "type": ["string", "null"] }
                          },
                          "required": ["id", "title", "url"],
                          "additionalProperties": false,
                          "description": "The collection that this discount applies to"
                        },
                        "discount_type": {
                          "type": "string",
                          "enum": ["fixed", "percentage"],
                          "description": "The type of discount this voucher will apply to items in the collection"
                        },
                        "discount": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "amount": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["amount", "formatted"],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "percentage": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["percentage", "formatted"],
                              "additionalProperties": false
                            }
                          ],
                          "description": "The discount that will apply to items in the collection. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
                        },
                        "minimum_spend": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "amount": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["amount", "formatted"],
                              "additionalProperties": false
                            },
                            { "type": "null" }
                          ],
                          "description": "The minimum spend, if any, for the voucher to apply to the cart",
                          "example": { "amount": 10, "formatted": "$10" }
                        },
                        "expires_at": {
                          "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                          "type": ["string", "null"]
                        },
                        "used_at": {
                          "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                          "type": ["string", "null"]
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "code",
                        "collection",
                        "discount_type",
                        "discount",
                        "minimum_spend",
                        "expires_at",
                        "used_at"
                      ],
                      "additionalProperties": false,
                      "title": "Collection discount voucher",
                      "description": "A discount voucher that applies a reduction to a specific collection"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": {
                          "type": "string",
                          "const": "active_subscription_discount_voucher"
                        },
                        "code": {
                          "type": "string",
                          "description": "The discount voucher code"
                        },
                        "discount_type": {
                          "type": "string",
                          "enum": ["fixed", "percentage"],
                          "description": "The type of discount this voucher will apply to next order"
                        },
                        "discount": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "amount": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["amount", "formatted"],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "percentage": { "type": "number" },
                                "formatted": { "type": "string" }
                              },
                              "required": ["percentage", "formatted"],
                              "additionalProperties": false
                            }
                          ],
                          "description": "The discount that will apply to the next order. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
                        },
                        "recurring_cycle_limit": {
                          "description": "The number of recurring orders this discount will apply to. If `null`, the discount will be applied to any number of orders for as long as it is active",
                          "type": ["number", "null"]
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "code",
                        "discount_type",
                        "discount",
                        "recurring_cycle_limit"
                      ],
                      "additionalProperties": false,
                      "title": "Active subscription discount voucher",
                      "description": "A discount voucher that applies a reduction to upcoming orders for an active subscription"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": {
                          "type": "string",
                          "const": "active_subscription_product"
                        },
                        "product": {
                          "type": "object",
                          "properties": {
                            "id": { "type": "string" },
                            "handle": { "type": ["string", "null"] },
                            "title": { "type": ["string", "null"] },
                            "url": { "type": ["string", "null"] },
                            "image_url": { "type": ["string", "null"] },
                            "variant": {
                              "type": "object",
                              "properties": {
                                "id": { "type": "string" },
                                "title": { "type": ["string", "null"] },
                                "inventory_count": {
                                  "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                                  "type": ["integer", "null"]
                                }
                              },
                              "required": ["id", "title", "inventory_count"],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "handle",
                            "title",
                            "url",
                            "image_url",
                            "variant"
                          ],
                          "additionalProperties": false,
                          "description": "The product and variant that will be included in the next subscription"
                        },
                        "quantity": {
                          "type": "number",
                          "description": "The quantity of the product that will be included in the next subscription"
                        },
                        "subscription_details": {
                          "oneOf": [
                            {
                              "$ref": "#/components/schemas/ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge"
                            }
                          ],
                          "type": "object",
                          "discriminator": {
                            "propertyName": "kind",
                            "mapping": {
                              "recharge": "#/components/schemas/ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge"
                            }
                          }
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "product",
                        "quantity",
                        "subscription_details"
                      ],
                      "additionalProperties": false,
                      "title": "Active subscription product",
                      "description": "A free product that will be included in the next shipment of an active subscription"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": { "type": "string", "const": "product_cart" },
                        "product": {
                          "type": "object",
                          "properties": {
                            "id": { "type": "string" },
                            "handle": { "type": ["string", "null"] },
                            "title": { "type": ["string", "null"] },
                            "url": { "type": ["string", "null"] },
                            "image_url": { "type": ["string", "null"] },
                            "variant": {
                              "type": "object",
                              "properties": {
                                "id": { "type": "string" },
                                "title": { "type": ["string", "null"] },
                                "inventory_count": {
                                  "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                                  "type": ["integer", "null"]
                                }
                              },
                              "required": ["id", "title", "inventory_count"],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "id",
                            "handle",
                            "title",
                            "url",
                            "image_url",
                            "variant"
                          ],
                          "additionalProperties": false,
                          "description": "The product and variant that should be added to the cart"
                        },
                        "quantity": {
                          "type": "number",
                          "description": "The quantity of the product that should be added to the cart"
                        },
                        "used_at": {
                          "description": "`ISO 8601` timestamp representing when the product was used in an order, or `null` if not yet used",
                          "type": ["string", "null"]
                        },
                        "cart_line_identifier": {
                          "type": "string",
                          "description": "The unique cart line identifier, which connects this redemption to the line item in the eventual completed order. For Shopify, this identifier is used as the value of the `__lion_sfp_id` attribute on the cart line when the product is added to the cart"
                        },
                        "grant": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "expires_at": {
                                  "description": "`ISO 8601` timestamp of the deadline the grant had for adding the product to the cart, or `null` if the grant had no deadline",
                                  "type": ["string", "null"]
                                }
                              },
                              "required": ["expires_at"],
                              "additionalProperties": false
                            },
                            { "type": "null" }
                          ],
                          "description": "Present when the customer was granted this product and has since added it to their cart. `null` for a product the customer redeemed with points or claimed directly"
                        },
                        "active_cart_redemption": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "The unique ID of this cart redemption. This ID needs to be attached to the cart line when the product is added to the cart. For Shopify, this is used as the value of the `__lion_sfp_id` attribute on the cart line"
                                },
                                "claimed_reward_id": {
                                  "type": "number",
                                  "description": "The ID of the claimed reward that this cart redemption is associated with"
                                },
                                "expires_at": {
                                  "type": "string",
                                  "description": "`ISO 8601` timestamp representing when this cart redemption will expire if it has not been checked out, at which point any associated points will be returned to the customer"
                                },
                                "product": {
                                  "type": "object",
                                  "properties": {
                                    "id": { "type": "string" },
                                    "handle": { "type": ["string", "null"] },
                                    "title": { "type": ["string", "null"] },
                                    "url": { "type": ["string", "null"] },
                                    "image_url": { "type": ["string", "null"] },
                                    "variant": {
                                      "type": "object",
                                      "properties": {
                                        "id": { "type": "string" },
                                        "title": { "type": ["string", "null"] },
                                        "inventory_count": {
                                          "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                                          "type": ["integer", "null"]
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "title",
                                        "inventory_count"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "handle",
                                    "title",
                                    "url",
                                    "image_url",
                                    "variant"
                                  ],
                                  "additionalProperties": false,
                                  "description": "The product and variant that this cart redemption is for"
                                },
                                "quantity": {
                                  "type": "number",
                                  "description": "The quantity of the line item in this cart redemption"
                                },
                                "cart_id": {
                                  "type": "string",
                                  "description": "The ID of the cart for which this cart redemption was initially redeemed"
                                },
                                "cart_line": {
                                  "oneOf": [
                                    {
                                      "$ref": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                                    }
                                  ],
                                  "type": "object",
                                  "discriminator": {
                                    "propertyName": "kind",
                                    "mapping": {
                                      "shopify": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                                    }
                                  }
                                },
                                "current_cart_state": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "in_cart": {
                                          "type": "boolean",
                                          "description": "Indicates if the redemption is currently in the cart"
                                        },
                                        "cart_requirements_met": {
                                          "type": "boolean",
                                          "description": "Indicates if all this redemption's requirements are currently met by the cart, such as a required minimum cart total or number of line items"
                                        },
                                        "cart_requirements_detail": {
                                          "type": "object",
                                          "properties": {
                                            "minimum_cart_total": {
                                              "oneOf": [
                                                {
                                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement"
                                                },
                                                {
                                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet"
                                                },
                                                {
                                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                                }
                                              ],
                                              "type": "object",
                                              "discriminator": {
                                                "propertyName": "state",
                                                "mapping": {
                                                  "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement",
                                                  "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet",
                                                  "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                                }
                                              }
                                            },
                                            "minimum_line_item_quantity": {
                                              "oneOf": [
                                                {
                                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement"
                                                },
                                                {
                                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet"
                                                },
                                                {
                                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                                }
                                              ],
                                              "type": "object",
                                              "discriminator": {
                                                "propertyName": "state",
                                                "mapping": {
                                                  "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement",
                                                  "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet",
                                                  "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                                }
                                              }
                                            }
                                          },
                                          "required": [
                                            "minimum_cart_total",
                                            "minimum_line_item_quantity"
                                          ],
                                          "additionalProperties": false
                                        }
                                      },
                                      "required": [
                                        "in_cart",
                                        "cart_requirements_met",
                                        "cart_requirements_detail"
                                      ],
                                      "additionalProperties": false
                                    },
                                    { "type": "null" }
                                  ],
                                  "description": "If this request included a serialized `cart` object whose `id` matches the `cart_id` of this redemption, this object includes information about this redemption's state in the current cart. It will be `null` if the request did not include a serialized cart or its `id` does not match"
                                }
                              },
                              "required": [
                                "id",
                                "claimed_reward_id",
                                "expires_at",
                                "product",
                                "quantity",
                                "cart_id",
                                "cart_line",
                                "current_cart_state"
                              ],
                              "additionalProperties": false
                            },
                            { "type": "null" }
                          ],
                          "description": "The active cart redemption associated with this product reward, if any. A product reward will have an active cart redemption if it has been redeemed and has not yet been checked out with an order, or expired"
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "product",
                        "quantity",
                        "used_at",
                        "cart_line_identifier",
                        "grant",
                        "active_cart_redemption"
                      ],
                      "additionalProperties": false,
                      "title": "Product cart",
                      "description": "A free product that can be added to the customer's cart"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "usage_status": {
                          "type": "string",
                          "enum": ["not_used", "partially_used", "used"],
                          "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                        },
                        "kind": { "type": "string", "const": "custom" },
                        "fulfilment_explanation": {
                          "description": "Optional fulfillment explanation as a short, plaintext string. If present, this will explain to the customer how and when the reward will be fulfilled",
                          "type": ["string", "null"]
                        },
                        "fulfilled_at": {
                          "description": "`ISO 8601` timestamp representing when this custom redeemable was fulfilled, or `null` if it is not yet fulfilled",
                          "type": ["string", "null"]
                        },
                        "code": {
                          "description": "The voucher code issued to the customer. Present only for custom rewards that issue codes from a merchant-uploaded pool; absent for other custom rewards (e.g. those fulfilled manually or by webhook).",
                          "type": "string"
                        }
                      },
                      "required": [
                        "usage_status",
                        "kind",
                        "fulfilment_explanation",
                        "fulfilled_at"
                      ],
                      "additionalProperties": false,
                      "title": "Custom",
                      "description": "A custom redemption that is fulfilled by the merchant manually or using a webhook, or with a voucher code issued from a merchant-uploaded pool"
                    }
                  ]
                },
                "auto_refund_at": {
                  "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                  "type": ["string", "null"]
                }
              },
              "required": [
                "id",
                "claimed_at",
                "reward_id",
                "title",
                "state",
                "source",
                "auto_refund_at"
              ],
              "additionalProperties": false
            }
          },
          "available_rewards": {
            "description": "A list of rewards that are enabled for this customer, based on their tier. This is the same as the list of rewards returned from [Get Configuration](/headless-api/2025-06/configuration/get-configuration), with a few differences:\n\n- instead of `variants`, each reward will have a `variant` property, which represents the applicable variant for this customer based on their tier. If there is no applicable enabled variant, the reward will not be included in this list, e.g. if it's disabled for the customer's current tier\n- each reward will have a `context` property, which includes information about the reward specific to this customer, such as the number of times they have claimed it, and if any limit is in effect. The `can_redeem` property is a quick way to determine if the customer is able to redeem the reward\n\nNote that the inclusion of a reward here does not mean it the customer can redeem it: they must have enough points, and it must not have reached its claim limit. You can determine this yourself, or use the `context.can_redeem` property",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardGiftCard"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardCartDiscountVoucher"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardCartVariableDiscountVoucher"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardFreeShippingVoucher"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardProductDiscountVoucher"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardCollectionDiscountVoucher"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardProductCart"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardActiveSubscriptionDiscountVoucher"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRewardActiveSubscriptionProduct"
                },
                { "$ref": "#/components/schemas/CustomerAvailableRewardCustom" }
              ],
              "type": "object",
              "discriminator": {
                "propertyName": "kind",
                "mapping": {
                  "gift_card": "#/components/schemas/CustomerAvailableRewardGiftCard",
                  "cart_discount_voucher": "#/components/schemas/CustomerAvailableRewardCartDiscountVoucher",
                  "cart_variable_discount_voucher": "#/components/schemas/CustomerAvailableRewardCartVariableDiscountVoucher",
                  "free_shipping_voucher": "#/components/schemas/CustomerAvailableRewardFreeShippingVoucher",
                  "product_discount_voucher": "#/components/schemas/CustomerAvailableRewardProductDiscountVoucher",
                  "collection_discount_voucher": "#/components/schemas/CustomerAvailableRewardCollectionDiscountVoucher",
                  "product_cart": "#/components/schemas/CustomerAvailableRewardProductCart",
                  "active_subscription_discount_voucher": "#/components/schemas/CustomerAvailableRewardActiveSubscriptionDiscountVoucher",
                  "active_subscription_product": "#/components/schemas/CustomerAvailableRewardActiveSubscriptionProduct",
                  "custom": "#/components/schemas/CustomerAvailableRewardCustom"
                }
              }
            }
          },
          "available_rules": {
            "description": "A list of rules that are enabled for this customer, based on their tier. This is the same as the list of rules returned from [Get Configuration](/headless-api/2025-06/configuration/get-configuration), with a few differences:\n\n- instead of `variants`, each rule will have a `variant` property, which represents the applicable variant for this customer based on their tier. If there is no applicable enabled variant, the rule will not be included in this list, e.g. if it's disabled for the customer's current tier\n- each rule will have a `context` property, which includes information about this customer's interaction with the rule, such as the number of times they have completed it, and if any limit is in effect",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleBirthday"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleLoyaltyPassInstall"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleCollectionPurchase"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleNewsletterSignup"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRulePageview"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleProductPurchase"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRulePurchase"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleJoinProgram"
                },
                { "$ref": "#/components/schemas/CustomerAvailableRuleReview" },
                { "$ref": "#/components/schemas/CustomerAvailableRuleCustom" },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleFacebookLike"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleTwitterFollow"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleInstagramFollow"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleInstagramMention"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleInstagramPostHashtag"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleTiktokFollow"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleTiktokPostHashtag"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleReferral"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleClickthrough"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleRetailPurchase"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleSubtotalLink"
                },
                {
                  "$ref": "#/components/schemas/CustomerAvailableRuleSubtotalPurchase"
                }
              ],
              "type": "object",
              "discriminator": {
                "propertyName": "kind",
                "mapping": {
                  "birthday": "#/components/schemas/CustomerAvailableRuleBirthday",
                  "loyalty_pass_install": "#/components/schemas/CustomerAvailableRuleLoyaltyPassInstall",
                  "collection_purchase": "#/components/schemas/CustomerAvailableRuleCollectionPurchase",
                  "newsletter_signup": "#/components/schemas/CustomerAvailableRuleNewsletterSignup",
                  "pageview": "#/components/schemas/CustomerAvailableRulePageview",
                  "product_purchase": "#/components/schemas/CustomerAvailableRuleProductPurchase",
                  "purchase": "#/components/schemas/CustomerAvailableRulePurchase",
                  "join_program": "#/components/schemas/CustomerAvailableRuleJoinProgram",
                  "review": "#/components/schemas/CustomerAvailableRuleReview",
                  "custom": "#/components/schemas/CustomerAvailableRuleCustom",
                  "facebook_like": "#/components/schemas/CustomerAvailableRuleFacebookLike",
                  "twitter_follow": "#/components/schemas/CustomerAvailableRuleTwitterFollow",
                  "instagram_follow": "#/components/schemas/CustomerAvailableRuleInstagramFollow",
                  "instagram_mention": "#/components/schemas/CustomerAvailableRuleInstagramMention",
                  "instagram_post_hashtag": "#/components/schemas/CustomerAvailableRuleInstagramPostHashtag",
                  "tiktok_follow": "#/components/schemas/CustomerAvailableRuleTiktokFollow",
                  "tiktok_post_hashtag": "#/components/schemas/CustomerAvailableRuleTiktokPostHashtag",
                  "referral": "#/components/schemas/CustomerAvailableRuleReferral",
                  "clickthrough": "#/components/schemas/CustomerAvailableRuleClickthrough",
                  "retail_purchase": "#/components/schemas/CustomerAvailableRuleRetailPurchase",
                  "subtotal_link": "#/components/schemas/CustomerAvailableRuleSubtotalLink",
                  "subtotal_purchase": "#/components/schemas/CustomerAvailableRuleSubtotalPurchase"
                }
              }
            }
          },
          "history": {
            "description": "A list of the most recent actions that have occurred for this customer, such as earning points, redeeming rewards, and joining tiers. This list is sorted by date with the most recent actions at the beginning.\n\nHistory actions are not the same as _transactions_. A single action may cover multiple transactions. For example, if points are added and then later voided, it will be represented by a single action whose state will initially be `approved`, and then later change to `void`. This keeps the customer's history concise whilst still showing the key information.",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionRedeemedPointsForReward"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionPointsAdded"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionPointsRemoved"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionPointsExpired"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEnteredTier"
                }
              ],
              "type": "object",
              "discriminator": {
                "propertyName": "kind",
                "mapping": {
                  "earned_points_from_rule": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule",
                  "redeemed_points_for_reward": "#/components/schemas/CustomerHistoryActionRedeemedPointsForReward",
                  "received_reward": "#/components/schemas/CustomerHistoryActionReceivedReward",
                  "points_added": "#/components/schemas/CustomerHistoryActionPointsAdded",
                  "points_removed": "#/components/schemas/CustomerHistoryActionPointsRemoved",
                  "points_expired": "#/components/schemas/CustomerHistoryActionPointsExpired",
                  "entered_tier": "#/components/schemas/CustomerHistoryActionEnteredTier"
                }
              }
            }
          },
          "active_cart_redemptions": {
            "description": "A list of active cart redemptions. When a `product_cart` reward is redeemed by the customer, a new active cart redemption is created. This will persist until it expires or the completes the order",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The unique ID of this cart redemption. This ID needs to be attached to the cart line when the product is added to the cart. For Shopify, this is used as the value of the `__lion_sfp_id` attribute on the cart line"
                },
                "claimed_reward_id": {
                  "type": "number",
                  "description": "The ID of the claimed reward that this cart redemption is associated with"
                },
                "expires_at": {
                  "type": "string",
                  "description": "`ISO 8601` timestamp representing when this cart redemption will expire if it has not been checked out, at which point any associated points will be returned to the customer"
                },
                "product": {
                  "type": "object",
                  "properties": {
                    "id": { "type": "string" },
                    "handle": { "type": ["string", "null"] },
                    "title": { "type": ["string", "null"] },
                    "url": { "type": ["string", "null"] },
                    "image_url": { "type": ["string", "null"] },
                    "variant": {
                      "type": "object",
                      "properties": {
                        "id": { "type": "string" },
                        "title": { "type": ["string", "null"] },
                        "inventory_count": {
                          "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                          "type": ["integer", "null"]
                        }
                      },
                      "required": ["id", "title", "inventory_count"],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "handle",
                    "title",
                    "url",
                    "image_url",
                    "variant"
                  ],
                  "additionalProperties": false,
                  "description": "The product and variant that this cart redemption is for"
                },
                "quantity": {
                  "type": "number",
                  "description": "The quantity of the line item in this cart redemption"
                },
                "cart_id": {
                  "type": "string",
                  "description": "The ID of the cart for which this cart redemption was initially redeemed"
                },
                "cart_line": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                    }
                  ],
                  "type": "object",
                  "discriminator": {
                    "propertyName": "kind",
                    "mapping": {
                      "shopify": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                    }
                  }
                },
                "current_cart_state": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "in_cart": {
                          "type": "boolean",
                          "description": "Indicates if the redemption is currently in the cart"
                        },
                        "cart_requirements_met": {
                          "type": "boolean",
                          "description": "Indicates if all this redemption's requirements are currently met by the cart, such as a required minimum cart total or number of line items"
                        },
                        "cart_requirements_detail": {
                          "type": "object",
                          "properties": {
                            "minimum_cart_total": {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement"
                                },
                                {
                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet"
                                },
                                {
                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                }
                              ],
                              "type": "object",
                              "discriminator": {
                                "propertyName": "state",
                                "mapping": {
                                  "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement",
                                  "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet",
                                  "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                }
                              }
                            },
                            "minimum_line_item_quantity": {
                              "oneOf": [
                                {
                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement"
                                },
                                {
                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet"
                                },
                                {
                                  "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                }
                              ],
                              "type": "object",
                              "discriminator": {
                                "propertyName": "state",
                                "mapping": {
                                  "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement",
                                  "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet",
                                  "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                }
                              }
                            }
                          },
                          "required": [
                            "minimum_cart_total",
                            "minimum_line_item_quantity"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "in_cart",
                        "cart_requirements_met",
                        "cart_requirements_detail"
                      ],
                      "additionalProperties": false
                    },
                    { "type": "null" }
                  ],
                  "description": "If this request included a serialized `cart` object whose `id` matches the `cart_id` of this redemption, this object includes information about this redemption's state in the current cart. It will be `null` if the request did not include a serialized cart or its `id` does not match"
                }
              },
              "required": [
                "id",
                "claimed_reward_id",
                "expires_at",
                "product",
                "quantity",
                "cart_id",
                "cart_line",
                "current_cart_state"
              ],
              "additionalProperties": false
            }
          },
          "email_marketing_consent": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": ["subscribed", "not_subscribed", "unknown"],
                "description": "The state of the customer's email marketing consent. This is not guaranteed to be up to date, as LoyaltyLion relies on receiving changes for this value from your email marketing provider or ecommerce platform. Therefore, it should not be used as the source of truth for sending emails to this customer.\n\nIf we have no information about the customer's email marketing consent, it will be `unknown`."
              }
            },
            "required": ["state"],
            "additionalProperties": false
          },
          "sms_marketing_consent": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": ["subscribed", "not_subscribed", "unknown"],
                "description": "The state of the customer's SMS marketing consent. This is not guaranteed to be up to date, as LoyaltyLion relies on receiving changes for this value from your SMS marketing provider or ecommerce platform. Therefore, it should not be used as the source of truth for sending SMS to this customer.\n\nIf we have no information about the customer's SMS marketing consent, it will be `unknown`."
              }
            },
            "required": ["state"],
            "additionalProperties": false
          },
          "receipt_upload_url": {
            "description": "A URL that the customer can visit to upload a receipt for the retail purchase rule. Will be `null` if the retail purchase rule is not enabled for this program",
            "type": ["string", "null"]
          },
          "loyalty_pass_url": {
            "description": "A personal link that installs this customer's loyalty pass in Apple Wallet or Google Wallet, with no email entry or login. It identifies this customer only, so only show it to them. Will be `null` if the customer has no email address or the program's loyalty pass isn't live",
            "type": ["string", "null"]
          },
          "referral_urls": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "direct": {
                    "type": "string",
                    "description": "A generic referral link that is not associated with any particular platform"
                  },
                  "facebook": {
                    "type": "string",
                    "description": "A referral link intended for sharing on Facebook"
                  },
                  "twitter": {
                    "type": "string",
                    "description": "A referral link intended for sharing on Twitter"
                  },
                  "email": {
                    "type": "string",
                    "description": "A referral link intended for sharing via email"
                  },
                  "whatsapp": {
                    "type": "string",
                    "description": "A referral link intended for sharing via WhatsApp"
                  },
                  "instagram": {
                    "type": "string",
                    "description": "A referral link intended for sharing on Instagram"
                  },
                  "device_share": {
                    "type": "string",
                    "description": "A referral link intended for sharing via a mobile device share prompt"
                  }
                },
                "required": [
                  "direct",
                  "facebook",
                  "twitter",
                  "email",
                  "whatsapp",
                  "instagram",
                  "device_share"
                ],
                "additionalProperties": false
              },
              { "type": "null" }
            ],
            "description": "Referral URLs for different platforms, unique to this customer, or `null` if referrals are not enabled. Each URL has the same referral functionality, but will result in the referral being tracked for its platform. If unsure, use the `direct` URL for a generic link"
          }
        },
        "required": [
          "state",
          "id",
          "merchant_id",
          "email",
          "phone",
          "first_name",
          "last_name",
          "points_approved",
          "points_pending",
          "points_spent",
          "enrolled_at",
          "tier_membership",
          "birthday",
          "next_birthday",
          "claimed_rewards",
          "available_rewards",
          "available_rules",
          "history",
          "active_cart_redemptions",
          "email_marketing_consent",
          "sms_marketing_consent",
          "receipt_upload_url",
          "loyalty_pass_url",
          "referral_urls"
        ],
        "additionalProperties": false
      },
      "CustomerGuest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "The ID of the customer in LoyaltyLion"
          },
          "merchant_id": {
            "type": "string",
            "description": "The ID of the customer in your platform or ecommerce store"
          },
          "email": {
            "description": "The email address of the customer. May be `null`, e.g. for POS customers who have never provided an email address",
            "type": ["string", "null"]
          },
          "phone": {
            "description": "The customer's phone number in E.164 format, or `null` if we don't have one",
            "example": "+447700900123",
            "type": ["string", "null"]
          },
          "first_name": {
            "description": "The first name of the customer, if available",
            "type": ["string", "null"]
          },
          "last_name": {
            "description": "The last name of the customer, if available",
            "type": ["string", "null"]
          },
          "state": { "type": "string", "const": "guest" }
        },
        "required": [
          "id",
          "merchant_id",
          "email",
          "phone",
          "first_name",
          "last_name",
          "state"
        ],
        "additionalProperties": false
      },
      "CustomerBlocked": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "The ID of the customer in LoyaltyLion"
          },
          "merchant_id": {
            "type": "string",
            "description": "The ID of the customer in your platform or ecommerce store"
          },
          "email": {
            "description": "The email address of the customer. May be `null`, e.g. for POS customers who have never provided an email address",
            "type": ["string", "null"]
          },
          "phone": {
            "description": "The customer's phone number in E.164 format, or `null` if we don't have one",
            "example": "+447700900123",
            "type": ["string", "null"]
          },
          "first_name": {
            "description": "The first name of the customer, if available",
            "type": ["string", "null"]
          },
          "last_name": {
            "description": "The last name of the customer, if available",
            "type": ["string", "null"]
          },
          "state": { "type": "string", "const": "blocked" }
        },
        "required": [
          "id",
          "merchant_id",
          "email",
          "phone",
          "first_name",
          "last_name",
          "state"
        ],
        "additionalProperties": false
      },
      "CustomersGetCustomerResponseBody": {
        "type": "object",
        "properties": {
          "channel": {
            "description": "The sales channel for which this response was generated",
            "$ref": "#/components/schemas/SupportedChannel"
          },
          "currency": {
            "type": "string",
            "description": "`ISO 4217` code indicating the currency for any financial values in this response",
            "example": "usd"
          },
          "language": {
            "description": "`ISO 639-1` code indicating the language used for any text in this response"
          },
          "customer": {
            "oneOf": [
              {
                "title": "Enrolled customer",
                "$ref": "#/components/schemas/CustomerEnrolled"
              },
              {
                "title": "Guest customer",
                "$ref": "#/components/schemas/CustomerGuest"
              },
              {
                "title": "Blocked customer",
                "$ref": "#/components/schemas/CustomerBlocked"
              }
            ],
            "description": "The customer matched by `merchant_id`. The customer's `state` property indicates if the customer is a member of the program (`enrolled`), not a member (`guest`), or has been blocked from the program (`blocked`)",
            "type": "object",
            "discriminator": {
              "propertyName": "state",
              "mapping": {
                "enrolled": "#/components/schemas/CustomerEnrolled",
                "guest": "#/components/schemas/CustomerGuest",
                "blocked": "#/components/schemas/CustomerBlocked"
              }
            }
          },
          "configuration": {
            "description": "The complete program configuration. This is the same configuration that is returned by the [Get Configuration](/headless-api/2025-06/configuration/get-configuration) endpoint",
            "$ref": "#/components/schemas/SiteConfiguration"
          }
        },
        "required": [
          "channel",
          "currency",
          "language",
          "customer",
          "configuration"
        ],
        "additionalProperties": false,
        "example": {
          "channel": "web",
          "currency": "usd",
          "language": "en",
          "customer": {
            "state": "enrolled",
            "id": 1,
            "merchant_id": "1001",
            "email": "alice@example.com",
            "phone": "+447700900123",
            "first_name": "Alice",
            "last_name": "Kyako",
            "points_approved": 500,
            "points_pending": 200,
            "points_spent": 500,
            "enrolled_at": "2025-06-01T15:00:00Z",
            "tier_membership": {
              "tier_id": 1,
              "started_at": "2025-06-01T15:00:00Z",
              "expires_at": "2026-06-01T15:00:00Z",
              "progress": {
                "kind": "spend",
                "tier_spend": {
                  "now": { "amount": 200, "formatted": "$200" },
                  "at_expiration": { "amount": 100, "formatted": "$100" }
                },
                "valid_until": "2026-06-01T15:00:00Z",
                "upgrade_tier_id": 2,
                "spend_needed_for_renewal": null,
                "spend_needed_for_upgrade": {
                  "amount": 800,
                  "formatted": "$800"
                },
                "forecasted_tier_id": 1
              }
            },
            "birthday": { "day": 22, "month": 6 },
            "next_birthday": "2026-06-22",
            "claimed_rewards": [
              {
                "id": 1,
                "claimed_at": "2025-06-03T00:00:00Z",
                "auto_refund_at": null,
                "reward_id": 1,
                "title": "$5 discount",
                "state": "approved",
                "source": { "kind": "points_redemption", "points_cost": 500 },
                "redeemable": {
                  "kind": "cart_discount_voucher",
                  "applies_to_order_type": "all",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "code": "LL-XAIA8471",
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "minimum_spend": { "amount": 50, "formatted": "$50" },
                  "expires_at": "2026-06-03T00:00:00Z",
                  "used_at": null,
                  "usage_status": "not_used"
                }
              }
            ],
            "available_rules": [
              {
                "id": 1,
                "kind": "pageview",
                "limit": { "count": 5, "interval": "day" },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Visit our online store",
                  "description": null,
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 10
                  },
                  "result_short_text": "10 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 22,
                  "completion_limit": {
                    "state": "limit_not_reached",
                    "interval": "day",
                    "allowed_completions_within_interval": 5,
                    "completion_count_within_interval": 3,
                    "remaining_completions_within_interval": 2
                  }
                }
              },
              {
                "id": 2,
                "kind": "join_program",
                "limit": { "count": 1, "interval": null },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Join our loyalty program",
                  "description": "Sign up and start earning points on every order",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 100
                  },
                  "result_short_text": "100 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T07:44:24.537Z",
                  "completion_count": 1,
                  "completion_limit": { "state": "limit_reached_forever" }
                }
              },
              {
                "id": 3,
                "kind": "purchase",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Make a purchase",
                  "description": "Earn points every time you shop with us",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": 1,
                    "points": 5
                  },
                  "result_short_text": "5 points per $1"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 3,
                  "completion_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 4,
                "kind": "review",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Leave a review",
                  "description": "Tell us what you think of your purchase",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 50
                  },
                  "result_short_text": "50 points",
                  "requirements": [
                    {
                      "kind": "text_length",
                      "min_length": 50,
                      "text": "Review must be at least 50 characters"
                    }
                  ],
                  "modifiers": [
                    {
                      "kind": "includes_photo",
                      "min_count": 1,
                      "bonus": {
                        "kind": "per_count",
                        "points": 10,
                        "max_points": 30
                      },
                      "text": "Include photos for 10 bonus points per photo (up to 30)"
                    },
                    {
                      "kind": "text_length",
                      "min_length": 200,
                      "bonus": { "kind": "fixed", "points": 10 },
                      "text": "Write at least 200 characters for 10 bonus points"
                    }
                  ]
                },
                "context": {
                  "last_completed_at": null,
                  "completion_count": 0,
                  "completion_limit": { "state": "no_limit" }
                }
              }
            ],
            "available_rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "$5 discount",
                  "description": "Spend your points on $5 off your next order",
                  "cost": { "kind": "fixed", "points": 500 },
                  "cost_text": "500 points"
                },
                "context": {
                  "can_redeem": { "state": "redeemable" },
                  "last_claimed_at": "2025-06-03T00:00:00Z",
                  "claim_count": 1,
                  "claim_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 2,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "percentage",
                  "discount": { "percentage": 10, "formatted": "10%" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 50, "formatted": "$50" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "10% discount",
                  "description": null,
                  "cost": { "kind": "fixed", "points": 1000 },
                  "cost_text": "1,000 points"
                },
                "context": {
                  "can_redeem": {
                    "state": "insufficient_points",
                    "additional_points_required": 500
                  },
                  "last_claimed_at": null,
                  "claim_count": 0,
                  "claim_limit": { "state": "no_limit" }
                }
              }
            ],
            "history": [
              {
                "kind": "redeemed_points_for_reward",
                "label": "$5 discount",
                "date": "2025-06-03T15:00:00Z",
                "points": -500,
                "points_text": "-500 points",
                "reward": { "id": 1, "kind": "cart_discount_voucher" },
                "claimed_reward_id": 1,
                "state": "approved"
              },
              {
                "kind": "entered_tier",
                "label": "Entered Silver tier",
                "date": "2025-06-02T15:00:00Z",
                "tier": { "id": 1, "name": "Silver" }
              },
              {
                "kind": "earned_points_from_rule",
                "label": "Joined program",
                "date": "2025-06-01T15:00:00Z",
                "points": 500,
                "points_text": "500 points",
                "points_will_approve_at": null,
                "points_will_expire_at": "2026-06-01T00:00:00Z",
                "state": "approved",
                "rule": { "id": 1, "kind": "join_program" }
              }
            ],
            "active_cart_redemptions": [],
            "email_marketing_consent": { "state": "subscribed" },
            "sms_marketing_consent": { "state": "not_subscribed" },
            "receipt_upload_url": "https://upload.loyaltylion.com/_/_",
            "loyalty_pass_url": "https://passes.loyaltylion.net/loyalty-pass-install/_/c/_",
            "referral_urls": {
              "email": "https://prz.io/_",
              "direct": "https://prz.io/_",
              "facebook": "https://prz.io/_",
              "twitter": "https://prz.io/_",
              "whatsapp": "https://prz.io/_",
              "instagram": "https://prz.io/_",
              "device_share": "https://prz.io/_"
            }
          },
          "configuration": {
            "channel": "web",
            "currency": "usd",
            "language": "en",
            "program": { "name": "Lion Rewards" },
            "tier_configuration": {
              "boundary_mode": "spend",
              "tiers": [
                {
                  "id": 1,
                  "name": "Silver",
                  "benefit_ids": [1],
                  "hidden": false,
                  "kind": "spend",
                  "position": 1,
                  "lower_bound": { "amount": 0, "formatted": "$0" },
                  "upper_bound": { "amount": 99.99, "formatted": "$99.99" }
                },
                {
                  "id": 2,
                  "name": "Gold",
                  "benefit_ids": [1, 2],
                  "hidden": false,
                  "kind": "spend",
                  "position": 2,
                  "lower_bound": { "amount": 100, "formatted": "$100" },
                  "upper_bound": null
                }
              ],
              "tier_benefits": [
                {
                  "id": 1,
                  "label": "Early access to new products",
                  "secret": false,
                  "details": null
                },
                {
                  "id": 2,
                  "label": "Free makeup classes",
                  "secret": false,
                  "details": {
                    "plaintext": "Email classes@example.com to sign up to a class\n",
                    "html": "<p>Email classes@example.com to sign up to a class</p>"
                  }
                }
              ],
              "membership": { "mode": "rolling", "duration_months": 12 }
            },
            "referee_incentive": {
              "minimum_spend": { "amount": 100, "formatted": "$100" },
              "incentive_text": "Get a 10% discount on your order with this code when you spend over $100",
              "kind": "cart_discount_voucher",
              "discount_kind": "percentage",
              "discount": { "percentage": 10, "formatted": "10%" }
            },
            "rules": [
              {
                "id": 1,
                "kind": "purchase",
                "variants": [
                  {
                    "tier_id": 1,
                    "enabled": true,
                    "title": "Make a purchase",
                    "description": "Earn points every time you shop with us",
                    "result": {
                      "kind": "points",
                      "per_currency_unit": 1,
                      "points": 5
                    },
                    "result_short_text": "5 points per $1"
                  },
                  {
                    "tier_id": 2,
                    "enabled": true,
                    "title": "Make a purchase",
                    "description": "Earn points every time you shop with us",
                    "result": {
                      "kind": "points",
                      "per_currency_unit": 1,
                      "points": 10
                    },
                    "result_short_text": "10 points per $1"
                  }
                ],
                "limit": null
              },
              {
                "id": 2,
                "kind": "pageview",
                "variants": [
                  {
                    "tier_id": 1,
                    "enabled": true,
                    "title": "Visit our online store",
                    "description": null,
                    "result": {
                      "kind": "points",
                      "per_currency_unit": null,
                      "points": 100
                    },
                    "result_short_text": "100 points"
                  },
                  {
                    "tier_id": 2,
                    "enabled": true,
                    "title": "Visit our online store",
                    "description": null,
                    "result": {
                      "kind": "points",
                      "per_currency_unit": null,
                      "points": 200
                    },
                    "result_short_text": "200 points"
                  }
                ],
                "limit": { "count": 1, "interval": "week" }
              },
              {
                "id": 3,
                "kind": "review",
                "variants": [
                  {
                    "tier_id": 1,
                    "enabled": true,
                    "title": "Leave a review",
                    "description": "Tell us what you think of your purchase",
                    "result": {
                      "kind": "points",
                      "per_currency_unit": null,
                      "points": 50
                    },
                    "result_short_text": "50 points",
                    "requirements": [
                      {
                        "kind": "text_length",
                        "min_length": 50,
                        "text": "Review must be at least 50 characters"
                      }
                    ],
                    "modifiers": [
                      {
                        "kind": "includes_photo",
                        "min_count": 1,
                        "bonus": {
                          "kind": "per_count",
                          "points": 10,
                          "max_points": 30
                        },
                        "text": "Include photos for 10 bonus points per photo (up to 30)"
                      },
                      {
                        "kind": "text_length",
                        "min_length": 200,
                        "bonus": { "kind": "fixed", "points": 10 },
                        "text": "Write at least 200 characters for 10 bonus points"
                      }
                    ]
                  },
                  {
                    "tier_id": 2,
                    "enabled": true,
                    "title": "Leave a review",
                    "description": "Tell us what you think of your purchase",
                    "result": {
                      "kind": "points",
                      "per_currency_unit": null,
                      "points": 100
                    },
                    "result_short_text": "100 points",
                    "requirements": [
                      {
                        "kind": "text_length",
                        "min_length": 50,
                        "text": "Review must be at least 50 characters"
                      }
                    ],
                    "modifiers": [
                      {
                        "kind": "includes_photo",
                        "min_count": 1,
                        "bonus": {
                          "kind": "per_count",
                          "points": 20,
                          "max_points": 60
                        },
                        "text": "Include photos for 20 bonus points per photo (up to 60)"
                      },
                      {
                        "kind": "text_length",
                        "min_length": 200,
                        "bonus": { "kind": "fixed", "points": 20 },
                        "text": "Write at least 200 characters for 20 bonus points"
                      }
                    ]
                  }
                ],
                "limit": null
              }
            ],
            "rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variants": [
                  {
                    "tier_id": 1,
                    "enabled": true,
                    "title": "$5 discount",
                    "description": "Spend your points on $5 off your next order",
                    "cost": { "kind": "fixed", "points": 500 },
                    "cost_text": "500 points"
                  },
                  {
                    "tier_id": 2,
                    "enabled": true,
                    "title": "$5 discount",
                    "description": "Spend your points on $5 off your next order",
                    "cost": { "kind": "fixed", "points": 400 },
                    "cost_text": "400 points"
                  }
                ],
                "limit": null
              },
              {
                "id": 2,
                "kind": "cart_variable_discount_voucher",
                "properties": {
                  "minimum_discount": { "amount": 1, "formatted": "$1" },
                  "maximum_discount": { "amount": 100, "formatted": "$100" },
                  "applies_to_order_type": "all",
                  "minimum_spend_before_discount": null,
                  "minimum_spend_after_discount": null
                },
                "variants": [
                  {
                    "tier_id": 1,
                    "enabled": false,
                    "title": "Redeem points at checkout",
                    "description": null,
                    "cost": {
                      "kind": "variable",
                      "unit": "discount_amount",
                      "points_per_unit": 100
                    },
                    "cost_text": "100 points per $1"
                  },
                  {
                    "tier_id": 2,
                    "enabled": true,
                    "title": "Redeem points at checkout",
                    "description": null,
                    "cost": {
                      "kind": "variable",
                      "unit": "discount_amount",
                      "points_per_unit": 100
                    },
                    "cost_text": "100 points per $1"
                  }
                ],
                "limit": null
              }
            ]
          }
        }
      },
      "CartEmpty": {
        "type": "object",
        "properties": { "kind": { "type": "string", "const": "empty" } },
        "required": ["kind"],
        "additionalProperties": false,
        "title": "Empty cart",
        "description": "An empty cart. This can be used to quickly indicate a cart that is empty or, for platforms like Shopify, used when a cart does not yet exist because the shopper has not yet added any items to it",
        "example": { "kind": "empty" }
      },
      "CartShopify": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "shopify" },
          "id": {
            "type": "string",
            "description": "The unique ID of the cart, used to find redemptions that are associated with this cart",
            "example": "gid://shopify/Cart/Z2NwLWV1cm"
          },
          "cost": {
            "type": "object",
            "properties": {
              "total_amount": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string",
                    "description": "The total amount for the customer to pay, as a decimal money amount. From `cost.totalAmount.amount` on the [Storefront API Cart object](https://shopify.dev/docs/api/storefront/latest/objects/Cart)",
                    "example": "99.95"
                  },
                  "currency_code": {
                    "type": "string",
                    "description": "The currency for the total amount for the customer to pay. From `cost.totalAmount.currencyCode` on the [Storefront API Cart object](https://shopify.dev/docs/api/storefront/latest/objects/Cart)",
                    "example": "USD"
                  }
                },
                "required": ["amount", "currency_code"],
                "additionalProperties": false
              }
            },
            "required": ["total_amount"],
            "additionalProperties": false
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The ID for the cart line. From `id` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)"
                },
                "quantity": {
                  "type": "number",
                  "description": "The quantity of the merchandise the customer intends to purchase. From `quantity` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)"
                },
                "cost": {
                  "type": "object",
                  "properties": {
                    "total_amount": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string",
                          "description": "The cost of the merchandise, as a decimal money amount. From `cost.totalAmount.amount` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)",
                          "example": "99.95"
                        },
                        "currency_code": {
                          "type": "string",
                          "description": "The currency for the total amount for the customer to pay. From `cost.totalAmount.currencyCode` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)",
                          "example": "USD"
                        }
                      },
                      "required": ["amount", "currency_code"],
                      "additionalProperties": false
                    },
                    "amount_per_quantity": {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "string",
                          "description": "The cost of the merchandise, as a decimal money amount. From `cost.amountPerQuantity.amount` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)",
                          "example": "99.95"
                        },
                        "currency_code": {
                          "type": "string",
                          "description": "The currency for the total amount for the customer to pay. From `cost.amountPerQuantity.currencyCode` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)",
                          "example": "USD"
                        }
                      },
                      "required": ["amount", "currency_code"],
                      "additionalProperties": false
                    }
                  },
                  "required": ["total_amount", "amount_per_quantity"],
                  "additionalProperties": false
                },
                "merchandise": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "The ID of the merchandise. From `merchandise.id` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)",
                      "example": "gid://shopify/ProductVariant/1001"
                    }
                  },
                  "required": ["id"],
                  "additionalProperties": false
                },
                "attributes": {
                  "description": "The attributes associated with the cart line as an array of key-value pairs. From `attributes` on the [Storefront API CartLine object](https://shopify.dev/docs/api/storefront/latest/objects/cartline)",
                  "example": [
                    { "key": "customersFirstOrder", "value": "true" }
                  ],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": { "type": "string" },
                      "value": { "type": ["string", "null"] }
                    },
                    "required": ["key", "value"],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "id",
                "quantity",
                "cost",
                "merchandise",
                "attributes"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": ["kind", "id", "cost", "lines"],
        "additionalProperties": false,
        "title": "Shopify cart",
        "description": "A Shopify Cart",
        "example": {
          "kind": "shopify",
          "id": "gid://shopify/Cart/Z2NwLWV1cm",
          "cost": {
            "total_amount": { "amount": "99.50", "currency_code": "USD" }
          },
          "lines": [
            {
              "id": "gid://shopify/CartLine/735a73a2-666f-4df2-91dc-540bc1b8b9ba",
              "quantity": 2,
              "merchandise": { "id": "gid://shopify/ProductVariant/1001" },
              "cost": {
                "total_amount": { "amount": "99.50", "currency_code": "USD" },
                "amount_per_quantity": {
                  "amount": "49.75",
                  "currency_code": "USD"
                }
              },
              "attributes": [{ "key": "customersFirstOrder", "value": "true" }]
            }
          ]
        }
      },
      "RecommendedCartActionRemoveCartLine": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "remove_cart_line" },
          "reason": {
            "type": "string",
            "enum": [
              "redemption_expired",
              "redemption_cart_requirements_not_met"
            ],
            "description": "An enum indicating the reason the cart line should be removed"
          },
          "cart_line_to_remove": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RecommendedCartActionShopifyCartLine"
              }
            ],
            "description": "Details about the cart line that should be removed from the cart",
            "type": "object",
            "discriminator": {
              "propertyName": "kind",
              "mapping": {
                "shopify": "#/components/schemas/RecommendedCartActionShopifyCartLine"
              }
            }
          },
          "cart_redemption": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of the redemption",
                "example": "A7EB"
              }
            },
            "required": ["id"],
            "additionalProperties": false,
            "description": "Details about the associated cart redemption. Because this cart redemption is no longer active, it won't be included in the `active_cart_redemptions` array in the Customer object"
          }
        },
        "required": [
          "kind",
          "reason",
          "cart_line_to_remove",
          "cart_redemption"
        ],
        "additionalProperties": false,
        "title": "Remove cart line",
        "description": "Remove a cart line, relating to a reward, from the cart. This is usually due to the reward redemption expiring, or no longer meeting cart requirements. Whatever the reason, this redemption is no longer valid and the customer has already been refunded their points, so the associated item should be removed from the cart"
      },
      "RecommendedCartActionShopifyCartLine": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "shopify" },
          "id": {
            "type": "string",
            "description": "The ID of the cart line to be removed",
            "example": "gid://shopify/CartLine/735a73a2-666f-4df2-91dc-540bc1b8b9ba"
          },
          "merchandise_id": {
            "type": "string",
            "description": "The merchandise (variant) ID to be removed from the cart",
            "example": "gid://shopify/ProductVariant/1001"
          },
          "attributes": {
            "description": "The attributes associated with the cart line as an array of key-value pairs",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": { "type": "string" },
                "value": { "type": ["string", "null"] }
              },
              "required": ["key", "value"],
              "additionalProperties": false
            }
          }
        },
        "required": ["kind", "id", "merchandise_id", "attributes"],
        "additionalProperties": false,
        "title": "Shopify cart line"
      },
      "CustomersInitializeSessionResponseBody": {
        "type": "object",
        "properties": {
          "channel": {
            "description": "The sales channel for which this response was generated",
            "$ref": "#/components/schemas/SupportedChannel"
          },
          "currency": {
            "type": "string",
            "description": "`ISO 4217` code indicating the currency for any financial values in this response",
            "example": "usd"
          },
          "language": {
            "description": "`ISO 639-1` code indicating the language used for any text in this response"
          },
          "customer": {
            "oneOf": [
              {
                "title": "Enrolled customer",
                "$ref": "#/components/schemas/CustomerEnrolled"
              },
              {
                "title": "Guest customer",
                "$ref": "#/components/schemas/CustomerGuest"
              },
              {
                "title": "Blocked customer",
                "$ref": "#/components/schemas/CustomerBlocked"
              }
            ],
            "description": "The customer matched by `merchant_id`. The customer's `state` property indicates if the customer is a member of the program (`enrolled`), not a member (`guest`), or has been blocked from the program (`blocked`)",
            "type": "object",
            "discriminator": {
              "propertyName": "state",
              "mapping": {
                "enrolled": "#/components/schemas/CustomerEnrolled",
                "guest": "#/components/schemas/CustomerGuest",
                "blocked": "#/components/schemas/CustomerBlocked"
              }
            }
          },
          "configuration": {
            "description": "The complete program configuration. This is the same configuration that is returned by the [Get Configuration](/headless-api/2025-06/configuration/get-configuration) endpoint",
            "$ref": "#/components/schemas/SiteConfiguration"
          },
          "requested_cart_actions": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/RecommendedCartActionRemoveCartLine"
                }
              ],
              "type": "object",
              "discriminator": {
                "propertyName": "kind",
                "mapping": {
                  "remove_cart_line": "#/components/schemas/RecommendedCartActionRemoveCartLine"
                }
              }
            },
            "description": "If you included a serialized cart with the request, this may contain a list of requested actions to do with the cart, such as removing any reward items that are no longer valid"
          }
        },
        "required": [
          "channel",
          "currency",
          "language",
          "customer",
          "configuration",
          "requested_cart_actions"
        ],
        "additionalProperties": false
      },
      "InitializeSessionErrorEmailAlreadyInUse": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "email_already_in_use" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Email already in use",
        "description": "We attempted to create a customer with the given `merchant_id` and email, but another customer with the same email already exists in LoyaltyLion"
      },
      "InitializeSessionErrorEmailMismatch": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "email_mismatch" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Email mismatch",
        "description": "The request was authenticated with a customer session token and the request body's `customer.email` differs from the token's signed `email` claim. Send the same email the token was signed with"
      },
      "InitializeSessionErrorCustomerDeleted": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_deleted" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer deleted",
        "description": "The customer with the given `merchant_id` or email has been deleted from LoyaltyLion, so a session cannot be initialized for them"
      },
      "InitializeSessionErrorInvalidPhone": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "invalid_phone" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Invalid phone",
        "description": "The request body's `customer.phone` is not in E.164 format. Send `+` followed by 2 to 15 digits, the first of which is not 0, such as `+447700900123`"
      },
      "InitializeSessionErrorPhoneRequiresApiToken": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "phone_requires_api_token" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Phone requires an API token",
        "description": "The request was authenticated with a customer session token and the request body includes `customer.phone`. Send the phone from your server with an API token instead"
      },
      "CustomersInitializeSessionRequestBody": {
        "type": "object",
        "properties": {
          "customer": {
            "type": "object",
            "properties": {
              "email": {
                "type": "string",
                "format": "email",
                "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
                "example": "alice@example.com"
              },
              "phone": {
                "description": "The customer's phone number in E.164 format, starting with `+` and a country code. LoyaltyLion stores it only when this customer has no phone number and no other customer in the program has this one. This endpoint does not use it to identify the customer. Send it only with an API token, not a customer session token",
                "example": "+447700900123",
                "type": "string"
              }
            },
            "required": ["email"],
            "additionalProperties": false,
            "description": "The customer involved in this session. If the customer does not yet exist in LoyaltyLion, they will be created with these properties. With a customer session token the email must match the token's signed `email` claim — the signed claim is what any created customer is created with"
          },
          "session": {
            "description": "Additional information about this session, which can facilitate triggering rules, or improve program analytics",
            "type": "object",
            "properties": {
              "page_url": {
                "description": "The URL of the page the customer is currently viewing. This must be provided to trigger any relevant 'pageview' rules",
                "example": "https://store.example.com/products/100",
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "cart": {
            "description": "If you're using cart-based rewards (like free products), you should provide a serialized version of the current customer cart here. This is used to determine which rewards are eligible for the current cart (taking cart requirements into account), and also to remove and refund any product redemptions that are no longer valid\n\nIf the current cart is empty, or does not yet exist (typical on Shopify, before the the shopper has interacted with the cart), you should pass `{ \"kind\": \"empty\" }` to explicitly indicate an empty cart for the purposes of cart requirements\n\nWhen passing a cart, check the `requested_cart_actions` field in the response for any actions you should perform with the cart, such as removing any reward product lines that are no longer valid",
            "oneOf": [
              { "$ref": "#/components/schemas/CartEmpty" },
              { "$ref": "#/components/schemas/CartShopify" }
            ],
            "type": "object",
            "discriminator": {
              "propertyName": "kind",
              "mapping": {
                "empty": "#/components/schemas/CartEmpty",
                "shopify": "#/components/schemas/CartShopify"
              }
            }
          }
        },
        "required": ["customer"],
        "additionalProperties": false
      },
      "CustomersSetBirthdayResponseBody": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "boolean",
            "description": "A boolean indicating whether the birthday was updated. If the customer already had a birthday set, it will not have been updated and this will be `false`"
          },
          "birthday": {
            "type": "object",
            "properties": {
              "month": { "type": "number", "example": 9 },
              "day": { "type": "number", "example": 20 },
              "year": { "example": 1993, "type": "number" }
            },
            "required": ["month", "day"],
            "additionalProperties": false,
            "description": "The customer's birthday, which will be the provided birthday, or an existing birthday if one was already set. The `year` may not be present if the program has been configured to only save the month and day"
          },
          "customer": {
            "description": "The customer object, updated with the new birthday property if it was changed",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["updated", "birthday", "customer"],
        "additionalProperties": false
      },
      "UpdateCustomerNotEnrolledError": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_not_enrolled" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer not enrolled"
      },
      "UpdateCustomerBlockedError": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_blocked" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer blocked"
      },
      "SetBirthdayErrorInvalidDate": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "invalid_date" },
          "message": { "type": "string" }
        },
        "required": ["code", "message"],
        "additionalProperties": false,
        "title": "Invalid date",
        "description": "The provided birthday was not valid. This may be because an invalid day, month or year was provided, or because the date is in the future"
      },
      "CustomersSetBirthdayRequestBody": {
        "type": "object",
        "properties": {
          "birthday": {
            "type": "object",
            "properties": {
              "month": {
                "type": "number",
                "description": "The customer's birthday month, between 1 and 12",
                "example": 9
              },
              "day": {
                "type": "number",
                "description": "The customer's birthday day, between 1 and 31",
                "example": 20
              },
              "year": {
                "type": "number",
                "description": "The customer's birthday year, between 1900 and the current year. If the program has been configured to only save birthday month and day, the year will be discarded, so you can pass any value",
                "example": 1993
              }
            },
            "required": ["month", "day", "year"],
            "additionalProperties": false,
            "description": "The birthday to set for the customer"
          }
        },
        "required": ["birthday"],
        "additionalProperties": false
      },
      "CustomersEnrollResponseBody": {
        "type": "object",
        "properties": {
          "enrolled": {
            "type": "boolean",
            "description": "A boolean indicating whether this request enrolled the customer. If the customer was already enrolled, this will be `false` and no other state will have changed"
          },
          "customer": {
            "description": "The customer object in its post-enrollment state. If the customer was already enrolled, this represents their existing state",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["enrolled", "customer"],
        "additionalProperties": false
      },
      "EnrollCustomerBlockedError": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_blocked" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer blocked"
      },
      "CustomersEmailMarketingSubscribeResponseBody": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "boolean",
            "description": "A boolean indicating whether the email marketing consent was updated. If the customer was already subscribed, this will be `false`"
          },
          "email_marketing_consent": {
            "type": "object",
            "properties": {
              "state": {
                "type": "string",
                "enum": ["subscribed", "not_subscribed", "unknown"],
                "description": "The state of the customer's email marketing consent. This is not guaranteed to be up to date, as LoyaltyLion relies on receiving changes for this value from your email marketing provider or ecommerce platform. Therefore, it should not be used as the source of truth for sending emails to this customer.\n\nIf we have no information about the customer's email marketing consent, it will be `unknown`."
              }
            },
            "required": ["state"],
            "additionalProperties": false,
            "description": "The customer's email marketing consent as of this subscription request. This will always be `subscribed`, as the request will fail unless we are able to subscribe the customer to email marketing"
          },
          "customer": {
            "description": "The customer object, updated as of the email marketing subscription, i.e. their `email_marketing_consent` will reflect the change. If any rules were triggered as a result of the email marketing subscription, these changes will be reflected too, e.g. new history items, additional points, or new rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          },
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                }
              ]
            },
            "description": "A list of actions that were triggered as a result of the email marketing subscription. For example, if there was an applicable \"subscribe to newsletter\" rule when the customer subscribed, this will include the action that was triggered by the rule"
          }
        },
        "required": [
          "updated",
          "email_marketing_consent",
          "customer",
          "actions"
        ],
        "additionalProperties": false
      },
      "EmailMarketingSubscribeErrorSubscriptionFailed": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "subscription_failed" },
          "message": { "type": "string" }
        },
        "required": ["code", "message"],
        "additionalProperties": false,
        "title": "Subscription failed",
        "description": "We were unable to subscribe the customer to email marketing with your email marketing provider. This may be a transient error, or due to a configuration issue"
      },
      "EmailMarketingSubscribeErrorUnsupportedPlatform": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "unsupported_platform" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Unsupported platform",
        "description": "LoyaltyLion does not support email marketing for your ecommerce platform or marketing provider"
      },
      "ClaimRefereeIncentiveIncentive": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "incentive" },
          "incentive": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "The discount code the shopper redeems at checkout",
                "example": "LL-XYA3816"
              }
            },
            "required": ["code"],
            "additionalProperties": false
          }
        },
        "required": ["kind", "incentive"],
        "additionalProperties": false,
        "description": "The incentive was claimed. Repeating the request with the same `referral_id` and `referee_email` returns the same code. `kind` discriminates this from any further success outcome added later — switch on it rather than assuming a code is present"
      },
      "ClaimRefereeIncentiveErrorRefereeEmailRequired": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "referee_email_required" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Referee email required",
        "description": "The referrer is not enrolled in the program, so a voucher can only be issued once it can be bound to the shopper claiming it. Collect their email address and repeat the request with `referee_email` set — unlike the other codes here, this one is not terminal"
      },
      "ClaimRefereeIncentiveErrorInvalidReferee": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "invalid_referee" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Invalid referee",
        "description": "The shopper identified by `referee_email` cannot claim this referral — they are the referrer, or they are already a member of the program. Referral incentives are for new shoppers"
      },
      "ClaimRefereeIncentiveErrorReferralsNotEnabled": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "referrals_not_enabled" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Referrals not enabled",
        "description": "This site has no active referral rule, so it cannot issue referral incentives"
      },
      "ClaimRefereeIncentiveErrorGuestReferralsDisabled": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "guest_referrals_disabled" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Guest referrals disabled",
        "description": "The `referral_id` belongs to a shopper who is not enrolled in the program, and this site does not have guest referrals enabled. Only an enrolled customer's referral ID can issue an incentive here — turn guest referrals on to also accept referrals from shoppers who have not joined the program"
      },
      "ClaimRefereeIncentiveErrorInvalidReferralId": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "invalid_referral_id" },
          "message": { "type": "string" }
        },
        "required": ["code", "message"],
        "additionalProperties": false,
        "title": "Invalid referral ID",
        "description": "The `referral_id` could not be read, or does not belong to a customer in this program"
      },
      "ClaimRefereeIncentiveErrorReferralCapReached": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "referral_cap_reached" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Referral cap reached",
        "description": "The referrer has hit the referral rule's reward cap, and the rule is configured to stop issuing incentives once that happens"
      },
      "ClaimRefereeIncentiveErrorFraudDetected": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "fraud_detected" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Fraud detected",
        "description": "The program only accepts referrals between distinct IP addresses, and the `ip_address` you supplied matches the referrer's"
      },
      "ClaimRefereeIncentiveErrorNoVouchersAvailable": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "no_vouchers_available" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "No vouchers available",
        "description": "Your program issues referral incentives from a pool of codes you upload, and the pool is empty. Upload more codes to resume issuing incentives"
      },
      "ClaimRefereeIncentiveErrorVoucherAllocationFailed": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "voucher_allocation_failed" },
          "message": { "type": "string" }
        },
        "required": ["code", "message"],
        "additionalProperties": false,
        "title": "Voucher allocation failed",
        "description": "We could not issue a voucher for this referral. The message describes why"
      },
      "ReferralsClaimRefereeIncentiveRequestBody": {
        "type": "object",
        "properties": {
          "referral_id": {
            "type": "string",
            "minLength": 1,
            "description": "The referral the shopper arrived with. This is the value of the `ll_ref_id` query parameter on the URL the referral link redirects to",
            "example": "jRq0X"
          },
          "referee_email": {
            "description": "The email address of the shopper claiming the incentive. Pass it whenever you know it: it binds the voucher to that shopper, and it is what lets us reject a shopper who is referring themselves or who is already a member of the program\n\nIt is only *required* when the referrer is not enrolled in the program. A request that needs it and omits it is rejected with `referee_email_required`, so you can retry with the address once you have collected it",
            "example": "referee@example.com",
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipv4",
                "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
              },
              {
                "type": "string",
                "format": "ipv6",
                "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"
              }
            ],
            "description": "The IP address of the shopper claiming the incentive — the one that reached your server, not your server's own. It is what detects referral fraud when the program restricts referrals to distinct IP addresses, and it is the bucket we would rate-limit an individual shopper on\n\nSend a single address. A forwarded-for list is rejected: take the client entry from it yourself",
            "example": "203.0.113.42"
          },
          "user_agent": {
            "description": "The user agent of the shopper claiming the incentive, recorded alongside the referral for fraud analysis. Send `null` where the caller genuinely has none, such as a native mobile app",
            "type": ["string", "null"]
          }
        },
        "required": ["referral_id", "ip_address", "user_agent"],
        "additionalProperties": false
      },
      "ReferralShareChannel": {
        "type": "string",
        "enum": [
          "direct",
          "facebook",
          "twitter",
          "email",
          "whatsapp",
          "instagram",
          "device_share"
        ],
        "description": "Which of the customer's `referral_urls` was shared. Pass the key you took the link from, not the link itself — we re-derive the referral code from the customer and the channel, so you never have to parse one out of a URL",
        "example": "whatsapp"
      },
      "TrackReferralShareErrorCustomerNotEnrolled": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_not_enrolled" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer not enrolled"
      },
      "TrackReferralShareErrorCustomerBlocked": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_blocked" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer blocked"
      },
      "ReferralsTrackShareRequestBody": {
        "type": "object",
        "properties": {
          "customer_merchant_id": {
            "type": "string",
            "minLength": 1,
            "description": "The ID, in your platform or ecommerce store, of the customer who shared their referral link. For Shopify stores this can be either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID\n\nThis must be a customer whose state is `enrolled`. Shares made with the links a guest referrer is given cannot be recorded",
            "example": "100001"
          },
          "channel": { "$ref": "#/components/schemas/ReferralShareChannel" }
        },
        "required": ["customer_merchant_id", "channel"],
        "additionalProperties": false
      },
      "ReferralsRegisterGuestReferrerResponseBody": {
        "type": "object",
        "properties": {
          "referral_urls": {
            "type": "object",
            "properties": {
              "direct": {
                "type": "string",
                "description": "A generic referral link that is not associated with any particular platform"
              },
              "facebook": {
                "type": "string",
                "description": "A referral link intended for sharing on Facebook"
              },
              "twitter": {
                "type": "string",
                "description": "A referral link intended for sharing on Twitter"
              },
              "email": {
                "type": "string",
                "description": "A referral link intended for sharing via email"
              },
              "whatsapp": {
                "type": "string",
                "description": "A referral link intended for sharing via WhatsApp"
              },
              "instagram": {
                "type": "string",
                "description": "A referral link intended for sharing on Instagram"
              },
              "device_share": {
                "type": "string",
                "description": "A referral link intended for sharing via a mobile device share prompt"
              }
            },
            "required": [
              "direct",
              "facebook",
              "twitter",
              "email",
              "whatsapp",
              "instagram",
              "device_share"
            ],
            "additionalProperties": false,
            "description": "The links this shopper shares, one per channel — the same set an enrolled customer's `referral_urls` carries"
          }
        },
        "required": ["referral_urls"],
        "additionalProperties": false,
        "description": "The shopper holds referral links. The response is the same whether the address was new or already belonged to a customer, and says nothing about which — a shopper who is already a member keeps the membership they have, and is not enrolled or re-enrolled by this"
      },
      "RegisterGuestReferrerErrorGuestReferralsNotEnabled": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "guest_referrals_not_enabled" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Guest referrals not enabled",
        "description": "This site does not hand referral links to shoppers who have not joined the program, or it has no active referral rule for a referral to pay out against"
      },
      "RegisterGuestReferrerErrorCustomerBlocked": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_blocked" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer blocked",
        "description": "This address belongs to a customer who is blocked from the program. A blocked customer's referrals earn nothing, so no links are issued"
      },
      "RegisterGuestReferrerErrorMerchantCustomerPushFailed": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "merchant_customer_push_failed" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Merchant customer push failed",
        "description": "Your store is set to receive these shoppers as customers, and we could not create this one there, so no links were issued. The LoyaltyLion customer exists either way, so a retry picks that one up rather than duplicating them"
      },
      "ReferralsRegisterGuestReferrerRequestBody": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
            "description": "The email address of the shopper taking a referral link. It is what their referrals are attributed to, and what a later enrollment is matched against\n\nRepeating the request with an address that already holds links returns the same ones rather than a second set",
            "example": "referrer@example.com"
          },
          "first_name": {
            "type": "string",
            "minLength": 1,
            "description": "The shopper's first name, recorded on the customer created for them. Applied only on creation: an address that already belongs to a customer keeps the name it has",
            "example": "Ada"
          },
          "ip_address": {
            "anyOf": [
              {
                "type": "string",
                "format": "ipv4",
                "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$"
              },
              {
                "type": "string",
                "format": "ipv6",
                "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$"
              }
            ],
            "description": "The IP address of the shopper taking the link — the one that reached your server, not your server's own. It is the bucket an individual shopper is rate limited on, so sending your own address throttles every shopper you have to a single shared allowance\n\nSend a single address. A forwarded-for list is rejected: take the client entry from it yourself",
            "example": "203.0.113.42"
          }
        },
        "required": ["email", "first_name", "ip_address"],
        "additionalProperties": false
      },
      "RewardsRedeemCartDiscountVoucherResponseBody": {
        "type": "object",
        "properties": {
          "voucher_code": {
            "type": "string",
            "description": "The unique voucher code that will apply the discount",
            "example": "LL-XYA3816"
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": {
                    "type": "string",
                    "const": "cart_discount_voucher"
                  },
                  "code": {
                    "type": "string",
                    "description": "The discount voucher code"
                  },
                  "discount_type": {
                    "type": "string",
                    "enum": ["fixed", "percentage"],
                    "description": "The type of discount this voucher will apply to the cart"
                  },
                  "discount": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "percentage": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["percentage", "formatted"],
                        "additionalProperties": false
                      }
                    ],
                    "description": "The discount that will apply to the cart. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
                  },
                  "applies_to_order_type": {
                    "type": "string",
                    "enum": ["all", "one_time", "subscription"],
                    "description": "The type of order that this voucher will apply to. One of: `all` (applies to all types of order), `one_time` (applies to one-time orders), `subscription` (applies to subscription orders)",
                    "example": "one_time"
                  },
                  "recurring_cycle_limit": {
                    "description": "The number of orders this discount will apply to, for discounts that can apply to subscription orders. If it's `1`, it means the discount will apply only to the first order with which it is used. If `null`, the discount will be applied to any number of orders for as long as it is active",
                    "example": 1,
                    "type": ["number", "null"]
                  },
                  "supports_active_subscriptions": {
                    "description": "Whether or not this discount will also be able to be applied to active subscriptions in Recharge. If true, we will create a Recharge discount in addition to a Shopify discount whenever this reward is claimed.",
                    "type": "boolean"
                  },
                  "minimum_spend": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "The minimum spend, if any, for the voucher to apply to the cart",
                    "example": { "amount": 10, "formatted": "$10" }
                  },
                  "expires_at": {
                    "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                    "type": ["string", "null"]
                  },
                  "used_at": {
                    "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                    "type": ["string", "null"]
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "code",
                  "discount_type",
                  "discount",
                  "applies_to_order_type",
                  "recurring_cycle_limit",
                  "minimum_spend",
                  "expires_at",
                  "used_at"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. The voucher code can also be found in `claimed_reward.redeemable.code`"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["voucher_code", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RedeemRewardErrorInsufficientPoints": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "insufficient_points" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Insufficient points"
      },
      "RedeemRewardErrorCustomerNotEnrolled": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_not_enrolled" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer not enrolled"
      },
      "RedeemRewardErrorCustomerBlocked": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_blocked" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer blocked"
      },
      "RedeemRewardErrorRewardNotEnabledForCustomer": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "const": "reward_not_enabled_for_customer"
          },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Reward not enabled for customer"
      },
      "RedeemRewardErrorRewardOutOfStock": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "reward_out_of_stock" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Reward out of stock"
      },
      "RedeemRewardErrorRewardInvalidKind": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "reward_kind_mismatch" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Reward invalid kind"
      },
      "RedeemRewardErrorRewardLimitReached": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "reward_limit_reached" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Reward limit reached"
      },
      "RewardsRedeemCartDiscountVoucherRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["reward_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RewardsRedeemFreeShippingVoucherResponseBody": {
        "type": "object",
        "properties": {
          "voucher_code": {
            "type": "string",
            "description": "The unique voucher code that will apply free shipping",
            "example": "LL-XYA3816"
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": {
                    "type": "string",
                    "const": "free_shipping_voucher"
                  },
                  "code": {
                    "type": "string",
                    "description": "The discount voucher code"
                  },
                  "max_shipping": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "Free shipping will only be applied if the shipping rate is equal to or less than this amount, or `null` if there is no maximum"
                  },
                  "expires_at": {
                    "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                    "type": ["string", "null"]
                  },
                  "used_at": {
                    "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                    "type": ["string", "null"]
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "code",
                  "max_shipping",
                  "expires_at",
                  "used_at"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. The voucher code can be found in `claimed_reward.redeemable.code`"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["voucher_code", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RewardsRedeemFreeShippingVoucherRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["reward_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RewardsRedeemCollectionDiscountVoucherResponseBody": {
        "type": "object",
        "properties": {
          "voucher_code": {
            "type": "string",
            "description": "The unique voucher code that will apply the discount",
            "example": "LL-XYA3816"
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": {
                    "type": "string",
                    "const": "collection_discount_voucher"
                  },
                  "code": {
                    "type": "string",
                    "description": "The discount voucher code"
                  },
                  "collection": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "title": { "type": ["string", "null"] },
                      "url": { "type": ["string", "null"] }
                    },
                    "required": ["id", "title", "url"],
                    "additionalProperties": false,
                    "description": "The collection that this discount applies to"
                  },
                  "discount_type": {
                    "type": "string",
                    "enum": ["fixed", "percentage"],
                    "description": "The type of discount this voucher will apply to items in the collection"
                  },
                  "discount": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "percentage": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["percentage", "formatted"],
                        "additionalProperties": false
                      }
                    ],
                    "description": "The discount that will apply to items in the collection. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
                  },
                  "minimum_spend": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "The minimum spend, if any, for the voucher to apply to the cart",
                    "example": { "amount": 10, "formatted": "$10" }
                  },
                  "expires_at": {
                    "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                    "type": ["string", "null"]
                  },
                  "used_at": {
                    "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                    "type": ["string", "null"]
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "code",
                  "collection",
                  "discount_type",
                  "discount",
                  "minimum_spend",
                  "expires_at",
                  "used_at"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. The voucher code can be found in `claimed_reward.redeemable.code`"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["voucher_code", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RewardsRedeemCollectionDiscountVoucherRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["reward_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RewardsRedeemProductDiscountVoucherResponseBody": {
        "type": "object",
        "properties": {
          "voucher_code": {
            "type": "string",
            "description": "The unique voucher code that will apply the discount",
            "example": "LL-XYA3816"
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": {
                    "type": "string",
                    "const": "product_discount_voucher"
                  },
                  "code": {
                    "type": "string",
                    "description": "The discount voucher code"
                  },
                  "product": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "image_url": { "type": ["string", "null"] },
                      "variant_id": {
                        "description": "The variant ID to apply the discount to. If `null`, the discount can be applied to all this product's variants",
                        "type": ["string", "null"]
                      }
                    },
                    "required": ["id", "image_url", "variant_id"],
                    "additionalProperties": false,
                    "description": "The product that this discount applies to"
                  },
                  "discount": {
                    "type": "object",
                    "properties": {
                      "percentage": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["percentage", "formatted"],
                    "additionalProperties": false,
                    "description": "The discount that will apply to the product. Product discounts are always percentage based, so this will be a number from `1-100`"
                  },
                  "expires_at": {
                    "description": "ISO 8601 timestamp representing when the voucher will expire, or `null` if it does not expire",
                    "type": ["string", "null"]
                  },
                  "used_at": {
                    "description": "`ISO 8601` timestamp representing when the voucher was used, or `null` if not yet used",
                    "type": ["string", "null"]
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "code",
                  "product",
                  "discount",
                  "expires_at",
                  "used_at"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. The voucher code can be found in `claimed_reward.redeemable.code`"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["voucher_code", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RewardsRedeemProductDiscountVoucherRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["reward_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RewardsRedeemGiftCardResponseBody": {
        "type": "object",
        "properties": {
          "gift_card_code": {
            "type": "string",
            "description": "The full gift card code. This is the only time the full code can be seen through the API",
            "example": "8c88rfd8t8d6yxp9"
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": { "type": "string", "const": "gift_card" },
                  "code_last_characters": {
                    "type": "string",
                    "description": "The last few characters of the gift card code. Note that the full gift card code is only shown once when the gift card reward is redeemed"
                  },
                  "initial_balance": {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false,
                    "description": "The initial balance of the gift card"
                  },
                  "current_balance": {
                    "type": "object",
                    "properties": {
                      "amount": { "type": "number" },
                      "formatted": { "type": "string" }
                    },
                    "required": ["amount", "formatted"],
                    "additionalProperties": false,
                    "description": "The current balance of the gift card"
                  },
                  "expires_at": {
                    "description": "`ISO 8601` timestamp representing when the gift card will expire, or `null` if it does not expire",
                    "type": ["string", "null"]
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "code_last_characters",
                  "initial_balance",
                  "current_balance",
                  "expires_at"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. The last few characters of the gift card code can be found in `claimed_reward.redeemable.code_last_characters`"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["gift_card_code", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RewardsRedeemGiftCardRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["reward_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RewardsRedeemActiveSubscriptionDiscountVoucherResponseBody": {
        "type": "object",
        "properties": {
          "voucher_code": {
            "type": "string",
            "description": "The unique voucher code that will apply the discount. This code can only be used with an active subscription",
            "example": "LL-XYA3816"
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": {
                    "type": "string",
                    "const": "active_subscription_discount_voucher"
                  },
                  "code": {
                    "type": "string",
                    "description": "The discount voucher code"
                  },
                  "discount_type": {
                    "type": "string",
                    "enum": ["fixed", "percentage"],
                    "description": "The type of discount this voucher will apply to next order"
                  },
                  "discount": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "amount": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["amount", "formatted"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "percentage": { "type": "number" },
                          "formatted": { "type": "string" }
                        },
                        "required": ["percentage", "formatted"],
                        "additionalProperties": false
                      }
                    ],
                    "description": "The discount that will apply to the next order. For `fixed` discounts this will be the currency amount. For `percentage` discounts, it will be a number from `1-100`"
                  },
                  "recurring_cycle_limit": {
                    "description": "The number of recurring orders this discount will apply to. If `null`, the discount will be applied to any number of orders for as long as it is active",
                    "type": ["number", "null"]
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "code",
                  "discount_type",
                  "discount",
                  "recurring_cycle_limit"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. The voucher code can also be found in `claimed_reward.redeemable.code`"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["voucher_code", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RedeemRewardErrorNoSubscriptionIntegrationConfigured": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "const": "no_subscription_integration_configured"
          }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "No subscription integration configured"
      },
      "RewardsRedeemActiveSubscriptionDiscountVoucherRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["reward_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "ShippingAddressRecharge": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "recharge" },
          "id": {
            "type": "number",
            "description": "The ID of the address in ReCharge, as returned from the [Addresses API](https://developer.rechargepayments.com/2021-11/addresses/list_addresses)"
          }
        },
        "required": ["kind", "id"],
        "additionalProperties": false,
        "description": "If you are using ReCharge for subscriptions, you can optionally pass a shipping address ID which will be used as the shipping address for the free product. You can fetch shipping addresses using the ReCharge API. If not provided, the free product will included with the customer's next recurring subscription order"
      },
      "RewardsRedeemActiveSubscriptionProductResponseBody": {
        "type": "object",
        "properties": {
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": {
                    "type": "string",
                    "const": "active_subscription_product"
                  },
                  "product": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "handle": { "type": ["string", "null"] },
                      "title": { "type": ["string", "null"] },
                      "url": { "type": ["string", "null"] },
                      "image_url": { "type": ["string", "null"] },
                      "variant": {
                        "type": "object",
                        "properties": {
                          "id": { "type": "string" },
                          "title": { "type": ["string", "null"] },
                          "inventory_count": {
                            "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                            "type": ["integer", "null"]
                          }
                        },
                        "required": ["id", "title", "inventory_count"],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "handle",
                      "title",
                      "url",
                      "image_url",
                      "variant"
                    ],
                    "additionalProperties": false,
                    "description": "The product and variant that will be included in the next subscription"
                  },
                  "quantity": {
                    "type": "number",
                    "description": "The quantity of the product that will be included in the next subscription"
                  },
                  "subscription_details": {
                    "oneOf": [
                      {
                        "$ref": "#/components/schemas/ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge"
                      }
                    ],
                    "type": "object",
                    "discriminator": {
                      "propertyName": "kind",
                      "mapping": {
                        "recharge": "#/components/schemas/ActiveSubscriptionProductRedeemableSubscriptionDetailsRecharge"
                      }
                    }
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "product",
                  "quantity",
                  "subscription_details"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. Details about the product can be found in `claimed_reward.redeemable.product`, and details about the subscription can be found in `claimed_reward.redeemable.subscription_details`"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RedeemRewardErrorNoActiveSubscriptions": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "no_active_subscriptions" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "No active subscriptions"
      },
      "RedeemRewardErrorInvalidShippingAddress": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "invalid_shipping_address" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Invalid shipping address",
        "description": "The `shipping_address` does not belong to this customer"
      },
      "RedeemRewardErrorInvalidVariantId": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "invalid_variant_id" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Invalid variant ID"
      },
      "RewardsRedeemActiveSubscriptionProductRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          },
          "variant_id": {
            "type": "string",
            "description": "The product variant ID to redeem. If the product reward includes multiple variants, you should ask the customer which one they want to redeem"
          },
          "shipping_address": {
            "oneOf": [
              { "$ref": "#/components/schemas/ShippingAddressRecharge" }
            ],
            "type": "object",
            "discriminator": {
              "propertyName": "kind",
              "mapping": {
                "recharge": "#/components/schemas/ShippingAddressRecharge"
              }
            }
          }
        },
        "required": ["reward_id", "customer_merchant_id", "variant_id"],
        "additionalProperties": false
      },
      "RewardUsageOrder": {
        "type": "object",
        "properties": {
          "kind": { "type": "string", "const": "order" },
          "merchant_id": {
            "type": "string",
            "description": "The ID of the order in your platform or ecommerce store. The new claimed reward will be marked as being used with this order"
          }
        },
        "required": ["kind", "merchant_id"],
        "additionalProperties": false,
        "title": "Order"
      },
      "RewardsRedeemCustomResponseBody": {
        "type": "object",
        "properties": {
          "fulfillment_explanation": {
            "description": "Optional fulfillment explanation as a short, plaintext string. If present, this will explain to the customer how and when the reward will be fulfilled",
            "type": ["string", "null"]
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": { "type": "string", "const": "custom" },
                  "fulfilment_explanation": {
                    "description": "Optional fulfillment explanation as a short, plaintext string. If present, this will explain to the customer how and when the reward will be fulfilled",
                    "type": ["string", "null"]
                  },
                  "fulfilled_at": {
                    "description": "`ISO 8601` timestamp representing when this custom redeemable was fulfilled, or `null` if it is not yet fulfilled",
                    "type": ["string", "null"]
                  },
                  "code": {
                    "description": "The voucher code issued to the customer. Present only for custom rewards that issue codes from a merchant-uploaded pool; absent for other custom rewards (e.g. those fulfilled manually or by webhook).",
                    "type": "string"
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "fulfilment_explanation",
                  "fulfilled_at"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward. If you may need to refund this custom reward later, you should save the `claimed_reward.id` and use it with the [Refund Reward API](/api-reference/v2/resources/customers/rewards/refund-reward)"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["fulfillment_explanation", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RewardsRedeemCustomRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          },
          "fulfill_immediately": {
            "description": "For rewards using manual fulfillment, passing `true` here will mark the custom reward as fulfilled immediately. This option is ignored if the custom reward is configured to use a webhook for fulfillment\n\nRequires `api_token` authentication: fulfilling a reward is a merchant-side action, so requests made with a customer session token are rejected when this option is passed\n\nThis is useful if you know you'll be fulfilling the reward straight away, or have already fulfilled it\n\nThis option does not apply to rewards with a `fulfillment_type` of `voucher`: a voucher custom reward is always fulfilled at claim time, when the pooled code is issued to the customer",
            "type": "boolean"
          },
          "usage": {
            "description": "You can pass a usage object to indicate the reward has been used with an order. Note that the usage won't be applied in LoyaltyLion until the matching order (with the same `merchant_id`) has been sent to LoyaltyLion\n\nRequires `api_token` authentication: marking a reward as used is a merchant-side action, so requests made with a customer session token are rejected when this option is passed\n\nThis option does not apply to rewards with a `fulfillment_type` of `voucher` and is ignored for them: a voucher custom reward is marked as used automatically when the matching order containing its discount code is sent to LoyaltyLion",
            "oneOf": [{ "$ref": "#/components/schemas/RewardUsageOrder" }],
            "type": "object",
            "discriminator": {
              "propertyName": "kind",
              "mapping": { "order": "#/components/schemas/RewardUsageOrder" }
            }
          }
        },
        "required": ["reward_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RewardsRedeemProductCartResponseBody": {
        "type": "object",
        "properties": {
          "active_cart_redemption": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The unique ID of this cart redemption. This ID needs to be attached to the cart line when the product is added to the cart. For Shopify, this is used as the value of the `__lion_sfp_id` attribute on the cart line"
              },
              "claimed_reward_id": {
                "type": "number",
                "description": "The ID of the claimed reward that this cart redemption is associated with"
              },
              "expires_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp representing when this cart redemption will expire if it has not been checked out, at which point any associated points will be returned to the customer"
              },
              "product": {
                "type": "object",
                "properties": {
                  "id": { "type": "string" },
                  "handle": { "type": ["string", "null"] },
                  "title": { "type": ["string", "null"] },
                  "url": { "type": ["string", "null"] },
                  "image_url": { "type": ["string", "null"] },
                  "variant": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "title": { "type": ["string", "null"] },
                      "inventory_count": {
                        "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                        "type": ["integer", "null"]
                      }
                    },
                    "required": ["id", "title", "inventory_count"],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "handle",
                  "title",
                  "url",
                  "image_url",
                  "variant"
                ],
                "additionalProperties": false,
                "description": "The product and variant that this cart redemption is for"
              },
              "quantity": {
                "type": "number",
                "description": "The quantity of the line item in this cart redemption"
              },
              "cart_id": {
                "type": "string",
                "description": "The ID of the cart for which this cart redemption was initially redeemed"
              },
              "cart_line": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                  }
                ],
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "shopify": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                  }
                }
              },
              "current_cart_state": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "in_cart": {
                        "type": "boolean",
                        "description": "Indicates if the redemption is currently in the cart"
                      },
                      "cart_requirements_met": {
                        "type": "boolean",
                        "description": "Indicates if all this redemption's requirements are currently met by the cart, such as a required minimum cart total or number of line items"
                      },
                      "cart_requirements_detail": {
                        "type": "object",
                        "properties": {
                          "minimum_cart_total": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement"
                              },
                              {
                                "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet"
                              },
                              {
                                "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                              }
                            ],
                            "type": "object",
                            "discriminator": {
                              "propertyName": "state",
                              "mapping": {
                                "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement",
                                "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet",
                                "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                              }
                            }
                          },
                          "minimum_line_item_quantity": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement"
                              },
                              {
                                "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet"
                              },
                              {
                                "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                              }
                            ],
                            "type": "object",
                            "discriminator": {
                              "propertyName": "state",
                              "mapping": {
                                "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement",
                                "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet",
                                "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                              }
                            }
                          }
                        },
                        "required": [
                          "minimum_cart_total",
                          "minimum_line_item_quantity"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "in_cart",
                      "cart_requirements_met",
                      "cart_requirements_detail"
                    ],
                    "additionalProperties": false
                  },
                  { "type": "null" }
                ],
                "description": "If this request included a serialized `cart` object whose `id` matches the `cart_id` of this redemption, this object includes information about this redemption's state in the current cart. It will be `null` if the request did not include a serialized cart or its `id` does not match"
              }
            },
            "required": [
              "id",
              "claimed_reward_id",
              "expires_at",
              "product",
              "quantity",
              "cart_id",
              "cart_line",
              "current_cart_state"
            ],
            "additionalProperties": false
          },
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": { "type": "string", "const": "product_cart" },
                  "product": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "handle": { "type": ["string", "null"] },
                      "title": { "type": ["string", "null"] },
                      "url": { "type": ["string", "null"] },
                      "image_url": { "type": ["string", "null"] },
                      "variant": {
                        "type": "object",
                        "properties": {
                          "id": { "type": "string" },
                          "title": { "type": ["string", "null"] },
                          "inventory_count": {
                            "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                            "type": ["integer", "null"]
                          }
                        },
                        "required": ["id", "title", "inventory_count"],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "handle",
                      "title",
                      "url",
                      "image_url",
                      "variant"
                    ],
                    "additionalProperties": false,
                    "description": "The product and variant that should be added to the cart"
                  },
                  "quantity": {
                    "type": "number",
                    "description": "The quantity of the product that should be added to the cart"
                  },
                  "used_at": {
                    "description": "`ISO 8601` timestamp representing when the product was used in an order, or `null` if not yet used",
                    "type": ["string", "null"]
                  },
                  "cart_line_identifier": {
                    "type": "string",
                    "description": "The unique cart line identifier, which connects this redemption to the line item in the eventual completed order. For Shopify, this identifier is used as the value of the `__lion_sfp_id` attribute on the cart line when the product is added to the cart"
                  },
                  "grant": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "expires_at": {
                            "description": "`ISO 8601` timestamp of the deadline the grant had for adding the product to the cart, or `null` if the grant had no deadline",
                            "type": ["string", "null"]
                          }
                        },
                        "required": ["expires_at"],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "Present when the customer was granted this product and has since added it to their cart. `null` for a product the customer redeemed with points or claimed directly"
                  },
                  "active_cart_redemption": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The unique ID of this cart redemption. This ID needs to be attached to the cart line when the product is added to the cart. For Shopify, this is used as the value of the `__lion_sfp_id` attribute on the cart line"
                          },
                          "claimed_reward_id": {
                            "type": "number",
                            "description": "The ID of the claimed reward that this cart redemption is associated with"
                          },
                          "expires_at": {
                            "type": "string",
                            "description": "`ISO 8601` timestamp representing when this cart redemption will expire if it has not been checked out, at which point any associated points will be returned to the customer"
                          },
                          "product": {
                            "type": "object",
                            "properties": {
                              "id": { "type": "string" },
                              "handle": { "type": ["string", "null"] },
                              "title": { "type": ["string", "null"] },
                              "url": { "type": ["string", "null"] },
                              "image_url": { "type": ["string", "null"] },
                              "variant": {
                                "type": "object",
                                "properties": {
                                  "id": { "type": "string" },
                                  "title": { "type": ["string", "null"] },
                                  "inventory_count": {
                                    "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                                    "type": ["integer", "null"]
                                  }
                                },
                                "required": ["id", "title", "inventory_count"],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "handle",
                              "title",
                              "url",
                              "image_url",
                              "variant"
                            ],
                            "additionalProperties": false,
                            "description": "The product and variant that this cart redemption is for"
                          },
                          "quantity": {
                            "type": "number",
                            "description": "The quantity of the line item in this cart redemption"
                          },
                          "cart_id": {
                            "type": "string",
                            "description": "The ID of the cart for which this cart redemption was initially redeemed"
                          },
                          "cart_line": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                              }
                            ],
                            "type": "object",
                            "discriminator": {
                              "propertyName": "kind",
                              "mapping": {
                                "shopify": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                              }
                            }
                          },
                          "current_cart_state": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "in_cart": {
                                    "type": "boolean",
                                    "description": "Indicates if the redemption is currently in the cart"
                                  },
                                  "cart_requirements_met": {
                                    "type": "boolean",
                                    "description": "Indicates if all this redemption's requirements are currently met by the cart, such as a required minimum cart total or number of line items"
                                  },
                                  "cart_requirements_detail": {
                                    "type": "object",
                                    "properties": {
                                      "minimum_cart_total": {
                                        "oneOf": [
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                          }
                                        ],
                                        "type": "object",
                                        "discriminator": {
                                          "propertyName": "state",
                                          "mapping": {
                                            "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement",
                                            "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet",
                                            "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                          }
                                        }
                                      },
                                      "minimum_line_item_quantity": {
                                        "oneOf": [
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                          }
                                        ],
                                        "type": "object",
                                        "discriminator": {
                                          "propertyName": "state",
                                          "mapping": {
                                            "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement",
                                            "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet",
                                            "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "minimum_cart_total",
                                      "minimum_line_item_quantity"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "in_cart",
                                  "cart_requirements_met",
                                  "cart_requirements_detail"
                                ],
                                "additionalProperties": false
                              },
                              { "type": "null" }
                            ],
                            "description": "If this request included a serialized `cart` object whose `id` matches the `cart_id` of this redemption, this object includes information about this redemption's state in the current cart. It will be `null` if the request did not include a serialized cart or its `id` does not match"
                          }
                        },
                        "required": [
                          "id",
                          "claimed_reward_id",
                          "expires_at",
                          "product",
                          "quantity",
                          "cart_id",
                          "cart_line",
                          "current_cart_state"
                        ],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "The active cart redemption associated with this product reward, if any. A product reward will have an active cart redemption if it has been redeemed and has not yet been checked out with an order, or expired"
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "product",
                  "quantity",
                  "used_at",
                  "cart_line_identifier",
                  "grant",
                  "active_cart_redemption"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The new claimed reward"
          },
          "customer": {
            "description": "The customer object, updated as of the reward redemption, i.e. their `claimed_rewards` will include the new redemption. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["active_cart_redemption", "claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RedeemRewardErrorMaxCartRedemptionsReached": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "max_cart_redemptions_reached" },
          "limit": { "type": "number" },
          "message": { "type": "string" }
        },
        "required": ["code", "limit"],
        "additionalProperties": false,
        "title": "Max cart redemptions reached"
      },
      "RewardsRedeemProductCartRequestBody": {
        "type": "object",
        "properties": {
          "reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the reward to redeem"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to redeem the reward for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          },
          "variant_id": {
            "type": "string",
            "description": "The product variant ID to redeem. If the product reward includes multiple variants, you should ask the customer which one they want to redeem"
          },
          "cart_id": {
            "type": "string",
            "description": "The ID of the current cart. The resulting cart redemption will be linked to this cart",
            "minLength": 1
          }
        },
        "required": [
          "reward_id",
          "customer_merchant_id",
          "variant_id",
          "cart_id"
        ],
        "additionalProperties": false
      },
      "RewardsRefundProductCartResponseBody": {
        "type": "object",
        "properties": {
          "claimed_reward": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "The ID of the claimed reward resource in LoyaltyLion"
              },
              "claimed_at": {
                "type": "string",
                "description": "`ISO 8601` timestamp indicating when this reward was claimed"
              },
              "reward_id": {
                "type": "number",
                "description": "The ID of the reward that was claimed. If a reward with this ID does not exist in the current [Site Configuration](/headless-api/2025-06/configuration/get-configuration), it means the reward has been deleted. The associated redeemable, if any, will usually still be active even after the reward has been deleted"
              },
              "title": {
                "type": "string",
                "description": "Short, localized title for this claimed reward. For example, '$5 voucher', or 'Free Water Bottle'. This is usually the same title as the associated reward",
                "example": "$5 voucher"
              },
              "state": {
                "type": "string",
                "enum": ["approved", "declined", "expired", "pending", "void"],
                "description": "The state of this claimed reward. Only `active` rewards will have a usable `redeemable`"
              },
              "source": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourcePointsRedemption"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceRuleCompletion"
                  },
                  {
                    "$ref": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                ],
                "description": "Details about how the customer received this reward. One of `points_redemption` (the customer used their points to redeem the reward), `rule_completion` (the reward was awarded as the result of completing a rule), or `tier_entry` (the reward was awarded when the customer entered a tier)",
                "type": "object",
                "discriminator": {
                  "propertyName": "kind",
                  "mapping": {
                    "points_redemption": "#/components/schemas/ClaimedRewardSourcePointsRedemption",
                    "rule_completion": "#/components/schemas/ClaimedRewardSourceRuleCompletion",
                    "tier_entry": "#/components/schemas/ClaimedRewardSourceTierEntry"
                  }
                }
              },
              "auto_refund_at": {
                "description": "`ISO 8601` timestamp indicating when this reward and its associated redeemable will be automatically voided and refunded if it has not yet been used, or `null` if not applicable",
                "type": ["string", "null"]
              },
              "redeemable": {
                "type": "object",
                "properties": {
                  "usage_status": {
                    "type": "string",
                    "enum": ["not_used", "partially_used", "used"],
                    "description": "The usage status of this redeemable. Redeemables that are `used` cannot be used again, e.g. a voucher code that has already been used with an order"
                  },
                  "kind": { "type": "string", "const": "product_cart" },
                  "product": {
                    "type": "object",
                    "properties": {
                      "id": { "type": "string" },
                      "handle": { "type": ["string", "null"] },
                      "title": { "type": ["string", "null"] },
                      "url": { "type": ["string", "null"] },
                      "image_url": { "type": ["string", "null"] },
                      "variant": {
                        "type": "object",
                        "properties": {
                          "id": { "type": "string" },
                          "title": { "type": ["string", "null"] },
                          "inventory_count": {
                            "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                            "type": ["integer", "null"]
                          }
                        },
                        "required": ["id", "title", "inventory_count"],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "id",
                      "handle",
                      "title",
                      "url",
                      "image_url",
                      "variant"
                    ],
                    "additionalProperties": false,
                    "description": "The product and variant that should be added to the cart"
                  },
                  "quantity": {
                    "type": "number",
                    "description": "The quantity of the product that should be added to the cart"
                  },
                  "used_at": {
                    "description": "`ISO 8601` timestamp representing when the product was used in an order, or `null` if not yet used",
                    "type": ["string", "null"]
                  },
                  "cart_line_identifier": {
                    "type": "string",
                    "description": "The unique cart line identifier, which connects this redemption to the line item in the eventual completed order. For Shopify, this identifier is used as the value of the `__lion_sfp_id` attribute on the cart line when the product is added to the cart"
                  },
                  "grant": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "expires_at": {
                            "description": "`ISO 8601` timestamp of the deadline the grant had for adding the product to the cart, or `null` if the grant had no deadline",
                            "type": ["string", "null"]
                          }
                        },
                        "required": ["expires_at"],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "Present when the customer was granted this product and has since added it to their cart. `null` for a product the customer redeemed with points or claimed directly"
                  },
                  "active_cart_redemption": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The unique ID of this cart redemption. This ID needs to be attached to the cart line when the product is added to the cart. For Shopify, this is used as the value of the `__lion_sfp_id` attribute on the cart line"
                          },
                          "claimed_reward_id": {
                            "type": "number",
                            "description": "The ID of the claimed reward that this cart redemption is associated with"
                          },
                          "expires_at": {
                            "type": "string",
                            "description": "`ISO 8601` timestamp representing when this cart redemption will expire if it has not been checked out, at which point any associated points will be returned to the customer"
                          },
                          "product": {
                            "type": "object",
                            "properties": {
                              "id": { "type": "string" },
                              "handle": { "type": ["string", "null"] },
                              "title": { "type": ["string", "null"] },
                              "url": { "type": ["string", "null"] },
                              "image_url": { "type": ["string", "null"] },
                              "variant": {
                                "type": "object",
                                "properties": {
                                  "id": { "type": "string" },
                                  "title": { "type": ["string", "null"] },
                                  "inventory_count": {
                                    "description": "The current inventory count of this product variant, or `null` if inventory is not tracked. If the count is zero, you should ensure it is not selectable by customers when redeeming the reward",
                                    "type": ["integer", "null"]
                                  }
                                },
                                "required": ["id", "title", "inventory_count"],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "id",
                              "handle",
                              "title",
                              "url",
                              "image_url",
                              "variant"
                            ],
                            "additionalProperties": false,
                            "description": "The product and variant that this cart redemption is for"
                          },
                          "quantity": {
                            "type": "number",
                            "description": "The quantity of the line item in this cart redemption"
                          },
                          "cart_id": {
                            "type": "string",
                            "description": "The ID of the cart for which this cart redemption was initially redeemed"
                          },
                          "cart_line": {
                            "oneOf": [
                              {
                                "$ref": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                              }
                            ],
                            "type": "object",
                            "discriminator": {
                              "propertyName": "kind",
                              "mapping": {
                                "shopify": "#/components/schemas/ActiveCartRedemptionCartLineShopify"
                              }
                            }
                          },
                          "current_cart_state": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "in_cart": {
                                    "type": "boolean",
                                    "description": "Indicates if the redemption is currently in the cart"
                                  },
                                  "cart_requirements_met": {
                                    "type": "boolean",
                                    "description": "Indicates if all this redemption's requirements are currently met by the cart, such as a required minimum cart total or number of line items"
                                  },
                                  "cart_requirements_detail": {
                                    "type": "object",
                                    "properties": {
                                      "minimum_cart_total": {
                                        "oneOf": [
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                          }
                                        ],
                                        "type": "object",
                                        "discriminator": {
                                          "propertyName": "state",
                                          "mapping": {
                                            "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumCartTotalNoRequirement",
                                            "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementMet",
                                            "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumCartTotalRequirementNotMet"
                                          }
                                        }
                                      },
                                      "minimum_line_item_quantity": {
                                        "oneOf": [
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet"
                                          },
                                          {
                                            "$ref": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                          }
                                        ],
                                        "type": "object",
                                        "discriminator": {
                                          "propertyName": "state",
                                          "mapping": {
                                            "no_requirement": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityNoRequirement",
                                            "requirement_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementMet",
                                            "requirement_not_met": "#/components/schemas/CartRequirementsDetailMinimumLineItemQuantityRequirementNotMet"
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "minimum_cart_total",
                                      "minimum_line_item_quantity"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "in_cart",
                                  "cart_requirements_met",
                                  "cart_requirements_detail"
                                ],
                                "additionalProperties": false
                              },
                              { "type": "null" }
                            ],
                            "description": "If this request included a serialized `cart` object whose `id` matches the `cart_id` of this redemption, this object includes information about this redemption's state in the current cart. It will be `null` if the request did not include a serialized cart or its `id` does not match"
                          }
                        },
                        "required": [
                          "id",
                          "claimed_reward_id",
                          "expires_at",
                          "product",
                          "quantity",
                          "cart_id",
                          "cart_line",
                          "current_cart_state"
                        ],
                        "additionalProperties": false
                      },
                      { "type": "null" }
                    ],
                    "description": "The active cart redemption associated with this product reward, if any. A product reward will have an active cart redemption if it has been redeemed and has not yet been checked out with an order, or expired"
                  }
                },
                "required": [
                  "usage_status",
                  "kind",
                  "product",
                  "quantity",
                  "used_at",
                  "cart_line_identifier",
                  "grant",
                  "active_cart_redemption"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "claimed_at",
              "reward_id",
              "title",
              "state",
              "source",
              "auto_refund_at",
              "redeemable"
            ],
            "additionalProperties": false,
            "description": "The updated claimed reward that was refunded"
          },
          "customer": {
            "description": "The customer object, updated as of the reward refund, i.e. any refunded points will be returned to their points balance. This customer will always have `state` set to `enrolled`, as only enrolled customers can redeem rewards",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["claimed_reward", "customer"],
        "additionalProperties": false
      },
      "RefundRewardErrorCustomerNotEnrolled": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_not_enrolled" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer not enrolled"
      },
      "RefundRewardErrorCustomerBlocked": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_blocked" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer blocked"
      },
      "RefundRewardErrorRewardInvalidKind": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "reward_kind_mismatch" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Reward invalid kind"
      },
      "RefundRewardErrorRewardAlreadyRefunded": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "reward_already_refunded" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Reward already refunded"
      },
      "RefundRewardErrorRewardAlreadyUsed": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "reward_already_used" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Reward already used"
      },
      "RewardsRefundProductCartRequestBody": {
        "type": "object",
        "properties": {
          "claimed_reward_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the claimed reward to cancel and refund"
          }
        },
        "required": ["claimed_reward_id"],
        "additionalProperties": false
      },
      "RulesCompleteClickthroughResponseBody": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                }
              ]
            },
            "description": "A list of actions that resulted from the rule's completion, such as points or rewards being awarded"
          },
          "customer": {
            "description": "The customer object, updated as of the rule action, i.e. their history, points, and rewards will include any new actions as a result of completing the rule. This customer will always have `state` set to `enrolled`, as only enrolled customers can complete rules",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["actions", "customer"],
        "additionalProperties": false,
        "example": {
          "actions": [
            {
              "kind": "earned_points_from_rule",
              "label": "Visit https://example.com",
              "date": "2025-06-01T15:00:00Z",
              "state": "approved",
              "points": 100,
              "points_text": "100 points",
              "rule": { "id": 1, "kind": "clickthrough" },
              "points_will_approve_at": null,
              "points_will_expire_at": null
            }
          ],
          "customer": {
            "state": "enrolled",
            "id": 1,
            "merchant_id": "1001",
            "email": "alice@example.com",
            "phone": "+447700900123",
            "first_name": "Alice",
            "last_name": "Kyako",
            "points_approved": 500,
            "points_pending": 200,
            "points_spent": 500,
            "enrolled_at": "2025-06-01T15:00:00Z",
            "tier_membership": {
              "tier_id": 1,
              "started_at": "2025-06-01T15:00:00Z",
              "expires_at": "2026-06-01T15:00:00Z",
              "progress": {
                "kind": "spend",
                "tier_spend": {
                  "now": { "amount": 200, "formatted": "$200" },
                  "at_expiration": { "amount": 100, "formatted": "$100" }
                },
                "valid_until": "2026-06-01T15:00:00Z",
                "upgrade_tier_id": 2,
                "spend_needed_for_renewal": null,
                "spend_needed_for_upgrade": {
                  "amount": 800,
                  "formatted": "$800"
                },
                "forecasted_tier_id": 1
              }
            },
            "birthday": { "day": 22, "month": 6 },
            "next_birthday": "2026-06-22",
            "claimed_rewards": [
              {
                "id": 1,
                "claimed_at": "2025-06-03T00:00:00Z",
                "auto_refund_at": null,
                "reward_id": 1,
                "title": "$5 discount",
                "state": "approved",
                "source": { "kind": "points_redemption", "points_cost": 500 },
                "redeemable": {
                  "kind": "cart_discount_voucher",
                  "applies_to_order_type": "all",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "code": "LL-XAIA8471",
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "minimum_spend": { "amount": 50, "formatted": "$50" },
                  "expires_at": "2026-06-03T00:00:00Z",
                  "used_at": null,
                  "usage_status": "not_used"
                }
              }
            ],
            "available_rules": [
              {
                "id": 1,
                "kind": "pageview",
                "limit": { "count": 5, "interval": "day" },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Visit our online store",
                  "description": null,
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 10
                  },
                  "result_short_text": "10 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 22,
                  "completion_limit": {
                    "state": "limit_not_reached",
                    "interval": "day",
                    "allowed_completions_within_interval": 5,
                    "completion_count_within_interval": 3,
                    "remaining_completions_within_interval": 2
                  }
                }
              },
              {
                "id": 2,
                "kind": "join_program",
                "limit": { "count": 1, "interval": null },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Join our loyalty program",
                  "description": "Sign up and start earning points on every order",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 100
                  },
                  "result_short_text": "100 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T07:44:24.537Z",
                  "completion_count": 1,
                  "completion_limit": { "state": "limit_reached_forever" }
                }
              },
              {
                "id": 3,
                "kind": "purchase",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Make a purchase",
                  "description": "Earn points every time you shop with us",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": 1,
                    "points": 5
                  },
                  "result_short_text": "5 points per $1"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 3,
                  "completion_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 4,
                "kind": "review",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Leave a review",
                  "description": "Tell us what you think of your purchase",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 50
                  },
                  "result_short_text": "50 points",
                  "requirements": [
                    {
                      "kind": "text_length",
                      "min_length": 50,
                      "text": "Review must be at least 50 characters"
                    }
                  ],
                  "modifiers": [
                    {
                      "kind": "includes_photo",
                      "min_count": 1,
                      "bonus": {
                        "kind": "per_count",
                        "points": 10,
                        "max_points": 30
                      },
                      "text": "Include photos for 10 bonus points per photo (up to 30)"
                    },
                    {
                      "kind": "text_length",
                      "min_length": 200,
                      "bonus": { "kind": "fixed", "points": 10 },
                      "text": "Write at least 200 characters for 10 bonus points"
                    }
                  ]
                },
                "context": {
                  "last_completed_at": null,
                  "completion_count": 0,
                  "completion_limit": { "state": "no_limit" }
                }
              }
            ],
            "available_rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "$5 discount",
                  "description": "Spend your points on $5 off your next order",
                  "cost": { "kind": "fixed", "points": 500 },
                  "cost_text": "500 points"
                },
                "context": {
                  "can_redeem": { "state": "redeemable" },
                  "last_claimed_at": "2025-06-03T00:00:00Z",
                  "claim_count": 1,
                  "claim_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 2,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "percentage",
                  "discount": { "percentage": 10, "formatted": "10%" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 50, "formatted": "$50" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "10% discount",
                  "description": null,
                  "cost": { "kind": "fixed", "points": 1000 },
                  "cost_text": "1,000 points"
                },
                "context": {
                  "can_redeem": {
                    "state": "insufficient_points",
                    "additional_points_required": 500
                  },
                  "last_claimed_at": null,
                  "claim_count": 0,
                  "claim_limit": { "state": "no_limit" }
                }
              }
            ],
            "history": [
              {
                "kind": "redeemed_points_for_reward",
                "label": "$5 discount",
                "date": "2025-06-03T15:00:00Z",
                "points": -500,
                "points_text": "-500 points",
                "reward": { "id": 1, "kind": "cart_discount_voucher" },
                "claimed_reward_id": 1,
                "state": "approved"
              },
              {
                "kind": "entered_tier",
                "label": "Entered Silver tier",
                "date": "2025-06-02T15:00:00Z",
                "tier": { "id": 1, "name": "Silver" }
              },
              {
                "kind": "earned_points_from_rule",
                "label": "Joined program",
                "date": "2025-06-01T15:00:00Z",
                "points": 500,
                "points_text": "500 points",
                "points_will_approve_at": null,
                "points_will_expire_at": "2026-06-01T00:00:00Z",
                "state": "approved",
                "rule": { "id": 1, "kind": "join_program" }
              }
            ],
            "active_cart_redemptions": [],
            "email_marketing_consent": { "state": "subscribed" },
            "sms_marketing_consent": { "state": "not_subscribed" },
            "receipt_upload_url": "https://upload.loyaltylion.com/_/_",
            "loyalty_pass_url": "https://passes.loyaltylion.net/loyalty-pass-install/_/c/_",
            "referral_urls": {
              "email": "https://prz.io/_",
              "direct": "https://prz.io/_",
              "facebook": "https://prz.io/_",
              "twitter": "https://prz.io/_",
              "whatsapp": "https://prz.io/_",
              "instagram": "https://prz.io/_",
              "device_share": "https://prz.io/_"
            }
          }
        }
      },
      "CompleteRuleErrorCustomerNotEnrolled": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_not_enrolled" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer not enrolled"
      },
      "CompleteRuleErrorCustomerBlocked": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "customer_blocked" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Customer blocked"
      },
      "CompleteRuleErrorRuleNotEnabledForCustomer": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "const": "rule_not_enabled_for_customer"
          },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Rule not enabled for customer"
      },
      "CompleteRuleErrorRuleInvalidKind": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "rule_kind_mismatch" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Rule kind invalid"
      },
      "CompleteRuleErrorRuleLimitReached": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "rule_limit_reached" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Rule limit reached"
      },
      "CompleteRuleErrorRuleRequirementsNotMet": {
        "type": "object",
        "properties": {
          "code": { "type": "string", "const": "rule_requirements_not_met" },
          "message": { "type": "string" }
        },
        "required": ["code"],
        "additionalProperties": false,
        "title": "Rule requirements not met"
      },
      "RulesCompleteClickthroughRequestBody": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the rule to complete"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to complete the rule for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["rule_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RulesCompleteFacebookLikeResponseBody": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                }
              ]
            },
            "description": "A list of actions that resulted from the rule's completion, such as points or rewards being awarded"
          },
          "customer": {
            "description": "The customer object, updated as of the rule action, i.e. their history, points, and rewards will include any new actions as a result of completing the rule. This customer will always have `state` set to `enrolled`, as only enrolled customers can complete rules",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["actions", "customer"],
        "additionalProperties": false,
        "example": {
          "actions": [
            {
              "kind": "earned_points_from_rule",
              "label": "Like us on Facebook",
              "date": "2025-06-01T15:00:00Z",
              "state": "approved",
              "points": 100,
              "points_text": "100 points",
              "rule": { "id": 1, "kind": "facebook_like" },
              "points_will_approve_at": null,
              "points_will_expire_at": null
            }
          ],
          "customer": {
            "state": "enrolled",
            "id": 1,
            "merchant_id": "1001",
            "email": "alice@example.com",
            "phone": "+447700900123",
            "first_name": "Alice",
            "last_name": "Kyako",
            "points_approved": 500,
            "points_pending": 200,
            "points_spent": 500,
            "enrolled_at": "2025-06-01T15:00:00Z",
            "tier_membership": {
              "tier_id": 1,
              "started_at": "2025-06-01T15:00:00Z",
              "expires_at": "2026-06-01T15:00:00Z",
              "progress": {
                "kind": "spend",
                "tier_spend": {
                  "now": { "amount": 200, "formatted": "$200" },
                  "at_expiration": { "amount": 100, "formatted": "$100" }
                },
                "valid_until": "2026-06-01T15:00:00Z",
                "upgrade_tier_id": 2,
                "spend_needed_for_renewal": null,
                "spend_needed_for_upgrade": {
                  "amount": 800,
                  "formatted": "$800"
                },
                "forecasted_tier_id": 1
              }
            },
            "birthday": { "day": 22, "month": 6 },
            "next_birthday": "2026-06-22",
            "claimed_rewards": [
              {
                "id": 1,
                "claimed_at": "2025-06-03T00:00:00Z",
                "auto_refund_at": null,
                "reward_id": 1,
                "title": "$5 discount",
                "state": "approved",
                "source": { "kind": "points_redemption", "points_cost": 500 },
                "redeemable": {
                  "kind": "cart_discount_voucher",
                  "applies_to_order_type": "all",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "code": "LL-XAIA8471",
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "minimum_spend": { "amount": 50, "formatted": "$50" },
                  "expires_at": "2026-06-03T00:00:00Z",
                  "used_at": null,
                  "usage_status": "not_used"
                }
              }
            ],
            "available_rules": [
              {
                "id": 1,
                "kind": "pageview",
                "limit": { "count": 5, "interval": "day" },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Visit our online store",
                  "description": null,
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 10
                  },
                  "result_short_text": "10 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 22,
                  "completion_limit": {
                    "state": "limit_not_reached",
                    "interval": "day",
                    "allowed_completions_within_interval": 5,
                    "completion_count_within_interval": 3,
                    "remaining_completions_within_interval": 2
                  }
                }
              },
              {
                "id": 2,
                "kind": "join_program",
                "limit": { "count": 1, "interval": null },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Join our loyalty program",
                  "description": "Sign up and start earning points on every order",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 100
                  },
                  "result_short_text": "100 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T07:44:24.537Z",
                  "completion_count": 1,
                  "completion_limit": { "state": "limit_reached_forever" }
                }
              },
              {
                "id": 3,
                "kind": "purchase",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Make a purchase",
                  "description": "Earn points every time you shop with us",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": 1,
                    "points": 5
                  },
                  "result_short_text": "5 points per $1"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 3,
                  "completion_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 4,
                "kind": "review",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Leave a review",
                  "description": "Tell us what you think of your purchase",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 50
                  },
                  "result_short_text": "50 points",
                  "requirements": [
                    {
                      "kind": "text_length",
                      "min_length": 50,
                      "text": "Review must be at least 50 characters"
                    }
                  ],
                  "modifiers": [
                    {
                      "kind": "includes_photo",
                      "min_count": 1,
                      "bonus": {
                        "kind": "per_count",
                        "points": 10,
                        "max_points": 30
                      },
                      "text": "Include photos for 10 bonus points per photo (up to 30)"
                    },
                    {
                      "kind": "text_length",
                      "min_length": 200,
                      "bonus": { "kind": "fixed", "points": 10 },
                      "text": "Write at least 200 characters for 10 bonus points"
                    }
                  ]
                },
                "context": {
                  "last_completed_at": null,
                  "completion_count": 0,
                  "completion_limit": { "state": "no_limit" }
                }
              }
            ],
            "available_rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "$5 discount",
                  "description": "Spend your points on $5 off your next order",
                  "cost": { "kind": "fixed", "points": 500 },
                  "cost_text": "500 points"
                },
                "context": {
                  "can_redeem": { "state": "redeemable" },
                  "last_claimed_at": "2025-06-03T00:00:00Z",
                  "claim_count": 1,
                  "claim_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 2,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "percentage",
                  "discount": { "percentage": 10, "formatted": "10%" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 50, "formatted": "$50" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "10% discount",
                  "description": null,
                  "cost": { "kind": "fixed", "points": 1000 },
                  "cost_text": "1,000 points"
                },
                "context": {
                  "can_redeem": {
                    "state": "insufficient_points",
                    "additional_points_required": 500
                  },
                  "last_claimed_at": null,
                  "claim_count": 0,
                  "claim_limit": { "state": "no_limit" }
                }
              }
            ],
            "history": [
              {
                "kind": "redeemed_points_for_reward",
                "label": "$5 discount",
                "date": "2025-06-03T15:00:00Z",
                "points": -500,
                "points_text": "-500 points",
                "reward": { "id": 1, "kind": "cart_discount_voucher" },
                "claimed_reward_id": 1,
                "state": "approved"
              },
              {
                "kind": "entered_tier",
                "label": "Entered Silver tier",
                "date": "2025-06-02T15:00:00Z",
                "tier": { "id": 1, "name": "Silver" }
              },
              {
                "kind": "earned_points_from_rule",
                "label": "Joined program",
                "date": "2025-06-01T15:00:00Z",
                "points": 500,
                "points_text": "500 points",
                "points_will_approve_at": null,
                "points_will_expire_at": "2026-06-01T00:00:00Z",
                "state": "approved",
                "rule": { "id": 1, "kind": "join_program" }
              }
            ],
            "active_cart_redemptions": [],
            "email_marketing_consent": { "state": "subscribed" },
            "sms_marketing_consent": { "state": "not_subscribed" },
            "receipt_upload_url": "https://upload.loyaltylion.com/_/_",
            "loyalty_pass_url": "https://passes.loyaltylion.net/loyalty-pass-install/_/c/_",
            "referral_urls": {
              "email": "https://prz.io/_",
              "direct": "https://prz.io/_",
              "facebook": "https://prz.io/_",
              "twitter": "https://prz.io/_",
              "whatsapp": "https://prz.io/_",
              "instagram": "https://prz.io/_",
              "device_share": "https://prz.io/_"
            }
          }
        }
      },
      "RulesCompleteFacebookLikeRequestBody": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the rule to complete"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to complete the rule for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["rule_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RulesCompleteTwitterFollowResponseBody": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                }
              ]
            },
            "description": "A list of actions that resulted from the rule's completion, such as points or rewards being awarded"
          },
          "customer": {
            "description": "The customer object, updated as of the rule action, i.e. their history, points, and rewards will include any new actions as a result of completing the rule. This customer will always have `state` set to `enrolled`, as only enrolled customers can complete rules",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["actions", "customer"],
        "additionalProperties": false,
        "example": {
          "actions": [
            {
              "kind": "earned_points_from_rule",
              "label": "Follow us on X",
              "date": "2025-06-01T15:00:00Z",
              "state": "approved",
              "points": 100,
              "points_text": "100 points",
              "rule": { "id": 1, "kind": "twitter_follow" },
              "points_will_approve_at": null,
              "points_will_expire_at": null
            }
          ],
          "customer": {
            "state": "enrolled",
            "id": 1,
            "merchant_id": "1001",
            "email": "alice@example.com",
            "phone": "+447700900123",
            "first_name": "Alice",
            "last_name": "Kyako",
            "points_approved": 500,
            "points_pending": 200,
            "points_spent": 500,
            "enrolled_at": "2025-06-01T15:00:00Z",
            "tier_membership": {
              "tier_id": 1,
              "started_at": "2025-06-01T15:00:00Z",
              "expires_at": "2026-06-01T15:00:00Z",
              "progress": {
                "kind": "spend",
                "tier_spend": {
                  "now": { "amount": 200, "formatted": "$200" },
                  "at_expiration": { "amount": 100, "formatted": "$100" }
                },
                "valid_until": "2026-06-01T15:00:00Z",
                "upgrade_tier_id": 2,
                "spend_needed_for_renewal": null,
                "spend_needed_for_upgrade": {
                  "amount": 800,
                  "formatted": "$800"
                },
                "forecasted_tier_id": 1
              }
            },
            "birthday": { "day": 22, "month": 6 },
            "next_birthday": "2026-06-22",
            "claimed_rewards": [
              {
                "id": 1,
                "claimed_at": "2025-06-03T00:00:00Z",
                "auto_refund_at": null,
                "reward_id": 1,
                "title": "$5 discount",
                "state": "approved",
                "source": { "kind": "points_redemption", "points_cost": 500 },
                "redeemable": {
                  "kind": "cart_discount_voucher",
                  "applies_to_order_type": "all",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "code": "LL-XAIA8471",
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "minimum_spend": { "amount": 50, "formatted": "$50" },
                  "expires_at": "2026-06-03T00:00:00Z",
                  "used_at": null,
                  "usage_status": "not_used"
                }
              }
            ],
            "available_rules": [
              {
                "id": 1,
                "kind": "pageview",
                "limit": { "count": 5, "interval": "day" },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Visit our online store",
                  "description": null,
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 10
                  },
                  "result_short_text": "10 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 22,
                  "completion_limit": {
                    "state": "limit_not_reached",
                    "interval": "day",
                    "allowed_completions_within_interval": 5,
                    "completion_count_within_interval": 3,
                    "remaining_completions_within_interval": 2
                  }
                }
              },
              {
                "id": 2,
                "kind": "join_program",
                "limit": { "count": 1, "interval": null },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Join our loyalty program",
                  "description": "Sign up and start earning points on every order",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 100
                  },
                  "result_short_text": "100 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T07:44:24.537Z",
                  "completion_count": 1,
                  "completion_limit": { "state": "limit_reached_forever" }
                }
              },
              {
                "id": 3,
                "kind": "purchase",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Make a purchase",
                  "description": "Earn points every time you shop with us",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": 1,
                    "points": 5
                  },
                  "result_short_text": "5 points per $1"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 3,
                  "completion_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 4,
                "kind": "review",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Leave a review",
                  "description": "Tell us what you think of your purchase",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 50
                  },
                  "result_short_text": "50 points",
                  "requirements": [
                    {
                      "kind": "text_length",
                      "min_length": 50,
                      "text": "Review must be at least 50 characters"
                    }
                  ],
                  "modifiers": [
                    {
                      "kind": "includes_photo",
                      "min_count": 1,
                      "bonus": {
                        "kind": "per_count",
                        "points": 10,
                        "max_points": 30
                      },
                      "text": "Include photos for 10 bonus points per photo (up to 30)"
                    },
                    {
                      "kind": "text_length",
                      "min_length": 200,
                      "bonus": { "kind": "fixed", "points": 10 },
                      "text": "Write at least 200 characters for 10 bonus points"
                    }
                  ]
                },
                "context": {
                  "last_completed_at": null,
                  "completion_count": 0,
                  "completion_limit": { "state": "no_limit" }
                }
              }
            ],
            "available_rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "$5 discount",
                  "description": "Spend your points on $5 off your next order",
                  "cost": { "kind": "fixed", "points": 500 },
                  "cost_text": "500 points"
                },
                "context": {
                  "can_redeem": { "state": "redeemable" },
                  "last_claimed_at": "2025-06-03T00:00:00Z",
                  "claim_count": 1,
                  "claim_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 2,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "percentage",
                  "discount": { "percentage": 10, "formatted": "10%" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 50, "formatted": "$50" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "10% discount",
                  "description": null,
                  "cost": { "kind": "fixed", "points": 1000 },
                  "cost_text": "1,000 points"
                },
                "context": {
                  "can_redeem": {
                    "state": "insufficient_points",
                    "additional_points_required": 500
                  },
                  "last_claimed_at": null,
                  "claim_count": 0,
                  "claim_limit": { "state": "no_limit" }
                }
              }
            ],
            "history": [
              {
                "kind": "redeemed_points_for_reward",
                "label": "$5 discount",
                "date": "2025-06-03T15:00:00Z",
                "points": -500,
                "points_text": "-500 points",
                "reward": { "id": 1, "kind": "cart_discount_voucher" },
                "claimed_reward_id": 1,
                "state": "approved"
              },
              {
                "kind": "entered_tier",
                "label": "Entered Silver tier",
                "date": "2025-06-02T15:00:00Z",
                "tier": { "id": 1, "name": "Silver" }
              },
              {
                "kind": "earned_points_from_rule",
                "label": "Joined program",
                "date": "2025-06-01T15:00:00Z",
                "points": 500,
                "points_text": "500 points",
                "points_will_approve_at": null,
                "points_will_expire_at": "2026-06-01T00:00:00Z",
                "state": "approved",
                "rule": { "id": 1, "kind": "join_program" }
              }
            ],
            "active_cart_redemptions": [],
            "email_marketing_consent": { "state": "subscribed" },
            "sms_marketing_consent": { "state": "not_subscribed" },
            "receipt_upload_url": "https://upload.loyaltylion.com/_/_",
            "loyalty_pass_url": "https://passes.loyaltylion.net/loyalty-pass-install/_/c/_",
            "referral_urls": {
              "email": "https://prz.io/_",
              "direct": "https://prz.io/_",
              "facebook": "https://prz.io/_",
              "twitter": "https://prz.io/_",
              "whatsapp": "https://prz.io/_",
              "instagram": "https://prz.io/_",
              "device_share": "https://prz.io/_"
            }
          }
        }
      },
      "RulesCompleteTwitterFollowRequestBody": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the rule to complete"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to complete the rule for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["rule_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RulesCompleteInstagramFollowResponseBody": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                }
              ]
            },
            "description": "A list of actions that resulted from the rule's completion, such as points or rewards being awarded"
          },
          "customer": {
            "description": "The customer object, updated as of the rule action, i.e. their history, points, and rewards will include any new actions as a result of completing the rule. This customer will always have `state` set to `enrolled`, as only enrolled customers can complete rules",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["actions", "customer"],
        "additionalProperties": false,
        "example": {
          "actions": [
            {
              "kind": "earned_points_from_rule",
              "label": "Follow us on Instagram",
              "date": "2025-06-01T15:00:00Z",
              "state": "approved",
              "points": 100,
              "points_text": "100 points",
              "rule": { "id": 1, "kind": "instagram_follow" },
              "points_will_approve_at": null,
              "points_will_expire_at": null
            }
          ],
          "customer": {
            "state": "enrolled",
            "id": 1,
            "merchant_id": "1001",
            "email": "alice@example.com",
            "phone": "+447700900123",
            "first_name": "Alice",
            "last_name": "Kyako",
            "points_approved": 500,
            "points_pending": 200,
            "points_spent": 500,
            "enrolled_at": "2025-06-01T15:00:00Z",
            "tier_membership": {
              "tier_id": 1,
              "started_at": "2025-06-01T15:00:00Z",
              "expires_at": "2026-06-01T15:00:00Z",
              "progress": {
                "kind": "spend",
                "tier_spend": {
                  "now": { "amount": 200, "formatted": "$200" },
                  "at_expiration": { "amount": 100, "formatted": "$100" }
                },
                "valid_until": "2026-06-01T15:00:00Z",
                "upgrade_tier_id": 2,
                "spend_needed_for_renewal": null,
                "spend_needed_for_upgrade": {
                  "amount": 800,
                  "formatted": "$800"
                },
                "forecasted_tier_id": 1
              }
            },
            "birthday": { "day": 22, "month": 6 },
            "next_birthday": "2026-06-22",
            "claimed_rewards": [
              {
                "id": 1,
                "claimed_at": "2025-06-03T00:00:00Z",
                "auto_refund_at": null,
                "reward_id": 1,
                "title": "$5 discount",
                "state": "approved",
                "source": { "kind": "points_redemption", "points_cost": 500 },
                "redeemable": {
                  "kind": "cart_discount_voucher",
                  "applies_to_order_type": "all",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "code": "LL-XAIA8471",
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "minimum_spend": { "amount": 50, "formatted": "$50" },
                  "expires_at": "2026-06-03T00:00:00Z",
                  "used_at": null,
                  "usage_status": "not_used"
                }
              }
            ],
            "available_rules": [
              {
                "id": 1,
                "kind": "pageview",
                "limit": { "count": 5, "interval": "day" },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Visit our online store",
                  "description": null,
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 10
                  },
                  "result_short_text": "10 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 22,
                  "completion_limit": {
                    "state": "limit_not_reached",
                    "interval": "day",
                    "allowed_completions_within_interval": 5,
                    "completion_count_within_interval": 3,
                    "remaining_completions_within_interval": 2
                  }
                }
              },
              {
                "id": 2,
                "kind": "join_program",
                "limit": { "count": 1, "interval": null },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Join our loyalty program",
                  "description": "Sign up and start earning points on every order",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 100
                  },
                  "result_short_text": "100 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T07:44:24.537Z",
                  "completion_count": 1,
                  "completion_limit": { "state": "limit_reached_forever" }
                }
              },
              {
                "id": 3,
                "kind": "purchase",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Make a purchase",
                  "description": "Earn points every time you shop with us",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": 1,
                    "points": 5
                  },
                  "result_short_text": "5 points per $1"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 3,
                  "completion_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 4,
                "kind": "review",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Leave a review",
                  "description": "Tell us what you think of your purchase",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 50
                  },
                  "result_short_text": "50 points",
                  "requirements": [
                    {
                      "kind": "text_length",
                      "min_length": 50,
                      "text": "Review must be at least 50 characters"
                    }
                  ],
                  "modifiers": [
                    {
                      "kind": "includes_photo",
                      "min_count": 1,
                      "bonus": {
                        "kind": "per_count",
                        "points": 10,
                        "max_points": 30
                      },
                      "text": "Include photos for 10 bonus points per photo (up to 30)"
                    },
                    {
                      "kind": "text_length",
                      "min_length": 200,
                      "bonus": { "kind": "fixed", "points": 10 },
                      "text": "Write at least 200 characters for 10 bonus points"
                    }
                  ]
                },
                "context": {
                  "last_completed_at": null,
                  "completion_count": 0,
                  "completion_limit": { "state": "no_limit" }
                }
              }
            ],
            "available_rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "$5 discount",
                  "description": "Spend your points on $5 off your next order",
                  "cost": { "kind": "fixed", "points": 500 },
                  "cost_text": "500 points"
                },
                "context": {
                  "can_redeem": { "state": "redeemable" },
                  "last_claimed_at": "2025-06-03T00:00:00Z",
                  "claim_count": 1,
                  "claim_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 2,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "percentage",
                  "discount": { "percentage": 10, "formatted": "10%" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 50, "formatted": "$50" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "10% discount",
                  "description": null,
                  "cost": { "kind": "fixed", "points": 1000 },
                  "cost_text": "1,000 points"
                },
                "context": {
                  "can_redeem": {
                    "state": "insufficient_points",
                    "additional_points_required": 500
                  },
                  "last_claimed_at": null,
                  "claim_count": 0,
                  "claim_limit": { "state": "no_limit" }
                }
              }
            ],
            "history": [
              {
                "kind": "redeemed_points_for_reward",
                "label": "$5 discount",
                "date": "2025-06-03T15:00:00Z",
                "points": -500,
                "points_text": "-500 points",
                "reward": { "id": 1, "kind": "cart_discount_voucher" },
                "claimed_reward_id": 1,
                "state": "approved"
              },
              {
                "kind": "entered_tier",
                "label": "Entered Silver tier",
                "date": "2025-06-02T15:00:00Z",
                "tier": { "id": 1, "name": "Silver" }
              },
              {
                "kind": "earned_points_from_rule",
                "label": "Joined program",
                "date": "2025-06-01T15:00:00Z",
                "points": 500,
                "points_text": "500 points",
                "points_will_approve_at": null,
                "points_will_expire_at": "2026-06-01T00:00:00Z",
                "state": "approved",
                "rule": { "id": 1, "kind": "join_program" }
              }
            ],
            "active_cart_redemptions": [],
            "email_marketing_consent": { "state": "subscribed" },
            "sms_marketing_consent": { "state": "not_subscribed" },
            "receipt_upload_url": "https://upload.loyaltylion.com/_/_",
            "loyalty_pass_url": "https://passes.loyaltylion.net/loyalty-pass-install/_/c/_",
            "referral_urls": {
              "email": "https://prz.io/_",
              "direct": "https://prz.io/_",
              "facebook": "https://prz.io/_",
              "twitter": "https://prz.io/_",
              "whatsapp": "https://prz.io/_",
              "instagram": "https://prz.io/_",
              "device_share": "https://prz.io/_"
            }
          }
        }
      },
      "RulesCompleteInstagramFollowRequestBody": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the rule to complete"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to complete the rule for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["rule_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RulesCompleteTiktokFollowResponseBody": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                }
              ]
            },
            "description": "A list of actions that resulted from the rule's completion, such as points or rewards being awarded"
          },
          "customer": {
            "description": "The customer object, updated as of the rule action, i.e. their history, points, and rewards will include any new actions as a result of completing the rule. This customer will always have `state` set to `enrolled`, as only enrolled customers can complete rules",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["actions", "customer"],
        "additionalProperties": false,
        "example": {
          "actions": [
            {
              "kind": "earned_points_from_rule",
              "label": "Follow us on TikTok",
              "date": "2025-06-01T15:00:00Z",
              "state": "approved",
              "points": 100,
              "points_text": "100 points",
              "rule": { "id": 1, "kind": "tiktok_follow" },
              "points_will_approve_at": null,
              "points_will_expire_at": null
            }
          ],
          "customer": {
            "state": "enrolled",
            "id": 1,
            "merchant_id": "1001",
            "email": "alice@example.com",
            "phone": "+447700900123",
            "first_name": "Alice",
            "last_name": "Kyako",
            "points_approved": 500,
            "points_pending": 200,
            "points_spent": 500,
            "enrolled_at": "2025-06-01T15:00:00Z",
            "tier_membership": {
              "tier_id": 1,
              "started_at": "2025-06-01T15:00:00Z",
              "expires_at": "2026-06-01T15:00:00Z",
              "progress": {
                "kind": "spend",
                "tier_spend": {
                  "now": { "amount": 200, "formatted": "$200" },
                  "at_expiration": { "amount": 100, "formatted": "$100" }
                },
                "valid_until": "2026-06-01T15:00:00Z",
                "upgrade_tier_id": 2,
                "spend_needed_for_renewal": null,
                "spend_needed_for_upgrade": {
                  "amount": 800,
                  "formatted": "$800"
                },
                "forecasted_tier_id": 1
              }
            },
            "birthday": { "day": 22, "month": 6 },
            "next_birthday": "2026-06-22",
            "claimed_rewards": [
              {
                "id": 1,
                "claimed_at": "2025-06-03T00:00:00Z",
                "auto_refund_at": null,
                "reward_id": 1,
                "title": "$5 discount",
                "state": "approved",
                "source": { "kind": "points_redemption", "points_cost": 500 },
                "redeemable": {
                  "kind": "cart_discount_voucher",
                  "applies_to_order_type": "all",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "code": "LL-XAIA8471",
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "minimum_spend": { "amount": 50, "formatted": "$50" },
                  "expires_at": "2026-06-03T00:00:00Z",
                  "used_at": null,
                  "usage_status": "not_used"
                }
              }
            ],
            "available_rules": [
              {
                "id": 1,
                "kind": "pageview",
                "limit": { "count": 5, "interval": "day" },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Visit our online store",
                  "description": null,
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 10
                  },
                  "result_short_text": "10 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 22,
                  "completion_limit": {
                    "state": "limit_not_reached",
                    "interval": "day",
                    "allowed_completions_within_interval": 5,
                    "completion_count_within_interval": 3,
                    "remaining_completions_within_interval": 2
                  }
                }
              },
              {
                "id": 2,
                "kind": "join_program",
                "limit": { "count": 1, "interval": null },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Join our loyalty program",
                  "description": "Sign up and start earning points on every order",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 100
                  },
                  "result_short_text": "100 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T07:44:24.537Z",
                  "completion_count": 1,
                  "completion_limit": { "state": "limit_reached_forever" }
                }
              },
              {
                "id": 3,
                "kind": "purchase",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Make a purchase",
                  "description": "Earn points every time you shop with us",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": 1,
                    "points": 5
                  },
                  "result_short_text": "5 points per $1"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 3,
                  "completion_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 4,
                "kind": "review",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Leave a review",
                  "description": "Tell us what you think of your purchase",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 50
                  },
                  "result_short_text": "50 points",
                  "requirements": [
                    {
                      "kind": "text_length",
                      "min_length": 50,
                      "text": "Review must be at least 50 characters"
                    }
                  ],
                  "modifiers": [
                    {
                      "kind": "includes_photo",
                      "min_count": 1,
                      "bonus": {
                        "kind": "per_count",
                        "points": 10,
                        "max_points": 30
                      },
                      "text": "Include photos for 10 bonus points per photo (up to 30)"
                    },
                    {
                      "kind": "text_length",
                      "min_length": 200,
                      "bonus": { "kind": "fixed", "points": 10 },
                      "text": "Write at least 200 characters for 10 bonus points"
                    }
                  ]
                },
                "context": {
                  "last_completed_at": null,
                  "completion_count": 0,
                  "completion_limit": { "state": "no_limit" }
                }
              }
            ],
            "available_rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "$5 discount",
                  "description": "Spend your points on $5 off your next order",
                  "cost": { "kind": "fixed", "points": 500 },
                  "cost_text": "500 points"
                },
                "context": {
                  "can_redeem": { "state": "redeemable" },
                  "last_claimed_at": "2025-06-03T00:00:00Z",
                  "claim_count": 1,
                  "claim_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 2,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "percentage",
                  "discount": { "percentage": 10, "formatted": "10%" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 50, "formatted": "$50" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "10% discount",
                  "description": null,
                  "cost": { "kind": "fixed", "points": 1000 },
                  "cost_text": "1,000 points"
                },
                "context": {
                  "can_redeem": {
                    "state": "insufficient_points",
                    "additional_points_required": 500
                  },
                  "last_claimed_at": null,
                  "claim_count": 0,
                  "claim_limit": { "state": "no_limit" }
                }
              }
            ],
            "history": [
              {
                "kind": "redeemed_points_for_reward",
                "label": "$5 discount",
                "date": "2025-06-03T15:00:00Z",
                "points": -500,
                "points_text": "-500 points",
                "reward": { "id": 1, "kind": "cart_discount_voucher" },
                "claimed_reward_id": 1,
                "state": "approved"
              },
              {
                "kind": "entered_tier",
                "label": "Entered Silver tier",
                "date": "2025-06-02T15:00:00Z",
                "tier": { "id": 1, "name": "Silver" }
              },
              {
                "kind": "earned_points_from_rule",
                "label": "Joined program",
                "date": "2025-06-01T15:00:00Z",
                "points": 500,
                "points_text": "500 points",
                "points_will_approve_at": null,
                "points_will_expire_at": "2026-06-01T00:00:00Z",
                "state": "approved",
                "rule": { "id": 1, "kind": "join_program" }
              }
            ],
            "active_cart_redemptions": [],
            "email_marketing_consent": { "state": "subscribed" },
            "sms_marketing_consent": { "state": "not_subscribed" },
            "receipt_upload_url": "https://upload.loyaltylion.com/_/_",
            "loyalty_pass_url": "https://passes.loyaltylion.net/loyalty-pass-install/_/c/_",
            "referral_urls": {
              "email": "https://prz.io/_",
              "direct": "https://prz.io/_",
              "facebook": "https://prz.io/_",
              "twitter": "https://prz.io/_",
              "whatsapp": "https://prz.io/_",
              "instagram": "https://prz.io/_",
              "device_share": "https://prz.io/_"
            }
          }
        }
      },
      "RulesCompleteTiktokFollowRequestBody": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the rule to complete"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to complete the rule for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["rule_id", "customer_merchant_id"],
        "additionalProperties": false
      },
      "RulesCompleteCustomResponseBody": {
        "type": "object",
        "properties": {
          "actions": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionEarnedPointsFromRule"
                },
                {
                  "$ref": "#/components/schemas/CustomerHistoryActionReceivedReward"
                }
              ]
            },
            "description": "A list of actions that resulted from the rule's completion, such as points or rewards being awarded"
          },
          "customer": {
            "description": "The customer object, updated as of the rule action, i.e. their history, points, and rewards will include any new actions as a result of completing the rule. This customer will always have `state` set to `enrolled`, as only enrolled customers can complete rules",
            "$ref": "#/components/schemas/CustomerEnrolled"
          }
        },
        "required": ["actions", "customer"],
        "additionalProperties": false,
        "example": {
          "actions": [
            {
              "kind": "earned_points_from_rule",
              "label": "Enter our competition",
              "date": "2025-06-01T15:00:00Z",
              "state": "approved",
              "points": 100,
              "points_text": "100 points",
              "rule": { "id": 1, "kind": "custom" },
              "points_will_approve_at": null,
              "points_will_expire_at": null
            }
          ],
          "customer": {
            "state": "enrolled",
            "id": 1,
            "merchant_id": "1001",
            "email": "alice@example.com",
            "phone": "+447700900123",
            "first_name": "Alice",
            "last_name": "Kyako",
            "points_approved": 500,
            "points_pending": 200,
            "points_spent": 500,
            "enrolled_at": "2025-06-01T15:00:00Z",
            "tier_membership": {
              "tier_id": 1,
              "started_at": "2025-06-01T15:00:00Z",
              "expires_at": "2026-06-01T15:00:00Z",
              "progress": {
                "kind": "spend",
                "tier_spend": {
                  "now": { "amount": 200, "formatted": "$200" },
                  "at_expiration": { "amount": 100, "formatted": "$100" }
                },
                "valid_until": "2026-06-01T15:00:00Z",
                "upgrade_tier_id": 2,
                "spend_needed_for_renewal": null,
                "spend_needed_for_upgrade": {
                  "amount": 800,
                  "formatted": "$800"
                },
                "forecasted_tier_id": 1
              }
            },
            "birthday": { "day": 22, "month": 6 },
            "next_birthday": "2026-06-22",
            "claimed_rewards": [
              {
                "id": 1,
                "claimed_at": "2025-06-03T00:00:00Z",
                "auto_refund_at": null,
                "reward_id": 1,
                "title": "$5 discount",
                "state": "approved",
                "source": { "kind": "points_redemption", "points_cost": 500 },
                "redeemable": {
                  "kind": "cart_discount_voucher",
                  "applies_to_order_type": "all",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "code": "LL-XAIA8471",
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "minimum_spend": { "amount": 50, "formatted": "$50" },
                  "expires_at": "2026-06-03T00:00:00Z",
                  "used_at": null,
                  "usage_status": "not_used"
                }
              }
            ],
            "available_rules": [
              {
                "id": 1,
                "kind": "pageview",
                "limit": { "count": 5, "interval": "day" },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Visit our online store",
                  "description": null,
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 10
                  },
                  "result_short_text": "10 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 22,
                  "completion_limit": {
                    "state": "limit_not_reached",
                    "interval": "day",
                    "allowed_completions_within_interval": 5,
                    "completion_count_within_interval": 3,
                    "remaining_completions_within_interval": 2
                  }
                }
              },
              {
                "id": 2,
                "kind": "join_program",
                "limit": { "count": 1, "interval": null },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Join our loyalty program",
                  "description": "Sign up and start earning points on every order",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 100
                  },
                  "result_short_text": "100 points"
                },
                "context": {
                  "last_completed_at": "2025-06-10T07:44:24.537Z",
                  "completion_count": 1,
                  "completion_limit": { "state": "limit_reached_forever" }
                }
              },
              {
                "id": 3,
                "kind": "purchase",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Make a purchase",
                  "description": "Earn points every time you shop with us",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": 1,
                    "points": 5
                  },
                  "result_short_text": "5 points per $1"
                },
                "context": {
                  "last_completed_at": "2025-06-10T05:08:37.582Z",
                  "completion_count": 3,
                  "completion_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 4,
                "kind": "review",
                "limit": null,
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "Leave a review",
                  "description": "Tell us what you think of your purchase",
                  "result": {
                    "kind": "points",
                    "per_currency_unit": null,
                    "points": 50
                  },
                  "result_short_text": "50 points",
                  "requirements": [
                    {
                      "kind": "text_length",
                      "min_length": 50,
                      "text": "Review must be at least 50 characters"
                    }
                  ],
                  "modifiers": [
                    {
                      "kind": "includes_photo",
                      "min_count": 1,
                      "bonus": {
                        "kind": "per_count",
                        "points": 10,
                        "max_points": 30
                      },
                      "text": "Include photos for 10 bonus points per photo (up to 30)"
                    },
                    {
                      "kind": "text_length",
                      "min_length": 200,
                      "bonus": { "kind": "fixed", "points": 10 },
                      "text": "Write at least 200 characters for 10 bonus points"
                    }
                  ]
                },
                "context": {
                  "last_completed_at": null,
                  "completion_count": 0,
                  "completion_limit": { "state": "no_limit" }
                }
              }
            ],
            "available_rewards": [
              {
                "id": 1,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "fixed",
                  "discount": { "amount": 5, "formatted": "$5" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 10, "formatted": "$10" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "$5 discount",
                  "description": "Spend your points on $5 off your next order",
                  "cost": { "kind": "fixed", "points": 500 },
                  "cost_text": "500 points"
                },
                "context": {
                  "can_redeem": { "state": "redeemable" },
                  "last_claimed_at": "2025-06-03T00:00:00Z",
                  "claim_count": 1,
                  "claim_limit": { "state": "no_limit" }
                }
              },
              {
                "id": 2,
                "kind": "cart_discount_voucher",
                "limit": null,
                "properties": {
                  "discount_type": "percentage",
                  "discount": { "percentage": 10, "formatted": "10%" },
                  "applies_to_order_type": "one_time",
                  "recurring_cycle_limit": 1,
                  "supports_active_subscriptions": false,
                  "minimum_spend": { "amount": 50, "formatted": "$50" }
                },
                "variant": {
                  "tier_id": 1,
                  "enabled": true,
                  "title": "10% discount",
                  "description": null,
                  "cost": { "kind": "fixed", "points": 1000 },
                  "cost_text": "1,000 points"
                },
                "context": {
                  "can_redeem": {
                    "state": "insufficient_points",
                    "additional_points_required": 500
                  },
                  "last_claimed_at": null,
                  "claim_count": 0,
                  "claim_limit": { "state": "no_limit" }
                }
              }
            ],
            "history": [
              {
                "kind": "redeemed_points_for_reward",
                "label": "$5 discount",
                "date": "2025-06-03T15:00:00Z",
                "points": -500,
                "points_text": "-500 points",
                "reward": { "id": 1, "kind": "cart_discount_voucher" },
                "claimed_reward_id": 1,
                "state": "approved"
              },
              {
                "kind": "entered_tier",
                "label": "Entered Silver tier",
                "date": "2025-06-02T15:00:00Z",
                "tier": { "id": 1, "name": "Silver" }
              },
              {
                "kind": "earned_points_from_rule",
                "label": "Joined program",
                "date": "2025-06-01T15:00:00Z",
                "points": 500,
                "points_text": "500 points",
                "points_will_approve_at": null,
                "points_will_expire_at": "2026-06-01T00:00:00Z",
                "state": "approved",
                "rule": { "id": 1, "kind": "join_program" }
              }
            ],
            "active_cart_redemptions": [],
            "email_marketing_consent": { "state": "subscribed" },
            "sms_marketing_consent": { "state": "not_subscribed" },
            "receipt_upload_url": "https://upload.loyaltylion.com/_/_",
            "loyalty_pass_url": "https://passes.loyaltylion.net/loyalty-pass-install/_/c/_",
            "referral_urls": {
              "email": "https://prz.io/_",
              "direct": "https://prz.io/_",
              "facebook": "https://prz.io/_",
              "twitter": "https://prz.io/_",
              "whatsapp": "https://prz.io/_",
              "instagram": "https://prz.io/_",
              "device_share": "https://prz.io/_"
            }
          }
        }
      },
      "RulesCompleteCustomRequestBody": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "number",
            "description": "The LoyaltyLion ID of the rule to complete"
          },
          "customer_merchant_id": {
            "type": "string",
            "description": "The ID of the customer (in your ecommerce store or platform) to complete the rule for. For Shopify stores, you can pass either a [GID](https://shopify.dev/docs/api/usage/gids) or a regular numeric ID. \n\nThis must be a customer whose state is `enrolled`"
          }
        },
        "required": ["rule_id", "customer_merchant_id"],
        "additionalProperties": false
      }
    },
    "responses": {
      "ClientErrorBadRequest": {
        "description": "Bad Request",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "object",
                  "properties": {
                    "message": { "type": "string" },
                    "details": {
                      "type": "object",
                      "additionalProperties": { "type": "string" }
                    }
                  },
                  "required": ["message"]
                }
              },
              "required": ["error"]
            }
          }
        }
      }
    },
    "securitySchemes": {
      "CustomerSessionToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "A [customer session token](/headless-api/session-tokens): a signed envelope you generate yourself, scoped to a single site and customer and to the [scopes](/headless-api/session-tokens#scopes) you grant it. Safe to hand to a browser or app: it only authorizes customer-self-serve actions for its own customer. Provide it as a `Bearer` token in the `Authorization` header"
      },
      "ProgramApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key linked to a Program in LoyaltyLion, with a set of permissions (scopes). API keys can be created manually, or acquired through an OAuth2 flow. The API key should be provided as a `Bearer` token in the `Authorization` header"
      }
    }
  }
}
