younifyd
Menu

Get campaigns for given filters

Get campaigns for given filters

GET/shops/{shopKey}/campaigns

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Get campaigns for given filters action (under Campaigns).
  3. Fill in the fields below, then reference the result from later steps as {{getCampaignsForGivenFilters.response.data}}.

Request

Path parameters

shopKeystringrequired

The shop key.

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[id]array<integer>

Comma-separated list of IDs of entities that should be used for filtering.

filters[minId]integer

Minimum (inclusive) ID of entities that should be returned.

filters[maxId]integer

Maximum (inclusive) ID of entities that should be returned.

sortstring

Sort by the provided column.

One ofidDefault "id"

sortDirstring

Sort ascending or descending

One ofascdescDefault "asc"

cursorstring

Valid cursor used for pagination.

witharray<string>

Comma-separated list of additional properties that should be included in the response.

Response

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

entitiesarray<object>
idinteger

The ID of the campaign created by SCAYLE.

namestringrequired

Name of the campaign.

descriptionstring

Optional description of the campaign.

countryCodesarray<string>required

List of country codes the campaign is valid for. If the same countryCode exists for multiple shop countries, you can target a specific shop country by passing its shopCountryId instead of the country code. Example: ["139"] instead of ["DE"].

reductionnumber (float)

The reduction percentage applied to all variants, which do not have a specific reduction set.

startAtstring (date-time)required

Start time of campaign in Iso8601 format.

endAtstring (date-time)required

End time of campaign in Iso8601 format.

campaignKeystring

A specific key to identify the campaign. If not provided, it will be generated by SCAYLE.

customDataany
headlineobject

The localized headline. Recommended max length is up to 30 characters.

sublineobject

The localized sub line. Recommended max length is up to 75 characters.

linkobject

The localized relative link.

conditionobject

The localized condition. Recommended max length is up to 250 characters.

hideCountdownboolean

Defines if the count down should be hidden or not. Displayed by default.

Default false

excludeFromLowestPriorPriceCalculationboolean

When true, this campaign's prices are excluded from the 30-day lowest prior price (LPP) calculation. Default false.

Default false

productobject1 fields
colorobject2 fields
cursorobject
nextstring

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

json
{
  "entities": [
    {
      "name": "My Campaign",
      "countryCodes": [
        "DE",
        "GB"
      ],
      "startAt": "2021-01-23T11%3A30%3A58%2B00%3A00",
      "endAt": "2021-09-23T11%3A30%3A58%2B00%3A00",
      "id": 1,
      "description": "My first campaign.",
      "reduction": 10.45,
      "campaignKey": "05f962c8-857b-462a-bea2-54e2bfecf729",
      "customData": null,
      "headline": {
        "de_DE": "Meine Kampagnenüberschrift",
        "en_US": "My campaign headline"
      },
      "subline": {
        "de_DE": "Meine Kampagnenunterzeile",
        "en_US": "My campaign subline"
      },
      "link": {
        "de_DE": "/mein-kampagne",
        "en_US": "/my-campaign"
      }
    }
  ],
  "cursor": {
    "next": "MQ=="
  }
}

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