Light Mode
Create Coupon
POST
/couponsLast modified: 17 days ago
This endpoint allows you to create Single Coupon, and Group Coupons.
:::info[Information]
Although the response payload you will be receiving of the two coupon types at once, each has its own required Body Requests.
:::
When creating a Single Coupon
, ensure that you are sending the following required variables:
| Attribute | Type | Is Required |
| ----------------------- | ------- | ----------- |
| `code` | string | Yes |
| `type` | string | Yes |
| `amount` | number | Yes |
| `free_shipping` | boolean | Yes |
| `expiry_date` | string | Yes |
| `exclude_sale_products` | boolean | Yes |
If `marketing_active` is valued as `true`, then when creating `Marketing Coupons`, ensure that you are sending the
following required variables:
| Attribute | Type | Is Required |
| ------------------ | ------- | ----------- |
| `marketing_active` | boolean | Yes |
| `marketing_name` | string | Yes |
| `marketing_type` | string | Yes |
| `marketing_amount` | number | Yes |
If is_group
is valued as true
, then when creating Group Coupons
, ensure that you are sending the following required variables:
| Attribute | Type | Is Required |
| ----------------------- | ------- | ----------- |
| `is_group` | boolean | Yes |
| `group_coupons_count` | number | Yes |
| `group_suffix` | string | Yes |
| `group_name` | string | Yes |
| `type` | string | Yes |
| `amount` | number | Yes |
| `free_shipping` | boolean | Yes |
| `expiry_date` | string | Yes |
| `exclude_sale_products` | boolean | Yes |
If `marketing_active` is valued as `true`, then when creating `Marketing Coupons`, ensure that you are sending the following required variables:
| Attribute | Type | Is Required |
| ------------------ | ------- | ----------- |
| `marketing_active` | boolean | Yes |
| `marketing_name` | string | Yes |
| `marketing_type` | string | Yes |
| `marketing_amount` | number | Yes |
Request
Request samples
Responses
Success(200)
Error Validation(422)
HTTP Code: 200
Content Type : JSONapplication/json
Last modified: 17 days ago