---
schema_version: "1"
id: d8e260174f60c0b8962436e4e2b61206b1bb67f96642518a0c015ec7791d03a5
title: Data Coupons (deprecated)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/b2c-commerce/references/generated-api-specs/ocapi-data-coupons.md
canonical_url: https://developer.salesforce.com/docs/commerce/b2c-commerce/references/ocapi-data-coupons
source_site: developer.salesforce.com
content_type: documentation
content_hash: 260d690c50f078788a25f50edffab11ae238d4ddf8ffc3d8c3a07b58c65d9135
products:
  - B2C Commerce
  - Salesforce APIs
---
Data Coupons (deprecated)

# Data Coupons (deprecated)

Data API endpoints enable developers to build applications for merchants: Create, update, delete business objects, like products, customers, pricing and promotions or assignments. They typically provide read and write access and are designed for moderate usage.

**Version:** 25.6

## Servers

*   `https://{host}/s/-/dw/data/v25_6`

Protocols: https.

## Security

*   `oauth2_application` (oauth2) Authentication flow with client ID and password with account manager.
    *   OAuth flow application (tokenUrl: https://account.demandware.com:443/dwsso/oauth2/access\_token)
    *   Scope x-info: Scopes are NOT supported. This is just a dummy, because the 'scopes' field is required.
*   `client_id` (apiKey) Add client ID for application identification. Alternative as 'client\_id' query parameter.
    *   API key in header: x-dw-client-id

## Operations

### GET Get Coupons

`GET /sites/{site_id}/coupons`

Operation ID: `Get Coupons`. Tags: sites. Security: oauth2\_application.

Action to get all the coupons with no filtering.

The result is sorted by by coupon\_id ascending.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `start` (query, integer (int32)) Optional start index for retrieving the codes from a given index (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving only a subset of the codes (default is 25).
*   `select` (query, string) The property selector.
*   `expand` (query, array of string)

#### Responses

*   **default**
    
    Media type: `application/json, text/xml`. Schema: `coupons`.
    

### GET Get Coupon

`GET /sites/{site_id}/coupons/{coupon_id}`

Operation ID: `Get Coupon`. Tags: sites. Security: oauth2\_application.

Action to get coupon information.

The following fields are returned in the Coupon document when specifying the _stats_ expand:

*   exported\_code\_count
    
*   redemption\_count
    
*   total\_codes\_count
    

If the role to which the user belongs does not have View\_Coupon\_Codes permission, then the coupon codes returned will be masked.

This endpoint may return the following faults:

*   404 - CouponNotFoundException - Thrown in case the coupon does not exist matching the given id

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the requested coupon.  
    Minimum length: 1.
*   `select` (query, string) The property selector.
*   `expand` (query, array of string) The expand parameter. A comma separated list with the allowed values ( _stats_ ).

#### Responses

*   **404** `CouponNotFoundException` - Thrown in case the coupon does not exist matching the given id
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `coupon`.
    

### PUT Create Coupon

`PUT /sites/{site_id}/coupons/{coupon_id}`

Operation ID: `Create Coupon`. Tags: sites. Security: oauth2\_application.

Creates a coupon using the information provided. If a coupon exists with the same unique identifier, the coupon is replaced completely.

This endpoint may return the following faults:

*   400 - CouponCodeDuplicateException - Thrown if the code provided is in use by another coupon.
*   400 - CouponCreateSingleCodeException - Thrown if a single code coupon does not set the coupon code properly.
*   400 - CouponInvalidException - Thrown if the coupon passed in is not valid (the argument indicates the field that was invalid).
*   400 - IdConflictException - if the Id in request is not the same as the ID in document.
*   400 - SystemGeneratedCouponQuotaException - Thrown whenever a quota regarding system-generated coupons is violated
*   403 - SiteAccessForbiddenException - Thrown if the resource requires global instead of site-specific context.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the coupon to create.  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `coupon`.

#### Responses

*   **400** `CouponCodeDuplicateException` - Thrown if the code provided is in use by another coupon. or `CouponCreateSingleCodeException` - Thrown if a single code coupon does not set the coupon code properly. or `CouponInvalidException` - Thrown if the coupon passed in is not valid (the argument indicates the field that was invalid). or `IdConflictException` - if the Id in request is not the same as the ID in document. or `SystemGeneratedCouponQuotaException` - Thrown whenever a quota regarding system-generated coupons is violated
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **403** `SiteAccessForbiddenException` - Thrown if the resource requires global instead of site-specific context.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `coupon`.
    

### DELETE Delete Coupon

`DELETE /sites/{site_id}/coupons/{coupon_id}`

Operation ID: `Delete Coupon`. Tags: sites. Security: oauth2\_application.

Delete a coupon by id.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) Id of the coupon to delete from the site.  
    Minimum length: 1.

#### Responses

*   **204**

### PATCH Update Coupon

`PATCH /sites/{site_id}/coupons/{coupon_id}`

Operation ID: `Update Coupon`. Tags: sites. Security: oauth2\_application.

Updates the coupon with the specified information.

This endpoint may return the following faults:

*   400 - CouponCodeDuplicateException - Thrown if the code provided is in use by another coupon.
*   400 - CouponUpdateReadOnlyException - Thrown if you try to update certain fields in a coupon after redeeming or exporting it.
*   400 - SystemGeneratedCouponQuotaException - Thrown whenever a quota regarding system-generated coupons is violated
*   403 - CouponLegacyUpdateForbiddenException - Thrown when trying to update a legacy coupon.
*   403 - CouponUpdateForbiddenException - Thrown when trying to update a broken coupon, that should be deleted and re-created.
*   404 - CouponNotFoundException - Thrown if the coupon does not exist matching the given id.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the requested coupon.  
    Minimum length: 1.

#### Request body (required)

Media type: `application/json, text/xml`. Schema: `coupon`.

#### Responses

*   **400** `CouponCodeDuplicateException` - Thrown if the code provided is in use by another coupon. or `CouponUpdateReadOnlyException` - Thrown if you try to update certain fields in a coupon after redeeming or exporting it. or `SystemGeneratedCouponQuotaException` - Thrown whenever a quota regarding system-generated coupons is violated
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **403** `CouponLegacyUpdateForbiddenException` - Thrown when trying to update a legacy coupon. or `CouponUpdateForbiddenException` - Thrown when trying to update a broken coupon, that should be deleted and re-created.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `CouponNotFoundException` - Thrown if the coupon does not exist matching the given id.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `coupon`.
    

### GET Get Campaigns

`GET /sites/{site_id}/coupons/{coupon_id}/campaigns`

Operation ID: `Get Campaigns`. Tags: sites. Security: oauth2\_application.

Get the campaigns that have a coupon assigned to them either directly or through promotions

This endpoint may return the following faults:

*   404 - CouponNotFoundException - Thrown if the coupon does not exist matching the given id.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the coupon that is assigned to campaigns directly or through promotions.
*   `start` (query, integer (int32)) Optional start index for retrieving the campaigns (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving the campaigns (default is 25).
*   `select` (query, string)

#### Responses

*   **404** `CouponNotFoundException` - Thrown if the coupon does not exist matching the given id.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `campaigns`.
    

### GET Get Promotions for Campaign

`GET /sites/{site_id}/coupons/{coupon_id}/campaigns/{campaign_id}/promotions`

Operation ID: `Get Promotions for Campaign`. Tags: sites. Security: oauth2\_application.

Get the promotions for a campaign that have a coupon assigned to them either directly or through campaigns.

This endpoint may return the following faults:

*   404 - CampaignNotFoundException - Thrown if the campaign does not exist matching the given id.
*   404 - CouponNotFoundException - Thrown if the coupon does not exist matching the given id.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the coupon that is assigned to promotions directly or through campaigns.
*   `campaign_id` (path, string, required) The id of the campaign that we want to restrict the set of promotions for.
*   `start` (query, integer (int32)) Optional start index for retrieving the promotions (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving the promotions (default is 25).
*   `select` (query, string)

#### Responses

*   **404** `CampaignNotFoundException` - Thrown if the campaign does not exist matching the given id. or `CouponNotFoundException` - Thrown if the coupon does not exist matching the given id.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `promotions`.
    

### GET Get Coupon Codes

`GET /sites/{site_id}/coupons/{coupon_id}/codes`

Operation ID: `Get Coupon Codes`. Tags: sites. Security: oauth2\_application.

Get the coupon codes for the given coupon.

If the role to which the user belongs does not have View\_Coupon\_Codes permission, then the coupon codes returned will be masked.

This endpoint may return the following faults:

*   404 - CouponNotFoundException - Thrown if the coupon does not exist matching the given id.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the coupon from which to delete codes (must be a multiple code coupon).
*   `start` (query, integer (int32)) Optional start index for retrieving the codes from a given index (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving only a subset of the codes (default is 25).
*   `select` (query, string) Optional select clause for getting fields from the returned JSON document.

#### Responses

*   **404** `CouponNotFoundException` - Thrown if the coupon does not exist matching the given id.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `coupon_codes`.
    

### POST Modify Multiple Codes

`POST /sites/{site_id}/coupons/{coupon_id}/multiple_codes`

Operation ID: `Modify Multiple Codes`. Tags: sites. Security: oauth2\_application.

Add or delete (modify) multiple codes to/from the supplied coupon.

This endpoint may return the following faults:

*   400 - CouponCodeCreateException - Thrown if the coupon code could not be created.
*   404 - CouponNotFoundException - Thrown if the coupon does not exist matching the given id.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the coupon to modify codes (must be multiple code coupon).
*   `delete` (query, boolean) Optional parameter for specifying when to delete multiple codes.

#### Request body

Media type: `application/json, text/xml`. Schema: `coupon_multi_codes_request`.

#### Responses

*   **204**
*   **400** `CouponCodeCreateException` - Thrown if the coupon code could not be created.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **404** `CouponNotFoundException` - Thrown if the coupon does not exist matching the given id.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    

### GET Get Promotions

`GET /sites/{site_id}/coupons/{coupon_id}/promotions`

Operation ID: `Get Promotions`. Tags: sites. Security: oauth2\_application.

Get the promotions that have a coupon assigned to them either directly or through campaigns.

This endpoint may return the following faults:

*   404 - CouponNotFoundException - Thrown if the coupon does not exist matching the given id.

#### Parameters

*   `site_id` (path, string, required) The site context.  
    Minimum length: 1.
*   `coupon_id` (path, string, required) The id of the coupon that is assigned to promotions directly or through campaigns.
*   `start` (query, integer (int32)) Optional start index for retrieving the promotions (default 0).
*   `count` (query, integer (int32)) Optional count for retrieving the promotions (default is 25).
*   `select` (query, string)

#### Responses

*   **404** `CouponNotFoundException` - Thrown if the coupon does not exist matching the given id.
    
    Media type: `application/json, text/xml`. Schema: `fault`.
    
*   **default**
    
    Media type: `application/json, text/xml`. Schema: `promotions`.
    

## Schemas

### coupons

Document representing an unfiltered list of coupons.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of coupon_)
*   `expand` (_array of string_) The list of expands set for the search request. Expands are optional.
*   `next` (_string_) The URL of the next result page.
*   `previous` (_string_) The URL of the previous result page.
*   `select` (_string_) The fields that you want to select.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The total number of documents.

### fault

Document representing a fault message that is returned whenever the HTTP status code is greater than or equal to 400 (which indicates an error).

*   `arguments` (_object_)
    
    A map that provides fault arguments.
    
    Data can be used to provide error messages on the client side.
    
    Additional properties: `object`.
    
*   `cause` (_cause_)
*   `display_message_pattern` (_string_) The localized display message pattern, if the request parameter display\_locale was given
*   `message` (_string_) The message text of the java exception.
*   `stack_trace` (_string_)
*   `type` (_string_) The name of the java exception.

### coupon

Document representing a coupon.

*   `case_insensitive` (_boolean_) `True` if a coupon is case insensitive; `false` otherwise. This attribute on the coupon can not be modified after the coupon has been created. If an attempt was made to modify this the system would return CouponUpdateForbiddenException
*   `coupon_id` (_string_, read-only) The id of the coupon.  
    Minimum length: 1. Maximum length: 256.
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `description` (_string_) The description of the coupon.  
    Maximum length: 4000.
*   `enabled` (_boolean_) A flag indicating whether the coupon is enabled.
*   `exported_code_count` (_integer (int32)_) The number of coupon codes attached to the coupon that have been issued (request search only).
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `link` (_string_) A link to the coupon.
*   `multiple_codes_per_basket` (_boolean_) `True` if a coupon with multiple codes can have different codes used on the same basket or order. If the coupon type does not support this configuration, this will return `false`.
*   `redemption_count` (_integer (int32)_) The number of times the coupon has been redeemed (request search only).
*   `redemption_limits` (_redemption\_limits_) The redemption limit per coupon code.
*   `single_code` (_string_) Single coupon code, only valid for Single Code type  
    Minimum length: 1. Maximum length: 256.
*   `system_codes_config` (_coupon\_system\_code\_config_) The configuration of system coupon codes, including pre-fix and number of codes
*   `total_codes_count` (_integer (int32)_) The total number of coupon codes associated with this coupon
*   `type` (_string_, read-only) The type of the coupon code.  
    Allowed values: `single_code`, `multiple_codes`, `system_codes`.

_Example_

```
{
  "coupon_id": "my-coupon",
  "description": "sytem generated coupon code.",
  "enabled": true,
  "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/coupons/my-coupon",
  "redemption_count": 2,
  "redemption_limits": {
    "limit_per_code": 1,
    "limit_per_customer": 0,
    "limit_per_time_frame": {
      "limit": 0,
      "redemption_time_frame": 0
    }
  },
  "system_codes_config": {
    "code_prefix": "sys",
    "number_of_codes": 100
  },
  "type": "system_codes"
}
```

### campaigns

Document representing an unfiltered list of campaigns.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of campaign_)
*   `expand` (_array of string_) The list of expands set for the search request. Expands are optional.
*   `next` (_string_) The URL of the next result page.
*   `previous` (_string_) The URL of the previous result page.
*   `select` (_string_) The fields that you want to select.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The total number of documents.

_Example_

```
{
  "count": 3,
  "data": [
    {
      "campaign_id": "my-coupon-campaign1",
      "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/campaigns/my-coupon-campaign1"
    },
    {
      "campaign_id": "my-coupon-campaign2",
      "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/campaigns/my-coupon-campaign2"
    },
    {
      "campaign_id": "my-coupon-campaign3",
      "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/campaigns/my-coupon-campaign3"
    }
  ],
  "start": 0,
  "total": 3
}
```

### promotions

A set of promotions

*   `count` (_integer (int32)_)
*   `data` (_array of promotion_) The set of promotions
*   `expand` (_array of string_)
*   `next` (_string_)
*   `previous` (_string_)
*   `select` (_string_)
*   `start` (_integer (int32)_)  
    Minimum: 0.
*   `total` (_integer (int32)_)

_Example_

```
{
  "count": 1,
  "data": [
    {
      "id": "my-coupon-promotion1",
      "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/promotions/my-coupon-promotion1"
    }
  ],
  "start": 0,
  "total": 1
}
```

### coupon\_codes

Document representing a set of coupon codes.

*   `count` (_integer (int32)_) The number of returned documents.
*   `data` (_array of coupon\_code_) The collection of coupon codes
*   `expand` (_array of string_) The list of expands set for the search request. Expands are optional.
*   `next` (_string_) The URL of the next result page.
*   `previous` (_string_) The URL of the previous result page.
*   `select` (_string_) The fields that you want to select.
*   `start` (_integer (int32)_) The zero-based index of the first search hit to include in the result.  
    Minimum: 0.
*   `total` (_integer (int32)_) The total number of documents.

### coupon\_multi\_codes\_request

A request object to add and remove coupon codes from a document

*   `codes` (_array of string_, required) The list of coupon codes to add or delete

_Example_

```
{
  "codes": [
    "xyz",
    "pdq",
    "abc"
  ]
}
```

### cause

*   `cause` (_cause_)
*   `message` (_string_)
*   `type` (_string_)

### redemption\_limits

Document representing a coupon.

*   `limit_per_code` (_integer (int32)_) The redemption limit per code  
    Minimum: 0.
*   `limit_per_customer` (_integer (int32)_) The redemption limit per customer  
    Minimum: 0.
*   `limit_per_time_frame` (_redemption\_limit\_per\_period_) The redemption limit per time frame

_Example_

```
{
  "limit_per_code": 1,
  "limit_per_customer": 0,
  "limit_per_time_frame": {
    "limit": 0,
    "redemption_time_frame": 0
  }
}
```

### coupon\_system\_code\_config

*   `code_prefix` (_string_) The code prefix for system-generated coupon codes.
*   `number_of_codes` (_integer (int32)_) The number of system coupon codes that can be issued.

### campaign

Document representing a campaign.

*   `campaign_id` (_string_) The ID of the campaign.  
    Minimum length: 1. Maximum length: 256.
*   `coupons` (_array of string_) The array of assigned coupon IDs, not sorted
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `customer_groups` (_array of string_) The array of assigned customer groups, not sorted
*   `description` (_string (text)_) The description of the campaign.  
    Maximum length: 4000.
*   `enabled` (_boolean_) The enabled flag for campaign.
*   `end_date` (_string (date-time)_) The date that the Scenario ends
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `link` (_string_) link for convenience
*   `source_code_groups` (_array of string_) The array of assigned source code groups, not sorted
*   `start_date` (_string (date-time)_) The date that the Scenario begins

_Example_

```
{
  "coupons": [
    "testCoupon"
  ],
  "customer_groups": [
    "Registered"
  ],
  "description": "My Campaign",
  "enabled": true,
  "end_date": "2015-07-31T23:09:08.000Z",
  "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/campaigns/my-campaign",
  "source_code_groups": [
    "WapiSourceCodeGroup1"
  ],
  "start_date": "2015-04-01T11:30:15.000Z"
}
```

### promotion

Document representing a promotion. Unless otherwise stated, attributes of this document are not supported when using the Open Commerce API to update multiple promotions at once.

*   `archived` (_boolean_) Determines whether or not this promotion is archived. This attribute is allowed to be updated when using the Open Commerce API to update multiple promotions at once.
*   `assignment_information` (_promotion\_assignment\_information_) Information about the assignments and assignment schedules of this promotion
*   `callout_msg` (_object (localized)_) The localized callout message of the promotion.
    
    Additional properties: `markup_text`.
    
*   `creation_date` (_string (date-time)_, read-only) Returns the value of attribute 'creationDate'.
*   `currency_code` (_string_) The ISO 4217 mnemonic code of the currency this promotion is restricted to. If not populated, then there is no currency restriction on the promotion.  
    Maximum length: 3.
*   `disable_globally_excluded` (_boolean_) Determines whether or not this promotion ignores the global product exclusions for promotions. This attribute is allowed to be updated when using the Open Commerce API to update multiple promotions at once.
*   `enabled` (_boolean_) Determines whether or not this promotion is enabled. This attribute is allowed to be updated when using the Open Commerce API to update multiple promotions at once.
*   `exclusivity` (_string_) Determines if the promotion can be combined with other promotions of the same promotion class or if it cannot be combined with any other promotions. This attribute is allowed to be updated when using the Open Commerce API to update multiple promotions at once.  
    Allowed values: `no`, `class`, `global`.
*   `id` (_string_) The id for the promotion.
*   `last_modified` (_string (date-time)_, read-only) Returns the value of attribute 'lastModified'.
*   `link` (_string_) A URL that is used to get the details of this promotion.
*   `name` (_object (localized)_) The user supplied name of this promotion, which can be localized
    
    Additional properties: `string`.
    
*   `promotion_class` (_string_) The class of the promotion. If the promotion class is modified, then the promotion rule and all of its values, such as whether or not to disable global product exclusions, will be reset.  
    Allowed values: `product`, `shipping`, `order`.
*   `tags` (_array of tag_) Returns the list of tags assigned to this promotion. If used to set the tags on a promotion, the promotion will only have the tags passed in the input. Any existing tags will be removed.

_Example_

```
{
  "enabled": true,
  "exclusivity": "class",
  "id": "my-promotion",
  "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/promotion_campaign_assignments/my-promotion/my-promotion",
  "name": {
    "default": "My Promotion"
  },
  "promotion_class": "order"
}
```

### coupon\_code

A coupon code with accompanying stats for redemptions and issued.

*   `code` (_string_) The code used to redeem the coupon
*   `issued` (_boolean_) Flag indicating if the coupon code has been issued
*   `redemption_count` (_integer (int32)_) The count of the number of redemptions associated with the code

_Example_

```
{
  "code": "xmas2014-00001",
  "issued": true,
  "redemption_count": 1
}
```

### redemption\_limit\_per\_period

Document representing a coupon redemption limit.

*   `limit` (_integer (int32)_) The limit on the number of times a coupon can be redeemed for a specified redemption time period.  
    Minimum: 0.
*   `redemption_time_frame` (_integer (int32)_) The redemption time period.  
    Minimum: 0. Maximum: 999.

### promotion\_assignment\_information

*   `abtest_id` (_string_) If there is only one assignment, and that assignment is an A/B test segment, the id of the A/B test the segment belongs to. Otherwise, empty.
*   `abtest_segment_id` (_string_) If there is only one assignment, and that assignment is an A/B test segment, the id of the A/B test segment. Otherwise, empty.
*   `active` (_boolean_) true if the individual assignment or the multiple assignments are currently active (applicable only for non default schedule assignments i.e. either campaign or A/B test schedule).
*   `active_abtest_assignments` (_array of promotion\_abtest\_group\_assignment_) A list of currently active A/B tests this is assigned to.
*   `active_campaign_assignments` (_array of promotion\_campaign\_assignment_) A list of currently active campaigns this is assigned to.
*   `campaign_id` (_string_) If there is only one assignment, and that assignment is a campaign, the id of the campaign. Otherwise, empty.
*   `enabled` (_boolean_)
*   `end_date` (_string (date-time)_) The end date of the container of the assignment (a Campaign or ABTest). If schedule\_type is schedule\_type : "multiple" or schedule\_type : "none", then then result will be null. Also, a null date will also return null.
*   `schedule` (_schedule_) The schedule of the assignment (a Campaign or ABTest). If schedule\_type is schedule\_type : "multiple" or schedule\_type : "none", then then result will be null.
*   `schedule_type` (_string_) If there is only one active assignment, or no active assignments and one upcoming assignment, this is that type of assignment (schedule\_type : "campaign" or schedule\_type : "abtest"). If there are no assignments, it will be schedule\_type : "none", otherwise, schedule\_type : "multiple".  
    Allowed values: `none`, `campaign`, `abtest`, `multiple`.
*   `start_date` (_string (date-time)_) The start date of the container of the assignment (a Campaign or ABTest). If schedule\_type is schedule\_type : "multiple" or schedule\_type : "none", then then result will be null. Also, a null date will also return null.
*   `upcoming_abtest_assignments` (_array of promotion\_abtest\_group\_assignment_) A list of upcoming A/B tests this is assigned to.
*   `upcoming_campaign_assignments` (_array of promotion\_campaign\_assignment_) A list of upcoming campaigns this is assigned to.

_Example_

```
{
  "active": true,
  "active_campaign_assignments": [
    {
      "campaign_id": "coupon-campaign",
      "coupons": [
        "limitPerCode-coupon",
        "multipleCodes-coupon",
        "longCode-coupon",
        "systemCodes-coupon",
        "limitPerTimePeriod-coupon",
        "disabled-coupon",
        "singleCode-coupon",
        "limitPerCustomer-coupon"
      ],
      "description": "Coupon Promotion",
      "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/promotion_campaign_assignments/coupon-promotion/coupon-campaign",
      "promotion_id": "coupon-promotion",
      "rank": 10,
      "schedule": {}
    }
  ],
  "campaign_id": "coupon-campaign",
  "end_date": "2050-06-01T00:00:00.000Z",
  "schedule": {},
  "schedule_type": "campaign",
  "start_date": "2020-05-01T00:00:00.000Z"
}
```

### markup\_text

*   `markup` (_string_) The rendered HTML (read only)
*   `source` (_string_) The raw markup text (only this needs to be provided in update request)

### tag

Document representing a tag

*   `tag_id` (_string_) The id of the tag.

### promotion\_abtest\_group\_assignment

Document representing a promotionabtestgroupassignment

*   `abtest_description` (_string_) The description for the ABTest assigned to the promotion in the promotionabtestgroupassignment
*   `abtest_id` (_string_) The id for the ABTest assigned to the promotion in the promotionabtestgroupassignment
*   `enabled` (_boolean_) True if the assignment resource is enabled
*   `schedule` (_schedule_) The schedule informaiton for the ABTest. Recurrence information is not supported.
*   `segment_description` (_string_) The description for the ABTest segment assigned to the promotion in the promotionabtestgroupassignment
*   `segment_id` (_string_) The id for the ABTest segment assigned to the promotion in the promotionabtestgroupassignment

### promotion\_campaign\_assignment

Document representing a promotion campaign assignment.

*   `campaign` (_campaign_) The campaign
*   `campaign_id` (_string_) The id of the campaign.  
    Minimum length: 1. Maximum length: 256.
*   `coupons` (_array of string_) The sorted array of assigned coupon ids.
*   `coupons_based` (_boolean_) True if the assigned promotion is coupon based. When set to false, Coupons in the campaign and on the PromotionCampaignAssignment are ignored. The default value is true.
*   `creation_date` (_string (date-time)_)
*   `customer_groups` (_array of string_) The sorted array of assigned customer groups.
*   `customer_groups_based` (_boolean_) True if the assigned promotion is customer group based. When set to false, Customer Groups in the campaign and on the PromotionCampaignAssignment are ignored. The default value is true.
*   `description` (_string_) The description of the promotion campaign assignment.  
    Maximum length: 4000.
*   `enabled` (_boolean_) True if the assignment resource is enabled
*   `last_modified` (_string (date-time)_)
*   `link` (_string_) link for convenience
*   `promotion` (_promotion_) The promotion
*   `promotion_id` (_string_) The id of the Promotion.  
    Minimum length: 1. Maximum length: 256.
*   `rank` (_integer (int32)_) The rank of promotion campaign assignment
*   `required_qualifier` (_string_) A constant indicating that one or all qualifier conditions must be met in order for the promotion to apply for a given customer. Valid values are "any" and "all".  
    Allowed values: `any`, `all`.
*   `schedule` (_schedule_) The schedule of the assignment resource
*   `source_code_based` (_boolean_) True if the assigned promotion is source code group based. When set to false, Source Code Groups in the campaign and on the PromotionCampaignAssignment are ignored. The default value is true.
*   `source_code_groups` (_array of string_) The sorted array of assigned source code groups.

_Example_

```
{
  "campaign": {
    "campaign_id": "coupon-campaign",
    "description": "A campaign for coupons.",
    "enabled": true
  },
  "campaign_id": "coupon-campaign",
  "coupons": [
    "order-promotion-coupon"
  ],
  "description": "Coupon Order Promotion",
  "enabled": true,
  "link": "https://example.com/s/-/dw/data/{version}/sites/SiteGenesis/promotions/coupon-promotion-order/campaigns/coupon-campaign",
  "promotion_id": "coupon-promotion-order",
  "schedule": {
    "end_date": "2050-01-01T00:00:00.000Z",
    "start_date": "2000-01-01T00:00:00.000Z"
  }
}
```

### schedule

Document representing a time schedule for slots.

*   `end_date` (_string (date-time)_) The date to end of validity. ISO8601 date time format: yyyy-MM-dd'T'HH:mm:ssZ.
*   `recurrence` (_recurrence_) The recurrence of the schedule by day of week and time of day. Not all schedules will support a recurrence.
*   `start_date` (_string (date-time)_) The date to start validity. ISO8601 date time format: yyyy-MM-dd'T'HH:mm:ssZ.

_Example_

```
{
  "end_date": "2050-01-01T00:00:00.000Z",
  "start_date": "2000-01-01T00:00:00.000Z"
}
```

### recurrence

Document representing a schedule recurrence.

*   `day_of_week` (_array of string_) The days of week for recurrence.  
    Items: Allowed values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`. Allowed values: `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`, `sunday`.
*   `time_of_day` (_time\_of\_day_) The time of the day for recurrence.

_Example_

```
{
  "day_of_week": [
    "thursday",
    "sunday",
    "saturday"
  ],
  "time_of_day": {
    "time_from": "01:14:00",
    "time_to": "20:00:00"
  }
}
```

### time\_of\_day

Document representing a time schedule within a single day.

*   `time_from` (_string (time)_) The time to start from. Time format: HH:mm:ss. Seconds are ignored and set to 0.
*   `time_to` (_string (time)_) The time to end on. Time format: HH:mm:ss. Seconds are ignored and set to 0.

_Example_

```
{
  "time_from": "01:14:00",
  "time_to": "20:00:00"
}
```