Elastic Path · Schema

Promotions Standard Introduction

Promotions Standard offer the flexibility to provide different types of discounts to all your customers or specific customers. You can apply promotions automatically to all purchases, or alternatively, create promotion codes that customers must enter to receive a discount.

CommerceHeadless CommerceComposable CommerceeCommerceB2BProductsCatalogsOrdersPromotionsSubscriptionsPayments
View JSON Schema on GitHub

JSON Schema

promotions.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/elastic-path/main/json-schema/promotions.json",
  "title": "Promotions Standard Introduction",
  "description": "Promotions Standard offer the flexibility to provide different types of discounts to all your customers or specific customers. You can apply promotions automatically to all purchases, or alternatively, create promotion codes that customers must enter to receive a discount.",
  "version": "26.0504.7552059",
  "$defs": {
    "Data.AttributeObject": {
      "title": "Data.AttributeObject",
      "type": "object",
      "properties": {
        "attribute": {
          "type": "object",
          "properties": {
            "template": {
              "description": "Specifies the name of the template slug to be excluded from a promotion.",
              "type": "string",
              "examples": [
                "products(shoes)"
              ]
            },
            "field": {
              "description": "Specifies the unique slug identifier for the field excluded from a promotion.",
              "type": "string",
              "examples": [
                "brand"
              ]
            },
            "type": {
              "description": "Specifies the type of the field, such as `string`, `integer`, `boolean`, `float`, or `date`.",
              "type": "string",
              "examples": [
                "string"
              ]
            },
            "value": {
              "description": "Specifies the value of the field that was specified in the `attributes.field`. For example, you can specify any color in the value if you indicate color in the `attributes.field`.",
              "type": "string",
              "examples": [
                "adidas"
              ]
            }
          }
        }
      }
    },
    "Data.NodesObject": {
      "title": "Data.NodesObject",
      "type": "object",
      "properties": {
        "node": {
          "type": "object",
          "properties": {
            "values": {
              "description": "Specifies unique identifiers of the nodes to be excluded from the promotion.",
              "type": "array",
              "items": {
                "type": "string",
                "description": "node or hierarchy ids",
                "examples": [
                  "19650d2e-7e9d-496a-8658-5107dd8ad803",
                  "fe0cff14-1b7e-4abf-88db-cd0fd6a3ec5b"
                ]
              }
            }
          }
        }
      }
    },
    "Data.Conditions": {
      "title": "Data.Conditions",
      "type": "object",
      "properties": {
        "or": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "and": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Data.AttributeObject"
                    },
                    {
                      "$ref": "#/components/schemas/Data.NodesObject"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "Data.Promotions.Schema.TargetCatalogs": {
      "title": "Data.Promotions.Schema.TargetCatalogs",
      "type": "object",
      "properties": {
        "target_catalogs": {
          "description": "Specifies the unique identifiers of the catalogs to be applied for this promotion. If you do not set this parameter, promotion will be applied to all catalogs.",
          "type": "array",
          "items": {
            "type": "string",
            "examples": [
              "baff37e6-1c9b-449d-852c-80ec4d0e39c6"
            ]
          }
        }
      }
    },
    "Data.Promotions.Schema.Targets": {
      "title": "Data.Promotions.Schema.Targets",
      "type": "object",
      "properties": {
        "targets": {
          "description": "Specifies the product SKUs or unique identifiers of the products included in the promotion. Set \"targets:all\" if you want to apply the promotion to all SKUs. Leaving this field empty might cause errors. You need to define `schema.targets`, `schema.target_nodes` or `schema.target_attributes`, or all three of them to qualify for this promotion.",
          "type": "array",
          "items": {
            "type": "string"
          },
          "examples": [
            "sku1"
          ]
        }
      }
    },
    "Data.Promotions.Schema.TargetNodes": {
      "title": "Data.Promotions.Schema.TargetNodes",
      "type": "object",
      "properties": {
        "target_nodes": {
          "description": "Specifies the unique identifiers of the nodes to be applied for the promotion in addition to the product SKUs applied in targets. You can also define `schema.target_nodes` without defining the `schema.targets` if the promotion is intended for a certain node. You cannot define \"targets\":\"all\" and `schema.target_nodes` within the same schema. This will result in a validation error.",
          "type": "array",
          "items": {
            "type": "string",
            "examples": [
              "ff7d62d4-740c-43ac-97cd-a7b0c32221c2"
            ]
          }
        }
      }
    },
    "Data.Promotions.Schema.TargetAttributes": {
      "title": "Data.Promotions.Schema.TargetAttributes",
      "type": "object",
      "properties": {
        "target_attributes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "template": {
                "description": "Specifies the name of the template slug to be included in a promotion.",
                "type": "string",
                "examples": [
                  "products(shoes)"
                ]
              },
              "field": {
                "description": "Specifies the unique slug identifier for the field to be included in a promotion.",
                "type": "string",
                "examples": [
                  "brand"
                ]
              },
              "type": {
                "description": "Specifies the type of the field, such as `string`, `integer`, `boolean`, `float`, or `date`.",
                "type": "string",
                "examples": [
                  "string"
                ]
              },
              "value": {
                "description": "Specifies the value of the field that was specified in the `attributes.type`. For example, you can specify any color in the value if you indicate color in the `attributes.field`.",
                "type": "string",
                "examples": [
                  "adidas"
                ]
              }
            }
          }
        }
      }
    },
    "Data.Promotions.Schema.Currencies.AmountAndCurrency": {
      "title": "Data.Promotions.Schema.Currencies.AmountAndCurrency",
      "type": "object",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "description": "Specifies the fixed discount amount to be applied to the cart. For example, $10 off the total amount in the cart.",
          "type": "integer"
        },
        "currency": {
          "description": "Specifies a three-letter currency code. For example, USD.",
          "type": "string"
        }
      }
    },
    "Data.Promotions.Schema.XValue": {
      "title": "Data.Promotions.Schema.XValue",
      "type": "object",
      "required": [
        "x"
      ],
      "properties": {
        "x": {
          "description": "Specifies the X value for the promotion.",
          "type": "integer"
        }
      }
    },
    "Data.Promotions.Schema.YValue": {
      "title": "Data.Promotions.Schema.YValue",
      "type": "object",
      "required": [
        "y"
      ],
      "properties": {
        "y": {
          "description": "Specifies the Y value for the promotion.",
          "type": "integer"
        }
      }
    },
    "Data.Promotions.Schema.Requirements": {
      "title": "Data.Promotions.Schema.Requirements",
      "type": "object",
      "required": [
        "requirements"
      ],
      "properties": {
        "requirements": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Data.Promotions.Schema.Requirement"
          }
        }
      }
    },
    "Data.Promotions.Schema.Gifts": {
      "title": "Data.Promotions.Schema.Gifts",
      "type": "object",
      "required": [
        "gifts"
      ],
      "properties": {
        "gifts": {
          "description": "Specifies all the gift items that a shopper can avail when they qualify for the promotion. The gift quantity applies to each specified item. For example, if the promotion includes `giftA` and `giftB`, shopper can avail both the gifts if the cart qualifies for the gift promotion. If the cart qualifies for two gift promotions, the shopper can use two `giftA` and two `giftB`.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "auto_add_free_gift": {
          "description": "When set to `true`, free gift items are automatically added to the shopping cart for all the eligible products. Default is `false`.",
          "type": "boolean"
        }
      }
    },
    "Data.Promotions.Schema.Requirement": {
      "title": "Data.Promotions.Schema.Requirement",
      "type": "object",
      "required": [
        "targets",
        "quantity"
      ],
      "properties": {
        "targets": {
          "description": "Specifies an array of required product SKUs or IDs for the bundle discount promotion.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "quantity": {
          "description": "Specifies the quantities of products to be applied for the promotion.",
          "type": "integer"
        }
      }
    },
    "Data.Promotions.Schema.AmountAndCurrencyArray": {
      "title": "Data.Promotions.Schema.AmountAndCurrencyArray",
      "type": "object",
      "required": [
        "currencies"
      ],
      "properties": {
        "currencies": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Data.Promotions.Schema.Currencies.AmountAndCurrency"
          }
        }
      }
    },
    "Data.Promotions.Schema.Percent": {
      "title": "Data.Promotions.Schema.Percent",
      "type": "object",
      "required": [
        "percent"
      ],
      "properties": {
        "percent": {
          "description": "Specifies the discount percentage to be applied to the targeted SKU price. For example, 10% discount on a product SKU priced at $100. You can specify the discount percentage with up to six decimal places.",
          "type": "integer"
        }
      }
    },
    "Data.Promotions.Schema.Currencies.PercentageAndCurrency": {
      "title": "Data.Promotions.Schema.Currencies.PercentageAndCurrency",
      "type": "object",
      "required": [
        "percentage",
        "currency"
      ],
      "properties": {
        "percentage": {
          "description": "Specifies the discount percentage of the cart total value. For example, 10 represents 10% discount of the cart value of $100. You can add up to six decimal places for the discount percentage to be applied for the promotion.",
          "type": "number"
        },
        "currency": {
          "description": "Specifies a three-letter currency code. For example, USD.",
          "type": "string"
        }
      }
    },
    "Data.Promotions.Schema.PercentageAndCurrencyArray": {
      "title": "Data.Promotions.Schema.PercentageAndCurrencyArray",
      "type": "object",
      "required": [
        "currencies"
      ],
      "properties": {
        "currencies": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Data.Promotions.Schema.Currencies.PercentageAndCurrency"
          }
        }
      }
    },
    "Data.Promotions.Schema.Exclude": {
      "title": "Data.Promotions.Schema.Exclude",
      "type": "object",
      "properties": {
        "conditions": {
          "type": "object",
          "$ref": "#/components/schemas/Data.Conditions"
        }
      }
    },
    "Data.BasePromotions": {
      "title": "Data.Promotions",
      "type": "object",
      "required": [
        "type",
        "id",
        "name",
        "description",
        "automatic",
        "enabled",
        "promotion_type",
        "schema",
        "start",
        "end"
      ],
      "properties": {
        "type": {
          "description": "Specifies the type of the resource. The type of resource for promotions is `promotion`.",
          "type": "string",
          "const": "promotion"
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "description": "Specifies a name for the promotion.",
          "type": "string",
          "examples": [
            "Buy SKU1 and SKU2 to get free gift"
          ]
        },
        "description": {
          "description": "Specifies a description for the promotion.",
          "type": "string",
          "examples": [
            "SKU1 and SKU2 for free gift"
          ]
        },
        "promotion_type": {
          "description": "Specifies the type of the promotion.",
          "type": "string",
          "enum": [
            "fixed_discount",
            "percent_discount",
            "item_fixed_discount",
            "item_percent_discount",
            "x_for_y",
            "x_for_amount",
            "bundle_fixed_discount",
            "bundle_gift"
          ]
        },
        "enabled": {
          "description": "Specifies whether the promotion is enabled. The options are `true` or `false`, and the default setting is `false`.",
          "type": "boolean",
          "examples": [
            true
          ]
        },
        "automatic": {
          "description": "Specifies whether the promotion is applied automatically to the cart or a code is required to apply the promotion. The default setting is to `false`. When this value is set to `true`, a code is autogenerated. If this value is set to `false`, you must create the code manually. For more information about creating codes, see the Create Promotion Codes section.",
          "type": "boolean",
          "examples": [
            true
          ]
        },
        "start": {
          "description": "Specifies the start date and time of the promotion or the start date of the promotion. You can provide a specific time in the HH:MM format.",
          "type": "string",
          "examples": [
            "2020-01-01"
          ]
        },
        "end": {
          "description": "Specifies the end date and time of the promotion or the end date of the promotion.",
          "type": "string",
          "examples": [
            "2100-01-01"
          ]
        },
        "min_cart_value": {
          "description": "Specifies an array of currency-value objects, `min_cart_value[].currency` and `min_cart_value[].amount`, that provides the minimum cart value required for the promotion to apply. You can add one or several value specifications in different currencies. Do not use `max_discount_value` for Cart Fixed Discount promotion and Item Fixed Discount promotion. If `max_discount_value` is greater than the `fixed_discount` value, the `fixed_discount` value is applied; otherwise the `max_discount value` is applied.",
          "type": "object",
          "examples": [
            {
              "amount": 1000,
              "currency": "USD"
            }
          ]
        },
        "max_applications_per_cart": {
          "description": "Specifies the maximum number of application of a promotion per cart.",
          "type": "number",
          "examples": [
            0
          ]
        }
      }
    },
    "Data.CartFixedDiscountPromotion": {
      "title": "Data.CartFixedDiscountPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.AmountAndCurrencyArray"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Exclude"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.CartPercentDiscountPromotion": {
      "title": "Data.CartPercentDiscountPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.PercentageAndCurrencyArray"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Exclude"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.ItemFixedDiscountPromotion": {
      "title": "Data.ItemFixedDiscountPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Targets"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetNodes"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetAttributes"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.AmountAndCurrencyArray"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Exclude"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.ItemPercentDiscountPromotion": {
      "title": "Data.ItemPercentDiscountPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Targets"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetNodes"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetAttributes"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Exclude"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Percent"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.XForYDiscountPromotion": {
      "title": "Data.XForYDiscountPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Targets"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetNodes"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetAttributes"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Exclude"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.XValue"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.YValue"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.XForAmountDiscountPromotion": {
      "title": "Data.XForAmountDiscountPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Targets"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetNodes"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.AmountAndCurrencyArray"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Exclude"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.XValue"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.FixedBundleDiscountPromotion": {
      "title": "Data.FixedBundleDiscountPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.AmountAndCurrencyArray"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Requirements"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.FreeGiftPromotion": {
      "title": "Data.FreeGiftPromotion",
      "allOf": [
        {
          "$ref": "#/components/schemas/Data.BasePromotions"
        },
        {
          "type": "object",
          "properties": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.TargetCatalogs"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Requirements"
                },
                {
                  "$ref": "#/components/schemas/Data.Promotions.Schema.Gifts"
                }
              ]
            }
          }
        }
      ]
    },
    "Data.PromotionObject": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/components/schemas/Data.CartFixedDiscountPromotion"
        },
        {
          "$ref": "#/components/schemas/Data.CartPercentDiscountPromotion"
        },
        {
          "$ref": "#/components/schemas/Data.ItemFixedDiscountPromotion"
        },
        {
          "$ref": "#/components/schemas/Data.ItemPercentDiscountPromotion"
        },
        {
          "$ref": "#/components/schemas/Data.XForYDiscountPromotion"
        },
        {
          "$ref": "#/components/schemas/Data.XForAmountDiscountPromotion"
        },
        {
          "$ref": "#/components/schemas/Data.FixedBundleDiscountPromotion"
        },
        {
          "$ref": "#/components/schemas/Data.FreeGiftPromotion"
        }
      ],
      "discriminator": {
        "propertyName": "promotion_type",
        "mapping": {
          "fixed_discount": "#/components/schemas/Data.CartFixedDiscountPromotion",
          "percent_discount": "#/components/schemas/Data.CartPercentDiscountPromotion",
          "item_fixed_discount": "#/components/schemas/Data.ItemFixedDiscountPromotion",
          "item_percent_discount": "#/components/schemas/Data.ItemPercentDiscountPromotion",
          "x_for_y": "#/components/schemas/Data.XForYDiscountPromotion",
          "x_for_amount": "#/components/schemas/Data.XForAmountDiscountPromotion",
          "bundle_fixed_discount": "#/components/schemas/Data.FixedBundleDiscountPromotion",
          "bundle_gift": "#/components/schemas/Data.FreeGiftPromotion"
        }
      },
      "required": [
        "promotion_type"
      ],
      "properties": {
        "promotion_type": {
          "type": "string",
          "enum": [
            "fixed_discount",
            "percent_discount",
            "item_fixed_discount",
            "item_percent_discount",
            "x_for_y",
            "x_for_amount",
            "bundle_fixed_discount",
            "bundle_gift"
          ]
        }
      }
    },
    "Data.PromotionsCodesObject": {
      "title": "Data.PromotionsCodesObject",
      "type": "object",
      "properties": {
        "data": {
          "$ref": "#/components/schemas/Data.PromotionsCodes"
        }
      }
    },
    "Data.PromotionsCodesRequest": {
      "title": "Data.PromotionsCodesRequest",
      "type": "object",
      "properties": {
        "codes": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Data.CodeRequest"
          },
          "description": ""
        },
        "type": {
          "description": "Specifies the type of the resource. The type of resource for promotions is `promotion_codes`.",
          "type": "string",
          "examples": [
            "promotion_codes"
          ]
        }
      }
    },
    "Data.CodeRequest": {
      "title": "Data.CodeRequest",
      "type": "object",
      "properties": {
        "code": {
          "description": "Specifies the string to use as a code for the promotion.",
          "type": "string",
          "examples": [
            "ZXY_CBA"
          ]
        },
        "consume_unit": {
          "description": "Specifies whether the code is applied to a line item or cart. The options are `per_item` or `per_cart`. The default setting is per_cart, which is applied at cart level. The `per_item` setting specifies how many times a buyer can use a promotion code on promotion items in a cart. For example, in a store that offers 50% off on SKU1, but limits the maximum usage of the promotion code to two, buyer can apply the promotion to SKU1 up to 2 times if cart has two quantities of SKU1. The third SKU1 is sold for regular price. The code usage is applied at checkout. You must set the automatic setting to `false` and create a code for this promotion to work.",
          "type": "string",
          "examples": [
            "per_item"
          ]
        },
        "user": {
          "description": "Specifies the users who can use the code. You can use the customer object ID or an array of customer object IDs. For more information, see the [Create a customer](/docs/customer-management/customer-management-api/create-a-customer) section. Additionally, you could pass any identifying string to the promotions service that identifies a user.",
          "type": "string",
          "examples": [
            "{customerID}"
          ]
        },
        "uses": {
          "description": "Specifies the maximum number of times the code can be used. If no value is set, the shopper can use the code any number of times.",
          "type": "number",
          "examples": [
            10
          ]
        }
      }
    },
    "Data.PromotionsCodes": {
      "title": "Data.PromotionsCodes",
      "type": "object",
      "properties": {
        "codes": {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/Data.CodeResponse"
          },
          "description": ""
        }
      }
    },
    "Data.CodeResponse": {
      "title": "Data.CodeResponse",
      "type": "object",
      "properties": {
        "code": {
          "description": "Specifies the name of the code.",
          "type": "string",
          "examples": [
            "ZXY_CBA"
          ]
        },
        "consume_unit": {
          "description": "Specifies whether the code is applied to a line item or cart. The options are `per_item` or `per_cart`. The default setting is `per_cart`, which is applied at cart level. The `per_item` setting specifies how many times a buyer can use a promotion code on promotion items in a cart. For example, in a store that offers 50% off on SKU1, but limits the maximum usage of the promotion code to two, buyer can apply the promotion to SKU1 up to 2 times if cart has two quantities of SKU1. The third SKU1 is sold for regular price. The code usage is applied at checkout. You must set the automatic setting to false and create a code for this promotion to work.",
          "type": "string",
          "examples": [
            "per_item"
          ]
        },
        "user": {
          "description": "Specifies the users who can use the code. You can use the customer object ID or an array of customer object IDs. For more information, see the [Create a customer](/docs/customer-management/customer-management-api/create-a-customer) section. Additionally, you could pass any identifying string to the promotions service that identifies a user.",
          "type": "string",
          "examples": [
            "{customerID}"
          ]
        },
        "uses": {
          "description": "Specifies the maximum number of times the code can be used. If no value is set, the shopper can use the code any number of times.",
          "type": "number",
          "examples": [
            10
          ]
        },
        "created_by": {
          "description": "Specifies by whom it was created.",
          "type": "string",
          "examples": [
            "[email protected]"
          ]
        },
        "meta": {
          "type": "object",
          "properties": {
            "timestamps": {
              "type": "object",
              "properties": {
                "created_at": {
                  "description": "Specifies the date the code was created.",
                  "type": "string",
                  "example": "2023-11-07T23:04:18.845Z"
                }
              }
            }
          }
        }
      }
    },
    "Response.Meta.Promotions": {
      "title": "Response.Meta.Promotions",
      "type": "object",
      "properties": {
        "page": {
          "$ref": "#/components/schemas/Response.PaginationPage"
        },
        "results": {
          "$ref": "#/components/schemas/Response.PaginationResults"
        }
      }
    },
    "Response.PromotionCodes": {
      "title": "Response.PromotionCodes",
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "examples": [
            "ZXY_CBA"
          ]
        }
      }
    },
    "Response.PaginationPage": {
      "type": "object",
      "properties": {
        "current": {
          "description": "The current page.",
          "type": "integer"
        },
        "limit": {
          "description": "The maximum number of records per page for this response. You can set this value up to 100.",
          "type": "integer"
        },
        "offset": {
          "description": "The current offset by number of records, not pages. Offset is zero-based.",
          "type": "integer"
        },
        "total": {
          "description": "The total page count.",
          "type": "integer"
        }
      }
    },
    "Response.PaginationResults": {
      "type": "object",
      "properties": {
        "total": {
          "description": "The total number of results.",
          "type": "integer"
        }
      }
    },
    "Response.PageLinks": {
      "type": "object",
      "properties": {
        "current": {
          "description": "Always the current page.",
          "type": "string"
        },
        "first": {
          "description": "Always the first page.",
          "type": "string"
 

# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elastic-path/refs/heads/main/json-schema/promotions.json