Skip to main content
GET
/
api
/
v1
/
campaigns
cURL
curl --request GET \
  --url https://services.engagementagents.com/api/v1/campaigns \
  --header 'Authorization: Bearer <token>'
{
  "ok": true,
  "message": "Campaigns retrieved successfully",
  "statusCode": 200,
  "languages": [
    "en",
    "fr"
  ],
  "types": [
    "Sales",
    "Events"
  ],
  "pagination": {
    "totalItems": 150,
    "totalPages": 3,
    "currentPage": 2,
    "pageSize": 50,
    "next": "/api/v1/campaigns?limit=50&page=3",
    "prev": "/api/v1/campaigns?limit=50&page=1"
  },
  "data": [
    {
      "headline": {
        "en": "Make Special Moments Shine Bright",
        "fr": "Faites scintiller les moments spéciaux"
      },
      "description": {
        "en": "Wrap up a special set to make their season unforgettable. Shop now and save 20% on our thoughtfully styled gift sets.",
        "fr": "Emballez un ensemble spécial pour rendre leur saison des fêtes inoubliable. Magasinez maintenant et obtenez un rabais de 20% sur nos ensembles-cadeaux soigneusement agencés."
      },
      "type": "Sales",
      "startDate": "2022-12-08",
      "endDate": "2022-12-15",
      "publishByDate": "2022-12-08",
      "campaignNumber": "62",
      "brand": "Pandora",
      "brandId": "1853b8a4-63a7-4fb9-a973-3a27bdd5e1b4",
      "storeIds": [
        "84b5de1a-9005-4239-8f27-b8a9fe7c32ef",
        "fec6959e-3607-4614-8695-3ad7e745ca20"
      ],
      "slug": "pandora-62-make-special-moments-shine-bright",
      "imageUrls": {
        "en": "https://data-engagementagents-dev.s3.ca-central-1.amazonaws.com/Bwu8h8ZoLMfFispdncSaTla2Xvkn.png",
        "fr": "https://data-engagementagents-dev.s3.ca-central-1.amazonaws.com/om8h5frznPNk15SY3HE6loRtz7Bn.png"
      },
      "updatedAt": "2022-12-19"
    },
    {
      "headline": {
        "en": "40% OFF YOUR ENTIRE PURCHASE"
      },
      "description": {
        "en": "• 40% off your entire purchase • Accessories 50% off • Visit your nearest Levi's Store for more great deals!"
      },
      "type": "Loyalty",
      "startDate": "2023-11-20",
      "endDate": "2023-11-22  ",
      "publishByDate": "2023-11-20",
      "campaignNumber": "423",
      "brand": "Levi's US",
      "brandId": "5b9b828e-7884-4328-bac0-57903c39bb93",
      "storeIds": [
        "2d382f8a-b342-4d79-b89c-d9aa1974657d"
      ],
      "slug": "levis-us-423-40-off-your-entire-purchase",
      "imageUrl": {
        "en": "https://data-engagementagents-dev.s3.ca-central-1.amazonaws.com/3UhbkfpYKe9RjNvjdyRh1qWZt3O6.png"
      },
      "updatedAt": "2023-11-23"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

imageSize
string
required

The image size in WxH format that will determine which image to use in each of the returned campaigns

limit
integer<int32>
default:50

The maximum number of results to return

page
integer<int32>
default:1

The page number to return given the limit

sortKey
enum<string>
default:startDate

The key to sort the results by

Available options:
startDate,
endDate,
publishByDate,
brand
sortOrder
enum<string>
default:asc

The order to sort the results by

Available options:
asc,
desc

A search term to filter the results by. Fields that will not be included in search; imageUrl. All other fields will be included in the search. For searching dates, use the format YYYY-MM-DD

type
enum<string>[]

An array of types to filter the results by. If not provided, all types will be returned.

Available options:
Sales,
Events,
New Arrivals,
Loyalty

Response

A list of marketing campaigns for your given location

ok
boolean

Indicates if the request was successful

message
string

A message describing the result of the request

statusCode
integer

The status code of the response

languages
string[]

An array of languages that the campaigns are available in. Note, some languages may not have translations

types
string[]

An array of campaign types that are in the returned results. Note, these may only include a subset of the types available or that were requested in the query

pagination
object

Information about the pagination of the results returned

data
object[]

The list of marketing campaigns