company.PromoCodeGroup

Request

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

Response

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

Examples

Request

When used inside a request.

Example 1

{
    "codes": [
        "...",
        "...",
        "..."
    ],
    "discount_type": "PERCENT",
    "usage_type": "X_USES_TOTAL",
    "fixed_discount": 11,
    "percent_discount": 14,
    "minimum_order_price": 11,
    "expiry_date": "2019-01-31",
    "max_uses": 11,
    "max_uses_per_user": 18,
    "applicable_on": {
        "all": true,
        "products": [
            17,
            10,
            16
        ],
        "categories": [
            13,
            15,
            10
        ],
        "product_prices": [
            12,
            15,
            11
        ]
    }
}

Response

When returned in a response.

Example 1

{
    "codes": [
        "...",
        "...",
        "..."
    ],
    "discount_type": "PERCENT",
    "usage_type": "X_USES_TOTAL",
    "fixed_discount": 19,
    "percent_discount": 13,
    "minimum_order_price": 13,
    "expiry_date": "2019-01-31",
    "max_uses": 11,
    "max_uses_per_user": 19,
    "applicable_on": {
        "all": true,
        "products": [
            15,
            19,
            12
        ],
        "categories": [
            13,
            19,
            18
        ],
        "product_prices": [
            13,
            10,
            19
        ]
    },
    "id": 17,
    "shop_id": 14,
    "times_used": 19
}
1.9.0 stable