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": 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
        ]
    }
}

Response

When returned in a response.

Example 1

{
    "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
}
This is a development version Do not use this version in production
1.10.0 development