> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/api-references/readme/api-reference-11/models.md).

# Models

## The coupons object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"coupons":{"type":"array","items":{"$ref":"#/components/schemas/coupon-with-id-and-status"}},"coupon-with-id-and-status":{"allOf":[{"$ref":"#/components/schemas/coupon"},{"type":"object","properties":{"code":{"type":"string","description":"e.g.: WINTER-SALE, 10OFF (read-only)."},"referralCoupon":{"$ref":"#/components/schemas/referralCouponProperty"},"status":{"type":"string","description":"Current status of the coupon (read-only). 'INACTIVE': the coupon is only valid in the future; 'VALID': can be used; 'EXPIRED': the coupon validity period has expired; 'USED': the maximum number of redemptions for the coupon has been reached.","enum":["VALID","INACTIVE","EXPIRED","USED"]}}}]},"coupon":{"allOf":[{"$ref":"#/components/schemas/base-coupon"},{"type":"object","properties":{"legalEntityRedemptions":{"type":"array","items":{"type":"object","properties":{"legalEntityId":{"type":"string","description":"The id of the legal entity to which customer is assigned."},"count":{"type":"number","description":"The number of times a specific coupon has been redeemed in the context of the given legal entity."}}}},"redemptionCount":{"type":"number","description":"The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)."},"referralCoupon":{"$ref":"#/components/schemas/referralCouponProperty"},"deleted":{"description":"Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute.","type":"boolean"}},"required":["name","discountType"]}]},"base-coupon":{"title":"Coupon response/update payload","description":"Coupons describe voucher alike commerce capabilities, e.g. 10% off winter accessories.","type":"object","properties":{"name":{"type":"string","description":"Coupon name."},"description":{"type":"string","description":"Coupon description."},"discountType":{"enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"'PERCENT' for relative values, 'ABSOLUTE' for float values, referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.","type":"string"},"discountPercentage":{"type":"number","description":"A discount percentage within the range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.","minimum":0,"maximum":100},"discountAbsolute":{"type":"object","description":"Must be specified only if type is 'ABSOLUTE'. Defines the amount that should be substracted from the cart subtotal.","properties":{"amount":{"type":"number","description":"Total amount in the specified currency."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"allowAnonymous":{"type":"boolean","description":"Specifies if the coupon can be redeemed by anonymous user. If set to false, only logged-in customers can redeem it.","default":false},"maxRedemptions":{"type":"number","description":"Maximum number of redemptions; -1  designates 'unlimited' (seller-only).","default":-1},"maxRedemptionsPerCustomer":{"type":"number","description":"Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.","default":-1},"discountCalculationType":{"type":"string","enum":["TOTAL","SUBTOTAL"],"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","default":"SUBTOTAL"},"categoryRestricted":{"$ref":"#/components/schemas/categoryRestricted"},"segmentRestricted":{"$ref":"#/components/schemas/segmentRestricted"},"vendorRestricted":{"$ref":"#/components/schemas/vendorRestricted"},"restrictions":{"$ref":"#/components/schemas/restrictions"},"issuedTo":{"type":"string","description":"The Id of the customer who originally received the coupon (seller-only)."},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":false,"properties":{"version":{"description":"Version of the document. Set to 0 after creating a document. Increments by 1 after every update.","type":"number"},"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"categoryRestricted":{"type":"boolean","description":"Defines if the coupon has category restrictions.\n***\nInfo: Cannot be combined together with the segment restrictions.\n","default":false},"segmentRestricted":{"type":"boolean","description":"Defines if the coupon has segment restrictions. If the value is set to `true`, the `restrictions.segments` must be provided.\n***\nInfo: Cannot be combined neither with the category restrictions nor with customers restrictions.\n","default":false},"vendorRestricted":{"type":"boolean","description":"Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.\nA vendor restriction can be combined with other restriction types.\n","default":false},"restrictions":{"type":"object","description":"Restrictions of the coupon.","properties":{"validFor":{"type":"array","description":"A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.","items":{"type":"string"}},"validFrom":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"validUntil":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The minimum order value required to use the coupon. When `vendorRestricted` is `true`, this value is checked against the total of the matching vendor items."}]},"includedCategories":{"type":"array","description":"The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"The list of product's categories to which this coupon does not apply to. Can be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with includedCategories list.","items":{"type":"string"}},"segments":{"type":"array","description":"The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.","items":{"type":"string"}},"vendors":{"type":"array","description":"The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.","items":{"type":"string"}}}},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"referralCouponProperty":{"type":"boolean","description":"Indicates if the coupon is type of referral coupon. This property is read only."}}}}
```

## The base-coupon object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"base-coupon":{"title":"Coupon response/update payload","description":"Coupons describe voucher alike commerce capabilities, e.g. 10% off winter accessories.","type":"object","properties":{"name":{"type":"string","description":"Coupon name."},"description":{"type":"string","description":"Coupon description."},"discountType":{"enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"'PERCENT' for relative values, 'ABSOLUTE' for float values, referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.","type":"string"},"discountPercentage":{"type":"number","description":"A discount percentage within the range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.","minimum":0,"maximum":100},"discountAbsolute":{"type":"object","description":"Must be specified only if type is 'ABSOLUTE'. Defines the amount that should be substracted from the cart subtotal.","properties":{"amount":{"type":"number","description":"Total amount in the specified currency."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"allowAnonymous":{"type":"boolean","description":"Specifies if the coupon can be redeemed by anonymous user. If set to false, only logged-in customers can redeem it.","default":false},"maxRedemptions":{"type":"number","description":"Maximum number of redemptions; -1  designates 'unlimited' (seller-only).","default":-1},"maxRedemptionsPerCustomer":{"type":"number","description":"Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.","default":-1},"discountCalculationType":{"type":"string","enum":["TOTAL","SUBTOTAL"],"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","default":"SUBTOTAL"},"categoryRestricted":{"$ref":"#/components/schemas/categoryRestricted"},"segmentRestricted":{"$ref":"#/components/schemas/segmentRestricted"},"vendorRestricted":{"$ref":"#/components/schemas/vendorRestricted"},"restrictions":{"$ref":"#/components/schemas/restrictions"},"issuedTo":{"type":"string","description":"The Id of the customer who originally received the coupon (seller-only)."},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":false,"properties":{"version":{"description":"Version of the document. Set to 0 after creating a document. Increments by 1 after every update.","type":"number"},"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"categoryRestricted":{"type":"boolean","description":"Defines if the coupon has category restrictions.\n***\nInfo: Cannot be combined together with the segment restrictions.\n","default":false},"segmentRestricted":{"type":"boolean","description":"Defines if the coupon has segment restrictions. If the value is set to `true`, the `restrictions.segments` must be provided.\n***\nInfo: Cannot be combined neither with the category restrictions nor with customers restrictions.\n","default":false},"vendorRestricted":{"type":"boolean","description":"Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.\nA vendor restriction can be combined with other restriction types.\n","default":false},"restrictions":{"type":"object","description":"Restrictions of the coupon.","properties":{"validFor":{"type":"array","description":"A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.","items":{"type":"string"}},"validFrom":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"validUntil":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The minimum order value required to use the coupon. When `vendorRestricted` is `true`, this value is checked against the total of the matching vendor items."}]},"includedCategories":{"type":"array","description":"The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"The list of product's categories to which this coupon does not apply to. Can be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with includedCategories list.","items":{"type":"string"}},"segments":{"type":"array","description":"The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.","items":{"type":"string"}},"vendors":{"type":"array","description":"The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.","items":{"type":"string"}}}},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}}}}}
```

## The coupon object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"coupon":{"allOf":[{"$ref":"#/components/schemas/base-coupon"},{"type":"object","properties":{"legalEntityRedemptions":{"type":"array","items":{"type":"object","properties":{"legalEntityId":{"type":"string","description":"The id of the legal entity to which customer is assigned."},"count":{"type":"number","description":"The number of times a specific coupon has been redeemed in the context of the given legal entity."}}}},"redemptionCount":{"type":"number","description":"The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)."},"referralCoupon":{"$ref":"#/components/schemas/referralCouponProperty"},"deleted":{"description":"Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute.","type":"boolean"}},"required":["name","discountType"]}]},"base-coupon":{"title":"Coupon response/update payload","description":"Coupons describe voucher alike commerce capabilities, e.g. 10% off winter accessories.","type":"object","properties":{"name":{"type":"string","description":"Coupon name."},"description":{"type":"string","description":"Coupon description."},"discountType":{"enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"'PERCENT' for relative values, 'ABSOLUTE' for float values, referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.","type":"string"},"discountPercentage":{"type":"number","description":"A discount percentage within the range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.","minimum":0,"maximum":100},"discountAbsolute":{"type":"object","description":"Must be specified only if type is 'ABSOLUTE'. Defines the amount that should be substracted from the cart subtotal.","properties":{"amount":{"type":"number","description":"Total amount in the specified currency."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"allowAnonymous":{"type":"boolean","description":"Specifies if the coupon can be redeemed by anonymous user. If set to false, only logged-in customers can redeem it.","default":false},"maxRedemptions":{"type":"number","description":"Maximum number of redemptions; -1  designates 'unlimited' (seller-only).","default":-1},"maxRedemptionsPerCustomer":{"type":"number","description":"Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.","default":-1},"discountCalculationType":{"type":"string","enum":["TOTAL","SUBTOTAL"],"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","default":"SUBTOTAL"},"categoryRestricted":{"$ref":"#/components/schemas/categoryRestricted"},"segmentRestricted":{"$ref":"#/components/schemas/segmentRestricted"},"vendorRestricted":{"$ref":"#/components/schemas/vendorRestricted"},"restrictions":{"$ref":"#/components/schemas/restrictions"},"issuedTo":{"type":"string","description":"The Id of the customer who originally received the coupon (seller-only)."},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":false,"properties":{"version":{"description":"Version of the document. Set to 0 after creating a document. Increments by 1 after every update.","type":"number"},"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"categoryRestricted":{"type":"boolean","description":"Defines if the coupon has category restrictions.\n***\nInfo: Cannot be combined together with the segment restrictions.\n","default":false},"segmentRestricted":{"type":"boolean","description":"Defines if the coupon has segment restrictions. If the value is set to `true`, the `restrictions.segments` must be provided.\n***\nInfo: Cannot be combined neither with the category restrictions nor with customers restrictions.\n","default":false},"vendorRestricted":{"type":"boolean","description":"Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.\nA vendor restriction can be combined with other restriction types.\n","default":false},"restrictions":{"type":"object","description":"Restrictions of the coupon.","properties":{"validFor":{"type":"array","description":"A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.","items":{"type":"string"}},"validFrom":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"validUntil":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The minimum order value required to use the coupon. When `vendorRestricted` is `true`, this value is checked against the total of the matching vendor items."}]},"includedCategories":{"type":"array","description":"The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"The list of product's categories to which this coupon does not apply to. Can be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with includedCategories list.","items":{"type":"string"}},"segments":{"type":"array","description":"The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.","items":{"type":"string"}},"vendors":{"type":"array","description":"The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.","items":{"type":"string"}}}},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"referralCouponProperty":{"type":"boolean","description":"Indicates if the coupon is type of referral coupon. This property is read only."}}}}
```

## The coupon-creation object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"coupon-creation":{"title":"Coupon creation payload","description":"Coupon creation schema.","type":"object","properties":{"code":{"type":"string","description":"e.g.: WINTER-SALE, 10OFF. If not provided, a code will be auto generated."},"name":{"type":"string","description":"Coupon name."},"description":{"type":"string","description":"Coupon description."},"discountType":{"enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"default":"ABSOLUTE","description":"'PERCENT' for relative values, 'ABSOLUTE' for float values, referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.","type":"string"},"discountPercentage":{"type":"number","description":"A discount percentage within the range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.","minimum":0,"maximum":100},"discountAbsolute":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"Must be specified only if type is 'ABSOLUTE'. Defines the amount that should be substracted from the cart subtotal."}]},"allowAnonymous":{"type":"boolean","description":"Specifies if the coupon can be redeemed by anonymous user. If set to false, only logged-in customers can redeem it.","default":false},"maxRedemptions":{"type":"number","description":"Maximum number of redemptions; -1 designates 'unlimited' (seller-only).","default":-1},"maxRedemptionsPerCustomer":{"type":"number","description":"Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.","default":-1},"discountCalculationType":{"type":"string","enum":["TOTAL","SUBTOTAL"],"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","default":"SUBTOTAL"},"categoryRestricted":{"$ref":"#/components/schemas/categoryRestricted"},"segmentRestricted":{"$ref":"#/components/schemas/segmentRestricted"},"vendorRestricted":{"$ref":"#/components/schemas/vendorRestricted"},"restrictions":{"$ref":"#/components/schemas/restrictions"},"issuedTo":{"type":"string","description":"The Id of the customer who originally received the coupon (seller-only)."},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":false,"properties":{"version":{"description":"Version of the document. Set to 0 after creating a document. Increments by 1 after every update.","type":"number"},"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}},"required":["name"]},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"categoryRestricted":{"type":"boolean","description":"Defines if the coupon has category restrictions.\n***\nInfo: Cannot be combined together with the segment restrictions.\n","default":false},"segmentRestricted":{"type":"boolean","description":"Defines if the coupon has segment restrictions. If the value is set to `true`, the `restrictions.segments` must be provided.\n***\nInfo: Cannot be combined neither with the category restrictions nor with customers restrictions.\n","default":false},"vendorRestricted":{"type":"boolean","description":"Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.\nA vendor restriction can be combined with other restriction types.\n","default":false},"restrictions":{"type":"object","description":"Restrictions of the coupon.","properties":{"validFor":{"type":"array","description":"A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.","items":{"type":"string"}},"validFrom":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"validUntil":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The minimum order value required to use the coupon. When `vendorRestricted` is `true`, this value is checked against the total of the matching vendor items."}]},"includedCategories":{"type":"array","description":"The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"The list of product's categories to which this coupon does not apply to. Can be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with includedCategories list.","items":{"type":"string"}},"segments":{"type":"array","description":"The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.","items":{"type":"string"}},"vendors":{"type":"array","description":"The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.","items":{"type":"string"}}}}}}}
```

## The segmentRestricted object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"segmentRestricted":{"type":"boolean","description":"Defines if the coupon has segment restrictions. If the value is set to `true`, the `restrictions.segments` must be provided.\n***\nInfo: Cannot be combined neither with the category restrictions nor with customers restrictions.\n","default":false}}}}
```

## The categoryRestricted object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"categoryRestricted":{"type":"boolean","description":"Defines if the coupon has category restrictions.\n***\nInfo: Cannot be combined together with the segment restrictions.\n","default":false}}}}
```

## The vendorRestricted object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"vendorRestricted":{"type":"boolean","description":"Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.\nA vendor restriction can be combined with other restriction types.\n","default":false}}}}
```

## The currency-amount object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}}}}}
```

## The redemptions object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"redemptions":{"type":"array","items":{"$ref":"#/components/schemas/redemption"}},"redemption":{"type":"object","title":"Coupon Redemption","description":"Defines a coupon redemption response.","allOf":[{"$ref":"#/components/schemas/redemption-creation"}],"properties":{"id":{"description":"Unique identifier of the redemption.","type":"string"},"redeemedAt":{"description":"Timestamp of the redemption.","type":"string","format":"date-time"}}},"redemption-creation":{"type":"object","title":"Coupon Redemption Request","description":"Defines a coupon redemption request payload that affects a coupon instance.","properties":{"orderCode":{"description":"Code of the associated order.","type":"string"},"customerNumber":{"type":"string","description":"The customer Id of the user, e.g. C0123456789. Can be specified only if coupon.coupon_redeem_on_behalf scope is present."},"legalEntityId":{"type":"string","description":"The id of the legal entity to which customer is assigned. When customer is assigned to many legal entities then he can redeem the same coupon separately for each legal entity."},"orderTotal":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The amount of the purchase."}]},"discount":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The absolute amount of the granted discount."}]}},"required":["orderTotal","discount"]},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}}}}}
```

## The redemption object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"redemption":{"type":"object","title":"Coupon Redemption","description":"Defines a coupon redemption response.","allOf":[{"$ref":"#/components/schemas/redemption-creation"}],"properties":{"id":{"description":"Unique identifier of the redemption.","type":"string"},"redeemedAt":{"description":"Timestamp of the redemption.","type":"string","format":"date-time"}}},"redemption-creation":{"type":"object","title":"Coupon Redemption Request","description":"Defines a coupon redemption request payload that affects a coupon instance.","properties":{"orderCode":{"description":"Code of the associated order.","type":"string"},"customerNumber":{"type":"string","description":"The customer Id of the user, e.g. C0123456789. Can be specified only if coupon.coupon_redeem_on_behalf scope is present."},"legalEntityId":{"type":"string","description":"The id of the legal entity to which customer is assigned. When customer is assigned to many legal entities then he can redeem the same coupon separately for each legal entity."},"orderTotal":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The amount of the purchase."}]},"discount":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The absolute amount of the granted discount."}]}},"required":["orderTotal","discount"]},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}}}}}
```

## The redemption-creation object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"redemption-creation":{"type":"object","title":"Coupon Redemption Request","description":"Defines a coupon redemption request payload that affects a coupon instance.","properties":{"orderCode":{"description":"Code of the associated order.","type":"string"},"customerNumber":{"type":"string","description":"The customer Id of the user, e.g. C0123456789. Can be specified only if coupon.coupon_redeem_on_behalf scope is present."},"legalEntityId":{"type":"string","description":"The id of the legal entity to which customer is assigned. When customer is assigned to many legal entities then he can redeem the same coupon separately for each legal entity."},"orderTotal":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The amount of the purchase."}]},"discount":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The absolute amount of the granted discount."}]}},"required":["orderTotal","discount"]},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}}}}}
```

## The restrictions object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"restrictions":{"type":"object","description":"Restrictions of the coupon.","properties":{"validFor":{"type":"array","description":"A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.","items":{"type":"string"}},"validFrom":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"validUntil":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The minimum order value required to use the coupon. When `vendorRestricted` is `true`, this value is checked against the total of the matching vendor items."}]},"includedCategories":{"type":"array","description":"The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"The list of product's categories to which this coupon does not apply to. Can be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with includedCategories list.","items":{"type":"string"}},"segments":{"type":"array","description":"The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.","items":{"type":"string"}},"vendors":{"type":"array","description":"The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.","items":{"type":"string"}}}},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}}}}}
```

## The resource-location object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"resource-location":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the link."},"yrn":{"type":"string","description":"Identifier of the link in the system's notation."}}}}}}
```

## The coupon-with-id-and-status object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"coupon-with-id-and-status":{"allOf":[{"$ref":"#/components/schemas/coupon"},{"type":"object","properties":{"code":{"type":"string","description":"e.g.: WINTER-SALE, 10OFF (read-only)."},"referralCoupon":{"$ref":"#/components/schemas/referralCouponProperty"},"status":{"type":"string","description":"Current status of the coupon (read-only). 'INACTIVE': the coupon is only valid in the future; 'VALID': can be used; 'EXPIRED': the coupon validity period has expired; 'USED': the maximum number of redemptions for the coupon has been reached.","enum":["VALID","INACTIVE","EXPIRED","USED"]}}}]},"coupon":{"allOf":[{"$ref":"#/components/schemas/base-coupon"},{"type":"object","properties":{"legalEntityRedemptions":{"type":"array","items":{"type":"object","properties":{"legalEntityId":{"type":"string","description":"The id of the legal entity to which customer is assigned."},"count":{"type":"number","description":"The number of times a specific coupon has been redeemed in the context of the given legal entity."}}}},"redemptionCount":{"type":"number","description":"The number of times a specific coupon has been redeemed. Read-only, set through server. (seller-only)."},"referralCoupon":{"$ref":"#/components/schemas/referralCouponProperty"},"deleted":{"description":"Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute.","type":"boolean"}},"required":["name","discountType"]}]},"base-coupon":{"title":"Coupon response/update payload","description":"Coupons describe voucher alike commerce capabilities, e.g. 10% off winter accessories.","type":"object","properties":{"name":{"type":"string","description":"Coupon name."},"description":{"type":"string","description":"Coupon description."},"discountType":{"enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"'PERCENT' for relative values, 'ABSOLUTE' for float values, referring to a specific currency, 'FREE_SHIPPING' for reducing the shipping cost to 0.","type":"string"},"discountPercentage":{"type":"number","description":"A discount percentage within the range [0.00, 100.00]. Must be specified only if type is 'PERCENT'.","minimum":0,"maximum":100},"discountAbsolute":{"type":"object","description":"Must be specified only if type is 'ABSOLUTE'. Defines the amount that should be substracted from the cart subtotal.","properties":{"amount":{"type":"number","description":"Total amount in the specified currency."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"allowAnonymous":{"type":"boolean","description":"Specifies if the coupon can be redeemed by anonymous user. If set to false, only logged-in customers can redeem it.","default":false},"maxRedemptions":{"type":"number","description":"Maximum number of redemptions; -1  designates 'unlimited' (seller-only).","default":-1},"maxRedemptionsPerCustomer":{"type":"number","description":"Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.","default":-1},"discountCalculationType":{"type":"string","enum":["TOTAL","SUBTOTAL"],"description":"Determines whether the coupon is applied to the total or subtotal value of the order.","default":"SUBTOTAL"},"categoryRestricted":{"$ref":"#/components/schemas/categoryRestricted"},"segmentRestricted":{"$ref":"#/components/schemas/segmentRestricted"},"vendorRestricted":{"$ref":"#/components/schemas/vendorRestricted"},"restrictions":{"$ref":"#/components/schemas/restrictions"},"issuedTo":{"type":"string","description":"The Id of the customer who originally received the coupon (seller-only)."},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":false,"properties":{"version":{"description":"Version of the document. Set to 0 after creating a document. Increments by 1 after every update.","type":"number"},"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"categoryRestricted":{"type":"boolean","description":"Defines if the coupon has category restrictions.\n***\nInfo: Cannot be combined together with the segment restrictions.\n","default":false},"segmentRestricted":{"type":"boolean","description":"Defines if the coupon has segment restrictions. If the value is set to `true`, the `restrictions.segments` must be provided.\n***\nInfo: Cannot be combined neither with the category restrictions nor with customers restrictions.\n","default":false},"vendorRestricted":{"type":"boolean","description":"Defines if the coupon applies only to products from specific vendors. If the value is `true`, `restrictions.vendors` must be provided.\nA vendor restriction can be combined with other restriction types.\n","default":false},"restrictions":{"type":"object","description":"Restrictions of the coupon.","properties":{"validFor":{"type":"array","description":"A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.","items":{"type":"string"}},"validFrom":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"validUntil":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'."},"minOrderValue":{"allOf":[{"$ref":"#/components/schemas/currency-amount"},{"description":"The minimum order value required to use the coupon. When `vendorRestricted` is `true`, this value is checked against the total of the matching vendor items."}]},"includedCategories":{"type":"array","description":"The list of product's categories to which this coupon applies to. Must be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with excludedCategories list.","items":{"type":"string"}},"excludedCategories":{"type":"array","description":"The list of product's categories to which this coupon does not apply to. Can be defined only if the `categoryRestricted` flag is set to true. Must be disjoint with includedCategories list.","items":{"type":"string"}},"segments":{"type":"array","description":"The list of segments to which this coupon applies to. Can be defined only if the `segmentRestricted` flag is set to true.","items":{"type":"string"}},"vendors":{"type":"array","description":"The list of vendor identifiers to which this coupon applies. Must be provided when `vendorRestricted` is `true`, and must be empty when `vendorRestricted` is `false`.","items":{"type":"string"}}}},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"referralCouponProperty":{"type":"boolean","description":"Indicates if the coupon is type of referral coupon. This property is read only."}}}}
```

## The referralCoupon object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"referralCoupon":{"title":"Coupon","description":"Coupons describe voucher alike commerce capabilities.","type":"object","properties":{"code":{"type":"string","description":"e.g.: WINTER-SALE, 10OFF (read-only)"},"name":{"type":"string","description":"Coupon name."},"description":{"type":"string","description":"Coupon description."},"discountType":{"enum":["PERCENT","ABSOLUTE","FREE_SHIPPING"],"description":"`PERCENT` for relative values, `ABSOLUTE` for float values, referring to a specific currency, `FREE_SHIPPING` for reducing the shipping cost to 0.\n","type":"string"},"discountPercentage":{"type":"number","description":"A discount percentage within the range [0.00, 100.00]. Must be specified only if type is `PERCENT`.","minimum":0,"maximum":100},"discountAbsolute":{"allOf":[{"$ref":"#/components/schemas/currency-amount"}]},"allowAnonymous":{"type":"boolean","description":"Specifies if the coupon can be redeemed by anonymous users.","default":false},"maxRedemptions":{"type":"number","description":"Maximum number of redemptions; -1 designates 'unlimited' (seller-only).","default":-1},"maxRedemptionsPerCustomer":{"type":"number","description":"Maximum number of redemptions per customer; -1 designates 'unlimited'. Cannot be specified for coupons which can be redeemed by anonymous users.","default":-1},"restrictions":{"type":"object","properties":{"validFor":{"type":"array","description":"A list of customer identifiers for whom the coupon can be redeemed. Cannot be specified for coupons which can be redeemed by anonymous users.","items":{"type":"string"}},"validFrom":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'"},"validUntil":{"type":"string","format":"date-time","description":"Must be provided in ISO 8601 format (http://www.iso.org/iso/home/standards/iso8601.htm), e.g. '2015-01-31T23:59:59.999Z'"},"minOrderValue":{"$ref":"#/components/schemas/currency-amount"}}},"issuedTo":{"type":"string","description":"The Id of the customer who originally received the coupon (seller-only)."},"referralCoupon":{"$ref":"#/components/schemas/referralCouponProperty"},"redemptionCount":{"type":"number","description":"The number of times a specific coupon has been redeemed. Read-only, set through server (seller-only)."},"status":{"enum":["INACTIVE","VALID","EXPIRED","USED"],"description":"Current status of the coupon (read-only). `INACTIVE`: the coupon is only valid in the future; `VALID`: can be used; `EXPIRED`: the coupon validity period has expired; `USED`: the maximum number of redemptions for the coupon has been reached.","type":"string"},"deleted":{"description":"Flag to mark a coupon as deleted (a.k.a. Soft delete). It is a read-only and seller-only attribute","type":"boolean"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","additionalProperties":false,"properties":{"version":{"description":"Version of the document. Set to 0 after creating a document. Increments by 1 after every update.","type":"number"},"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}},"required":["discountType","issuedTo","status","name"]},"currency-amount":{"type":"object","title":"Money amount","description":"Defines an amount in a specific currency.","properties":{"amount":{"type":"number","default":0,"minimum":0,"description":"Total amount in the specified currency."},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$","description":"ISO 4217 currency code, e.g.: USD, EUR, CHF."}}},"referralCouponProperty":{"type":"boolean","description":"Indicates if the coupon is type of referral coupon. This property is read only."}}}}
```

## The referralCouponProperty object

```json
{"openapi":"3.0.0","info":{"title":"Coupon Service","version":"0.0.1"},"components":{"schemas":{"referralCouponProperty":{"type":"boolean","description":"Indicates if the coupon is type of referral coupon. This property is read only."}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developer.emporix.io/api-references/readme/api-reference-11/models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
