younifyd
Menu

Update an existing voucher

Update an existing voucher

PATCH/shops/{shopKey}/countries/{countryCode}/vouchers/{voucherId}

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Update an existing voucher action (under Vouchers).
  3. Fill in the fields below, then reference the result from later steps as {{updateAnExistingVoucher.response.data}}.

Request

Path parameters

shopKeystringrequired

The shop key.

countryCodestringrequired

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

voucherIdintegerrequired

The voucher ID.

Request body

Enter the body as JSON in the step's Body field.

idinteger
codestring

The voucher code. Can be specified on creation only and cannot be updated for existing vouchers.

constraintsobject
dateobject2 fields
isValidOnCampaignsboolean
maxApplicationsobject2 fields
orderValueobject2 fields
criteriaarray<object>
idinteger
keystringrequired

One ofshopCategoryIdmasterCategoryIdcustomerIdemailHashbrandIdproductIdcustomerGroupshopCountryIdmerchantIdpaymentType

typestringrequired

If the 'shopCategoryId' key is utilized, it should be associated with a 'country' type of application rather than 'shop'.

One ofincludeexclude

valuearray<any>required
isApplicableToPromotionsboolean
namestringrequired
statusstring

One ofactiveinactivepending-reviewarchived

summarystring
typestringrequired

One ofabsoluterelative

valuenumber (float)required
json
{
  "name": "string",
  "type": "absolute",
  "value": 0.1,
  "id": 0,
  "code": "string",
  "constraints": {
    "date": {
      "max": "2021-12-23T11%3A30%3A58%2B00%3A00",
      "min": "2021-01-23T11%3A30%3A58%2B00%3A00"
    },
    "isValidOnCampaigns": false,
    "maxApplications": {
      "count": 0,
      "restriction": "customer"
    },
    "orderValue": {
      "max": 0,
      "min": 0
    }
  },
  "criteria": [
    {
      "key": "shopCategoryId",
      "type": "include",
      "value": [
        null
      ],
      "id": 0
    }
  ],
  "isApplicableToPromotions": false,
  "status": "active",
  "summary": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{updateAnExistingVoucher.response.data.<field>}}.

idinteger
codestring

The voucher code. Can be specified on creation only and cannot be updated for existing vouchers.

constraintsobject
dateobject2 fields
isValidOnCampaignsboolean
maxApplicationsobject2 fields
orderValueobject2 fields
criteriaarray<object>
idinteger
keystringrequired

One ofshopCategoryIdmasterCategoryIdcustomerIdemailHashbrandIdproductIdcustomerGroupshopCountryIdmerchantIdpaymentType

typestringrequired

If the 'shopCategoryId' key is utilized, it should be associated with a 'country' type of application rather than 'shop'.

One ofincludeexclude

valuearray<any>required
isApplicableToPromotionsboolean
namestring
statusstring

One ofactiveinactivepending-reviewarchived

summarystring
typestring

One ofabsoluterelative

valuenumber (float)
json
{
  "name": "string",
  "type": "absolute",
  "value": 0.1,
  "id": 0,
  "code": "string",
  "constraints": {
    "date": {
      "max": "2021-12-23T11%3A30%3A58%2B00%3A00",
      "min": "2021-01-23T11%3A30%3A58%2B00%3A00"
    },
    "isValidOnCampaigns": false,
    "maxApplications": {
      "count": 0,
      "restriction": "customer"
    },
    "orderValue": {
      "max": 0,
      "min": 0
    }
  },
  "criteria": [
    {
      "key": "shopCategoryId",
      "type": "include",
      "value": [
        null
      ],
      "id": 0
    }
  ],
  "isApplicableToPromotions": false,
  "status": "active",
  "summary": "string"
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.