创建促销码活动。
external_id required | string Default: "coupon_external_id" 唯一促销活动ID。 |
required | object Default: {"de-DE":"Gutscheintitel","en-US":"Coupon title"} 促销活动名称。应包含键/值对, 其中键是"^[a-z]{2}-[A-Z]{2}$"格式的区域设置,值是字符串。 |
Array of type = string (objects) or Array of type = date (objects) or Array of type = number (objects) 与用户属性值进行比较的条件。 必须满足所有条件操作才生效。 | |
One of: 与用户属性值进行比较的条件。 必须满足所有条件操作才生效。 Array ([ 1 .. 100 ] items) | |
Array of objects or null | |
date_end | string or null <date-time> Default: "2020-04-15T18:16:00+05:00" 促销活动结束日期。可以是 |
date_start | string or null <date-time> Default: "2020-04-15T18:16:00+05:00" 促销活动开始日期。 |
object or null | |
Array of objects or null 通过促销码打折的商品列表。 | |
excluded_promotions | Array of integers 应用此促销活动时要排除的促销活动ID列表。 |
Array of objects or null 包含条件的对象数组,用于设置对购物车中某些商品应用促销活动的价格范围。 | |
Array of objects or null 包含条件的对象数组,用于设置对整个购物车应用促销活动的价格范围。 | |
redeem_code_limit | integer or null Default: 10 每个代码的兑换次数。 |
redeem_total_limit | integer or null Default: 10 限制优惠券的总数。 |
redeem_user_limit | integer or null Default: 10 限制单个用户兑换的优惠券总数。 |
促销码已成功创建。
基本认证未通过或错误。确保您使用了基本认证或正确的凭据。
无效的请求。
{- "attribute_conditions": [
- {
- "attribute": "account_status",
- "can_be_missing": false,
- "operator": "eq",
- "type": "string",
- "value": "golden"
}
], - "date_end": "2020-04-25T18:16:00+05:00",
- "date_start": "2020-04-15T18:16:00+05:00",
- "discount": {
- "percent": "10.10"
}, - "external_id": "coupon_external_id",
- "name": {
- "de-DE": "Neujahrsrabatt",
- "en-US": "New Year Discount"
}, - "redeem_code_limit": 1,
- "redeem_total_limit": 100,
- "redeem_user_limit": 1
}
{- "external_id": "coupon_external_id"
}