{"openapi":"3.1.0","info":{"title":"Admin Management: Promotions","version":"1.0.0"},"paths":{"/stores/{store_hash}/v3/promotions/{promotion_id}/codes":{"get":{"operationId":"getPromotionCodes","summary":"List Coupon Codes","description":"Get codes for a particular promotion.\n\n**Note:**\nThe default rate limit for this endpoint is 10 concurrent requests.","tags":["couponCodesBulk"],"parameters":[{"name":"promotion_id","in":"path","description":"The ID of the associated promotion.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"before","in":"query","description":"A cursor that can be used for backwards pagination. Will fetch results before the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'after' query parameter.\n","required":false,"schema":{"type":"string"}},{"name":"after","in":"query","description":"A cursor that can be used for forwards pagination. Will fetch results after the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'before' query parameter.\n","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Query parameter that specifies the page number in a paginated list of resources. This field is deprecated and the 'before' and 'after' cursor parameters should be used instead.\n","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Query parameter that limits the number of items displayed per page in a paginated list of resources. When none is specified a default value of 50 is used.\n","required":false,"schema":{"type":"integer"}},{"name":"code","in":"query","description":"Filter items by `code`.","required":false,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon Codes (Bulk)_getPromotionCodes_Response_200"}}}}}},"delete":{"operationId":"deleteCouponCodes","summary":"Delete Multiple Coupon Codes","description":"Deletes multiple coupon codes relating to the given promotion. Currently, batches are limited to 50 coupon codes.\n\n**Notes**\n* \"id:in\" query param is required to delete coupon codes. If not provided, or provided with the wrong data format, a 422 error code is returned.\n* The default rate limit for this endpoint is 40 concurrent requests.","tags":["couponCodesBulk"],"parameters":[{"name":"promotion_id","in":"path","description":"The ID of the associated promotion.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"id:in","in":"query","description":"A comma-separated list of promotions to filter or target with this operation.\n\nExample: **?id:in=11,12,13,14**","required":true,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"code","in":"query","description":"Filter items by `code`.","required":false,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"A 204 response.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCouponCodesRequestUnprocessableEntityError"}}}}}},"post":{"operationId":"createPromotionCode","summary":"Create Coupon Code","description":"Create a new code for the promotion.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["couponCodesSingle"],"parameters":[{"name":"promotion_id","in":"path","description":"The ID of the associated promotion.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon Codes (Single)_createPromotionCode_Response_201"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"A unique code that can be used to manually apply a discount. Only letters, numbers, white spaces, underscores, and hyphens are allowed."},"max_uses":{"type":"integer","description":"The maximum number of times you can use this coupon code. The default value is 0, which represents unlimited uses. The parent promotion's `max_uses` field overrides the coupon code's `max_uses` field."},"max_uses_per_customer":{"type":"integer","description":"The maximum number of times a specific customer can use this coupon code. The default value is 0, which represents unlimited uses."}},"required":["code"]}}}}}},"/stores/{store_hash}/v3/promotions/{promotion_id}/codegen":{"post":{"operationId":"generatePromotionCodesBatch","summary":"Generate Multiple Coupon Codes","description":"Generate a batch of coupon codes for a particular bulk coupon promotion.\n\n**Note:**\n* batch_size (number of codes generated per request) is limited to 250. If batch_size is not an integer or larger than 250, it will return a 422 error code.\n* The default rate limit for this endpoint is 10 concurrent requests.","tags":["couponCodesBulk"],"parameters":[{"name":"promotion_id","in":"path","description":"The ID of the associated promotion.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon Codes (Bulk)_generatePromotionCodesBatch_Response_201"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse400"}}}},"403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse403"}}}},"405":{"description":"Method not allowed. Bulk code generation is only supported for promotions with redemption_type of 'COUPON' and coupon_type of 'BULK'.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse405"}}}},"422":{"description":"The request payload is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"batch_size":{"type":"integer","description":"The number of coupon codes to generate in each batch. The maximum value is 250."},"max_uses":{"type":"integer","description":"The maximum number of times each coupon code can be used. The default value is 1. The value 0 means unlimited usage."},"max_uses_per_customer":{"type":"integer","description":"The maximum number of times a specific customer can use each coupon code. The default value is 1. The value 0 means unlimited usage."},"prefix":{"type":"string","description":"The fixed text that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed."},"suffix":{"type":"string","description":"The fixed text that will appear at the end of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed."},"delimiter":{"type":"string","description":"An optional single character (_ or -) that will be placed between the prefix and the randomly generated code, and again between the randomly generated code and the suffix. It will only be applied if a valid prefix or suffix is present."},"exclude_characters":{"type":"array","items":{"type":"string"},"description":"An optional array of single length string elements to exclude from the randomly generated part. Only capital letters and numbers are allowed. The default value is an empty array []."},"code_length":{"type":"integer","description":"The length of the random string to be generated for each coupon code. The value must be between 6 and 16. The default length is 16. The total length of each generated coupon code is calculated as `:` code_length + length of prefix with delimiter + length of suffix with delimiter. The maximum total length of a coupon code is 50."}},"required":["batch_size"]}}}}}},"/stores/{store_hash}/v3/promotions/codes":{"get":{"operationId":"getCouponCodeByCode","summary":"Get Coupon Code","description":"Get a coupon with a given coupon code.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["couponCodesSingle"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"code","in":"query","description":"Filter items by `code`.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Coupon Codes (Single)_getCouponCodeByCode_Response_200"}}}}}},"delete":{"operationId":"deleteCouponCodeByCode","summary":"Delete Coupon Code","description":"Deletes a coupon with a given coupon code.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["couponCodesSingle"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"code","in":"query","description":"Filter items by `code`.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"The deletion was successful or the resource does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/stores/{store_hash}/v3/promotions/{promotion_id}/codes/{code_id}":{"delete":{"operationId":"deleteCouponCode","summary":"Delete Coupon Code by ID","description":"Deletes a coupon code.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["couponCodesSingle"],"parameters":[{"name":"promotion_id","in":"path","description":"The ID of the associated promotion.","required":true,"schema":{"type":"string"}},{"name":"code_id","in":"path","description":"The ID of the coupon code to delete.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"The deletion was successful or the resource does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}},"/stores/{store_hash}/v3/promotions":{"get":{"operationId":"getPromotions","summary":"List Promotions","description":"Returns a list of *promotions*.\n\nThe response includes the display name and other details about each promotion, and lists the promotions ordered by ID by default.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["promotionsBulk"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"id","in":"query","description":"Filter items by `id`.","required":false,"schema":{"type":"integer"}},{"name":"name","in":"query","description":"Filter items by `name`.","required":false,"schema":{"type":"string"}},{"name":"code","in":"query","description":"Filter items by `code`.","required":false,"schema":{"type":"string"}},{"name":"currency_code","in":"query","description":"Filter items by `currency_code`.","required":false,"schema":{"type":"string"}},{"name":"redemption_type","in":"query","description":"Filter items by `redemption type`","required":false,"schema":{"$ref":"#/components/schemas/PromotionsGetParametersRedemptionType"}},{"name":"status","in":"query","description":"Filter items by `status`.","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Query parameter that specifies the page number in a paginated list of resources.","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Query parameter that limits the number of items displayed per page in a paginated list of resources. When none is specified a default value of 50 is used.\n","required":false,"schema":{"type":"integer"}},{"name":"sort","in":"query","description":"Query parameter that specifies the field name to sort by. The default value is *id*.","required":false,"schema":{"$ref":"#/components/schemas/PromotionsGetParametersSort"}},{"name":"direction","in":"query","description":"Query parameter that specifies the sorting direction. The default value is *asc*.","required":false,"schema":{"$ref":"#/components/schemas/PromotionsGetParametersDirection"}},{"name":"channels","in":"query","description":"Filter promotions that target those `channel IDs`.  Example: **?channels=1,2**. Note: promotions that target all the channels are included in the filtering result.","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"query","in":"query","description":"Filter items by both name or code.","required":false,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promotions (Bulk)_getPromotions_Response_200"}}}},"422":{"description":"Failure due to an invalid query parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"delete":{"operationId":"deletePromotions","summary":"Delete Multiple Promotions","description":"Deletes multiple promotions. Currently, batches are limited to 50 promotions.\n\n**Notes**\n* \"id:in\" query param is required to delete promotions. If this parameter is not provided, or provided with the wrong data format, a 422 error code is returned.\n* You cannot delete promotions that still have coupon codes attached.\n* The default rate limit for this endpoint is 40 concurrent requests.","tags":["promotionsBulk"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"id:in","in":"query","description":"A comma-separated list of promotions to filter or target with this operation.\n\nExample: **?id:in=11,12,13,14**","required":true,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"A 204 response.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"422":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePromotionsRequestUnprocessableEntityError"}}}}}},"post":{"operationId":"createPromotion","summary":"Create Promotion","description":"Creates a *promotion*.\nTo learn more about how to create a *promotion*, read the [Promotions Overview](/developer/docs/admin/catalog-and-inventory/promotions).\nFor examples grouped by use case, see the [promotions examples](/developer/docs/admin/catalog-and-inventory/promotions/examples/brand).\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["promotionsSingle"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promotions (Single)_createPromotion_Response_201"}}}},"400":{"description":"The request payload was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse400"}}}},"403":{"description":"The request payload was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse403"}}}},"422":{"description":"The request payload was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promotions (Single)_createPromotion_Request"}}}}}},"/stores/{store_hash}/v3/promotions/archive":{"post":{"operationId":"archivePromotions","summary":"Archive Multiple Promotions","description":"Archives multiple promotions. Accepts an array of promotion IDs to archive.\n\nArchiving a coupon-based promotion deletes all coupon codes created for that promotion before the time of archiving. Because a promotion can have a large number of codes, the deletion runs asynchronously and can take a few minutes to complete.\n\nArchiving a promotion also removes it from the featured list, freeing up a seat for another active promotion. Its priority is ignored by priority management operations on active promotions. If the promotion is later unarchived, it's placed at the bottom of the priority list.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["promotionsBulk"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"The promotions were archived successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"422":{"description":"The request body was empty or contained a non-positive integer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An internal error occurred while archiving the promotions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}}},"/stores/{store_hash}/v3/promotions/unarchive":{"post":{"operationId":"unarchivePromotions","summary":"Unarchive Multiple Promotions","description":"Unarchives multiple promotions. Accepts an array of promotion IDs to unarchive.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["promotionsBulk"],"parameters":[{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"The promotions were unarchived successfully.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"422":{"description":"The request body was empty or contained a non-positive integer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"An internal error occurred while unarchiving the promotions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"}}}}}}},"/stores/{store_hash}/v3/promotions/{id}":{"get":{"operationId":"getPromotion","summary":"Get Promotion","description":"Returns a single *promotion*.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests","tags":["promotionsSingle"],"parameters":[{"name":"id","in":"path","description":"The ID of the promotion in question.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promotions (Single)_getPromotion_Response_200"}}}},"404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"put":{"operationId":"updatePromotion","summary":"Update Promotion","description":"Update a promotion.\n\n**Note:**\nThe default rate limit for this request is 40 concurrent requests.","tags":["promotionsSingle"],"parameters":[{"name":"id","in":"path","description":"The ID of the promotion in question.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promotions (Single)_updatePromotion_Response_200"}}}},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promotions (Single)_updatePromotion_Request"}}}}},"delete":{"operationId":"deletePromotion","summary":"Delete Promotion","description":"Deletes a promotion.\n\n**Note:**\nThe default rate limit for this endpoint is 40 concurrent requests.","tags":["promotionsSingle"],"parameters":[{"name":"id","in":"path","description":"The ID of the promotion in question.","required":true,"schema":{"type":"string"}},{"name":"store_hash","in":"path","description":"Permanent ID of the BigCommerce store.","required":true,"schema":{"type":"string"}},{"name":"X-Auth-Token","in":"header","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).","required":true,"schema":{"type":"string"}},{"name":"Accept","in":"header","description":"The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"204":{"description":"The deletion was successful or the specified resource does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{}}}}}}}}},"servers":[{"url":"https://api.bigcommerce.com","description":"https://api.bigcommerce.com"}],"components":{"schemas":{"CouponCode":{"type":"object","properties":{"id":{"type":"integer","description":"An auto-generated unique identifier for the coupon code."},"code":{"type":"string","description":"A unique code that can be used to manually apply a discount. Only letters, numbers, white spaces, underscores and hyphens are allowed."},"current_uses":{"type":"integer","description":"A read-only count of the times this coupon code has been used."},"max_uses":{"type":"integer","description":"The maximum number of times you can use this coupon code. The default value is 0, which represents unlimited uses."},"max_uses_per_customer":{"type":"integer","description":"The maximum number of times a specific customer can use this coupon code. The default value is 0, which represents unlimited uses."},"created":{"type":"string","format":"date-time","description":"The date and time when this coupon code was created."}},"required":["id","code","current_uses","created"],"description":"A `CouponCode` object encapsulates attributes of a coupon code.","title":"CouponCode"},"DeprecatedPaginationLinks":{"type":"object","properties":{"previous":{"type":"string","description":"Link to the previous page returned in the response."},"current":{"type":"string","description":"Link to the current page returned in the response."},"next":{"type":"string","description":"Link to the next page returned in the response."}},"description":"Pagination links for the previous and next parts of the whole collection.","title":"DeprecatedPaginationLinks"},"DeprecatedPagination":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items in the result set."},"count":{"type":"integer","description":"Total number of items in the collection response."},"per_page":{"type":"integer","description":"The amount of items returned in the collection per page, controlled by the limit of items per page parameter."},"current_page":{"type":"integer","description":"The page you are currently on within the collection."},"total_pages":{"type":"integer","description":"The total number of pages in the collection."},"links":{"$ref":"#/components/schemas/DeprecatedPaginationLinks","description":"Pagination links for the previous and next parts of the whole collection."}},"description":"Data about the response, including pagination and collection totals. This property has been deprecated and cursor_pagination should be used instead.\n","title":"DeprecatedPagination"},"CursorPaginationLinks":{"type":"object","properties":{"previous":{"type":"string","description":"Link to the previous page returned in the response. This property is omitted when the result set is empty or on the first page.\n"},"next":{"type":"string","description":"Link to the next page returned in the response. This property is omitted when the result set is empty.\n"}},"title":"CursorPaginationLinks"},"CursorPagination":{"type":"object","properties":{"count":{"type":"integer","description":"Total number of items in the result set."},"per_page":{"type":"integer","description":"The amount of items returned in the collection per page, controlled by the limit of items per page parameter."},"start_cursor":{"type":"string","description":"The cursor to the first item in the result set. Can be used with the \"before\" query parameter to paginate backwards. This property is omitted when the result set is empty.\n"},"end_cursor":{"type":"string","description":"The cursor to the last item in the result set. Can be used with the \"after\" query parameter to paginate forwards. This property is omitted when the result set is empty.\n"},"links":{"$ref":"#/components/schemas/CursorPaginationLinks"}},"required":["count","per_page","links"],"description":"Contains data about paginating the response via cursors.","title":"CursorPagination"},"OptionalCursorCollectionMeta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/DeprecatedPagination"},"cursor_pagination":{"$ref":"#/components/schemas/CursorPagination"}},"description":"Contains data about paginating the response via cursors. If no pagination details are specified, then both properties will be present.  When a 'before' or 'after' cursor is provided, only the 'cursor_pagination' property will be present. When a 'page' parameter is provided, only the offset based 'pagination' property will be present.\n","title":"OptionalCursorCollectionMeta"},"Coupon Codes (Bulk)_getPromotionCodes_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CouponCode"}},"meta":{"$ref":"#/components/schemas/OptionalCursorCollectionMeta"}},"title":"Coupon Codes (Bulk)_getPromotionCodes_Response_200"},"BulkActionResponseErrorErrors":{"type":"object","properties":{},"description":"List all per-item errors. Use an index of an item on a request to reference an error. The example shows the first and second item on a request that has caused an error.","title":"BulkActionResponseErrorErrors"},"BulkActionResponseError":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP Response status."},"title":{"type":"string","description":"Title of the status"},"type":{"type":"string","description":"Explanation of the error type."},"errors":{"$ref":"#/components/schemas/BulkActionResponseErrorErrors","description":"List all per-item errors. Use an index of an item on a request to reference an error. The example shows the first and second item on a request that has caused an error."}},"description":"Contains data about the error of the bulk action.","title":"BulkActionResponseError"},"BulkActionResponseMeta":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items in the bulk action."},"success":{"type":"integer","description":"Number of items that processed successfully."},"failed":{"type":"integer","description":"Number of items that failed to process."}},"description":"Contains data about the bulk action response including the number of total, failed and success.","title":"BulkActionResponseMeta"},"DeleteCouponCodesRequestUnprocessableEntityError":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/BulkActionResponseError"}},"meta":{"$ref":"#/components/schemas/BulkActionResponseMeta"}},"title":"DeleteCouponCodesRequestUnprocessableEntityError"},"BulkCouponCode":{"type":"object","properties":{"code":{"type":"string","description":"A unique, 16-character code that can be used to manually apply a discount. The code consists of randomly generated capital letters and numbers."}},"title":"BulkCouponCode"},"PromotionsPromotionIdCodegenPostResponsesContentApplicationJsonSchemaData":{"type":"object","properties":{"created":{"type":"string","format":"date-time","description":"The date and time when the codes were created."},"max_uses":{"type":"integer","description":"The maximum number of times each code can be used."},"max_uses_per_customer":{"type":"integer","description":"The maximum number of times each customer can use a code."},"batch_size":{"type":"integer","description":"The number of codes generated in the batch."},"codes":{"type":"array","items":{"$ref":"#/components/schemas/BulkCouponCode"}}},"title":"PromotionsPromotionIdCodegenPostResponsesContentApplicationJsonSchemaData"},"PromotionsPromotionIdCodegenPostResponsesContentApplicationJsonSchemaMeta":{"type":"object","properties":{},"description":"Empty meta object, which may be used at a later time.","title":"PromotionsPromotionIdCodegenPostResponsesContentApplicationJsonSchemaMeta"},"Coupon Codes (Bulk)_generatePromotionCodesBatch_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PromotionsPromotionIdCodegenPostResponsesContentApplicationJsonSchemaData"},"meta":{"$ref":"#/components/schemas/PromotionsPromotionIdCodegenPostResponsesContentApplicationJsonSchemaMeta","description":"Empty meta object, which may be used at a later time."}},"title":"Coupon Codes (Bulk)_generatePromotionCodesBatch_Response_201"},"ErrorResponse400":{"type":"object","properties":{"status":{"type":"string","description":"Bad request."},"title":{"type":"string","description":"The error title describing the particular error."},"type":{"type":"string","description":"Error payload for the BigCommerce API."},"detail":{"type":"string","description":"Detailed summary describing the particular error."}},"description":"The server cannot process the request because the syntax or data is invalid.","title":"ErrorResponse400"},"ErrorResponse403":{"type":"object","properties":{"status":{"type":"string","description":"Forbidden."},"title":{"type":"string","description":"The error title describing the particular error."},"error":{"type":"string","description":"Error payload for the BigCommerce API."}},"description":"The client is authenticated but does not have the necessary permissions to perform the requested action.","title":"ErrorResponse403"},"ErrorResponse405":{"type":"object","properties":{"status":{"type":"string","description":"Method not allowed."},"title":{"type":"string","description":"The error title describing the particular error."},"error":{"type":"string","description":"Error payload for the BigCommerce API."}},"description":"The requested method is not allowed for the specified resource.","title":"ErrorResponse405"},"Error":{"type":"object","properties":{"status":{"type":"integer"},"title":{"type":"string"}},"title":"Error"},"ErrorResponse":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}}},"title":"ErrorResponse"},"PromotionsPromotionIdCodesPostResponsesContentApplicationJsonSchemaMeta":{"type":"object","properties":{},"description":"Empty meta object, which may be used at a later time.","title":"PromotionsPromotionIdCodesPostResponsesContentApplicationJsonSchemaMeta"},"Coupon Codes (Single)_createPromotionCode_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CouponCode"},"meta":{"$ref":"#/components/schemas/PromotionsPromotionIdCodesPostResponsesContentApplicationJsonSchemaMeta","description":"Empty meta object, which may be used at a later time."}},"title":"Coupon Codes (Single)_createPromotionCode_Response_201"},"Coupon Codes (Single)_getCouponCodeByCode_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CouponCode"}},"meta":{"$ref":"#/components/schemas/OptionalCursorCollectionMeta"}},"title":"Coupon Codes (Single)_getCouponCodeByCode_Response_200"},"PromotionsGetParametersRedemptionType":{"type":"string","enum":["automatic","coupon"],"title":"PromotionsGetParametersRedemptionType"},"PromotionsGetParametersSort":{"type":"string","enum":["id","name","priority","start_date"],"title":"PromotionsGetParametersSort"},"PromotionsGetParametersDirection":{"type":"string","enum":["asc","desc"],"title":"PromotionsGetParametersDirection"},"SavedAutomaticPromotionRedemptionType":{"type":"string","enum":["AUTOMATIC"],"description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`.","title":"SavedAutomaticPromotionRedemptionType"},"Channel":{"type":"object","properties":{"id":{"type":"integer"}},"required":["id"],"title":"Channel"},"CustomerSegmentIdLimitation":{"type":"object","properties":{"id":{"type":"array","items":{"type":"string"},"description":"An array of segment IDs."}},"required":["id"],"title":"CustomerSegmentIdLimitation"},"NotCustomerSegmentLimitation3":{"type":"object","properties":{"not":{"$ref":"#/components/schemas/CustomerSegmentIdLimitation"}},"required":["not"],"title":"NotCustomerSegmentLimitation3"},"AndCustomerSegmentLimitation3":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSegmentIdLimitation"}}},"required":["and"],"title":"AndCustomerSegmentLimitation3"},"OrCustomerSegmentLimitation3":{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSegmentIdLimitation"}}},"required":["or"],"title":"OrCustomerSegmentLimitation3"},"CustomerSegmentLimitation3":{"oneOf":[{"$ref":"#/components/schemas/CustomerSegmentIdLimitation"},{"$ref":"#/components/schemas/NotCustomerSegmentLimitation3"},{"$ref":"#/components/schemas/AndCustomerSegmentLimitation3"},{"$ref":"#/components/schemas/OrCustomerSegmentLimitation3"}],"title":"CustomerSegmentLimitation3"},"NotCustomerSegmentLimitation2":{"type":"object","properties":{"not":{"$ref":"#/components/schemas/CustomerSegmentLimitation3"}},"required":["not"],"title":"NotCustomerSegmentLimitation2"},"AndCustomerSegmentLimitation2":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSegmentLimitation3"}}},"required":["and"],"title":"AndCustomerSegmentLimitation2"},"OrCustomerSegmentLimitation2":{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSegmentLimitation3"}}},"required":["or"],"title":"OrCustomerSegmentLimitation2"},"CustomerSegmentLimitation2":{"oneOf":[{"$ref":"#/components/schemas/CustomerSegmentIdLimitation"},{"$ref":"#/components/schemas/NotCustomerSegmentLimitation2"},{"$ref":"#/components/schemas/AndCustomerSegmentLimitation2"},{"$ref":"#/components/schemas/OrCustomerSegmentLimitation2"}],"title":"CustomerSegmentLimitation2"},"NotCustomerSegmentLimitation":{"type":"object","properties":{"not":{"$ref":"#/components/schemas/CustomerSegmentLimitation2"}},"required":["not"],"title":"NotCustomerSegmentLimitation"},"AndCustomerSegmentLimitation":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSegmentLimitation2"}}},"required":["and"],"title":"AndCustomerSegmentLimitation"},"OrCustomerSegmentLimitation":{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSegmentLimitation2"}}},"required":["or"],"title":"OrCustomerSegmentLimitation"},"CustomerSegmentLimitation":{"oneOf":[{"$ref":"#/components/schemas/CustomerSegmentIdLimitation"},{"$ref":"#/components/schemas/NotCustomerSegmentLimitation"},{"$ref":"#/components/schemas/AndCustomerSegmentLimitation"},{"$ref":"#/components/schemas/OrCustomerSegmentLimitation"}],"title":"CustomerSegmentLimitation"},"CustomerSegments":{"oneOf":[{"$ref":"#/components/schemas/CustomerSegmentLimitation"}],"title":"CustomerSegments"},"Customer":{"type":"object","properties":{"group_ids":{"type":"array","items":{"type":"integer"},"description":"A list of customer group IDs that the promotion targets. Only customers in those groups are eligible for this promotion. When unspecified, or set to an empty array, this requirement is not effective, and all customers who satisfy the other requirements (minimum_order_count, excluded_group_ids) are eligible for the promotion. This has a maximum supported length of 100000 IDs."},"minimum_order_count":{"type":"integer","description":"The minimum number of completed orders required of the customer."},"excluded_group_ids":{"type":"array","items":{"type":"integer"},"description":"A list of customer group IDs that the promotion will exclude. Only customers who are NOT in those groups are eligible for this promotion. When unspecified, or set to an empty array, this requirement will not have any effects, and all customers who satisfy the other requirements (group_ids, minimum_order_count) are eligible for the promotion."},"segments":{"$ref":"#/components/schemas/CustomerSegments"}},"description":"Specifies the requirements which make the customer eligible for the promotion.\n\nNote:\n- Only \"group_ids\" or \"excluded_group_ids\" should be specified (have non-empty array data), but not both.\n- group_id zero (0) signifies guest customers or registered customers who are not assigned to any groups.\n- The \"group_ids\" array has a hard limit of 100000 group ids.","title":"Customer"},"Money":{"type":"string","description":"**Money**\nRepresents a monetary value in the store’s default currency.","title":"Money"},"FixedDiscount":{"type":"object","properties":{"fixed_amount":{"$ref":"#/components/schemas/Money"}},"required":["fixed_amount"],"description":"**Fixed Discount**","title":"FixedDiscount"},"PercentageDiscount":{"type":"object","properties":{"percentage_amount":{"type":"string","description":"The amount of discount (percentage off) to apply."}},"required":["percentage_amount"],"description":"**Percentage Discount**","title":"PercentageDiscount"},"Discount":{"oneOf":[{"$ref":"#/components/schemas/FixedDiscount"},{"$ref":"#/components/schemas/PercentageDiscount"}],"description":"**Discount**","title":"Discount"},"MaximumAllowedDiscountAmount":{"type":"string","description":"The maximum monetary value that can be applied as a discount. It can take any value greater than 0, up to 10000000.\nThe application of this maximum depends on the discount type:\n  - Discount on shipping:\n      - Percent Discount: Maximum discount total applies to ALL shipping destinations combined.\n      - Fixed Amount Discount: Maximum total is divided evenly amongst all shipping destinations.\n  - Discount on products:\n      - Percent Discount: Maximum discount total applies to ALL products combined.\n      - Fixed Amount Discount + Each Product's price: Maximum total is divided based on existing weighting logic amongst all products. Applicable only when `as_total` is set to `false`.\n  - Discount on order subtotal:\n      - Maximum discount total applies to entire order total. Applicable for both Percent and Fixed Amount discounts.\n","title":"MaximumAllowedDiscountAmount"},"CartValueActionCartValue":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"},"maximum_allowed_discount_amount":{"$ref":"#/components/schemas/MaximumAllowedDiscountAmount"}},"required":["discount"],"title":"CartValueActionCartValue"},"CartValueAction":{"type":"object","properties":{"cart_value":{"$ref":"#/components/schemas/CartValueActionCartValue"}},"description":"**Cart Value Action**\nApplies discount on the entire cart.","title":"CartValueAction"},"BrandsItemMatcher":{"type":"object","properties":{"brands":{"type":"array","items":{"type":"integer"},"description":"List of brand IDs."}},"description":"**BrandsItemMatcher**\nBrands to which the items should belong.","title":"BrandsItemMatcher"},"CategoriesItemMatcher":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"integer"},"description":"List of category IDs."}},"description":"**CategoriesItemMatcher**\nCategories to which the items should belong.","title":"CategoriesItemMatcher"},"ProductsItemMatcher":{"type":"object","properties":{"products":{"type":"array","items":{"type":"integer"},"description":"List of product IDs."}},"description":"**Products Item Matcher**\nSpecific products which items should be from.","title":"ProductsItemMatcher"},"VariantsItemMatcher":{"type":"object","properties":{"variants":{"type":"array","items":{"type":"integer"},"description":"List of variant IDs."}},"description":"**Variants Item Matcher**\nProduct variants which items should be from.","title":"VariantsItemMatcher"},"ProductOptionsItemMatcherProductOption":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["type","name","values"],"title":"ProductOptionsItemMatcherProductOption"},"ProductOptionsItemMatcher":{"type":"object","properties":{"product_option":{"$ref":"#/components/schemas/ProductOptionsItemMatcherProductOption"}},"description":"Match a product by product options.\n\nCurrently the only supported type is `string_match` which performs a string comparison on the name and values.","title":"ProductOptionsItemMatcher"},"ProductCustomFieldMatcherProductCustomField":{"type":"object","properties":{"name":{"type":"string"},"values":{"type":"array","items":{"type":"string"}}},"required":["name","values"],"title":"ProductCustomFieldMatcherProductCustomField"},"ProductCustomFieldMatcher":{"type":"object","properties":{"product_custom_field":{"$ref":"#/components/schemas/ProductCustomFieldMatcherProductCustomField"}},"description":"Match a product with a custom field.\n\nYou can define a maximum of 10 Product Custom Field Item Matchers within an Item Matcher.","title":"ProductCustomFieldMatcher"},"SimpleItemMatcher":{"oneOf":[{"$ref":"#/components/schemas/BrandsItemMatcher"},{"$ref":"#/components/schemas/CategoriesItemMatcher"},{"$ref":"#/components/schemas/ProductsItemMatcher"},{"$ref":"#/components/schemas/VariantsItemMatcher"},{"$ref":"#/components/schemas/ProductOptionsItemMatcher"},{"$ref":"#/components/schemas/ProductCustomFieldMatcher"}],"description":"**Simple Item Matcher**","title":"SimpleItemMatcher"},"NotItemMatcher3":{"type":"object","properties":{"not":{"$ref":"#/components/schemas/SimpleItemMatcher"}},"description":"**NotItemMatcher**\nEvaluates to true when the child is evaluated to false.","title":"NotItemMatcher3"},"AndItemMatcher3":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/SimpleItemMatcher"},"description":"Array of Item Matcher."}},"description":"**AndItemMatcher**\nEvaluates to true when all children are evaluated to true.","title":"AndItemMatcher3"},"OrItemMatcher3":{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/components/schemas/SimpleItemMatcher"},"description":"Array of Item Matcher."}},"description":"**OrItemMatcher**\nEvaluates to true when one of its children are evaluated to true.","title":"OrItemMatcher3"},"ItemMatcher3":{"oneOf":[{"$ref":"#/components/schemas/SimpleItemMatcher"},{"$ref":"#/components/schemas/NotItemMatcher3"},{"$ref":"#/components/schemas/AndItemMatcher3"},{"$ref":"#/components/schemas/OrItemMatcher3"}],"description":"**ItemMatcher**\nLists which items to consider in the condition or action. If this is specified, you will need to also specify at least one of minimum_quantity or minimum_spend.","title":"ItemMatcher3"},"NotItemMatcher2":{"type":"object","properties":{"not":{"$ref":"#/components/schemas/ItemMatcher3"}},"description":"**NotItemMatcher**\nEvaluates to true when the child is evaluated to false.","title":"NotItemMatcher2"},"AndItemMatcher2":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ItemMatcher3"},"description":"Array of Item Matcher."}},"description":"**AndItemMatcher**\nEvaluates to true when all children are evaluated to true.","title":"AndItemMatcher2"},"OrItemMatcher2":{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/components/schemas/ItemMatcher3"},"description":"Array of Item Matcher."}},"description":"**OrItemMatcher**\nEvaluates to true when one of its children are evaluated to true.","title":"OrItemMatcher2"},"ItemMatcher2":{"oneOf":[{"$ref":"#/components/schemas/SimpleItemMatcher"},{"$ref":"#/components/schemas/NotItemMatcher2"},{"$ref":"#/components/schemas/AndItemMatcher2"},{"$ref":"#/components/schemas/OrItemMatcher2"}],"description":"**ItemMatcher**\nLists which items to consider in the condition or action. If this is specified, you will need to also specify at least one of minimum_quantity or minimum_spend.","title":"ItemMatcher2"},"NotItemMatcher":{"type":"object","properties":{"not":{"$ref":"#/components/schemas/ItemMatcher2"}},"description":"**NotItemMatcher**\nEvaluates to true when the child is evaluated to false.","title":"NotItemMatcher"},"AndItemMatcher":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/ItemMatcher2"},"description":"Array of Item Matcher."}},"description":"**AndItemMatcher**\nEvaluates to true when all children are evaluated to true.","title":"AndItemMatcher"},"OrItemMatcher":{"type":"object","properties":{"or":{"type":"array","items":{"$ref":"#/components/schemas/ItemMatcher2"},"description":"Array of Item Matcher."}},"description":"**OrItemMatcher**\nEvaluates to true when one of its children are evaluated to true.","title":"OrItemMatcher"},"ItemMatcher":{"oneOf":[{"$ref":"#/components/schemas/SimpleItemMatcher"},{"$ref":"#/components/schemas/NotItemMatcher"},{"$ref":"#/components/schemas/AndItemMatcher"},{"$ref":"#/components/schemas/OrItemMatcher"}],"description":"**ItemMatcher**\nLists which items to consider in the condition or action. If this is specified, you will need to also specify at least one of minimum_quantity or minimum_spend.","title":"ItemMatcher"},"CartItemsActionCartItemsStrategy":{"type":"string","enum":["LEAST_EXPENSIVE","LEAST_EXPENSIVE_ONLY","MOST_EXPENSIVE","MOST_EXPENSIVE_ONLY"],"description":"If the shopper has multiple items in their cart that could be discounted by this action, strategy will determine which items are discounted, for example LEAST_EXPENSIVE will sort items by their price in ascending order and discount the cheapest item first.","title":"CartItemsActionCartItemsStrategy"},"CartItemsActionCartItems":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"},"maximum_allowed_discount_amount":{"$ref":"#/components/schemas/MaximumAllowedDiscountAmount"},"as_total":{"type":"boolean","description":"Set this value to true to distribute the discount as a total among matching items. By default, the discount applies to each item.\nExample: If set to false, the discount is $10 and you have 2 eligible items for this discount in the cart, both items will be discounted by $10, with a total of $20 off the order.\nIf set to true, $10 will be distributed among the 2 items, weighted by their respective price. In a case where there are 2 of the same items, each item will be discounted by $5."},"items":{"$ref":"#/components/schemas/ItemMatcher"},"include_items_considered_by_condition":{"type":"boolean","description":"Setting this value to true enables you to discount items that are used to satisfy the condition. By default items that are used to satisfy the condition are excluded from receiving the discount. For example, \"Buy 1 Get 1 20% off.\" When the cart only contains 1 item, the discount won’t apply."},"exclude_items_on_sale":{"type":"boolean","description":"Setting this value to true enables the option to prevent items already on sale from being further discounted."},"strategy":{"$ref":"#/components/schemas/CartItemsActionCartItemsStrategy","description":"If the shopper has multiple items in their cart that could be discounted by this action, strategy will determine which items are discounted, for example LEAST_EXPENSIVE will sort items by their price in ascending order and discount the cheapest item first."},"quantity":{"type":"integer","description":"Specifies a quantity of matching items to discount. If no quantity is specified, an infinite number of items can be discounted."},"add_free_item":{"type":"boolean","description":"The promotion will try to add a free item to the cart automatically, but if it cannot, it will discount a matching existing cart item by 100%."}},"required":["discount"],"title":"CartItemsActionCartItems"},"CartItemsAction":{"type":"object","properties":{"cart_items":{"$ref":"#/components/schemas/CartItemsActionCartItems"}},"description":"**Cart Items Action**\nApplies discount on matching products in the cart.","title":"CartItemsAction"},"GiftItemActionGiftItem":{"type":"object","properties":{"quantity":{"type":"integer","description":"Quantity of gift item to give."},"product_id":{"type":"integer","description":"Product ID of the gift item."},"variant_id":{"type":"integer","description":"Variant ID of the gift item."}},"required":["quantity"],"title":"GiftItemActionGiftItem"},"GiftItemAction":{"type":"object","properties":{"gift_item":{"$ref":"#/components/schemas/GiftItemActionGiftItem"}},"description":"**Gift Item Action**\nGive a gift item for free.","title":"GiftItemAction"},"FixedPriceSetActionFixedPriceSetStrategy":{"type":"string","enum":["LEAST_EXPENSIVE","LEAST_EXPENSIVE_ONLY","MOST_EXPENSIVE","MOST_EXPENSIVE_ONLY"],"description":"If the shopper has multiple items in their cart that could be discounted by this action, strategy will determine which items are discounted, for example LEAST_EXPENSIVE will sort items in price ascending order and discount the cheapest item first.","title":"FixedPriceSetActionFixedPriceSetStrategy"},"FixedPriceSetActionFixedPriceSet":{"type":"object","properties":{"quantity":{"type":"integer","description":"Quantity of items in the set that would receive the discount."},"fixed_price":{"$ref":"#/components/schemas/Money"},"items":{"$ref":"#/components/schemas/ItemMatcher"},"strategy":{"$ref":"#/components/schemas/FixedPriceSetActionFixedPriceSetStrategy","description":"If the shopper has multiple items in their cart that could be discounted by this action, strategy will determine which items are discounted, for example LEAST_EXPENSIVE will sort items in price ascending order and discount the cheapest item first."},"exclude_items_on_sale":{"type":"boolean","description":"Enable this option to prevent items already on sale from being further discounted."},"include_items_considered_by_condition":{"type":"boolean","default":true,"description":"Setting this value to false enables you to exclude items used to satisfy the condition to be discounted. By default, items that are used to satisfy the condition are eligible to receive the discount."}},"required":["quantity","fixed_price"],"title":"FixedPriceSetActionFixedPriceSet"},"FixedPriceSetAction":{"type":"object","properties":{"fixed_price_set":{"$ref":"#/components/schemas/FixedPriceSetActionFixedPriceSet"}},"description":"**Fixed Price Set Action**\nSets a fixed price for a list of items.","title":"FixedPriceSetAction"},"ShippingActionShippingZoneIds0":{"type":"string","enum":["*"],"description":"All configured shipping zones.","title":"ShippingActionShippingZoneIds0"},"ShippingActionShippingZoneIds":{"oneOf":[{"$ref":"#/components/schemas/ShippingActionShippingZoneIds0"},{"type":"array","items":{"type":"integer"}}],"title":"ShippingActionShippingZoneIds"},"ShippingActionShipping":{"type":"object","properties":{"free_shipping":{"type":"boolean","description":"Set this property to true to provide a separate free shipping method. Read-Only."},"zone_ids":{"$ref":"#/components/schemas/ShippingActionShippingZoneIds"}},"required":["zone_ids"],"title":"ShippingActionShipping"},"ShippingAction":{"type":"object","properties":{"shipping":{"$ref":"#/components/schemas/ShippingActionShipping"}},"description":"**Shipping Action**\nApplies discount on shipping, optionally restricted to specific shipping zones.","title":"ShippingAction"},"ShippingDiscountActionShippingDiscountMethodIds0":{"type":"string","enum":["*"],"description":"All configured shipping methods.","title":"ShippingDiscountActionShippingDiscountMethodIds0"},"ShippingDiscountActionShippingDiscountMethodIds":{"oneOf":[{"$ref":"#/components/schemas/ShippingDiscountActionShippingDiscountMethodIds0"},{"type":"array","items":{"type":"integer"}}],"title":"ShippingDiscountActionShippingDiscountMethodIds"},"ShippingDiscountActionShippingDiscount":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"},"maximum_allowed_discount_amount":{"$ref":"#/components/schemas/MaximumAllowedDiscountAmount"},"method_ids":{"$ref":"#/components/schemas/ShippingDiscountActionShippingDiscountMethodIds"}},"required":["discount","method_ids"],"title":"ShippingDiscountActionShippingDiscount"},"ShippingDiscountAction":{"type":"object","properties":{"shipping_discount":{"$ref":"#/components/schemas/ShippingDiscountActionShippingDiscount"}},"description":"**Shipping Discount Action**\nDiscounts shipping, optionally restricted to specific shipping methods.","title":"ShippingDiscountAction"},"Action":{"oneOf":[{"$ref":"#/components/schemas/CartValueAction"},{"$ref":"#/components/schemas/CartItemsAction"},{"$ref":"#/components/schemas/GiftItemAction"},{"$ref":"#/components/schemas/FixedPriceSetAction"},{"$ref":"#/components/schemas/ShippingAction"},{"$ref":"#/components/schemas/ShippingDiscountAction"}],"description":"**Action**","title":"Action"},"CartConditionCart":{"type":"object","properties":{"items":{"$ref":"#/components/schemas/ItemMatcher"},"minimum_spend":{"$ref":"#/components/schemas/Money"},"minimum_quantity":{"type":"integer","description":"Minimum required quantity of the item in the cart for the condition to match. This field is *mandatory* when `items` are specified, but has *no effect* if `items` are not specified."}},"title":"CartConditionCart"},"CartCondition":{"type":"object","properties":{"cart":{"$ref":"#/components/schemas/CartConditionCart"}},"description":"**Cart Condition**\nCondition based on the content of the current cart.","title":"CartCondition"},"AndCondition":{"type":"object","properties":{"and":{"type":"array","items":{"$ref":"#/components/schemas/CartCondition"},"description":"Array of [Conditions](/developer/api-reference/rest/admin/management/promotions)."}},"description":"**AndCondition**\nEvaluates to true when all children are evaluated to true.","title":"AndCondition"},"Condition":{"oneOf":[{"$ref":"#/components/schemas/CartCondition"},{"$ref":"#/components/schemas/AndCondition"}],"description":"**Condition**","title":"Condition"},"Rule":{"type":"object","properties":{"action":{"$ref":"#/components/schemas/Action"},"apply_once":{"type":"boolean","default":true,"description":"Setting this property to false enables the rule to run repeatedly (for example: 1 free product X for every product Y you purchase)"},"stop":{"type":"boolean","description":"Boolean value that specifies whether to stop executing all the remaining rules down the priority list when the current rule is applied successfully."},"condition":{"$ref":"#/components/schemas/Condition"}},"required":["action"],"description":"**Rule**\nA Rule is the executable unit of the promotion. When a ruleʼs condition is met, the API applies the discount defined in the specified action.","title":"Rule"},"SavedAutomaticPromotionStatus":{"type":"string","enum":["ENABLED","DISABLED","INVALID"],"description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid.","title":"SavedAutomaticPromotionStatus"},"NotificationType":{"type":"string","enum":["UPSELL","ELIGIBLE","APPLIED"],"title":"NotificationType"},"Notification":{"type":"object","properties":{"content":{"type":"string","description":"The notification content to be displayed to the user.\nData from the condition and action are available allowing the message to be customized."},"type":{"$ref":"#/components/schemas/NotificationType"},"locations":{"type":"array","items":{"type":"string"},"description":"Specifies where the notification message will be displayed."}},"required":["content","type","locations"],"description":"**Notification**\nA notification displayed to the user based on the result of executing a promotion, for example, a \"Congratulations! Youʼve received free shipping!\" message when the shopper receives free shipping.","title":"Notification"},"CountryRuleInfo":{"type":"object","properties":{"iso2_country_code":{"type":"string","description":"Specifies the country code, in ISO 3166-1 alpha-2 format."}},"required":["iso2_country_code"],"description":"Country Rule","title":"CountryRuleInfo"},"CountryAddressMatcher":{"type":"object","properties":{"countries":{"type":"array","items":{"$ref":"#/components/schemas/CountryRuleInfo"},"description":"A list of country rules."}},"required":["countries"],"description":"Specifies the countries which the promotion targets.","title":"CountryAddressMatcher"},"NotAddressMatcher":{"type":"object","properties":{"not":{"$ref":"#/components/schemas/CountryAddressMatcher"}},"required":["not"],"description":"Evaluates to `true` when the child is evaluated to `false`.","title":"NotAddressMatcher"},"AddressMatcher":{"oneOf":[{"$ref":"#/components/schemas/CountryAddressMatcher"},{"$ref":"#/components/schemas/NotAddressMatcher"}],"description":"Specifies which addresses to consider.","title":"AddressMatcher"},"AvailabilityByWeekDayWeekDaysItems":{"type":"string","enum":["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],"title":"AvailabilityByWeekDayWeekDaysItems"},"AvailabilityByWeekDay":{"type":"object","properties":{"week_frequency":{"type":"integer","description":"Specifies the recurrence, in number of weeks, during which the promotion is available (every \"x\" weeks)."},"week_days":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityByWeekDayWeekDaysItems"},"description":"Specifies the weekdays during which the promotion is available."},"daily_start_time":{"type":"string","format":"time","description":"Specifies the time of day from which the promotion is available."},"daily_end_time":{"type":"string","format":"time","description":"Specifies the time of day until which the promotion is available."}},"required":["week_frequency","week_days","daily_start_time","daily_end_time"],"description":"Specifies the availability by weekdays.","title":"AvailabilityByWeekDay"},"CreatedFrom":{"type":"string","enum":["react_ui","legacy_ui","api"],"description":"Describes which client originally created the promotion","title":"CreatedFrom"},"SavedAutomaticPromotion":{"type":"object","properties":{"id":{"type":"integer","description":"An auto-generated unique identifier for the discount rule."},"redemption_type":{"$ref":"#/components/schemas/SavedAutomaticPromotionRedemptionType","description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`."},"name":{"type":"string","description":"An internal name for this rule that the merchant can refer to."},"display_name":{"type":"string","description":"Customer-facing name for this rule, that the merchant want to display to customers."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"},"description":"Channels that the promotion targets. Empty array [] means targeting all the channels. In POST request, if omitted, this field defaults to an empty array [] value."},"customer":{"$ref":"#/components/schemas/Customer"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"},"description":"An ordered list of rules to be executed until the first applicable one applies a discount successfully and the rest will be skipped."},"current_uses":{"type":"integer","description":"A read-only count of the times this rule has been used by customers. A rule is considered to be used when a customer successfully checks out with a rule that has applied a discount to their cart."},"max_uses":{"type":"integer","description":"The maximum number of times this discount can be used by customers."},"status":{"$ref":"#/components/schemas/SavedAutomaticPromotionStatus","description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid."},"start_date":{"type":"string","description":"The date and time when this rule will become active."},"end_date":{"type":"string","description":"The date and time when this rule will expire. If this property is left null, the promotion never expires."},"stop":{"type":"boolean","description":"Boolean value that specifies whether to stop evaluating promotions down the priority list when the promotion is applied successfully."},"can_be_used_with_other_promotions":{"type":"boolean","default":true,"description":"Boolean value that specifies whether this promotion can be used with other promotions. When set to false, only apply this promotion if there are no discounts applied already, and stop executing other promotions if this promotion applies successfully."},"currency_code":{"type":"string","description":"The ISO-4217-based transactional currency code to which the promotion applies OR * for all currencies."},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"},"description":"Notifications to display on the storefront based on the result of the evaluation for promotion eligibility."},"shipping_address":{"$ref":"#/components/schemas/AddressMatcher"},"schedule":{"$ref":"#/components/schemas/AvailabilityByWeekDay"},"created_from":{"$ref":"#/components/schemas/CreatedFrom"}},"required":["id","redemption_type","name","channels","customer","rules","current_uses","status","start_date","stop","can_be_used_with_other_promotions","currency_code","notifications","created_from"],"description":"The store applies *Automatic promotions* to a shopper’s cart once the promotion criteria are satisfied. The shopper cannot manually apply an *automatic promotion*.","title":"SavedAutomaticPromotion"},"SavedCouponPromotionRedemptionType":{"type":"string","enum":["COUPON"],"description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`.","title":"SavedCouponPromotionRedemptionType"},"SavedCouponPromotionStatus":{"type":"string","enum":["ENABLED","DISABLED","INVALID"],"description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid.","title":"SavedCouponPromotionStatus"},"SavedCouponPromotionMultipleCodes":{"type":"object","properties":{"has_multiple_codes":{"type":"boolean","default":false}},"title":"SavedCouponPromotionMultipleCodes"},"SavedCouponPromotionCouponType":{"type":"string","enum":["SINGLE","BULK"],"description":"The type of the coupon promotion, whether it will have single or multiple codes.","title":"SavedCouponPromotionCouponType"},"SavedCouponPromotion":{"type":"object","properties":{"id":{"type":"integer","description":"An auto-generated unique identifier for the discount rule."},"redemption_type":{"$ref":"#/components/schemas/SavedCouponPromotionRedemptionType","description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`."},"name":{"type":"string","description":"An internal name for this rule that the merchant can refer to."},"display_name":{"type":"string","description":"Customer-facing name for this rule, that the merchant want to display to customers."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"},"description":"Channels that the promotion targets. Empty array [] means targeting all the channels. In POST request, if omitted, this field defaults to an empty array [] value."},"customer":{"$ref":"#/components/schemas/Customer"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"},"description":"An ordered list of rules to be executed until the first applicable one applies a discount successfully and the rest will be skipped."},"current_uses":{"type":"integer","description":"A read-only count of the times this rule has been used by customers. A rule is considered to be used when a customer successfully checks out with a rule that has applied a discount to their cart."},"max_uses":{"type":"integer","description":"The maximum number of times this discount can be used by customers."},"status":{"$ref":"#/components/schemas/SavedCouponPromotionStatus","description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid."},"start_date":{"type":"string","description":"The date and time when this rule will become active."},"end_date":{"type":"string","description":"The date and time when this rule will expire. If this property is left null, the promotion never expires."},"stop":{"type":"boolean","description":"Boolean value that specifies whether to stop evaluating promotions down the priority list when the promotion is applied successfully."},"can_be_used_with_other_promotions":{"type":"boolean","default":true,"description":"Boolean value that specifies whether this promotion can be used with other promotions. When set to false, only apply this promotion if there are no discounts applied already, and stop executing other promotions if this promotion applies successfully."},"currency_code":{"type":"string","description":"The ISO-4217-based transactional currency code to which the promotion applies OR * for all currencies."},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"},"description":"Notifications to display on the storefront based on the result of the evaluation for promotion eligibility."},"shipping_address":{"$ref":"#/components/schemas/AddressMatcher"},"schedule":{"$ref":"#/components/schemas/AvailabilityByWeekDay"},"created_from":{"$ref":"#/components/schemas/CreatedFrom"},"codes":{"$ref":"#/components/schemas/CouponCode"},"coupon_overrides_automatic_when_offering_higher_discounts":{"type":"boolean","default":false,"description":"This field only has effect when the `redemption_type` is `COUPON` and `can_be_used_with_other_promotions` is `false`:\n- When the property is set to `true`, the coupon will override the applied automatic promotions if it provides a greater discount.\n- When the property is set to `fasle`, the coupon will not be applied if automatic promotions are already applied.\n\nTrying to set the value of this field to `true` when the `redemption_type` is not `COUPON`, or when `can_be_used_with_other_promotions` is `true` will yield a 422 error response."},"multiple_codes":{"$ref":"#/components/schemas/SavedCouponPromotionMultipleCodes"},"coupon_type":{"$ref":"#/components/schemas/SavedCouponPromotionCouponType","description":"The type of the coupon promotion, whether it will have single or multiple codes."}},"required":["id","redemption_type","name","channels","customer","rules","current_uses","status","start_date","stop","can_be_used_with_other_promotions","currency_code","notifications","created_from","coupon_overrides_automatic_when_offering_higher_discounts","coupon_type"],"description":"**Coupon Promotion** A shopper must manually apply a *coupon promotion* to their cart.","title":"SavedCouponPromotion"},"PromotionsGetResponsesContentApplicationJsonSchemaDataItems":{"oneOf":[{"$ref":"#/components/schemas/SavedAutomaticPromotion"},{"$ref":"#/components/schemas/SavedCouponPromotion"}],"title":"PromotionsGetResponsesContentApplicationJsonSchemaDataItems"},"PaginationLinks":{"type":"object","properties":{"previous":{"type":"string","description":"Link to the previous page returned in the response."},"current":{"type":"string","description":"Link to the current page returned in the response."},"next":{"type":"string","description":"Link to the next page returned in the response."}},"description":"Pagination links for the previous and next parts of the whole collection.","title":"PaginationLinks"},"Pagination":{"type":"object","properties":{"total":{"type":"integer","description":"Total number of items in the result set."},"count":{"type":"integer","description":"Total number of items in the collection response."},"per_page":{"type":"integer","description":"The amount of items returned in the collection per page, controlled by the limit of items per page parameter."},"current_page":{"type":"integer","description":"The page you are currently on within the collection."},"total_pages":{"type":"integer","description":"The total number of pages in the collection."},"links":{"$ref":"#/components/schemas/PaginationLinks","description":"Pagination links for the previous and next parts of the whole collection."}},"required":["total","count","per_page","current_page","total_pages","links"],"description":"Data about the response, including pagination and collection totals.","title":"Pagination"},"CollectionMeta":{"type":"object","properties":{"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["pagination"],"description":"Contains data about the response including pagination and collection totals.","title":"CollectionMeta"},"Promotions (Bulk)_getPromotions_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PromotionsGetResponsesContentApplicationJsonSchemaDataItems"}},"meta":{"$ref":"#/components/schemas/CollectionMeta"}},"required":["data","meta"],"title":"Promotions (Bulk)_getPromotions_Response_200"},"DeletePromotionsRequestUnprocessableEntityError":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/BulkActionResponseError"}},"meta":{"$ref":"#/components/schemas/BulkActionResponseMeta"}},"title":"DeletePromotionsRequestUnprocessableEntityError"},"DraftCouponPromotionRedemptionType":{"type":"string","enum":["COUPON"],"description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`.","title":"DraftCouponPromotionRedemptionType"},"DraftCouponPromotionStatus":{"type":"string","enum":["ENABLED","DISABLED","INVALID"],"description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid.","title":"DraftCouponPromotionStatus"},"DraftCouponPromotionCouponType":{"type":"string","enum":["SINGLE","BULK"],"default":"SINGLE","description":"The type of the coupon promotion, whether it will have single or multiple codes, defaults to \"SINGLE\" if not provided.","title":"DraftCouponPromotionCouponType"},"DraftCouponPromotion":{"type":"object","properties":{"id":{"type":"integer","description":"An auto-generated unique identifier for the discount rule."},"redemption_type":{"$ref":"#/components/schemas/DraftCouponPromotionRedemptionType","description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`."},"name":{"type":"string","description":"An internal name for this rule that the merchant can refer to."},"display_name":{"type":"string","description":"Customer-facing name for this rule, that the merchant want to display to customers."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"},"description":"Channels that the promotion targets. Empty array [] means targeting all the channels. In POST request, if omitted, this field defaults to an empty array [] value."},"customer":{"$ref":"#/components/schemas/Customer"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"},"description":"An ordered list of rules to be executed until the first applicable one applies a discount successfully and the rest will be skipped."},"current_uses":{"type":"integer","description":"A read-only count of the times this rule has been used by customers. A rule is considered to be used when a customer successfully checks out with a rule that has applied a discount to their cart."},"max_uses":{"type":"integer","description":"The maximum number of times this discount can be used by customers."},"status":{"$ref":"#/components/schemas/DraftCouponPromotionStatus","description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid."},"start_date":{"type":"string","description":"The date and time when this rule will become active."},"end_date":{"type":"string","description":"The date and time when this rule will expire. If this property is left null, the promotion never expires."},"stop":{"type":"boolean","description":"Boolean value that specifies whether to stop evaluating promotions down the priority list when the promotion is applied successfully."},"can_be_used_with_other_promotions":{"type":"boolean","default":true,"description":"Boolean value that specifies whether this promotion can be used with other promotions. When set to false, only apply this promotion if there are no discounts applied already, and stop executing other promotions if this promotion applies successfully."},"currency_code":{"type":"string","description":"The ISO-4217-based transactional currency code to which the promotion applies OR * for all currencies."},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"},"description":"Notifications to display on the storefront based on the result of the evaluation for promotion eligibility."},"shipping_address":{"$ref":"#/components/schemas/AddressMatcher"},"schedule":{"$ref":"#/components/schemas/AvailabilityByWeekDay"},"coupon_overrides_automatic_when_offering_higher_discounts":{"type":"boolean","default":false,"description":"This field only has effect when `can_be_used_with_other_promotions` is `false`:\n- When the property is set to `true`, the coupon will override the applied automatic promotions if it provides a greater discount.\n- When the property is set to `fasle`, the coupon will not be applied if automatic promotions are already applied.\nTrying to set the value of this field when `can_be_used_with_other_promotions` is `true` will yield a 422 error response."},"coupon_type":{"$ref":"#/components/schemas/DraftCouponPromotionCouponType","default":"SINGLE","description":"The type of the coupon promotion, whether it will have single or multiple codes, defaults to \"SINGLE\" if not provided."}},"required":["redemption_type","name","rules"],"description":"A draft **Coupon Promotion** to be created. A shopper must manually apply a *coupon promotion* to their cart.","title":"DraftCouponPromotion"},"DraftAutomaticPromotionRedemptionType":{"type":"string","enum":["AUTOMATIC"],"description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`.","title":"DraftAutomaticPromotionRedemptionType"},"DraftAutomaticPromotionStatus":{"type":"string","enum":["ENABLED","DISABLED","INVALID"],"description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid.","title":"DraftAutomaticPromotionStatus"},"DraftAutomaticPromotion":{"type":"object","properties":{"id":{"type":"integer","description":"An auto-generated unique identifier for the discount rule."},"redemption_type":{"$ref":"#/components/schemas/DraftAutomaticPromotionRedemptionType","description":"The type of the promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`."},"name":{"type":"string","description":"An internal name for this rule that the merchant can refer to."},"display_name":{"type":"string","description":"Customer-facing name for this rule, that the merchant want to display to customers."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"},"description":"Channels that the promotion targets. Empty array [] means targeting all the channels. In POST request, if omitted, this field defaults to an empty array [] value."},"customer":{"$ref":"#/components/schemas/Customer"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"},"description":"An ordered list of rules to be executed until the first applicable one applies a discount successfully and the rest will be skipped."},"current_uses":{"type":"integer","description":"A read-only count of the times this rule has been used by customers. A rule is considered to be used when a customer successfully checks out with a rule that has applied a discount to their cart."},"max_uses":{"type":"integer","description":"The maximum number of times this discount can be used by customers."},"status":{"$ref":"#/components/schemas/DraftAutomaticPromotionStatus","description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid."},"start_date":{"type":"string","description":"The date and time when this rule will become active."},"end_date":{"type":"string","description":"The date and time when this rule will expire. If this property is left null, the promotion never expires."},"stop":{"type":"boolean","description":"Boolean value that specifies whether to stop evaluating promotions down the priority list when the promotion is applied successfully."},"can_be_used_with_other_promotions":{"type":"boolean","default":true,"description":"Boolean value that specifies whether this promotion can be used with other promotions. When set to false, only apply this promotion if there are no discounts applied already, and stop executing other promotions if this promotion applies successfully."},"currency_code":{"type":"string","description":"The ISO-4217-based transactional currency code to which the promotion applies OR * for all currencies."},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"},"description":"Notifications to display on the storefront based on the result of the evaluation for promotion eligibility."},"shipping_address":{"$ref":"#/components/schemas/AddressMatcher"},"schedule":{"$ref":"#/components/schemas/AvailabilityByWeekDay"}},"required":["redemption_type","name","rules"],"description":"A draft **Automatic Promotion** to be created. The store applies *automatic promotions* to a shopper’s cart once the promotion criteria are satisfied. The shopper cannot manually apply an *automatic promotion*.","title":"DraftAutomaticPromotion"},"Promotions (Single)_createPromotion_Request":{"oneOf":[{"$ref":"#/components/schemas/DraftCouponPromotion"},{"$ref":"#/components/schemas/DraftAutomaticPromotion"}],"title":"Promotions (Single)_createPromotion_Request"},"PromotionsPostResponsesContentApplicationJsonSchemaData":{"oneOf":[{"$ref":"#/components/schemas/SavedCouponPromotion"},{"$ref":"#/components/schemas/SavedAutomaticPromotion"}],"title":"PromotionsPostResponsesContentApplicationJsonSchemaData"},"PromotionsPostResponsesContentApplicationJsonSchemaMeta":{"type":"object","properties":{},"description":"Empty meta object, which may be used at a later time.","title":"PromotionsPostResponsesContentApplicationJsonSchemaMeta"},"Promotions (Single)_createPromotion_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PromotionsPostResponsesContentApplicationJsonSchemaData"},"meta":{"$ref":"#/components/schemas/PromotionsPostResponsesContentApplicationJsonSchemaMeta","description":"Empty meta object, which may be used at a later time."}},"title":"Promotions (Single)_createPromotion_Response_201"},"PromotionsIdGetResponsesContentApplicationJsonSchemaData":{"oneOf":[{"$ref":"#/components/schemas/SavedCouponPromotion"},{"$ref":"#/components/schemas/SavedAutomaticPromotion"}],"title":"PromotionsIdGetResponsesContentApplicationJsonSchemaData"},"PromotionsIdGetResponsesContentApplicationJsonSchemaMeta":{"type":"object","properties":{},"description":"Empty meta object, which may be used at a later time.","title":"PromotionsIdGetResponsesContentApplicationJsonSchemaMeta"},"Promotions (Single)_getPromotion_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PromotionsIdGetResponsesContentApplicationJsonSchemaData"},"meta":{"$ref":"#/components/schemas/PromotionsIdGetResponsesContentApplicationJsonSchemaMeta","description":"Empty meta object, which may be used at a later time."}},"title":"Promotions (Single)_getPromotion_Response_200"},"PatchCouponPromotionRedemptionType":{"type":"string","enum":["AUTOMATIC","COUPON"],"description":"A read-only field indicating the type of promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`.","title":"PatchCouponPromotionRedemptionType"},"PatchCouponPromotionStatus":{"type":"string","enum":["ENABLED","DISABLED","INVALID"],"description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid.","title":"PatchCouponPromotionStatus"},"PatchCouponPromotionCouponType":{"type":"string","enum":["SINGLE","BULK"],"description":"The type of the coupon promotion, whether it will have single or multiple codes.\n\nMust be the same as existing value because changing coupon type is not supported. The field is there just for the ease of drafting PUT payload.","title":"PatchCouponPromotionCouponType"},"PatchCouponPromotion":{"type":"object","properties":{"id":{"type":"integer","description":"An auto-generated unique identifier for the discount rule."},"redemption_type":{"$ref":"#/components/schemas/PatchCouponPromotionRedemptionType","description":"A read-only field indicating the type of promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`."},"name":{"type":"string","description":"An internal name for this rule that the merchant can refer to."},"display_name":{"type":"string","description":"Customer-facing name for this rule, that the merchant want to display to customers."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"},"description":"Channels that the promotion targets. Empty array [] means targeting all the channels. In POST request, if omitted, this field defaults to an empty array [] value."},"customer":{"$ref":"#/components/schemas/Customer"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"},"description":"An ordered list of rules to be executed until the first applicable one applies a discount successfully and the rest will be skipped."},"current_uses":{"type":"integer","description":"A read-only count of the times this rule has been used by customers. A rule is considered to be used when a customer successfully checks out with a rule that has applied a discount to their cart."},"max_uses":{"type":"integer","description":"The maximum number of times this discount can be used by customers."},"status":{"$ref":"#/components/schemas/PatchCouponPromotionStatus","description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid."},"start_date":{"type":"string","description":"The date and time when this rule will become active."},"end_date":{"type":"string","description":"The date and time when this rule will expire. If this property is left null, the promotion never expires."},"stop":{"type":"boolean","description":"Boolean value that specifies whether to stop evaluating promotions down the priority list when the promotion is applied successfully."},"can_be_used_with_other_promotions":{"type":"boolean","default":true,"description":"Boolean value that specifies whether this promotion can be used with other promotions. When set to false, only apply this promotion if there are no discounts applied already, and stop executing other promotions if this promotion applies successfully."},"currency_code":{"type":"string","description":"The ISO-4217-based transactional currency code to which the promotion applies OR * for all currencies."},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"},"description":"Notifications to display on the storefront based on the result of the evaluation for promotion eligibility."},"shipping_address":{"$ref":"#/components/schemas/AddressMatcher"},"schedule":{"$ref":"#/components/schemas/AvailabilityByWeekDay"},"codes":{"$ref":"#/components/schemas/CouponCode"},"coupon_overrides_automatic_when_offering_higher_discounts":{"type":"boolean","default":false,"description":"This field only has effect when `can_be_used_with_other_promotions` is `false`:\n- When the property is set to `true`, the coupon will override the applied automatic promotions if it provides a greater discount.\n- When the property is set to `fasle`, the coupon will not be applied if automatic promotions are already applied.\nTrying to set the value of this field to `true` when `can_be_used_with_other_promotions` is `true` will yield a 422 error response."},"coupon_type":{"$ref":"#/components/schemas/PatchCouponPromotionCouponType","description":"The type of the coupon promotion, whether it will have single or multiple codes.\n\nMust be the same as existing value because changing coupon type is not supported. The field is there just for the ease of drafting PUT payload."}},"description":"A Partial **Coupon Promotion** that contains properties to patch.","title":"PatchCouponPromotion"},"PatchAutomaticPromotionRedemptionType":{"type":"string","enum":["AUTOMATIC","COUPON"],"description":"A read-only field indicating the type of promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`.","title":"PatchAutomaticPromotionRedemptionType"},"PatchAutomaticPromotionStatus":{"type":"string","enum":["ENABLED","DISABLED","INVALID"],"description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid.","title":"PatchAutomaticPromotionStatus"},"PatchAutomaticPromotion":{"type":"object","properties":{"id":{"type":"integer","description":"An auto-generated unique identifier for the discount rule."},"redemption_type":{"$ref":"#/components/schemas/PatchAutomaticPromotionRedemptionType","description":"A read-only field indicating the type of promotion. Promotions applied automatically have a value of `AUTOMATIC` whereas promotions requiring a coupon have a value of `COUPON`."},"name":{"type":"string","description":"An internal name for this rule that the merchant can refer to."},"display_name":{"type":"string","description":"Customer-facing name for this rule, that the merchant want to display to customers."},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"},"description":"Channels that the promotion targets. Empty array [] means targeting all the channels. In POST request, if omitted, this field defaults to an empty array [] value."},"customer":{"$ref":"#/components/schemas/Customer"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"},"description":"An ordered list of rules to be executed until the first applicable one applies a discount successfully and the rest will be skipped."},"current_uses":{"type":"integer","description":"A read-only count of the times this rule has been used by customers. A rule is considered to be used when a customer successfully checks out with a rule that has applied a discount to their cart."},"max_uses":{"type":"integer","description":"The maximum number of times this discount can be used by customers."},"status":{"$ref":"#/components/schemas/PatchAutomaticPromotionStatus","description":"Controls whether or not a discount rule can be used by customers. `INVALID` is a read-only status into which enabled discount rules may transition when they become invalid."},"start_date":{"type":"string","description":"The date and time when this rule will become active."},"end_date":{"type":"string","description":"The date and time when this rule will expire. If this property is left null, the promotion never expires."},"stop":{"type":"boolean","description":"Boolean value that specifies whether to stop evaluating promotions down the priority list when the promotion is applied successfully."},"can_be_used_with_other_promotions":{"type":"boolean","default":true,"description":"Boolean value that specifies whether this promotion can be used with other promotions. When set to false, only apply this promotion if there are no discounts applied already, and stop executing other promotions if this promotion applies successfully."},"currency_code":{"type":"string","description":"The ISO-4217-based transactional currency code to which the promotion applies OR * for all currencies."},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"},"description":"Notifications to display on the storefront based on the result of the evaluation for promotion eligibility."},"shipping_address":{"$ref":"#/components/schemas/AddressMatcher"},"schedule":{"$ref":"#/components/schemas/AvailabilityByWeekDay"}},"description":"A Partial **Automatic Promotion** that contains properties to patch.","title":"PatchAutomaticPromotion"},"Promotions (Single)_updatePromotion_Request":{"oneOf":[{"$ref":"#/components/schemas/PatchCouponPromotion"},{"$ref":"#/components/schemas/PatchAutomaticPromotion"}],"title":"Promotions (Single)_updatePromotion_Request"},"PromotionsIdPutResponsesContentApplicationJsonSchemaData":{"oneOf":[{"$ref":"#/components/schemas/SavedCouponPromotion"},{"$ref":"#/components/schemas/SavedAutomaticPromotion"}],"title":"PromotionsIdPutResponsesContentApplicationJsonSchemaData"},"PromotionsIdPutResponsesContentApplicationJsonSchemaMeta":{"type":"object","properties":{},"description":"Empty meta object, which may be used at a later time.","title":"PromotionsIdPutResponsesContentApplicationJsonSchemaMeta"},"Promotions (Single)_updatePromotion_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PromotionsIdPutResponsesContentApplicationJsonSchemaData"},"meta":{"$ref":"#/components/schemas/PromotionsIdPutResponsesContentApplicationJsonSchemaMeta","description":"Empty meta object, which may be used at a later time."}},"title":"Promotions (Single)_updatePromotion_Response_200"}},"securitySchemes":{"X-Auth-Token":{"type":"apiKey","in":"header","name":"X-Auth-Token","description":"### OAuth scopes\n\n| UI Name | Permission | Parameter |\n|:--------|:-----------|:----------|\n| Marketing | modify | `store_v2_marketing` |\n| Marketing | read-only | `store_v2_marketing_read_only` |\n\n### Authentication header\n\n| Header | Argument | Description |\n|:-------|:---------|:------------|\n| `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). |\n\n### Further reading\n\nFor example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts).\n\nFor more about BigCommerce OAuth scopes, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts).\n\nFor a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes)."}}}}