Open API v2 / eCommerce / eCommerce Discount Codes

eCommerce Discount Codes

Every request needs a bearer token: Authorization: Bearer <token>. Base URL https://your-site.webinone.com. New to field types? See the type reference.

GET/api/v2/admin/discount-codes#

Retrieves a list of discount codes by using a "where" filtering

Parameters
Wherestring · query
JSON filter expression. Combine operators ($eq, $contains, $gt, $in, …) with $and / $or.
Order_Bystring · query
Sort field. Prefix with - for descending; comma-separate for tie-breakers.
Semantic_Querystring · query
Natural-language search, ranked by relevance.
Min_Scorenumber · query
Lowest relevance score to include when using Semantic_Query.
Offsetinteger · query
Number of items to skip before returning results. Defaults to 0.
Limitinteger · query
Maximum number of items to return. Defaults to 100.
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Codestring · nullable
A unique coupon code (for example, SUMMER2024) that the user enters in the cart.
Typeenum
Discount type. Possible values: FixedAmount, PercentageOfOrder, FreeShipping.Possible values: FixedAmountPercentageOfOrderFreeShipping
Descriptionstring · nullable
Description of the discount.
Currencystring · nullable
Discount currency.
Enabledboolean
This is the main "on/off" (boolean) of your discount or promo code.
Amountnumber
This is the numerical value of the discount amount.
MinOrderCostLimitationnumber
Minimum order amount after which the coupon becomes active.
UseExpireAfterRedemptionboolean
This is a logical switch (checkbox) that determines the coupon expiration mode.
ExpireAfterinteger
This is a numerical indicator of the coupon's lifespan in dynamic mode.
ReleaseDateTimestring · date-time
Date and time of the beginning of the action.
ExpiryDateTimestring · date-time
Date and time of expiration.
Catalogsarray of integers
An array of directory IDs. 0 is the ID of the main catalog. It tells the system which sections of the store this setting will work in.
ApplyDiscountToCatalogsboolean
A boolean flag indicating that if this setting contains a discount, it should automatically apply to all products within the above catalogs.
curl "https://your-site.webinone.com/api/v2/admin/discount-codes" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Items": [
    {
      "Id": 1,
      "Code": "string",
      "Type": "FixedAmount",
      "Description": "string",
      "Currency": "USD",
      "Enabled": false,
      "Amount": 0,
      "MinOrderCostLimitation": 0,
      "UseExpireAfterRedemption": false,
      "ExpireAfter": 0,
      "ReleaseDateTime": "2026-07-01T00: 00: 00Z",
      "ExpiryDateTime": "2026-07-01T00: 00: 00Z",
      "Catalogs": [
        0
      ],
      "ApplyDiscountToCatalogs": false
    }
  ],
  "TotalItemsCount": 0
}
POST/api/v2/admin/discount-codes#

Creates a new discount code

Body parameters
Codestring · nullable
The actual code your customers need to enter in order to redeem this voucher. This code can contain spaces and special characters and is not case sensitive(when redeeming).
Typeenum
Defines the calculation logic Percentage Of Order allows the amount of the discount to be applied as a percentage reduction of the total order price. Possible values: FixedAmount, PercentageOfOrder, FreeShipping.Possible values: FixedAmountPercentageOfOrderFreeShipping
Descriptionstring · nullable
The description, or notes, about the discount code providing further info to the admin user about the code. This value is not displayed on the front-end.
Currencystring · nullable
The currency in which the discount code can be used.
Enabledboolean
Set the discount code as enabled when checked(uncheck to disable).
Amountnumber
The value used to calculate the discount applied. This value can be a fixed amount or a percentage, depending on the 'Type' setting above.
MinOrderCostLimitationnumber
Assigns a restriction on the use of the discount code unless the order total exceeds or is equal to, this minimum value threshold(before tax). Positive value.
UseExpireAfterRedemptionboolean
Enable discount code expiration after a defined number of redemptions have taken place. The discount code will be marked as disabled once its redemption threshold has been reached.
ExpireAfterinteger
A number defining the number of times the code can be used. This value will also reduce as redemptions occur. Available when UseExpireAfterRedemption = true. Positive value.
ReleaseDateTimestring · date-time
Set a date and time in which this discount code will become enabled for use in your shopping cart.
ExpiryDateTimestring · date-time
Set a date and time in which this discount code will become disabled and no longer able to be redeemed in your shopping cart.
Catalogsarray of integers
Define the catalog/s allowed for use of this discount code. Available when ApplyDiscountToCatalogs = true.
ApplyDiscountToCatalogsboolean
Define the catalog/s allowed for use of this discount code.
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Codestring · nullable
A unique coupon code (for example, SUMMER2024) that the user enters in the cart.
Typeenum
Discount type. Possible values: FixedAmount, PercentageOfOrder, FreeShipping.Possible values: FixedAmountPercentageOfOrderFreeShipping
Descriptionstring · nullable
Description of the discount.
Currencystring · nullable
Discount currency.
Enabledboolean
This is the main "on/off" (boolean) of your discount or promo code.
Amountnumber
This is the numerical value of the discount amount.
MinOrderCostLimitationnumber
Minimum order amount after which the coupon becomes active.
UseExpireAfterRedemptionboolean
This is a logical switch (checkbox) that determines the coupon expiration mode.
ExpireAfterinteger
This is a numerical indicator of the coupon's lifespan in dynamic mode.
ReleaseDateTimestring · date-time
Date and time of the beginning of the action.
ExpiryDateTimestring · date-time
Date and time of expiration.
Catalogsarray of integers
An array of directory IDs. 0 is the ID of the main catalog. It tells the system which sections of the store this setting will work in.
ApplyDiscountToCatalogsboolean
A boolean flag indicating that if this setting contains a discount, it should automatically apply to all products within the above catalogs.
curl -X POST "https://your-site.webinone.com/api/v2/admin/discount-codes" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"Code":"string","Type":"FixedAmount","Description":"string","Currency":"USD","Enabled":false,"Amount":0,"MinOrderCostLimitation":0,"UseExpireAfterRedemption":false,"ExpireAfter":0,"ReleaseDateTime":"2026-07-01T00:00:00Z","ExpiryDateTime":"2026-07-01T00:00:00Z","Catalogs":[0],"ApplyDiscountToCatalogs":false}'
Response · 200
{
  "Id": 1,
  "Code": "string",
  "Type": "FixedAmount",
  "Description": "string",
  "Currency": "USD",
  "Enabled": false,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": false,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2026-07-01T00: 00: 00Z",
  "ExpiryDateTime": "2026-07-01T00: 00: 00Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": false
}
GET/api/v2/admin/discount-codes/{id}#

Retrieves a single discount code

Parameters
idinteger · pathrequired
Discount id.
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Codestring · nullable
A unique coupon code (for example, SUMMER2024) that the user enters in the cart.
Typeenum
Discount type. Possible values: FixedAmount, PercentageOfOrder, FreeShipping.Possible values: FixedAmountPercentageOfOrderFreeShipping
Descriptionstring · nullable
Description of the discount.
Currencystring · nullable
Discount currency.
Enabledboolean
This is the main "on/off" (boolean) of your discount or promo code.
Amountnumber
This is the numerical value of the discount amount.
MinOrderCostLimitationnumber
Minimum order amount after which the coupon becomes active.
UseExpireAfterRedemptionboolean
This is a logical switch (checkbox) that determines the coupon expiration mode.
ExpireAfterinteger
This is a numerical indicator of the coupon's lifespan in dynamic mode.
ReleaseDateTimestring · date-time
Date and time of the beginning of the action.
ExpiryDateTimestring · date-time
Date and time of expiration.
Catalogsarray of integers
An array of directory IDs. 0 is the ID of the main catalog. It tells the system which sections of the store this setting will work in.
ApplyDiscountToCatalogsboolean
A boolean flag indicating that if this setting contains a discount, it should automatically apply to all products within the above catalogs.
curl "https://your-site.webinone.com/api/v2/admin/discount-codes/1" \
  -H "Authorization: Bearer <token>"
Response · 200
{
  "Id": 1,
  "Code": "string",
  "Type": "FixedAmount",
  "Description": "string",
  "Currency": "USD",
  "Enabled": false,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": false,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2026-07-01T00: 00: 00Z",
  "ExpiryDateTime": "2026-07-01T00: 00: 00Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": false
}
PUT/api/v2/admin/discount-codes/{id}#

Updates an existing discount code

Parameters
idinteger · pathrequired
Existent discount id.
Body parameters
Codestring · nullable
The actual code your customers need to enter in order to redeem this voucher. This code can contain spaces and special characters and is not case sensitive(when redeeming).
Typeenum
Defines the calculation logic Percentage Of Order allows the amount of the discount to be applied as a percentage reduction of the total order price. Possible values: FixedAmount, PercentageOfOrder, FreeShipping.Possible values: FixedAmountPercentageOfOrderFreeShipping
Descriptionstring · nullable
The description, or notes, about the discount code providing further info to the admin user about the code. This value is not displayed on the front-end.
Currencystring · nullable
The currency in which the discount code can be used.
Enabledboolean
Set the discount code as enabled when checked(uncheck to disable).
Amountnumber
The value used to calculate the discount applied. This value can be a fixed amount or a percentage, depending on the 'Type' setting above.
MinOrderCostLimitationnumber
Assigns a restriction on the use of the discount code unless the order total exceeds or is equal to, this minimum value threshold(before tax). Positive value.
UseExpireAfterRedemptionboolean
Enable discount code expiration after a defined number of redemptions have taken place. The discount code will be marked as disabled once its redemption threshold has been reached.
ExpireAfterinteger
A number defining the number of times the code can be used. This value will also reduce as redemptions occur. Available when UseExpireAfterRedemption = true. Positive value.
ReleaseDateTimestring · date-time
Set a date and time in which this discount code will become enabled for use in your shopping cart.
ExpiryDateTimestring · date-time
Set a date and time in which this discount code will become disabled and no longer able to be redeemed in your shopping cart.
Catalogsarray of integers
Define the catalog/s allowed for use of this discount code. Available when ApplyDiscountToCatalogs = true.
ApplyDiscountToCatalogsboolean
Define the catalog/s allowed for use of this discount code.
Response
Idinteger
Unique identifier. Technical record number in the database. Read-only.
Codestring · nullable
A unique coupon code (for example, SUMMER2024) that the user enters in the cart.
Typeenum
Discount type. Possible values: FixedAmount, PercentageOfOrder, FreeShipping.Possible values: FixedAmountPercentageOfOrderFreeShipping
Descriptionstring · nullable
Description of the discount.
Currencystring · nullable
Discount currency.
Enabledboolean
This is the main "on/off" (boolean) of your discount or promo code.
Amountnumber
This is the numerical value of the discount amount.
MinOrderCostLimitationnumber
Minimum order amount after which the coupon becomes active.
UseExpireAfterRedemptionboolean
This is a logical switch (checkbox) that determines the coupon expiration mode.
ExpireAfterinteger
This is a numerical indicator of the coupon's lifespan in dynamic mode.
ReleaseDateTimestring · date-time
Date and time of the beginning of the action.
ExpiryDateTimestring · date-time
Date and time of expiration.
Catalogsarray of integers
An array of directory IDs. 0 is the ID of the main catalog. It tells the system which sections of the store this setting will work in.
ApplyDiscountToCatalogsboolean
A boolean flag indicating that if this setting contains a discount, it should automatically apply to all products within the above catalogs.
curl -X PUT "https://your-site.webinone.com/api/v2/admin/discount-codes/1" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"Code":"string","Type":"FixedAmount","Description":"string","Currency":"USD","Enabled":false,"Amount":0,"MinOrderCostLimitation":0,"UseExpireAfterRedemption":false,"ExpireAfter":0,"ReleaseDateTime":"2026-07-01T00:00:00Z","ExpiryDateTime":"2026-07-01T00:00:00Z","Catalogs":[0],"ApplyDiscountToCatalogs":false}'
Response · 200
{
  "Id": 1,
  "Code": "string",
  "Type": "FixedAmount",
  "Description": "string",
  "Currency": "USD",
  "Enabled": false,
  "Amount": 0,
  "MinOrderCostLimitation": 0,
  "UseExpireAfterRedemption": false,
  "ExpireAfter": 0,
  "ReleaseDateTime": "2026-07-01T00: 00: 00Z",
  "ExpiryDateTime": "2026-07-01T00: 00: 00Z",
  "Catalogs": [
    0
  ],
  "ApplyDiscountToCatalogs": false
}
DELETE/api/v2/admin/discount-codes/{id}#

Deletes an existing discount code

Parameters
idinteger · pathrequired
Existent discount id.
curl -X DELETE "https://your-site.webinone.com/api/v2/admin/discount-codes/1" \
  -H "Authorization: Bearer <token>"