| Name | Description | ||||||
|---|---|---|---|---|---|---|---|
| name Type: string Required | Name of the discount. Example: FLAT 100 | ||||||
| type Type: string Required | Type of discount. It can be either flat or percentage type. Example: flat | ||||||
| amount Type: number Required | Amount of the discount. Example: 100 | ||||||
| enabled Type: string | Select the checkbox to enable discounts. Example: 1 | ||||||
| conditions Type: array | Array of conditions which decides the applicability of the discount. Example: 
 | ||||||
| number_of_uses Type: number | Maximum usage allowed. Example: 2 | ||||||
| uses_per_user Type: number | Maximum usage allowed per user. Example: NA | ||||||
| seller Type: string | Seller for which the discount is applicable. Example: 5ac383106eecb937c95196f3 | ||||||
| rule_type Type: string Required | Rule type defines whether the discount is product based or order based. Example: product | ||||||
| validity Type: string | The duration for which the discount will be applicable. Example: infinite | 
| Name | Routes | 
|---|---|
| add | post /api/1/entity/ms.discounts_new TRY IT ! | 
| edit | put /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| list | get /api/1/entity/ms.discounts_new TRY IT ! | 
| get | get /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| delete | delete /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| Name | Description | ||||||
|---|---|---|---|---|---|---|---|
| name Type: string Required | Name of the discount. Example: FLAT 100 | ||||||
| type Type: string Required | Type of discount. It can be either flat or percentage type. Example: flat | ||||||
| amount Type: number Required | Amount of the discount. Example: 100 | ||||||
| enabled Type: string | Select the checkbox to enable discounts. Example: 1 | ||||||
| conditions Type: array | Array of conditions which decides the applicability of the discount. Example: 
 | ||||||
| number_of_uses Type: number | Maximum usage allowed. Example: 2 | ||||||
| uses_per_user Type: number | Maximum usage allowed per user. Example: NA | ||||||
| seller Type: string | Seller for which the discount is applicable. Example: 5ac383106eecb937c95196f3 | ||||||
| rule_type Type: string Required | Rule type defines whether the discount is product based or order based. Example: product | ||||||
| validity Type: string | The duration for which the discount will be applicable. Example: infinite | 
| Name | Routes | 
|---|---|
| add | post /api/1/entity/ms.discounts_new TRY IT ! | 
| edit | put /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| list | get /api/1/entity/ms.discounts_new TRY IT ! | 
| get | get /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| delete | delete /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| Name | Description | ||||||
|---|---|---|---|---|---|---|---|
| name Type: string Required | Name of the discount. Example: FLAT 100 | ||||||
| type Type: string Required | Type of discount. It can be either flat or percentage type. Example: flat | ||||||
| amount Type: number Required | Amount of the discount. Example: 100 | ||||||
| enabled Type: string | Select the checkbox to enable discounts. Example: 1 | ||||||
| conditions Type: array | Array of conditions which decides the applicability of the discount. Example: 
 | ||||||
| number_of_uses Type: number | Maximum usage allowed. Example: 2 | ||||||
| uses_per_user Type: number | Maximum usage allowed per user. Example: NA | ||||||
| seller Type: string | Seller for which the discount is applicable. Example: 5ac383106eecb937c95196f3 | ||||||
| conditions.field Type: string Required | Example: order.quantity | ||||||
| conditions.operator Type: string Required | Example: not_equal | ||||||
| conditions.value Type: string Required | Example: 2000 | ||||||
| rule_type Type: string Required | Rule type defines whether the discount is product based or order based. Example: product | ||||||
| validity Type: string | The duration for which the discount will be applicable. Example: infinite | 
| Name | Routes | 
|---|---|
| add | post /api/1/entity/ms.discounts_new TRY IT ! | 
| edit | put /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| list | get /api/1/entity/ms.discounts_new TRY IT ! | 
| get | get /api/1/entity/ms.discounts_new/{_id} TRY IT ! | 
| delete | delete /api/1/entity/ms.discounts_new/{_id} TRY IT ! |