docs
  1. Vouchers
  2. Voucher Criteria
  3. Add New Criterion To The Voucher

Add new criterion to the voucher

v1.204.1
OpenAPI 3.0.3

This is the specification of the SCAYLE Admin API.

For more information about how to interact with the Admin API, you can read the respective developer guide. The developer guide includes code samples for our PHP SDK, for our Java SDK and for JavaScript and curl.

Authentication is done via X-Access-Token HTTP Header as described here.

Base url should be prefixed with /api/admin/v1.

If a client side timeout is deemed necessary, it is recommended to set it at a minimum of 380 seconds.

Server:https://{tenant-space}.admin.api.scayle.cloud/v1
Client Libraries

Vouchers

​

Add new criterion to the voucher

​

This endpoint can be used to create new voucher criterion. See more details in the Developer Guide.

Path Parameters

  • The shop key.

  • The shop country code; use shop country ID instead of country code when a country is ambiguous within a shop.

  • The voucher ID.

Body·

required
application/json
  • values
    shopCategoryIdmasterCategoryIdcustomerIdemailHashbrandIdproductIdcustomerGroupshopCountryIdmerchantIdpaymentType
  • If the 'shopCategoryId' key is utilized, it should be associated with a 'country' type of application rather than 'shop'.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/shops/{shopKey}/countries/{countryCode}/vouchers/{voucherId}/criteria
let voucherCriterion = {
     "key": "customerId",
     "type": "include",
     "value": [1]
};

let response = await adminApi.apis.Vouchers.createVoucherCriterion({shopKey: 'ms', countryCode: 'DE', voucherId: 1}, {requestBody: voucherCriterion});
voucherCriterion = response.body;

console.log(voucherCriterion.id);

{
  "id": 1,
  "key": "customerId",
  "type": "include",
  "value": [
    1
  ]
}

Models

​
​

Last updated: December 02, 2026