curl --request GET \
--url https://services.engagementagents.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.engagementagents.com/api/v1/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.engagementagents.com/api/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.engagementagents.com/api/v1/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.engagementagents.com/api/v1/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.engagementagents.com/api/v1/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.engagementagents.com/api/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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"
}
]
}{
"ok": false,
"message": "Bad Request",
"statusCode": 400,
"errors": [
"Invalid parameter: 'sortKey' must be one of 'startDate', 'endDate', 'publishByDate', 'brand'.",
"Invalid parameter: 'imageSize' must be in the format 'HxW'.",
"Invalid parameter: 'imageSize' must be an image size associated with your Mall."
],
"data": null
}{
"ok": false,
"message": "Unauthorized Request",
"statusCode": 401,
"errors": [
"You are making an unauthorized request. Please provide a valid authorization token. If you do not have one, please contact the support@engagementagents.com."
],
"data": null
}{
"ok": false,
"message": "Too Many Requests",
"statusCode": 429,
"errors": [
"You have exceeded the rate limit for this endpoint. We allow a maximum of 100 requests per minute. Please try again later or contact support@engagementagents.com."
],
"data": null
}{
"ok": false,
"message": "Internal Server Error",
"statusCode": 500,
"errors": [
"An internal server error occurred. Please contact support@engagementagents.com for assistance."
],
"data": null
}Marketing Campaigns
Returns a list of marketing campaigns
curl --request GET \
--url https://services.engagementagents.com/api/v1/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.engagementagents.com/api/v1/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.engagementagents.com/api/v1/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://services.engagementagents.com/api/v1/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://services.engagementagents.com/api/v1/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://services.engagementagents.com/api/v1/campaigns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.engagementagents.com/api/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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"
}
]
}{
"ok": false,
"message": "Bad Request",
"statusCode": 400,
"errors": [
"Invalid parameter: 'sortKey' must be one of 'startDate', 'endDate', 'publishByDate', 'brand'.",
"Invalid parameter: 'imageSize' must be in the format 'HxW'.",
"Invalid parameter: 'imageSize' must be an image size associated with your Mall."
],
"data": null
}{
"ok": false,
"message": "Unauthorized Request",
"statusCode": 401,
"errors": [
"You are making an unauthorized request. Please provide a valid authorization token. If you do not have one, please contact the support@engagementagents.com."
],
"data": null
}{
"ok": false,
"message": "Too Many Requests",
"statusCode": 429,
"errors": [
"You have exceeded the rate limit for this endpoint. We allow a maximum of 100 requests per minute. Please try again later or contact support@engagementagents.com."
],
"data": null
}{
"ok": false,
"message": "Internal Server Error",
"statusCode": 500,
"errors": [
"An internal server error occurred. Please contact support@engagementagents.com for assistance."
],
"data": null
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
The image size in WxH format that will determine which image to use in each of the returned campaigns
The maximum number of results to return
The page number to return given the limit
The key to sort the results by
startDate, endDate, publishByDate, brand The order to sort the results by
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
An array of types to filter the results by. If not provided, all types will be returned.
Sales, Events, New Arrivals, Loyalty Response
A list of marketing campaigns for your given location
Indicates if the request was successful
A message describing the result of the request
The status code of the response
An array of languages that the campaigns are available in. Note, some languages may not have translations
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
Information about the pagination of the results returned
Show child attributes
Show child attributes
The list of marketing campaigns
Show child attributes
Show child attributes
