Fields when send to the api inside a request.
Field | Type | Description |
---|---|---|
codes | [String] | Array of String |
discount_type | String | String enumarion of 'PERCENT', 'FIXED' |
usage_type | String | String enumarion of 'X_USES_TOTAL', 'X_USES_PER_PERSON' |
fixed_discount | Int | An integer value |
percent_discount | Int | An integer value |
minimum_order_price | Int | An integer value |
expiry_date | Date? | Nullable. Date in YYYY-MM-DD |
max_uses | Int | An integer value |
max_uses_per_user | Int | An integer value |
applicable_on | Dictionary | A dictionary with fields |
Fields when returned by the api in a response.
Field | Type | Description |
---|---|---|
codes | [String] | Array of String |
discount_type | String | String enumarion of 'PERCENT', 'FIXED' |
usage_type | String | String enumarion of 'X_USES_TOTAL', 'X_USES_PER_PERSON' |
fixed_discount | Int | An integer value |
percent_discount | Int | An integer value |
minimum_order_price | Int | An integer value |
expiry_date | Date? | Nullable. Date in YYYY-MM-DD |
max_uses | Int | An integer value |
max_uses_per_user | Int | An integer value |
applicable_on | Dictionary | A dictionary with fields |
id | Int | An integer value |
shop_id | Int | An integer value |
times_used | Int | An integer value |
When used inside a request.
{
"codes": [
"...",
"...",
"..."
],
"discount_type": "PERCENT",
"usage_type": "X_USES_TOTAL",
"fixed_discount": 17,
"percent_discount": 12,
"minimum_order_price": 17,
"expiry_date": "2019-01-31",
"max_uses": 11,
"max_uses_per_user": 18,
"applicable_on": {
"all": true,
"products": [
16,
12,
19
],
"categories": [
11,
18,
16
],
"product_prices": [
13,
19,
17
]
}
}
When returned in a response.
{
"codes": [
"...",
"...",
"..."
],
"discount_type": "PERCENT",
"usage_type": "X_USES_TOTAL",
"fixed_discount": 17,
"percent_discount": 11,
"minimum_order_price": 13,
"expiry_date": "2019-01-31",
"max_uses": 14,
"max_uses_per_user": 19,
"applicable_on": {
"all": true,
"products": [
16,
13,
14
],
"categories": [
16,
16,
18
],
"product_prices": [
11,
12,
11
]
},
"id": 16,
"shop_id": 18,
"times_used": 10
}