Post Cart Coupon Add

POST {{baseUrl}}/cart.coupon.add.json?store_id=<string>&code=<string>&name=<string>&codes=<array>&action_type=<string>&action_apply_to=<string>&action_scope=<string>&action_amount=<number>&date_start=<object>&date_end=<object>&usage_limit=<integer>&usage_limit_per_customer=<integer>&action_condition_entity=<string>&action_condition_key=<string>&action_condition_operator=<string>&action_condition_value=<string>

Create new coupon

Request Params

KeyDatatypeRequiredDescription
store_idstringDefines store id where the webhook should be assigned
codestringGift card code
namestringCoupon name
codesstringEntity codes
action_typestringCoupon discount type
action_apply_tostringDefines where discount should be applied
action_scopestringSpecify how discount should be applied. If scope=matching_items, then discount will be applied to each of the items that match action conditions. Scope order means that discount will be applied once.
action_amountstringDefines the discount amount value.
date_startstringDefines when discount code will be available.
date_endstringDefines when discount code will be expired.
usage_limitstringUsage limit for coupon.
usage_limit_per_customerstringUsage limit per customer.
action_condition_entitystringDefines entity for action condition.
action_condition_keystringDefines entity attribute code for action condition.
action_condition_operatorstringDefines condition operator.
action_condition_valuestringDefines condition attribute value/s. Can be comma separated string.