younifyd
Menu

Get vouchers for given filters

Get vouchers for given filters

GET/shops/{shopKey}/countries/{countryCode}/vouchers

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Get vouchers for given filters action (under Vouchers).
  3. Fill in the fields below, then reference the result from later steps as {{getVouchersForGivenFilters.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.

Query parameters

limitinteger

Maximum number of entities in the result. When fetching entities with children, the limit always applies to the amount of parent entities (max. 1000).

Default 100

filters[code]string

A specific code for a voucher.

filters[status]string

A specific status for a voucher.

cursorstring

Valid cursor used for pagination.

Response

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

entitiesarray<object>
idinteger
codestring

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

constraintsobject4 fields
criteriaarray<object>4 fields
isApplicableToPromotionsboolean
namestringrequired
statusstring

One ofactiveinactivepending-reviewarchived

summarystring
typestringrequired

One ofabsoluterelative

valuenumber (float)required
cursorobject
nextstring

The cursor pointing to the next page. If null there is no next page available.

json
{
  "entities": [
    {
      "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"
    }
  ],
  "cursor": {
    "next": "MQ=="
  }
}

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