# discounts.code.apply

> This request validates a shopper-submitted discount code and applies the discount to the cart if it exists.

Source: https://help.boltapp.com/api-reference/merchant-callback-reference/discount/discounts-code-apply

`POST /discounts.code.apply`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "version": "1.0.0",
    "title": "Merchant Callback API Reference",
    "description": "## About\nThe Merchant Callback API is a general endpoint on your eCommerce server that Bolt calls to receive information necessary for operating the checkout process.\n\n**Note**: You must also reference the [Bolt API](/api-bolt) when building a custom cart integration.\n\n### URL Options\nYou can set the URL(s) for your Merchant Callback API in the [Bolt Merchant dashboard](https://merchant.boltapp.com).\n- **v1**: v1 endpoints are individualized and described in the subsections below with unique URLs (e.g., `/order_shipping_and_tax`)\n- **Universal**: The \"Universal API\" is one endpoint (instead of many) that handles all events described in this spec; the methods and payloads are identical, however you only need to use one URL.\n\nNeed more information? See our [Developer reference articles](/developers/references/) for **environment details**, **error codes**, and more.\n"
  },
  "servers": [
    {
      "url": "https://merchant-url.com/api"
    }
  ],
  "paths": {
    "/discounts.code.apply": {
      "post": {
        "summary": "discounts.code.apply",
        "operationId": "discounts.code.apply",
        "description": "This request validates a shopper-submitted discount code and applies the discount to the cart if it exists.\n",
        "security": [
          {
            "ApiKeyAuth": [
              "X-API-Key"
            ]
          }
        ],
        "tags": [
          "Discount"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/bolt_hmac_param"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/discount_check"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/discount_check"
          },
          "422": {
            "$ref": "#/components/responses/discount_check_error"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "bolt_hmac_param": {
        "in": "header",
        "name": "X-Bolt-Hmac-Sha256",
        "schema": {
          "type": "string"
        },
        "description": "Bolt sends a signed HMAC for hook verification"
      }
    },
    "requestBodies": {
      "discount_check": {
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "event": {
                  "type": "string",
                  "enum": [
                    "discounts.code.apply"
                  ]
                },
                "data": {
                  "type": "object",
                  "description": "This is a generic wrapper for the merchant's data. Open to see properties.",
                  "properties": {
                    "discount_code": {
                      "$ref": "#/components/schemas/discount_code"
                    },
                    "cart": {
                      "$ref": "#/components/schemas/cart_discounts"
                    },
                    "customer_name": {
                      "$ref": "#/components/schemas/name_person"
                    },
                    "customer_email": {
                      "$ref": "#/components/schemas/email"
                    },
                    "customer_phone": {
                      "$ref": "#/components/schemas/phone"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "discount_code": {
        "type": "string",
        "description": "The discount code input by a shopper.",
        "examples": [
          "SUMMERFUN15"
        ]
      },
      "cart_discounts": {
        "type": "object",
        "properties": {
          "order_reference": {
            "$ref": "#/components/schemas/order_reference"
          },
          "display_id": {
            "$ref": "#/components/schemas/display_id"
          },
          "currency": {
            "$ref": "#/components/schemas/currency"
          },
          "subtotal_amount": {
            "$ref": "#/components/schemas/amounts"
          },
          "total_amount": {
            "$ref": "#/components/schemas/amounts"
          },
          "tax_amount": {
            "$ref": "#/components/schemas/amounts"
          },
          "shipping_amount": {
            "$ref": "#/components/schemas/amounts"
          },
          "discount_amount": {
            "$ref": "#/components/schemas/amounts"
          },
          "billing_address": {
            "$ref": "#/components/schemas/consumer_billing_address"
          },
          "items": {
            "$ref": "#/components/schemas/items"
          },
          "shipments": {
            "$ref": "#/components/schemas/cart_shipments"
          },
          "discounts": {
            "$ref": "#/components/schemas/discount_codes"
          }
        }
      },
      "order_reference": {
        "type": "string",
        "description": "The order reference.",
        "examples": [
          "order-12345"
        ]
      },
      "display_id": {
        "type": "string",
        "description": "The displayed ID.",
        "examples": [
          "ID-12345"
        ]
      },
      "currency": {
        "type": "object",
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/currency_iso"
          },
          "currency_symbol": {
            "$ref": "#/components/schemas/currency_symbol"
          }
        }
      },
      "currency_iso": {
        "type": "string",
        "description": "The 3-digit ISO code for the currency. **Nullable** for Transactions Details.",
        "examples": [
          "USD"
        ]
      },
      "currency_symbol": {
        "type": "string",
        "description": "The currency symbol used for the amount. **Nullable** for Transactions Details.",
        "examples": [
          "$"
        ]
      },
      "amounts": {
        "type": "object",
        "description": "The amount. **Nullable** for Transactions Details.",
        "required": [
          "amount",
          "currency",
          "currency_symbol"
        ],
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/amount"
          },
          "currency": {
            "$ref": "#/components/schemas/currency_iso"
          },
          "currency_symbol": {
            "$ref": "#/components/schemas/currency_symbol"
          }
        }
      },
      "amount": {
        "type": "integer",
        "description": "The amount in cents. **Nullable** for Transactions Details.",
        "examples": [
          754
        ]
      },
      "consumer_billing_address": {
        "type": "object",
        "required": [
          "street_address1",
          "locality",
          "region",
          "postal_code"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/billing_address_id"
          },
          "street_address1": {
            "$ref": "#/components/schemas/street_address"
          },
          "street_address2": {
            "$ref": "#/components/schemas/street_address"
          },
          "street_address3": {
            "$ref": "#/components/schemas/street_address"
          },
          "street_address4": {
            "$ref": "#/components/schemas/street_address"
          },
          "locality": {
            "$ref": "#/components/schemas/locality"
          },
          "region": {
            "$ref": "#/components/schemas/region"
          },
          "postal_code": {
            "$ref": "#/components/schemas/postal_code"
          },
          "country_code": {
            "$ref": "#/components/schemas/country_code"
          },
          "country": {
            "$ref": "#/components/schemas/country"
          },
          "name": {
            "$ref": "#/components/schemas/name_person"
          },
          "first_name": {
            "$ref": "#/components/schemas/first_name"
          },
          "last_name": {
            "$ref": "#/components/schemas/last_name"
          },
          "company": {
            "$ref": "#/components/schemas/company"
          },
          "phone_number": {
            "$ref": "#/components/schemas/phone"
          },
          "email_address": {
            "$ref": "#/components/schemas/email"
          }
        }
      },
      "billing_address_id": {
        "type": "string",
        "description": "ID for billing address",
        "examples": [
          "address-1"
        ]
      },
      "street_address": {
        "type": "string",
        "description": "You can use up to 4 street address fields.",
        "examples": [
          "42 Wallaby Way"
        ]
      },
      "locality": {
        "type": "string",
        "description": "A locale such as county, district, etc.",
        "examples": [
          "Wayne County"
        ]
      },
      "region": {
        "type": "string",
        "description": "A state, province, or similar region type.",
        "examples": [
          "Quebec"
        ]
      },
      "postal_code": {
        "type": "string",
        "description": "The postal code.",
        "examples": [
          "11209"
        ]
      },
      "country_code": {
        "type": "string",
        "description": "The 2-digit country code.",
        "examples": [
          "US"
        ]
      },
      "country": {
        "type": "string",
        "description": "The country's name.",
        "examples": [
          "Canada"
        ]
      },
      "name_person": {
        "type": "string",
        "description": "The first and last name together as a string.",
        "examples": [
          "Charlotte Charles"
        ]
      },
      "first_name": {
        "type": "string",
        "description": "The person's first name.",
        "examples": [
          "Charlotte"
        ]
      },
      "last_name": {
        "type": "string",
        "description": "The person's last name.",
        "examples": [
          "Charles"
        ]
      },
      "company": {
        "type": "string",
        "description": "The company's name",
        "examples": [
          "ACME Corp."
        ]
      },
      "phone": {
        "type": "string",
        "description": "A phone number without the country code.",
        "examples": [
          "867-5309"
        ]
      },
      "email": {
        "type": "string",
        "description": "The person's email address.",
        "examples": [
          "my.email@gmail.com"
        ]
      },
      "items": {
        "type": "array",
        "description": "A list of items.",
        "items": {
          "$ref": "#/components/schemas/item"
        }
      },
      "item": {
        "type": "object",
        "description": "An item with properties.",
        "required": [
          "reference",
          "name",
          "total_amount",
          "unit_price",
          "quantity"
        ],
        "properties": {
          "reference": {
            "$ref": "#/components/schemas/reference"
          },
          "name": {
            "$ref": "#/components/schemas/name_item"
          },
          "description": {
            "$ref": "#/components/schemas/item_description"
          },
          "options": {
            "$ref": "#/components/schemas/options"
          },
          "total_amount": {
            "$ref": "#/components/schemas/total_amount"
          },
          "unit_price": {
            "$ref": "#/components/schemas/unit_price"
          },
          "tax_amount": {
            "$ref": "#/components/schemas/amounts"
          },
          "quantity": {
            "$ref": "#/components/schemas/quantity"
          },
          "uom": {
            "type": "string",
            "examples": [
              "string"
            ]
          },
          "upc": {
            "type": "string",
            "examples": [
              "string"
            ]
          },
          "sku": {
            "$ref": "#/components/schemas/sku"
          },
          "isbn": {
            "$ref": "#/components/schemas/isbn"
          },
          "brand": {
            "$ref": "#/components/schemas/brand"
          },
          "manufacturer": {
            "$ref": "#/components/schemas/manufacturer"
          },
          "category": {
            "$ref": "#/components/schemas/category"
          },
          "collections": {
            "$ref": "#/components/schemas/collections"
          },
          "tags": {
            "$ref": "#/components/schemas/tag"
          },
          "color": {
            "$ref": "#/components/schemas/color"
          },
          "size": {
            "$ref": "#/components/schemas/size"
          },
          "weight": {
            "$ref": "#/components/schemas/total_weight"
          },
          "image_url": {
            "$ref": "#/components/schemas/image_url"
          },
          "details_url": {
            "type": "string",
            "description": "The URL for the item's details.",
            "examples": [
              "https://boltswagstore.com/inventory/hats/red-hat.png"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/type"
          },
          "taxable": {
            "$ref": "#/components/schemas/taxable"
          },
          "properties": {
            "$ref": "#/components/schemas/item_properties"
          },
          "item_group": {
            "$ref": "#/components/schemas/item_group"
          },
          "shipment_type": {
            "$ref": "#/components/schemas/item_shipment_type"
          },
          "customizations": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "name",
                "price",
                "attributes"
              ],
              "properties": {
                "name": {
                  "$ref": "#/components/schemas/customizations_name"
                },
                "price": {
                  "$ref": "#/components/schemas/amounts"
                },
                "attributes": {
                  "$ref": "#/components/schemas/metadata_component"
                }
              }
            }
          },
          "bolt_product_id": {
            "$ref": "#/components/schemas/bolt_product_id"
          },
          "gift_options": {
            "$ref": "#/components/schemas/gift_options"
          }
        }
      },
      "reference": {
        "type": "string",
        "description": "Reference for the object.",
        "examples": [
          "1123"
        ]
      },
      "name_item": {
        "type": "string",
        "description": "The name of an item.",
        "examples": [
          "Blue Hat"
        ]
      },
      "item_description": {
        "type": "string",
        "description": "A description for the item added to the cart/order.",
        "examples": [
          " Large blue satin hat with initials embroidered."
        ]
      },
      "options": {
        "type": "string",
        "examples": [
          "string option"
        ]
      },
      "total_amount": {
        "type": "integer",
        "description": "The total amount.",
        "examples": [
          9900
        ]
      },
      "unit_price": {
        "type": "integer",
        "description": "Price per unit in cents.",
        "examples": [
          500
        ]
      },
      "quantity": {
        "type": "integer",
        "description": "The quantity of this item.",
        "examples": [
          3
        ]
      },
      "sku": {
        "type": "string",
        "description": "The SKU identifier for this item or service.",
        "examples": [
          "SKU-11021"
        ]
      },
      "isbn": {
        "type": "string",
        "description": "A 13-digit identifier for a book item.",
        "examples": [
          "12-345-678-90123"
        ]
      },
      "brand": {
        "type": "string",
        "description": "The name of a brand.",
        "examples": [
          "Bolt Swagstore"
        ]
      },
      "manufacturer": {
        "type": "string",
        "description": "The name of a manufacturer.",
        "examples": [
          "Bolt Factory"
        ]
      },
      "category": {
        "type": "string",
        "description": "A category.",
        "examples": [
          "hats"
        ]
      },
      "collections": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/collection"
        }
      },
      "collection": {
        "type": "string",
        "examples": [
          "summer"
        ]
      },
      "tag": {
        "type": "string",
        "description": "A tag",
        "examples": [
          "red"
        ]
      },
      "color": {
        "type": "string",
        "description": "The color.",
        "examples": [
          "Red"
        ]
      },
      "size": {
        "type": "string",
        "description": "The size.",
        "examples": [
          "XXL"
        ]
      },
      "total_weight": {
        "type": "object",
        "properties": {
          "weight": {
            "$ref": "#/components/schemas/weight"
          },
          "unit": {
            "$ref": "#/components/schemas/weight_unit"
          }
        }
      },
      "weight": {
        "type": "integer",
        "description": "The weight of an item.",
        "examples": [
          22
        ]
      },
      "weight_unit": {
        "type": "string",
        "description": "The unit of measurement for an item's weight.",
        "examples": [
          "kg"
        ]
      },
      "image_url": {
        "type": "string",
        "description": "The URL for the item's image.",
        "examples": [
          "https://boltswagstore.com/inventory/hats/red-hat.png"
        ]
      },
      "type": {
        "type": "string",
        "enum": [
          "bundled",
          "digital",
          "physical",
          "unknown"
        ],
        "description": "Determines if item is a physical, digital, or bundled good, or if the good type is unknown.",
        "examples": [
          "physical"
        ]
      },
      "taxable": {
        "type": "boolean",
        "description": "Determines if item is taxable.",
        "examples": [
          true
        ]
      },
      "item_properties": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/item_property"
        }
      },
      "item_property": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "a-name"
            ]
          },
          "value": {
            "type": "string",
            "examples": [
              "a-value"
            ]
          }
        }
      },
      "item_group": {
        "type": "string",
        "description": "Enables grouping in the checkout UI.",
        "examples": [
          "Ships Immediately"
        ]
      },
      "item_shipment_type": {
        "type": "string",
        "description": "The shipment type selected by the shopper.",
        "enum": [
          "unknown",
          "door delivery",
          "in_store_pickup",
          "ship_to_store"
        ]
      },
      "customizations_name": {
        "type": "string",
        "description": "The name of the customization.",
        "examples": [
          "Bedazzled"
        ]
      },
      "metadata_component": {
        "type": "object",
        "properties": {
          "key1": {
            "type": "string",
            "examples": [
              "value1"
            ]
          },
          "key2": {
            "type": "string",
            "examples": [
              "value2"
            ]
          }
        }
      },
      "bolt_product_id": {
        "type": "string",
        "description": "Unique ID generated for a product via the products endpoint.",
        "examples": [
          "e2bb0e7e-5625-536f-8ad7-25a26537ee28"
        ]
      },
      "gift_options": {
        "type": "object",
        "description": "Contains the gift option settings for wrapping and custom messages.",
        "required": [
          "wrap",
          "merchant_product_id"
        ],
        "properties": {
          "wrap": {
            "$ref": "#/components/schemas/gift_options_wrap"
          },
          "message": {
            "$ref": "#/components/schemas/gift_options_message"
          },
          "cost": {
            "$ref": "#/components/schemas/gift_options_cost"
          },
          "merchant_product_id": {
            "$ref": "#/components/schemas/merchant_product_id"
          }
        }
      },
      "gift_options_wrap": {
        "type": "boolean",
        "description": "Defines whether gift wrapping was requested.",
        "examples": [
          false
        ]
      },
      "gift_options_message": {
        "type": "string",
        "description": "Includes the gift message written by the shopper.",
        "examples": [
          "Happy Anniversary, Smoochy Poo!"
        ]
      },
      "gift_options_cost": {
        "type": "integer",
        "description": "Defines the price of gift wrapping this item. Required if `wrap` = `true`.\n",
        "examples": [
          785
        ]
      },
      "merchant_product_id": {
        "type": "string",
        "description": "The merchant's unique ID for the product.",
        "examples": [
          "881"
        ]
      },
      "cart_shipments": {
        "type": "array",
        "description": "A list of shipments.",
        "items": {
          "$ref": "#/components/schemas/cart_shipment"
        }
      },
      "cart_shipment": {
        "type": "object",
        "description": "A cart that is being prepared for shipment",
        "properties": {
          "shipping_address_id": {
            "$ref": "#/components/schemas/shipping_address_id"
          },
          "shipping_address": {
            "$ref": "#/components/schemas/shipping_address"
          },
          "total_weight": {
            "type": "integer",
            "description": "The total weight.",
            "examples": [
              55
            ]
          },
          "shipping_method": {
            "$ref": "#/components/schemas/shipping_method"
          },
          "carrier": {
            "$ref": "#/components/schemas/carrier"
          },
          "service": {
            "$ref": "#/components/schemas/service"
          },
          "expedited": {
            "$ref": "#/components/schemas/expedited"
          },
          "cost": {
            "$ref": "#/components/schemas/cost"
          },
          "tax_amount": {
            "$ref": "#/components/schemas/tax_amount"
          },
          "package_type": {
            "$ref": "#/components/schemas/package_type"
          },
          "package_width": {
            "$ref": "#/components/schemas/width"
          },
          "package_height": {
            "$ref": "#/components/schemas/height"
          },
          "package_depth": {
            "$ref": "#/components/schemas/depth"
          },
          "package_dimension_unit": {
            "$ref": "#/components/schemas/dimension_unit"
          },
          "tax_code": {
            "$ref": "#/components/schemas/tax_code"
          },
          "estimated_delivery_date": {
            "$ref": "#/components/schemas/estimated_delivery_date"
          },
          "type": {
            "$ref": "#/components/schemas/package_type"
          },
          "discount_by_membership": {
            "$ref": "#/components/schemas/discount_membership"
          }
        }
      },
      "shipping_address_id": {
        "type": "string",
        "description": "ID for billing address",
        "examples": [
          "addres-1"
        ]
      },
      "shipping_address": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/shipping_address_id"
          },
          "street_address1": {
            "$ref": "#/components/schemas/street_address"
          },
          "street_address2": {
            "$ref": "#/components/schemas/street_address"
          },
          "street_address3": {
            "$ref": "#/components/schemas/street_address"
          },
          "street_address4": {
            "$ref": "#/components/schemas/street_address"
          },
          "locality": {
            "$ref": "#/components/schemas/locality"
          },
          "region": {
            "$ref": "#/components/schemas/region"
          },
          "postal_code": {
            "$ref": "#/components/schemas/postal_code"
          },
          "country_code": {
            "$ref": "#/components/schemas/country_code"
          },
          "country": {
            "$ref": "#/components/schemas/country"
          },
          "name": {
            "$ref": "#/components/schemas/name_person"
          },
          "first_name": {
            "$ref": "#/components/schemas/first_name"
          },
          "last_name": {
            "$ref": "#/components/schemas/last_name"
          },
          "company": {
            "$ref": "#/components/schemas/company"
          },
          "phone": {
            "$ref": "#/components/schemas/phone"
          },
          "email": {
            "$ref": "#/components/schemas/email"
          }
        }
      },
      "shipping_method": {
        "type": "string",
        "description": "The name of the shipping method.",
        "examples": [
          "Unknown"
        ]
      },
      "carrier": {
        "type": "string",
        "description": "The name of the carrier selected.",
        "examples": [
          "FedEx"
        ]
      },
      "service": {
        "type": "string",
        "description": "The service name.",
        "examples": [
          "Option 1"
        ]
      },
      "expedited": {
        "type": "boolean",
        "description": "True if shipment is expedited.",
        "examples": [
          false
        ]
      },
      "cost": {
        "type": "integer",
        "description": "The cost in cents.",
        "examples": [
          770
        ]
      },
      "tax_amount": {
        "type": "integer",
        "description": "Tax amount in cents.",
        "examples": [
          230
        ]
      },
      "package_type": {
        "type": "string",
        "description": "The type of package.",
        "examples": [
          "A big package."
        ]
      },
      "width": {
        "type": "integer",
        "description": "The width.",
        "examples": [
          222
        ]
      },
      "height": {
        "type": "integer",
        "description": "The height.",
        "examples": [
          103
        ]
      },
      "depth": {
        "type": "integer",
        "description": "The depth.",
        "examples": [
          90
        ]
      },
      "dimension_unit": {
        "type": "string",
        "description": "The unit of measurement for an item's dimensions.",
        "examples": [
          "cm"
        ]
      },
      "tax_code": {
        "type": "string",
        "description": "The relevant tax code.",
        "examples": [
          "tax-12345"
        ]
      },
      "estimated_delivery_date": {
        "type": "string",
        "description": "The estimated delivery date.",
        "examples": [
          "08-30-2022"
        ]
      },
      "discount_membership": {
        "type": "boolean",
        "description": "Defines if shopper has a membership discount.",
        "examples": [
          false
        ]
      },
      "discount_codes": {
        "type": "array",
        "description": "A list of discount codes.",
        "items": {
          "$ref": "#/components/schemas/discount_code"
        }
      },
      "discount_description": {
        "type": "string",
        "description": "The discount code's description.",
        "examples": [
          "Take 15% off of your order."
        ]
      },
      "discount_type": {
        "type": "string",
        "enum": [
          "fixed_amount",
          "percentage",
          "shipping"
        ],
        "description": "The type of discount (e.g., percentage)",
        "examples": [
          "percentage"
        ]
      },
      "error": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/code"
          },
          "data": {
            "$ref": "#/components/schemas/reasons"
          }
        }
      },
      "code": {
        "type": "integer",
        "format": "int64",
        "description": "This is an error code.",
        "examples": [
          2001005
        ]
      },
      "reasons": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/reason"
        }
      },
      "reason": {
        "type": "object",
        "description": "The reason for the error.",
        "properties": {
          "reason": {
            "type": "string",
            "examples": [
              "This product is out of stock."
            ]
          }
        }
      }
    },
    "responses": {
      "discount_check": {
        "description": "Discount Applied Successfully",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "event",
                "status",
                "data"
              ],
              "properties": {
                "event": {
                  "type": "string",
                  "enum": [
                    "discounts.code.apply"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "success"
                  ]
                },
                "data": {
                  "type": "object",
                  "description": "This is a generic wrapper for the merchant's data. Open to see properties.",
                  "properties": {
                    "discount_code": {
                      "$ref": "#/components/schemas/discount_code"
                    },
                    "description": {
                      "$ref": "#/components/schemas/discount_description"
                    },
                    "discount_type": {
                      "$ref": "#/components/schemas/discount_type"
                    },
                    "discount_amount": {
                      "$ref": "#/components/schemas/amount"
                    },
                    "category": {
                      "$ref": "#/components/schemas/category"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "discount_check_error": {
        "description": "Discount Application Failed",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "event": {
                  "type": "string",
                  "enum": [
                    "discounts.code.apply"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "failure"
                  ]
                },
                "error": {
                  "$ref": "#/components/schemas/error"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard."
      }
    }
  }
}
```
