Skip to main content

Create a new Coupon

POST 

/coupon

Creates a new Coupon and attaches it to the requested Company.

A Coupon functions as a description for the CouponCodes. The Coupons are not used by visitors, instead they use the CouponCodes. The Coupon holds the basic information that all underlying CouponCodes use, e.g. if the CouponCodes will be used on Orders or Products, or the value of the CouponCode or discount, depending on the type.

Request

Body

Input data

    name stringrequired

    Possible values: <= 255 characters

    The name of the Coupon.

    description string

    Possible values: <= 65535 characters

    The description for the Coupon.

    note string

    A note field for extra comments.

    type stringrequired

    Possible values: [cheque, fixed-discount, percentage-discount, new-price]

    The type of the Coupon.

    cheque:
    The Coupon starts at the defined amount and each time it is used the amount will decrease, by the amount it is used.
    fixed-discount:
    The Coupon will apply a fixed discount in terms of money.
    percentage-discount:
    The Coupon will apply a discount percentagewise.
    new-price:
    The Coupon will put the price to the defined amount.

    start_date ISO 8601

    The start date of this Coupon. The start of the date range where it can be used (inclusive).

    end_date ISO 8601

    The end date of this Coupon. The end of the date range where it can be used (exclusive).

    status string

    Possible values: [enabled, disabled]

    Whether the Coupon is enabled. When the Coupon is enabled its CouponCodes can be used.

    amount floatrequired
    cheque:
    The total value of the CouponCode in cents. Can be used depending on usage count and applies to count.
    fixed-discount:
    The amount of discount that will be applied in cents.
    percentage-discount:
    The amount of discount that will be applied in percentages (ranges from 0.0 to 100.0).
    new-price:
    The amount to which the new price of the Order or Product Type will be set in cents.

Responses

Coupon created.

Schema

    name stringrequired

    Possible values: <= 255 characters

    The name of the Coupon.

    description string

    Possible values: <= 65535 characters

    The description for the Coupon.

    note string

    A note field for extra comments.

    type stringrequired

    Possible values: [cheque, fixed-discount, percentage-discount, new-price]

    The type of the Coupon.

    cheque:
    The Coupon starts at the defined amount and each time it is used the amount will decrease, by the amount it is used.
    fixed-discount:
    The Coupon will apply a fixed discount in terms of money.
    percentage-discount:
    The Coupon will apply a discount percentagewise.
    new-price:
    The Coupon will put the price to the defined amount.

    start_date ISO 8601

    The start date of this Coupon. The start of the date range where it can be used (inclusive).

    end_date ISO 8601

    The end date of this Coupon. The end of the date range where it can be used (exclusive).

    status string

    Possible values: [enabled, disabled]

    Whether the Coupon is enabled. When the Coupon is enabled its CouponCodes can be used.

    amount floatrequired
    cheque:
    The total value of the CouponCode in cents. Can be used depending on usage count and applies to count.
    fixed-discount:
    The amount of discount that will be applied in cents.
    percentage-discount:
    The amount of discount that will be applied in percentages (ranges from 0.0 to 100.0).
    new-price:
    The amount to which the new price of the Order or Product Type will be set in cents.
Loading...