Skip to main content
Version: 202201

Create Discount Code

POST 

/openapi/2022-01/price_rules/:price_rule_id/discount_codes

Creates a discount code associated with the specified price rule.

Request

Path Parameters

    price_rule_id stringrequired

    Price rule ID

Body

    discount_code object
    codestringrequired

    Discount code, e.g. SGTIOZT

Responses

200

Schema
    discount_code object
    idstring
    Example: f819c126-a581-4d66-a909-08282dd35916
    price_rule_idstring
    Example: 588fea0b-f15d-4c1d-9390-23661f0194fa
    codestring
    Example: VIJK8GB0
    created_atstring
    Example: 2022-06-17 07:48:29
    updated_atstring
    Example: 2022-06-17 07:48:29
    use_with_otherstring
    Example: 1
    usage_countstring
    Example: 0