Discount coupons

Import discount coupons

Changed on

Import discount coupons into a default or specific folder.

post/coupons/import

Request

  • Base URL
    https://api2.ecomailapp.cz
  • URL
    https://api2.ecomailapp.cz/coupons/import
  • Auth
    API key in header key

Request body

folderIdinteger

Folder ID. If not provided, coupons are imported into the default folder.

valid_untilstring

Expiration date in YYYY-MM-DD format.

typestring

Discount type: percentual or fixed. Required when value is set.

valuenumber

Discount value, greater than 0. The maximum is 100 for percentual and 99999999.99 for fixed. Required when type is set.

currencystring

Three-letter currency code, for example CZK. Required when type is fixed or when min_spend is set.

min_spendnumber

Minimum order value, from 0 to 99999999.99.

shipping_pricestring

Shipping rule of the discount: cart, free, or beforeDiscount.

update_existingboolean

Deprecated. Use PUT /coupons/import instead. When true, only valid_until of the existing coupons is updated and the updated coupons are counted in both duplicated and updated. The request fails with 422 when update_existing is combined with type, value, currency, min_spend, or shipping_price.

Response

OK

importedinteger
duplicatedinteger
updatedinteger
totalCountinteger

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status