Emporix · Schema

discountResponse

Discount details.

CompanyCommerceE-CommerceB2B CommerceHeadless CommerceComposable CommerceCommerce OrchestrationAgentic CommerceiPaaSSoftware-as-a-Service

Properties

Name Type Description
id string Discount's unique identifier.
yrn object
couponYrn object
code string Discount code generated when a discount coupon is created through the Coupon Service.
amount number Discount expressed as fixed amount.
currency string Three-letter currency code, compliant with the ISO 4217 standard.
discountRate number Discount expressed as a percentage of the price.
name string Discount's displayed name.
calculationType string Calculation type specifies how the discount should be calculated. Can be set to one of the following: * `ApplyDiscountBeforeTax` * `ApplyDiscountAfterTax`
discountCalculationType string Determines whether the coupon is applied to the total or subtotal value of the order.
valid boolean Flag indicating whether the discount is valid. Invalid discounts are not taken into account when the cart is calculated.
links array Links to Coupon Service endpoints used to validate and redeem the discount.
discountValidationDetails object
vendorRestricted boolean Indicates whether the discount is limited to the vendors in `restrictions.vendors`.
restrictions object
discountIndex integer The index of the discount. It represents the discount position in the cart discounts array.
View JSON Schema on GitHub

JSON Schema

emporix-discount-response-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/emporix/main/json-schema/emporix-discount-response-schema.json",
  "title": "discountResponse",
  "description": "Discount details.",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/emporix-cart-openapi.yml#/components/schemas/discountResponse",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Discount's unique identifier."
    },
    "yrn": {
      "$ref": "#/$defs/YRN"
    },
    "couponYrn": {
      "$ref": "#/$defs/YRN"
    },
    "code": {
      "maxLength": 150,
      "description": "Discount code generated when a discount coupon is created through the Coupon Service.",
      "type": "string"
    },
    "amount": {
      "type": "number",
      "minimum": 0,
      "description": "Discount expressed as fixed amount.",
      "format": "double"
    },
    "currency": {
      "type": "string",
      "pattern": "[A-Z]{3}",
      "description": "Three-letter currency code, compliant with the ISO 4217 standard.",
      "minLength": 3,
      "maxLength": 3
    },
    "discountRate": {
      "type": "number",
      "minimum": 0,
      "description": "Discount expressed as a percentage of the price.",
      "format": "double"
    },
    "name": {
      "maxLength": 150,
      "description": "Discount's displayed name.",
      "type": "string"
    },
    "calculationType": {
      "type": "string",
      "maxLength": 30,
      "default": "ApplyDiscountBeforeTax",
      "description": "Calculation type specifies how the discount should be calculated. Can be set to one of the following:\n* `ApplyDiscountBeforeTax`\n* `ApplyDiscountAfterTax`",
      "enum": [
        "ApplyDiscountBeforeTax",
        "ApplyDiscountAfterTax"
      ]
    },
    "discountCalculationType": {
      "type": "string",
      "description": "Determines whether the coupon is applied to the total or subtotal value of the order.",
      "enum": [
        "SUBTOTAL",
        "TOTAL"
      ]
    },
    "valid": {
      "default": true,
      "description": "Flag indicating whether the discount is valid. \nInvalid discounts are not taken into account when the cart is calculated.",
      "type": "boolean"
    },
    "links": {
      "minItems": 2,
      "type": "array",
      "description": "Links to Coupon Service endpoints used to validate and redeem the discount.",
      "items": {
        "$ref": "#/$defs/link"
      }
    },
    "discountValidationDetails": {
      "$ref": "#/$defs/discountValidationDetails"
    },
    "vendorRestricted": {
      "type": "boolean",
      "default": false,
      "description": "Indicates whether the discount is limited to the vendors in `restrictions.vendors`."
    },
    "restrictions": {
      "$ref": "#/$defs/discountRestrictions"
    },
    "discountIndex": {
      "type": "integer",
      "description": "The index of the discount. It represents the discount position in the cart discounts array."
    }
  },
  "required": [
    "code"
  ],
  "$defs": {
    "YRN": {
      "type": "string",
      "title": "YRN",
      "description": "A unique identifier of a global resource, which stores information about the resource, such as its type, ID or name of the tenant.",
      "minLength": 1
    },
    "discountRestrictions": {
      "description": "Restrictions copied from the coupon.",
      "type": "object",
      "properties": {
        "validFrom": {
          "type": "string",
          "description": "Start of the discount validity period."
        },
        "validUntil": {
          "type": "string",
          "description": "End of the discount validity period."
        },
        "minOrderValue": {
          "allOf": [
            {
              "$ref": "#/$defs/price"
            },
            {
              "description": "Minimum order value copied from the coupon. When `vendorRestricted` is `true`, this value is checked against the total of the matching vendor items."
            }
          ]
        },
        "includedCategories": {
          "type": "array",
          "description": "Categories to which the discount applies.",
          "items": {
            "type": "string"
          }
        },
        "excludedCategories": {
          "type": "array",
          "description": "Categories to which the discount does not apply.",
          "items": {
            "type": "string"
          }
        },
        "segments": {
          "type": "array",
          "description": "Customer segments to which the discount applies.",
          "items": {
            "type": "string"
          }
        },
        "vendors": {
          "type": "array",
          "description": "Vendor identifiers to which the discount applies.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "discountValidationDetails": {
      "description": "",
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "link": {
      "description": "",
      "type": "object",
      "properties": {
        "rel": {
          "type": "string",
          "maxLength": 50,
          "description": "Action to be done using the endpoint provided in the `href` field.",
          "enum": [
            "validate",
            "redeem"
          ]
        },
        "title": {
          "maxLength": 100,
          "description": "Detailed link description.",
          "type": "string"
        },
        "href": {
          "type": "string",
          "maxLength": 2000,
          "description": "Endpoint used to validate or redeem the discount."
        },
        "type": {
          "type": "string",
          "maxLength": 500,
          "description": "Content type."
        }
      },
      "required": [
        "rel",
        "href",
        "type"
      ]
    },
    "price": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "minimum": 0,
          "format": "double",
          "description": "Price."
        },
        "currency": {
          "type": "string",
          "pattern": "[A-Z]{3}",
          "minLength": 3,
          "maxLength": 3,
          "description": "Three-letter currency code, compliant with the ISO 4217 standard."
        }
      },
      "required": [
        "amount",
        "currency"
      ],
      "description": ""
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/emporix-discount-response"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.