Coupon Codes

(ms.coupon_codes)

It allows you to offer coupon codes to your customers for marketing of your online store.



Fields

ValueDescription
coupon_code   
Type: string
Required
Name of the coupon code.
GET 25
name   
Type: string
type   
Type: string
Required
Type of coupon code. Coupon code can be either flat or percentage type.
flat
amount   
Type: number
Required
Amount of the discount.
25
enabled   
Type: string
Select the checkbox to enable coupon code.
1
advance_settings   
Type: string
Enable the advance settings, if you want to apply conditions on the coupon code.
1
conditions   
Type: array
Array of conditions which decides the applicability of coupon code.
{
  "conditions": [ 
    { 
      "field": "order.total", 
      "operator": "greater_than", 
      "value": "500" 
    } 
  ]
}
field
Type: string
Required
Select the condition from pre-defined values.
operator
Type: string
Required
Operator for the condition.
operator
Type: string
Required
Operator for the condition.
operator
Type: string
Required
Operator for the condition.
operator
Type: string
Required
Operator for the condition.
value
Type: array
Required
Value of the condition.
value
Type: array
Required
Value of the condition.
value
Type: array
Required
Value of the condition.
value
Type: array
Required
Value of the condition.
value
Type: string
Required
Value of the condition.
value
Type: string
Required
Value of the condition.
value
Type: array
Required
Value of the condition.
apply_with   
Type: string
validity   
Type: string
maximum_discount   
Type: number
Limit of the discount upto which the coupon code is applicable.
number_of_uses   
Type: number
Maximum usage of the coupon code allowed.
3
uses_per_user   
Type: number
Maximum usage allowed per user.
2
start_date   
Type: string
Starting date and time for application of coupon code.
2018-04-25T06:48:00.000Z
end_date   
Type: string
Date and time at which the coupon code expires.
2018-04-30T06:48:00.000Z
seller   
Type: string
Seller for which the coupon code is applicable.
586f990997da96ba5c9ae2ac
use_count   
Type: string
Number of times the coupon code is to be used.
50

Commands (Endpoints)

POST /api/1/entity/ms.coupon_codes   
Creates a new coupon code
DEL /api/1/entity/ms.coupon_codes/{resource_id}   
Deletes a coupon code
PUT /api/1/entity/ms.coupon_codes/{resource_id}   
Updates an existing coupon code
GET /api/1/entity/ms.coupon_codes/{resource_id}   
Retrieves a single coupon code
GET /api/1/entity/ms.coupon_codes   
Retrieves a list of coupon codes