{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stripe/main/json-schema/stripe-promotion-codes-resource-promotion-code-list-schema.json",
  "title": "PromotionCodesResourcePromotionCodeList",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stripe-promotion-codes-api-openapi.yml#/components/schemas/PromotionCodesResourcePromotionCodeList",
  "type": "object",
  "required": [
    "data",
    "has_more",
    "object",
    "url"
  ],
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/promotion_code"
      },
      "type": "array"
    },
    "has_more": {
      "description": "True if this list has another page of items after this one that can be fetched.",
      "type": "boolean"
    },
    "object": {
      "description": "String representing the object's type. Objects of the same type share the same value. Always has the value `list`.",
      "enum": [
        "list"
      ],
      "type": "string"
    },
    "url": {
      "description": "The URL where this list can be accessed.",
      "maxLength": 5000,
      "pattern": "^/v1/promotion_codes",
      "type": "string"
    }
  },
  "$defs": {
    "coupon": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    },
    "customer": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    },
    "deleted_customer": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    },
    "promotion_code": {
      "description": "A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to\ncreate multiple codes for a single coupon.",
      "properties": {
        "active": {
          "description": "Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.",
          "type": "boolean"
        },
        "code": {
          "description": "The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer.",
          "maxLength": 5000,
          "type": "string"
        },
        "coupon": {
          "$ref": "#/$defs/coupon"
        },
        "created": {
          "description": "Time at which the object was created. Measured in seconds since the Unix epoch.",
          "format": "unix-time",
          "type": "integer"
        },
        "customer": {
          "anyOf": [
            {
              "maxLength": 5000,
              "type": "string"
            },
            {
              "$ref": "#/$defs/customer"
            },
            {
              "$ref": "#/$defs/deleted_customer"
            }
          ],
          "description": "The customer that this promotion code can be used by.",
          "x-expansionResources": {
            "oneOf": [
              {
                "$ref": "#/$defs/customer"
              },
              {
                "$ref": "#/$defs/deleted_customer"
              }
            ]
          }
        },
        "expires_at": {
          "description": "Date at which the promotion code can no longer be redeemed.",
          "format": "unix-time",
          "type": [
            "integer",
            "null"
          ]
        },
        "id": {
          "description": "Unique identifier for the object.",
          "maxLength": 5000,
          "type": "string"
        },
        "livemode": {
          "description": "Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.",
          "type": "boolean"
        },
        "max_redemptions": {
          "description": "Maximum number of times this promotion code can be redeemed.",
          "type": [
            "integer",
            "null"
          ]
        },
        "metadata": {
          "additionalProperties": {
            "maxLength": 500,
            "type": "string"
          },
          "description": "Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.",
          "type": [
            "object",
            "null"
          ]
        },
        "object": {
          "description": "String representing the object's type. Objects of the same type share the same value.",
          "enum": [
            "promotion_code"
          ],
          "type": "string"
        },
        "restrictions": {
          "$ref": "#/$defs/promotion_codes_resource_restrictions"
        },
        "times_redeemed": {
          "description": "Number of times this promotion code has been used.",
          "type": "integer"
        }
      },
      "required": [
        "active",
        "code",
        "coupon",
        "created",
        "id",
        "livemode",
        "object",
        "restrictions",
        "times_redeemed"
      ],
      "title": "PromotionCode",
      "type": "object",
      "x-expandableFields": [
        "coupon",
        "customer",
        "restrictions"
      ],
      "x-resourceId": "promotion_code"
    },
    "promotion_codes_resource_restrictions": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    }
  }
}