younifyd
Menu

List Campaign Templates

List Campaign Templates

GET/v1/templates/campaigns

Use it in a workflow

  1. Add a step and choose the Voucherify connector.
  2. Pick the List Campaign Templates action (under Templates).
  3. Fill in the fields below, then reference the result from later steps as {{listCampaignTemplates.response.data}}.

Request

Query parameters

limitinteger

Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

starting_after_idstring

A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.

orderstring

Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

One ofid-id

include_totalboolean

If set to `true`, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to `false` by default.

filtersobject

Filters for listing templates.

junctionstring

Logical Operator Between Filters. Filter by conditions set on the `junction` parameter indicating how the `conditions` should be accounted for in the query. An `AND` is an all-inclusive logical operator, meaning the `AND` operator displays a record if **ALL** the conditions separated by AND are TRUE, while an `OR` operator displays a record if **ANY** of the conditions separated by OR is TRUE.

One ofandor

idobject1 fields

Unique template ID.

nameobject1 fields

Unique user-defined template name.

campaign_typeobject1 fields

Campaign template campaign type.

Response

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

objectstring

The type of the object represented by JSON. This object stores information about campaign templates.

One oflist

data_refstring

Identifies the name of the JSON property that contains the array of campaign templates.

One ofdata

dataarray<any>

Dictionary that contains an array of campaign templates.

totalinteger

Total number of templates, regardless of the applied query parameters. Displayed only if the `include_total` query paremeter is set to `true`.

has_moreboolean

As query results are always limited (by the limit parameter), the `has_more` flag indicates if there are more records for given filter parameters. This lets you know if you can run another request to get more records returned in the results.

more_starting_afterstring

Returns an ID that can be used to return another page of results. Use the template ID in the `starting_after_id` query parameter to display another page of the results starting after the template with that ID.

json
{
  "object": "list",
  "data_ref": "data",
  "data": [
    null
  ],
  "total": 0,
  "has_more": false,
  "more_starting_after": "string"
}

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