Campaigns

List Campaigns

Returns a paginated list of Campaigns for the given site.

get/shop/customers/campaigns

Query parameters

pageinteger

The page to retrieve results from

per_pageinteger

The number of results to return per page

site_idstring uuid required

Filters campaigns that belong to the given site ID.

querystring

Filters campaigns whose name contains the given value.

sort'created_at' | '-created_at' | 'updated_at' | '-updated_at' | 'scheduled_at' | '-scheduled_at' | 'sent_at' | '-sent_at'

The field to sort results by. Prefix with - for descending order. Defaults to -created_at.

scheduled_at_fromstring date-time

Filters campaigns with a scheduled_at on or after the given datetime.

scheduled_at_tostring date-time

Filters campaigns with a scheduled_at on or before the given datetime.

sent_at_fromstring date-time

Filters campaigns with a sent_at on or after the given datetime.

sent_at_tostring date-time

Filters campaigns with a sent_at on or before the given datetime.

Response

The campaigns were successfully retrieved.

Example response

{
  "data": [
    {
      "name": "Summer Promotion 2024",
      "progress": 42.5,
      "segment": {
        "name": "Premium Members"
      },
      "status": "unsent"
    }
  ],
  "meta": {
    "from": 1,
    "to": 2,
    "total": 2,
    "current_page": 1,
    "last_page": 2,
    "per_page": 15,
    "path": "http://example.com/api"
  },
  "links": {
    "first": "http://example.com?page=1",
    "next": "https://example.com?page=3",
    "prev": "https://example.com?page=1",
    "last": "https://example.com?page=4"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.