Introduction
Welcome to the Advisr API! You can use our API to access Advisr API endpoints, which can get information on clients, campaigns and most objects with the Advisr Platform
You can view access examples with curl in the dark area to the right. All API endpoints responses are JSON. Please reach out to your account manager to inquire about access.
Authentication
To authorize, use this code:
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
-H "token: api-token"
Make sure to replace
api-token
with your API key.
All Advisr API endpoints require an access token passed in the headers of the request. In order to retrieve your Company's access token please contact your Support representative.
token: api-token
Company
Load company
curl "https://api.advisr.com/v1/company" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Advisr",
"logo": "https://assets.advisr.com/uploads/companies/a80b7375e2073c6725f8566c749957623b714e48.png",
"description": null,
"campaignSubmissionEmails": [],
"sendCampaignSubmissionEmailToUser": true,
"supportEmails": [
"support@advisr.com"
],
"presetBudgets": null,
"billingDetailId": 23,
"termsAndConditions": null,
"brandColors": null,
"campaignBudgetMinimum": null,
"submissionReplyToEmails": [],
"customFields": [
{
"categoryKey": "sfdc",
"name": "Id",
"key": "id",
"isArray": false,
"type": "text",
"value": "1",
"updatedAt": "2020-08-11T12:09:46.992Z"
}
],
"createdAt": "2019-03-28T13:18:15.322Z",
"updatedAt": "2020-07-17T13:54:08.489Z"
}
This endpoint loads the Company object
HTTP Request
GET https://api.advisr.com/v1/company
Company Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
logo | url | yes | |
description | string | no | |
campaignSubmissionEmailsToUser | boolean | no | |
supportEmails | array string | yes | |
presetBudgets | array int | yes | |
billingDetailId | int | yes | |
termsAndConditions | int | yes | |
brandColors | array string | yes | |
campaignBudgetMinimum | int | yes | |
submissionReplyToEmails | array string | yes | |
customFields | array of custom field objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Group
List groups
curl "https://api.advisr.com/v1/groups?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 3,
"name": "Internal Group",
"companyId": 1,
"companyName": "Advisr",
"region": null,
"station": null
"createdAt": "2019-04-18T20:26:05.566Z",
"updatedAt": "2020-01-23T20:37:33.537Z"
},
{
"id": 4,
"name": "WABC",
"companyId": 1,
"companyName": "Advisr",
"region": "East",
"station": "Wabc"
"createdAt": "2019-08-18T20:26:05.566Z",
"updatedAt": "2020-05-23T20:37:33.537Z"
}
]
}
This endpoint retrieves the group list for the company
HTTP Request
GET https://api.advisr.com/v1/groups
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many groups to return |
page | false | 1 | What page of the results to return |
sort | false | name | The column to sort results by |
sortDesc | false | false | Sort the results decending |
search | false | Search name string to limit results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of groups | no | |
id | int | no | |
name | string | no | |
companyId | int | no | |
companyName | string | no | |
region | string | no | |
station | string | no | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Load group
curl "https://api.advisr.com/v1/group/1" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Advisr East",
"companyId": 1,
"companyName": "Advisr",
"logo": "https://assets.advisr.com/uploads/groups/b975882b4af07502fcc3dc9ad90e33a5216d95fc.png",
"description": "<div>This is text for the description</div>",
"station": "East Station",
"region": "East Region",
"campaignSubmissionEmails": [],
"supportEmails": [],
"presetBudgets": [
10000,
20000,
50000,
75000,
100000
],
"brandColors": [
"rgba(46,118,188,1)",
"rgba(67,160,71,1)",
"rgba(205,205,205,1)"
],
"campaignBudgetMinimum": 500,
"billingDetails": null,
"customFields": [
{
"categoryKey": "sfdc",
"name": "Id",
"key": "id",
"isArray": false,
"type": "text",
"value": "1123",
"updatedAt": "2020-08-11T12:09:46.992Z"
}
],
"createdAt": "2019-03-20T13:05:08.780Z",
"updatedAt": "2020-06-05T14:38:28.129Z"
}
This endpoint loads the Group
HTTP Request
GET https://api.advisr.com/v1/group/:id
URL Parameters
Parameter | Description |
---|---|
id | The group id to load |
Group Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
companyId | int | no | |
companyName | string | no | |
logo | url | yes | |
description | string | no | |
station | string | yes | |
region | string | yes | |
campaignSubmissionEmails | array string | yes | |
supportEmails | array string | yes | |
presetBudgets | array int | yes | |
brandColors | array string | yes | |
campaignBudgetMinimum | int | yes | |
billingDetails | object | yes | |
customFields | array of custom field objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
BillingDetails Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
string | yes | ||
phone | string | yes | |
address | string | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Client
List clients
curl "https://api.advisr.com/v1/clients?companyGroupId=1&limit=10&page=1&sort=name&sortDesc=false" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 96,
"name": "AAA Rockland",
"industryCategoryName": "Insurance Services",
"industryCategoryId": 14,
"numCampaigns": "47",
"clientUpdatedAt": "2020-01-23T22:33:13.950Z",
"campaignUpdatedAt": "2020-03-12T19:46:14.822Z",
"createdAt": "2020-01-02T14:45:26.184Z",
"updatedAt": "2020-03-12T19:46:14.822Z",
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East"
},
{
"id": 13,
"name": "Advance Auto Parts",
"industryCategoryName": "Automotive Repair Services",
"industryCategoryId": 13,
"numCampaigns": "154",
"clientUpdatedAt": "2020-02-12T21:47:42.920Z",
"campaignUpdatedAt": "2020-03-10T18:41:44.461Z",
"createdAt": "2020-01-02T14:45:26.184Z",
"updatedAt": "2020-03-10T18:41:44.461Z",
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East"
}
]
}
This endpoint retrieves the client list for the user who owns the API token.
HTTP Request
GET https://api.advisr.com/v1/clients
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many clients to return |
page | false | 1 | What page of the client results to return |
sort | false | name | The column to sort results by (id,name,clientUpdatedAt,campaignUpdatedAt,updatedAt) |
sortDesc | false | false | Sort the results decending |
search | false | Search string to limit clients results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
industryCategoryName | string | no | |
industryCategoryID | int | no | |
numCampaigns | integer | no | |
clientUpdatedAt | datetime | no | |
campaignUpdatedAt | datetime | no | |
createdAt | datetime | no | |
updatedAt | datetime | no | |
companyId | int | no | |
companyGroupId | int | no | |
companyGroupName | string | no |
List campaigns for client
curl "https://api.advisr.com/v1/client/:id/campaigns?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 862,
"name": "Q3 Autozone 2020",
"clientId": 1,
"companyGroupId": 1,
"industryCategoryId": 8,
"budget": 50000,
"status": "Submitted",
"statusKey": "submitted",
"state" : "submitted",
"startDate": "2020-07-01",
"endDate": "2020-09-30",
"completedAt": "2020-04-02T14:46:02.772Z",
"submittedAt": "2020-04-02T14:48:12.840Z",
"createdAt": "2020-04-02T14:45:06.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
},
{
"id": 890,
"name": "Q4 Autozone 2020",
"clientId": 1,
"companyGroupId": 1,
"industryCategoryId": 8,
"budget": 50000,
"status": "Submitted",
"statusKey": "submitted",
"state" : "submitted",
"startDate": "2020-12-01",
"endDate": "2020-12-30",
"completedAt": "2020-04-02T14:46:02.772Z",
"submittedAt": "2020-04-02T14:48:12.840Z",
"createdAt": "2020-04-02T14:45:06.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
}
]
}
This endpoint retrieves the campaign list for the client.
HTTP Request
GET https://api.advisr.com/v1/client/:id/campaigns
Query Parameters
Parameter | Default | Description |
---|---|---|
id | The client id to load | |
limit | 10 | How many clients to return |
page | 1 | What page of the client results to return |
sort | updatedAt | The column to sort results by |
sortDesc | false | Sort the results decending |
search | false | Searchstring to limit campaigns results by |
List campaigns fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
clientId | integer | no | |
companyGroupId | int | no | |
industryCategoryId | int | no | |
budget | integer | no | |
state | string | no | fixed:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
status | string | no | defaults:-[ 'New', 'Open', 'Editing', 'Closed-Won', 'Closed-Lost', 'Testing'] |
statusKey | string | no | defaults:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
startDate | date | yes | |
endDate | date | yes | |
completedAt | datetime | yes | |
submittedAt | datetime | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
List goals for client
curl "https://api.advisr.com/v1/client/:id/goals?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 1,
"name": "Ad Engagement",
"externalLookupId": "12345"
},
{
"id": 2,
"name": "Website Traffic",
"externalLookupId": "37847"
},
{
"id": 3,
"name": "Reach",
"externalLookupId": "84887"
}
]
}
This endpoint retrieves the goals list for the company
HTTP Request
GET https://api.advisr.com/v1/client/:id/goals
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many goals to return |
page | false | 1 | What page of the results to return |
sort | false | name | The column to sort results by |
sortDesc | false | false | Sort the results decending |
search | false | Search name string to limit results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of goals | no | |
id | int | no | |
name | string | no | |
externalLookupId | string | yes |
Load client
curl "https://api.advisr.com/v1/client/284" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 1,
"name": "Autozone Auto Parts",
"companyId": 1,
"companyName": "Advisr",
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"deleted": false,
"externalLookupId": "93813",
"primaryContactName": "Steve Smith",
"primaryContactPhone": "(718) 789-9744",
"primaryContactEmail": "steve@gmail.com",
"logoUrl": "https://assets.beta.advisr.com/uploads/clients/b2948bddd69dd9d1d5f09a1440f8d6e82bf82208.png",
"website": "https://www.autozone.com/locations/ny/brooklyn/975-983-atlantic-ave.html",
"facebook": null,
"twitter": null,
"hasAgency": true,
"agencyName": "Digitas",
"agencyContact": "Steve Sanders",
"industryCategoryId": 8,
"industryCategoryName": "Automotive Parts and Supplies",
"industryId": 2,
"industryName": "Auto",
"type": "local",
"owners": [
{
"id": 4,
"firstName": "Steve",
"lastName": "Renz",
"fullName": "Steve Renz",
"email": "steve@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup": {
"id": 21,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"title": "Director of Product",
"mobilePhone": "(770) 330-3064",
"officePhone": "(770) 330-3064",
"isActive": true,
"isCampaignOwner": true
}
},
{
"id": 3,
"firstName": "Peter",
"lastName": "Fernquist",
"email": "peter@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup": {
"id": 38,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"title": "Sales Manager and Head Honcho",
"mobilePhone": "(646) 230-8692",
"officePhone": null,
"isActive": true,
"isCampaignOwner": true
}
}
],
"teamMembers": [
{
"id": 4,
"firstName": "Steve",
"lastName": "Renz",
"fullName": "Steve Renz",
"email": "steve@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup": {
"id": 21,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"title": "Director of Product",
"mobilePhone": "(770) 330-3064",
"officePhone": "(770) 330-3064",
"isActive": true,
"isCampaignOwner": true
}
},
{
"id": 3,
"firstName": "Peter",
"lastName": "Fernquist",
"email": "peter@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup": {
"id": 38,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"title": "Sales Manager and Head Honcho",
"mobilePhone": "(646) 230-8692",
"officePhone": null,
"isActive": true,
"isCampaignOwner": true
}
}
],
"createdBy": {
"id": 4,
"firstName": "Steve",
"lastName": "Renz",
"email": "steve@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup": {
"id": 21,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"title": "Director of Product",
"mobilePhone": "(770) 330-3064",
"officePhone": "(770) 330-3064",
"isActive": true,
"isCampaignOwner": true
}
},
"officeAddress": {
"id": 3488,
"formatted": "555 Washington St, Weymouth, MA 02188, USA",
"streetNumber": "555",
"street": "Washington Street",
"streetAddress": "555 Washington Street",
"subpremise": null,
"city": "Weymouth",
"state": "MA",
"zip": "02188",
"lat": "42.20498509999999",
"lng": "-70.9542742",
"googlePlaceId": "ChIJ_2WhRV9i44kRRUscAbeN5Jc",
"name": "AutoZone Auto Parts"
},
"addresses": [
{
"id": 59,
"formatted": "535 Morgan Ave, Brooklyn, NY 11222, USA",
"streetNumber": "535",
"street": "Morgan Avenue",
"streetAddress": "535 Morgan Avenue",
"subpremise": null,
"city": "Brooklyn",
"state": "NY",
"zip": "11222",
"lat": "40.72266189999999",
"lng": "-73.93948669999997",
"googlePlaceId": "ChIJPZ2DWExZwokRezYI-kgS_EY",
"name": "AutoZone Auto Parts"
},
{
"id": 1440,
"formatted": "629 Communipaw Ave, Jersey City, NJ 07304, USA",
"streetNumber": "629",
"street": "Communipaw Avenue",
"streetAddress": "629 Communipaw Avenue",
"subpremise": null,
"city": "Jersey City",
"state": "NJ",
"zip": "07304",
"lat": "40.7178388",
"lng": "-74.0745657",
"googlePlaceId": "ChIJNaFZMNhQwokRGDVw7dDI1hs",
"name": "AutoZone Auto Parts"
},
{
"id": 1447,
"formatted": "745 Secaucus Rd, Jersey City, NJ 07307, USA",
"streetNumber": "745",
"street": "Secaucus Road",
"streetAddress": "745 Secaucus Road",
"subpremise": null,
"city": "Jersey City",
"state": "NJ",
"zip": "07307",
"lat": "40.75642629999999",
"lng": "-74.04493889999998",
"googlePlaceId": "ChIJq-a6mXRXwokRN8ZHp035lpU",
"name": "AutoZone Auto Parts"
}
],
"customFields": [
{
"categoryKey": "sfdc",
"name": "Client Id",
"key": "client_id",
"isArray": false,
"type": "text",
"value": "12421512",
"updatedAt": "2020-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Category",
"key": "opportunity_category",
"isArray": true,
"type": "multiselect",
"value": [
"retail",
"amusement_parks"
],
"valueOptions": [
{ "value": "retail", "name": "Retail" },
{ "value": "amusement_parks", "name": "Amusement Parks" }
],
"updatedAt": "2022-08-11T12:09:46.992Z"
}
],
"createdAt": "2019-11-27T13:11:40.607Z",
"updatedAt": "2020-01-06T16:07:14.770Z"
}
This endpoint loads the data for a specific client.
HTTP Request
GET https://api.advisr.com/v1/client/:id
URL Parameters
Parameter | Description |
---|---|
id | The client id to load |
Client Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
companyId | int | no | |
companyName | string | no | |
companyGroupId | int | no | |
companyGroupName | string | no | |
deleted | boolean | no | |
externalLookupId | string | yes | External system ID used for matching across platforms |
primaryContactName | string | yes | |
primaryContactPhone | string | yes | |
primaryContactEmail | string | yes | |
logoUrl | string | yes | |
website | string | yes | |
string | yes | ||
string | yes | ||
hasAgency | boolean | no | |
agencyName | string | yes | |
agencyContact | string | yes | |
industryCategoryId | int | no | |
industryCategoryName | string | no | |
industryId | int | no | |
industryName | string | no | |
type | string | no | ['local', 'national'] |
owners | array - userCompanyGroup objects | no | |
teamMembers | array - userCompanyGroup objects | no | |
createdBy | userCompanyGroup object | no | |
officeAddress | address object | yes | |
addresses | array - address objects | yes | |
customFields | array - custom field objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Address Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
formatted | string | yes | |
streetNumber | string | yes | |
street | string | yes | |
streetAddress | string | yes | |
subpremise | string | yes | |
city | string | yes | |
state | string | yes | |
zip | string | yes | |
lat | string | yes | |
lng | string | yes | |
googlePlaceId | string | yes | |
name | string | yes |
UserCompanyGroup Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
companyId | int | no | |
companyGroupId | int | no | |
companyGroupName | string | no | |
title | string | yes | |
mobilePhone | string | yes | |
officePhone | string | yes | |
isActive | boolean | no | |
isCampaignOwner | boolean | no | |
userId | user object | no |
User Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
firstName | string | no | |
lastName | string | no | |
fullName | string | no | |
string | no | ||
isAdvisrEmployee | boolean | no |
Campaign
List campaigns
curl "https://api.advisr.com/v1/campaigns?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 862,
"name": "Q3 Autozone 2020",
"clientId": 1,
"companyGroupId": 1,
"industryCategoryId": 8,
"budget": 50000,
"status": "Closed - Won",
"statusKey": "submitted",
"state" : "submitted",
"startDate": "2020-07-01",
"endDate": "2020-09-30",
"completedAt": "2020-04-02T14:46:02.772Z",
"submittedAt": "2020-04-02T14:48:12.840Z",
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
},
{
"id": 890,
"name": "Q4 Autozone 2020",
"clientId": 1,
"companyGroupId": 1,
"industryCategoryId": 8,
"budget": 50000,
"status": "Closed - Won",
"statusKey": "submitted",
"state" : "submitted",
"startDate": "2020-12-01",
"endDate": "2020-12-30",
"completedAt": "2020-04-02T14:46:02.772Z",
"submittedAt": "2020-04-02T14:48:12.840Z",
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
}
]
}
This endpoint retrieves the campaign list for the user who owns the API token.
HTTP Request
GET https://api.advisr.com/v1/campaigns
Query Parameters
Parameter | Default | Description |
---|---|---|
limit | 10 | How many campaigns to return |
page | 1 | What page of the campaign results to return |
sort | updatedAt | The column to sort results by |
sortDesc | false | Sort the results decending |
search | Search string to limit campaigns results by |
List campaigns by external Opportunity
curl "https://api.advisr.com/v1/externalcrm/linkedcampaigns/:externalCrmId/:opportunityId?limit=150&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results":
[
{
"id": 2366,
"name": "Q3 Autozone 2020",
"client":
{
"id": 1,
"name": "Autozone Auto Parts",
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"industryCategoryId": 8,
"industryCategoryName": "Automotive Parts and Supplies",
"link": "https://app.advisr.com/client/1/info"
},
"budget": 50000,
"status": "Closed - Won",
"statusKey": "submitted",
"state" : "submitted",
"submittedStatus": "success",
"isPrimary": false,
"startDate": "2020-07-01",
"endDate": "2020-09-30",
"owner":
{
"id": 3,
"firstName": "Joe",
"lastName": "Advisr",
"email": "joe@advisr.com"
},
"link": "https://app.advisr.com/campaign/2366/summary",
"completedAt": "2020-04-02T14:46:02.772Z",
"submittedAt": "2020-04-02T14:48:12.840Z",
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
},
{
"id": 999,
"name": "Q3 Autozone 2020",
"client":
{
"id": 1,
"name": "Winterize 2020 event",
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"industryCategoryId": 8,
"industryCategoryName": "Automotive Parts and Supplies"
},
"budget": 50000,
"status": "Closed - Won",
"statusKey": "submitted",
"state" : "submitted",
"isPrimary": true,
"startDate": "2020-07-01",
"endDate": "2020-09-30",
"owner":
{
"id": 3,
"firstName": "Joe",
"lastName": "Advisr",
"email": "joe@advisr.com"
},
"campaignURL": "https://app.advisr.com/campaign/999/summary",
"clientURL": "https://app.advisr.com/client/1/info",
"completedAt": "2020-04-02T14:46:02.772Z",
"submittedAt": "2020-04-02T14:48:12.840Z",
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
},
{
"id": 2334,
"name": "New Client Opp",
"client":
{
"id": 13,
"name": "Advance Auto Parts",
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"industryCategoryId": 10,
"industryCategoryName": "Automotive Repair Services",
"clientURL": "https://app.advisr.com/client/1/info"
},
"budget": 40000,
"status": "Open",
"statusKey": "open",
"state": "open",
"isPrimary": false,
"startDate": "2020-07-01",
"endDate": "2020-09-30",
"owner":
{
"id": 3,
"firstName": "Joe",
"lastName": "Advisr",
"email": "joe@advisr.com"
},
"campaignURL": "https://app.advisr.com/campaign/999/summary",
"completedAt": "2020-04-02T14:46:02.772Z",
"submittedAt": null,
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
}
]
}
This endpoint retrieves the campaign list for the user who owns the API token.
HTTP Request
GET https://api.advisr.com/v1/external-crm/linked-campaigns/:externalCrmId/:opportunityId?limit=100&page=1&sort=name&sortDesc=false
Query Parameters
Parameter | Default | Description |
---|---|---|
externalCRMId | externalCRM id provided by support | |
opportunityId | The ID of the Opportunity to request | |
limit | 100 | How many campaigns to return |
page | 1 | What page of the campaign results to return |
sort | name | The column to sort results by |
sortDesc | false | Sort the results decending |
Opportunity Campaign List Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
client | client object json | no | |
budget | number | yes | |
state | string | no | fixed:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
status | string | no | defaults:-[ 'New', 'Open', 'Editing', 'Closed - Won', 'Closed - Lost', 'Testing'] |
statusKey | string | no | defaults:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
isPrimary | boolean | no | |
startDate | date | yes | |
endDate | date | yes | |
owner | owner object json | no | |
link | string | no | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Opportunity List campaign Client Object Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
clientId | integer | no | |
companyGroupId | int | no | |
industryCategoryId | int | no | |
industryCategoryName | int | no | |
link | sring | no |
Load campaign
curl "https://api.advisr.com/v1/campaign/862" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 862,
"name": "Q3 Autozone 2020",
"creationFlow": "wizard",
"deleted": false,
"description": null,
"externalLookupId": null,
"startDate": "2020-07-01",
"endDate": "2020-09-30",
"status": "Closed - Won",
"statusKey": "submitted",
"state" : "submitted",
"submittedStatus": "success",
"industryCategoryId": 8,
"industryCategoryName": "Automotive Parts and Supplies",
"industryId": 2,
"industryName": "Auto",
"budget": 50000,
"clientId": 1,
"clientName": "Autozone Auto Parts",
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"companyId": 1,
"companyName": "Advisr",
"completedAt": "2020-04-02T14:46:02.772Z",
"primaryGoalId": 64,
"primaryGoalName": "General Brand Awareness",
"secondaryGoalId": null,
"secondaryGoalName": null,
"presentationLink": "https://presentation.advisr.com/d7mt-QJzb",
"readyToSubmit": true,
"submittedAt": "2020-04-02T14:48:12.840Z",
"owner":
{
"id": 3,
"firstName": "Joe",
"lastName": "Advisr",
"email": "joe@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup":
{
"id": 7,
"userId": 3,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"isActive": true,
"title": "Sales Manager",
"mobilePhone": "(612) 220-5022",
"isCampaignOwner": true
}
},
"addresses":
[
{
"id": 3489,
"formatted": "535 Morgan Ave, Brooklyn, NY 11222, USA",
"streetNumber": "535",
"street": "Morgan Avenue",
"streetAddress": "535 Morgan Avenue",
"subpremise": null,
"city": "Brooklyn",
"state": "NY",
"zip": "11222",
"lat": "40.72266189999999",
"lng": "-73.93948669999997",
"googlePlaceId": "ChIJPZ2DWExZwokRezYI-kgS_EY",
"name": "AutoZone Auto Parts",
"country": "US"
},
{
"id": 3490,
"formatted": "629 Communipaw Ave, Jersey City, NJ 07304, USA",
"streetNumber": "629",
"street": "Communipaw Avenue",
"streetAddress": "629 Communipaw Avenue",
"subpremise": null,
"city": "Jersey City",
"state": "NJ",
"zip": "07304",
"lat": "40.7178388",
"lng": "-74.0745657",
"googlePlaceId": "ChIJNaFZMNhQwokRGDVw7dDI1hs",
"name": "AutoZone Auto Parts",
"country": "US"
},
{
"id": 3491,
"formatted": "745 Secaucus Rd, Jersey City, NJ 07307, USA",
"streetNumber": "745",
"street": "Secaucus Road",
"streetAddress": "745 Secaucus Road",
"subpremise": null,
"city": "Jersey City",
"state": "NJ",
"zip": "07307",
"lat": "40.75642629999999",
"lng": "-74.04493889999998",
"googlePlaceId": "ChIJq-a6mXRXwokRN8ZHp035lpU",
"name": "AutoZone Auto Parts",
"country": "US"
}
],
"createdBy":
{
"id": 4,
"firstName": "Steve",
"lastName": "Renz",
"fullName": "Steve Renz",
"email": "steve@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup":
{
"id": 21,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"title": "Director of Product",
"mobilePhone": "(770) 330-3064",
"officePhone": "(770) 330-3064",
"isActive": true,
"isCampaignOwner": true
}
},
"submittedBy":
{
"id": 3,
"firstName": "Peter",
"lastName": "Fernquist",
"fullName": "Peter Fernquist",
"email": "peter@advisr.com",
"isAdvisrEmployee": true
},
"customFields":
[
{
"categoryKey": "sfdc",
"name": "Opportunity Id",
"key": "opportunity_id",
"isArray": false,
"type": "text",
"value": "12421512",
"updatedAt": "2020-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Category",
"key": "opportunity_category",
"isArray": true,
"type": "multiselect",
"value": [
"retail",
"amusement_parks"
],
"valueOptions": [
{ "value": "retail", "name": "Retail" },
{ "value": "amusement_parks", "name": "Amusement Parks" }
],
"updatedAt": "2022-08-11T12:09:46.992Z"
}
],
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z",
"agency": {
"id": 3948,
"name": "Agency ABC"
},
"isTestCampaign": false,
"externalCrmLinks":
[
{
"crmType": "sfdc",
"crmId": "1",
"crmName": "Salesforce National",
"id": "0066g00003WgoP9AAJ",
"name": "Q4 Opportunity",
"link": "https://na174.lightning.force.com/lightning/r/Opportunity/0066g00003WgoP9AAJ/view",
"status": "Closed - Won",
"startDate": "2021-08-22",
"endDate": "2021-02-22",
"budget": "35000",
"ownerId": "2F0053g000000g0xS",
"ownerName": "Peter Fernquist",
"data": null,
"createdAt": "2021-08-22T14:14:27.775Z",
"updatedAt": "2021-09-12T17:45:30.556Z",
"account":
{
"id": "0016g00001thtQsAAI",
"name": "Blaze Pizza",
"link": "https://na174.lightning.force.com/lightning/r/Account/0016g00001pU7AVAA0/view"
}
},
{
"crmType": "sell",
"crmId": "2",
"crmName": "Zendesk Sell",
"id": "123123123123",
"name": "NPC Opp 2",
"link": "https://sell.zendesk.com/Opportunity/123123123123",
"status": "Value Proposition",
"startDate": "2021-08-22",
"endDate": "2021-02-22",
"budget": "50000",
"ownerId": "2F0053g000000g0xS",
"ownerName": "Peter Fernquist",
"data":
{
"regionId": 1,
"regionName": "Kansas"
},
"parent":
{
"id": "124124124124124",
"name": "AAA Boston",
"link": "https://sell.zendesk.com/Account/2F0053g000000g0xS"
},
"createdAt": "2021-08-22T14:14:27.775Z",
"updatedAt": "2021-09-12T17:45:30.556Z"
}
],
"teamMembers": [
{
"id": 1082,
"firstName": "Elizabeth",
"lastName": "Smith",
"fullName": "Elizabeth Smith",
"email": "esmith@advisr.com",
"isAdvisrEmployee": true,
"userCompanyGroup": {
"id": 492,
"userId": 256,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"title": null,
"mobilePhone": null,
"officePhone": null,
"isActive": true,
"isCampaignOwner": true
},
"userRoles": [
{
"id": 16,
"name": "Account Manager",
"description": "Role description"
}
]
}
]
}
This endpoint loads the data for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
creationFlow | string | no | ['wizard', 'custom', 'express'] |
deleted | boolean | no | |
description | string | yes | |
externalLookupId | string | yes | External system ID used for matching across platforms |
startDate | date | yes | |
endDate | date | yes | |
state | string | no | fixed:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
status | string | no | defaults:-[ 'New', 'Open', 'Editing', 'Closed - Won', 'Closed - Lost', 'Testing'] |
statusKey | string | no | defaults:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
submittedStatus | string | yes | fixed:-[ null, 'failed', 'success' ] |
industryCategoryid | int | no | |
industryCategoryName | string | no | |
industryId | int | no | |
industryName | string | no | |
budget | number | yes | |
clientId | int | no | |
clientName | string | no | |
companyGroupId | int | no | |
companyGroupName | string | no | |
companyId | int | no | |
companyName | string | no | |
completedAt | datetime | yes | |
primaryGoalId | int | yes | |
primaryGoalName | string | yes | |
secondaryGoalId | int | yes | |
secondaryGoalName | string | yes | |
proposalLink | string | yes | Deprecated |
presentationlLink | string | yes | |
readyToSubmit | boolean | no | |
submittedAt | datetime | yes | |
owner | owner object | no | |
addresses | array - address objects | yes | |
createdBy | userCompanyGroup object | no | |
submittedBy | user object | yes | |
customFields | array - custom field objects | yes | |
teamMembers | array - userCompanyGroup objects | yes | |
agency | agency object | yes | |
isTestCampaign | boolean | no | |
externalCrmLinks | array - externalCrmLink objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Address Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
formatted | string | yes | |
streetNumber | string | yes | |
street | string | yes | |
streetAddress | string | yes | |
subpremise | string | yes | |
city | string | yes | |
state | string | yes | |
zip | string | yes | |
lat | string | yes | |
lng | string | yes | |
googlePlaceId | string | yes | |
name | string | yes | |
country | string | no |
UserCompanyGroup Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
companyId | int | no | |
companyGroupId | int | no | |
companyGroupName | string | no | |
title | string | yes | |
mobilePhone | string | yes | |
officePhone | string | yes | |
isActive | boolean | no | |
isCampaignOwner | boolean | no | |
userId | user object | no |
User Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
firstName | string | no | |
lastName | string | no | |
fullName | string | no | |
string | no | ||
isAdvisrEmployee | boolean | no |
ExternalCRM Links Object Properties
Parameter | Required | Type | Description |
---|---|---|---|
crmType | true | string | CRM type |
crmId | true | number | CRM id - provided by integrations team |
crmName | true | string | CRM display name |
id | true | string | The id field of the external Opportunity |
name | true | string | The name of the external Opportunity |
link | true | string | The url of the external Opportunity |
status | true | string | The status of the external Opportunity |
startDate | true | string | The startDate of the Opportunity |
endDate | true | string | The startDate of the Opportunity |
budget | true | string | The budget of the opportunity |
ownerId | true | string | The external ownerID of the Opportunity |
ownerName | true | string | The external ownerName of the Opportunity |
data | false | json | any additional custom values that are stored at the opportunity level |
updatedAt | true | datetime | |
createdAt | true | datetime | |
account | true | Account object |
ExternalCRM Links Account Object Properties
Parameter | Required | Type | Description |
---|---|---|---|
id | true | string | The id field of the external Account |
name | true | string | The name of the external Account |
link | true | string | The url of the external Account |
Load campaign products summary
curl "https://api.advisr.com/v1/campaign/862/product-summary" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 862,
"status": "Submitted",
"statusKey": "submitted",
"state" : "submitted",
"budget": 50000,
"readyToSubmit": true,
"version": "1",
"createdAt": "2019-11-22T14:14:27.775Z",
"updatedAt": "2019-11-22T14:14:36.424Z",
"products": [
{
"id": 5,
"name": "Local TV",
"spend": 19000,
"isService": false,
"vendorId": null,
"vendorName": null,
"reportingCategoryId": null,
"reportingCategoryName": null
},
{
"id": 8,
"name": "Radio",
"spend": 14400,
"isService": false,
"vendorId": null,
"vendorName": null,
"reportingCategoryId": null,
"reportingCategoryName": null
},
{
"id": 1,
"name": "Magazines",
"spend": 500,
"isService": false,
"vendorId": null,
"vendorName": null,
"reportingCategoryId": null,
"reportingCategoryName": null
},
{
"id": 12,
"name": "Online Paid Search",
"spend": 16100,
"isService": false,
"vendorId": null,
"vendorName": null,
"reportingCategoryId": null,
"reportingCategoryName": null
}
]
}
This endpoint loads the data for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/product-summary
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign Product Summary Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
status | string | no | |
statusKey | string | no | |
state | string | no | |
budget | number | yes | |
readyToSubmit | boolean | no | |
version | string | no | |
products | array products | yes |
Campaign Product Summary Product Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
spend | number | yes | |
isService | boolean | no | |
vendorId | int | yes | |
vendorName | string | yes | |
reportingCategoryId | int | yes | |
reportingCategoryName | string | yes |
Load campaign products detail
curl "https://api.advisr.com/v1/campaign/862/product-detail" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 1365,
"status": "Open",
"statusKey": "open",
"state" : "open",
"budget": 50000,
"readyToSubmit": true,
"createdAt": "2020-09-21T15:22:11.698Z",
"updatedAt": "2020-09-21T15:23:35.937Z",
"products": [
{
"id": 1,
"name": "Product - Options Only/ Multiple lines",
"spend": 23700,
"isService": false,
"vendorId": null,
"reportingCategoryId": null,
"customFields": [],
"fees": [
{
"id": 8,
"name": "prod-fee",
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Daily",
"rate": 10,
"calculationType": null,
"quantity": 90,
"fee": 900
}
],
"lineItems": [
{
"subProduct": null,
"attributes": [
{
"id": 36,
"name": "AdSize",
"field": "adsize",
"type": "string",
"format": null,
"isRequired": true,
"isArray": true,
"value": [
"728x90",
"300x250"
]
}
],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 1,
"totalFees": 0,
"totalSpend": 3000,
"fees": []
},
{
"subProduct": null,
"attributes": [
{
"id": 40,
"name": "Screen size",
"field": "screen",
"type": "string",
"isRequired": true,
"format": null,
"isArray": false,
"value": "mobile"
}
],
"isValid": true,
"inValidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 1,
"totalFees": 0,
"totalSpend": 3000,
"fees": []
}
]
},
{
"id": 2,
"name": "Product with multiple SubProducts",
"spend": 23700,
"isService": false,
"vendorId": null,
"reportingCategoryId": null,
"customFields": [],
"fees": [
{
"id": 8,
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"name": "prod-fee",
"rateType": "Daily",
"rate": 10,
"calculationType": null,
"quantity": 90,
"fee": 900
}
],
"lineItems": [
{
"subProduct": {
"id": 39,
"name": "Facebook",
"field": "facebook"
},
"attributes": [
{
"id": 36,
"name": "AdSize",
"field": "adsize",
"type": "string",
"format": null,
"isArray": true,
"isRequired": false,
"value": [
"728x90"
]
},
{
"id": 40,
"name": "ROI",
"field": "roi",
"type": "number",
"format": "Currency",
"isRequired": false,
"value": 100
}
],
"fees": [
{
"id": 5,
"name": "sub-fee",
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"calculationType": null,
"quantity": 1,
"fee": 100
}
],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"quantity": 30,
"spend": 3000,
"totalFees": 100,
"totalSpend": 3100
},
{
"subProduct": {
"id": 40,
"name": "Instagram",
"field": "instagram"
},
"attributes": [
{
"id": 36,
"name": "AdSize",
"field": "adsize",
"type": "Multiselect",
"isValid": true,
"isArray": true,
"value": [
"728x90"
]
}
],
"fees": [],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 30,
"totalFees": 0,
"totalSpend": 3000
},
{
"subProduct": {
"id": 40,
"name": "Instagram",
"field": "instagram"
},
"attributes": [],
"fees": [],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 30,
"totalFees": 0,
"totalSpend": 3000
}
]
}
]
}
This endpoint loads the data for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/product-detail
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign Product Detail Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
status | string | no | |
statusKey | string | no | |
state | string | no | |
budget | number | yes | |
readyToSubmit | boolean | no | |
createdAt | timestamp | no | |
updatedAt | timestamp | no | |
products | array products | yes |
Campaign Product Detail Product Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
spend | number | yes | |
isService | boolean | no | |
vendorId | int | yes | |
reportingCategoryId | int | yes | |
customFields | array - custom field objects | yes | |
fees | array fees | yes | Product Fees |
lineItems | array lineItems | yes |
Campaign Product Detail lineItem Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
subProduct | object | yes | SubProduct details (id,name,field) |
isValid | boolean | no | |
invalidFields | array fieldnames | yes | (spend, startDate, endDate,quantity,rateType) |
startDate | string | yes | |
endDate | string | yes | |
rateType | string | yes | (CPM, CPC, CPA,CPE, CPV, CPP, CostPer,Flat Rate,Bonus,Daily,Weekly,Monthly,Annual) |
rate | number | yes | |
spend | number | no | |
quantity | number | no | |
totalFees | number | no | |
totalSpend | number | no | |
attributes | array attributes | yes | |
fees | fee Object | yes |
Campaign Product Detail Attribute Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
field | string | yes | |
type | string | no | Value type (string, boolean, number) |
isArray | boolean | no | Is the value an array |
isRequired | boolean | no | Is the fields designated as required |
value | number,boolean,string,array | yes |
Campaign Product Detail Fee Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
startDate | string | yes | |
endDate | string | yes | |
rateType | string | yes | (Flat Rate,Daily,Weekly,Monthly,Annual) |
rate | number | yes | |
calculationType | string | yes | |
quantity | number | no | |
fee | number | no |
Load campaign product recommendation
curl "https://api.advisr.com/v1/campaign/862/product-recommendation?includeProductMetadata=true&includeRecommendedBudgets=true" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"rankedProducts": [
{
"id": 1,
"name": "Product - Options Only/ Multiple lines",
"allocationPct": 0.06644767,
"rank": 90,
"isActive": true
},
{
"id": 2,
"name": "Product with multiple SubProducts",
"allocationPct": 0.004570207,
"rank": 86.99311,
"isActive": true
},
],
"recommendedProducts": [
{
"id": 1,
"name": "Product - Options Only/ Multiple lines",
"order": 1,
"budget": 17500,
"isActive": true
},
{
"id": 2,
"name": "Product with multiple SubProducts",
"order": 2,
"budget": 500,
"isActive": true
},
],
"productMetadata": [
{
"id": 1,
"name": "Product - Options Only/ Multiple lines",
"spend": 23700,
"isService": false,
"vendorId": null,
"reportingCategoryId": null,
"customFields": [],
"fees": [
{
"id": 8,
"name": "prod-fee",
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Daily",
"rate": 10,
"calculationType": null,
"quantity": 90,
"fee": 900
}
],
"lineItems": [
{
"subProduct": null,
"attributes": [
{
"id": 36,
"name": "AdSize",
"field": "adsize",
"type": "string",
"format": null,
"isRequired": true,
"isArray": true,
"value": [
"728x90",
"300x250"
]
}
],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 1,
"totalFees": 0,
"totalSpend": 3000,
"fees": []
},
{
"subProduct": null,
"attributes": [
{
"id": 40,
"name": "Screen size",
"field": "screen",
"type": "string",
"isRequired": true,
"format": null,
"isArray": false,
"value": "mobile"
}
],
"isValid": true,
"inValidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 1,
"totalFees": 0,
"totalSpend": 3000,
"fees": []
}
]
},
{
"id": 2,
"name": "Product with multiple SubProducts",
"spend": 23700,
"isService": false,
"vendorId": null,
"reportingCategoryId": null,
"customFields": [],
"fees": [
{
"id": 8,
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"name": "prod-fee",
"rateType": "Daily",
"rate": 10,
"calculationType": null,
"quantity": 90,
"fee": 900
}
],
"lineItems": [
{
"subProduct": {
"id": 39,
"name": "Facebook",
"field": "facebook"
},
"attributes": [
{
"id": 36,
"name": "AdSize",
"field": "adsize",
"type": "string",
"format": null,
"isArray": true,
"isRequired": false,
"value": [
"728x90"
]
},
{
"id": 40,
"name": "ROI",
"field": "roi",
"type": "number",
"format": "Currency",
"isRequired": false,
"value": 100
}
],
"fees": [
{
"id": 5,
"name": "sub-fee",
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"calculationType": null,
"quantity": 1,
"fee": 100
}
],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"quantity": 30,
"spend": 3000,
"totalFees": 100,
"totalSpend": 3100
},
{
"subProduct": {
"id": 40,
"name": "Instagram",
"field": "instagram"
},
"attributes": [
{
"id": 36,
"name": "AdSize",
"field": "adsize",
"type": "Multiselect",
"isValid": true,
"isArray": true,
"value": [
"728x90"
]
}
],
"fees": [],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 30,
"totalFees": 0,
"totalSpend": 3000
},
{
"subProduct": {
"id": 40,
"name": "Instagram",
"field": "instagram"
},
"attributes": [],
"fees": [],
"isValid": true,
"invalidFields": [],
"startDate": "2021-01-01",
"endDate": "2021-03-31",
"rateType": "Flat",
"rate": 100,
"spend": 3000,
"quantity": 30,
"totalFees": 0,
"totalSpend": 3000
}
]
}
],
"recommendedBudgets": [
{
"id": 1,
"budget": "3157.33",
"order": 1
},
{
"id": 2,
"budget": "3946.67",
"order": 2
},
{
"id": 3,
"budget": "4736.00",
"order": 3
}
],
"createdAt": "2022-09-21T15:22:11.698Z",
"updatedAt": "2022-09-21T15:23:35.937Z"
}
This endpoint loads the product recommendation for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/product-recommendation
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Query Parameters
Parameter | Default | Description |
---|---|---|
includeProductMetadata | false | Whether to include full metadata for product catalog |
includeRecommendedBudgets | false | Whether to include budget recommendations |
Campaign Product Recommendation Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
rankedProducts | array of ranked products | no | All products in ranked order |
recommendedProducts | array of recommended products | no | The topmost products by rank that comprise the recommendation |
productMetadata | array products | yes | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Campaign Ranked Product Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
allocationPct | decimal | no | Utilized for user-initiated changes to recommendation |
rank | decimal | no | Utilized for rank ordering of products |
isActive | boolean | no | Whether the product in question is still active and should be used |
Campaign Recommended Product Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
order | integer | no | Utilized for rank ordering of products |
budget | integer | no | Budget allocation for that particular product |
isActive | boolean | no | Whether the product in question is still active and should be used |
Campaign Product Metadata Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
companyId | int | no | |
companyGroupId | int | no | |
isActive | boolean | no | |
isService | boolean | no | |
description | string | no | HTML |
minSpend | int | yes | |
maxSpend | int | yes | |
minMonthlySpend | int | yes | |
includeNewGroups | boolean | no | |
showDefaultSlide | boolean | no | |
logo | url | yes | |
addOnType | string | yes | SubProducts,Attributes |
subProductLabel | string | yes | |
vendorId | int | yes | |
vendorName | string | yes | |
reportingCategoryId | int | yes | |
reportingCategoryName | string | yes | |
productCategory | object | no | |
includedCompaignGroups | array companyGroup objects | yes | id,name |
customFields | array of custom field objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Campaign Recommended Budget Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
budget | string | no | Budget recommendation for the campaign |
order | integer | no | Utilized for rank ordering of budgets |
Load campaign geo detail
curl "https://api.advisr.com/v1/campaign/862/geo" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"selection": {
"type": "city",
"geos": [
{
"id": 16801,
"value": "Brooklyn, NY"
},
{
"id": 17768,
"value": "Ridgewood, NY"
}
]
},
"radiusTargets": [
{
"radiusMetric": "mi",
"distance": 1,
"address": {
"id": 3476,
"formatted": "535 Morgan Ave, Brooklyn, NY 11222, USA",
"streetNumber": "535",
"street": "Morgan Avenue",
"streetAddress": "535 Morgan Avenue",
"subpremise": null,
"city": "Brooklyn",
"state": "NY",
"zip": "11222",
"lat": "40.72266189999999",
"lng": "-73.9394867",
"googlePlaceId": "ChIJPZ2DWExZwokRezYI-kgS_EY",
"name": "AutoZone Auto Parts"
}
},
{
"radiusMetric": "mi",
"distance": 1,
"address": {
"id": 3477,
"formatted": "749 Wyckoff Ave, Ridgewood, NY 11385, USA",
"streetNumber": "749",
"street": "Wyckoff Avenue",
"streetAddress": "749 Wyckoff Avenue",
"subpremise": null,
"city": "Queens",
"state": "NY",
"zip": "11385",
"lat": "40.69917409999999",
"lng": "-73.90993320000001",
"googlePlaceId": "ChIJc8OlNSJcwokRaoNbuz8XsUI",
"name": "AutoZone Auto Parts"
}
}
],
"createdAt": "2020-03-27T21:59:37.566Z",
"updatedAt": "2020-04-06T16:02:15.373Z"
}
This endpoint loads the data for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/geo
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign Geo Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
selection | string | yes | ['city','congressionalDistrict', 'country', 'county', 'dma', 'state','zip'] |
geos | array of geo | no | |
radiusTargets | array radius | yes | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Campaign Geo geo Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
value | string | no |
Radius Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
radiusMetric | string | no | ['mi','ft'] |
distance | number | no | |
address | address object | no |
Address Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
formatted | string | yes | |
streetNumber | string | yes | |
street | string | yes | |
streetAddress | string | yes | |
subpremise | string | yes | |
city | string | yes | |
state | string | yes | |
zip | string | yes | |
lat | string | yes | |
lng | string | yes | |
googlePlaceId | string | yes | |
name | string | yes |
Load campaign geo detail (Beta)
curl "https://api.advisr.com/v1/campaign/862/geo" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"geos": [
{
"id": 16801,
"value": "Brooklyn, NY",
"type": "city",
},
{
"id": 17768,
"value": "Ridgewood, NY",
"type": "city",
},
{
"id": 213,
"value": "Virginia: 5th District",
"type": "congressionalDistrict"
},
{
"id": 598,
"value": "Kings County",
"type": "county"
}
],
"radiusTargets": [
{
"radiusMetric": "mi",
"distance": 1,
"address": {
"id": 3476,
"formatted": "535 Morgan Ave, Brooklyn, NY 11222, USA",
"streetNumber": "535",
"street": "Morgan Avenue",
"streetAddress": "535 Morgan Avenue",
"subpremise": null,
"city": "Brooklyn",
"state": "NY",
"zip": "11222",
"lat": "40.72266189999999",
"lng": "-73.9394867",
"googlePlaceId": "ChIJPZ2DWExZwokRezYI-kgS_EY",
"name": "AutoZone Auto Parts"
}
},
{
"radiusMetric": "mi",
"distance": 1,
"address": {
"id": 3477,
"formatted": "749 Wyckoff Ave, Ridgewood, NY 11385, USA",
"streetNumber": "749",
"street": "Wyckoff Avenue",
"streetAddress": "749 Wyckoff Avenue",
"subpremise": null,
"city": "Queens",
"state": "NY",
"zip": "11385",
"lat": "40.69917409999999",
"lng": "-73.90993320000001",
"googlePlaceId": "ChIJc8OlNSJcwokRaoNbuz8XsUI",
"name": "AutoZone Auto Parts"
}
}
],
"createdAt": "2020-03-27T21:59:37.566Z",
"updatedAt": "2020-04-06T16:02:15.373Z"
}
This endpoint loads the data for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/geo
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign Geo Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
geos | array of geo | no | |
radiusTargets | array radius | yes | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Campaign Geo geo Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
value | string | no | |
type | string | yes | ['city','congressionalDistrict', 'country', 'county', 'dma', 'state','zip','canadaProvince','canadaCity','canadaPostalcode'] |
Radius Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
radiusMetric | string | no | ['mi','ft','km','m'] |
distance | number | no | |
address | address object | no |
Address Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
formatted | string | yes | |
streetNumber | string | yes | |
street | string | yes | |
streetAddress | string | yes | |
subpremise | string | yes | |
city | string | yes | |
state | string | yes | |
zip | string | yes | |
lat | string | yes | |
lng | string | yes | |
googlePlaceId | string | yes | |
name | string | yes |
Load campaign audience detail
curl "https://api.advisr.com/v1/campaign/862/audience" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"categories": [
{
"id": 45,
"name": "Demographics",
"value": "demographics",
"subCategories": [
{
"id": 199,
"name": "age",
"value": "age",
"segments": [
{
"id": 2534,
"name": "25-34",
"value": "25"
},
{
"id": 2535,
"name": "35-44",
"value": "35"
},
{
"id": 2536,
"name": "45-54",
"value": "45"
}
]
},
{
"id": 200,
"name": "income",
"value": "income",
"segments": [
{
"id": 2546,
"name": "$60,000 to $74,999",
"value": "60"
},
{
"id": 2547,
"name": "$75,000 to $99,999",
"value": "75"
},
{
"id": 2539,
"name": "$100,000 to $124,999",
"value": "100"
},
{
"id": 2540,
"name": "$125,000 to $149,999",
"value": "125"
},
{
"id": 2541,
"name": "$150,000+",
"value": "150"
}
]
},
{
"id": 201,
"name": "gender",
"value": "gender",
"segments": [
{
"id": 2550,
"name": "Male",
"value": "m"
},
{
"id": 2549,
"name": "Female",
"value": "f"
}
]
},
{
"id": 202,
"name": "household",
"value": "household",
"segments": [
{
"id": 2551,
"name": "Household - No Children",
"value": "nokid"
},
{
"id": 2557,
"name": "Neighborhood - Urban",
"value": "urban"
},
{
"id": 2553,
"name": "Household - Married",
"value": "married"
},
{
"id": 2554,
"name": "Household - Single",
"value": "single"
}
]
}
]
},
{
"id": 46,
"name": "Interests",
"value": "interests",
"subCategories": [
{
"id": 203,
"name": "enthusiasts",
"value": "enthusiasts",
"segments": [
{
"id": 2560,
"name": "Auto Enthusiast",
"value": "auto"
},
{
"id": 2584,
"name": "Travel",
"value": "travel"
},
{
"id": 2573,
"name": "Foodie",
"value": "foodie"
},
{
"id": 2581,
"name": "Shopping Addict",
"value": "shopping"
},
{
"id": 2583,
"name": "Techie",
"value": "techie"
}
]
},
{
"id": 204,
"name": "shopping",
"value": "shopping",
"segments": [
{
"id": 2585,
"name": "Auto",
"value": "auto"
},
{
"id": 2590,
"name": "Movies, Music & Games",
"value": "movies"
},
{
"id": 2586,
"name": "Clothing, Shoes & Jewelry",
"value": "clothing"
},
{
"id": 2587,
"name": "Electronics",
"value": "electronics"
}
]
},
{
"id": 205,
"name": "lifestyle",
"value": "lifestyle",
"segments": [
{
"id": 2601,
"name": "Young & Hip",
"value": "hip"
},
{
"id": 2600,
"name": "Trendy Homemakers",
"value": "home"
},
{
"id": 2594,
"name": "High Spenders",
"value": "spend"
},
{
"id": 2596,
"name": "Leisure Travelers",
"value": "travel"
},
{
"id": 2593,
"name": "Fashionista",
"value": "fashion"
}
]
},
{
"id": 206,
"name": "occupation",
"value": "occupation",
"segments": [
{
"id": 2614,
"name": "Media & Communication",
"value": "media"
},
{
"id": 2611,
"name": "Management & Business",
"value": "manage"
},
{
"id": 2628,
"name": "Finance",
"value": "finance"
},
{
"id": 2630,
"name": "Real Estate",
"value": "real"
},
{
"id": 2613,
"name": "Marketing & Advertising",
"value": "market"
},
{
"id": 2629,
"name": "Health Care Professionals",
"value": "health"
},
{
"id": 2625,
"name": "Travel, Hospitality & Restaurant",
"value": "travel"
}
]
},
{
"id": 207,
"name": "search_history",
"value": "search_history",
"segments": [
{
"id": 2631,
"name": "Auto",
"value": "auto"
},
{
"id": 2634,
"name": "Clothing, Shoes & Jewelry",
"value": "clothing"
},
{
"id": 2636,
"name": "Digital Downloads",
"value": "digital"
},
{
"id": 2637,
"name": "Electronics",
"value": "electronics"
}
]
}
]
}
],
"createdAt": "2020-04-01T21:30:05.293Z",
"updatedAt": "2020-04-01T21:30:05.293Z"
}
This endpoint loads the data for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/audience
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign audience Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
categories | array of categories | no | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Campaign Audience Detail category Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | yes | |
value | string | yes | |
subCategories | array of subCategories | yes |
Campaign Audience Detail subCategory Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | yes | |
value | string | yes | |
segments | array of segments | yes |
Campaign Audience Detail segment Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | yes | |
value | string | yes |
Load campaign presentation
curl "https://api.advisr.com/v1/campaign/:id/presentation/:format" \
-H "token: api-token"
The above command returns JSON structured like this:
status=400
{"error":true,"message":"Presentation does not exist"}
OR
status=202
{"message": "PPTX export is pending"}
OR
status=200
Binary of File
This endpoint returns the binary pptx, or pdf file, a pending or error message specific campaign.
NOTE : campaign presentation must be created from within the User Interface
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/presentation/:format
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
format | pdf,pptx |
Presentation Properties
Parameter | Datatype | Description |
---|---|---|
error | boolean | |
message | string | |
status codes | int | pending-202, error-400, binary-200 |
List campaign files
curl "https://api.advisr.com/v1/campaign/862/files" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"fileCount": 2,
"files": [
{
"id": 34476,
"campaignId": 862,
"path": "assets.advisr.com/uploads/campaign-assets/862/files/a3ecdc39005cc2e05c5c6d09ef6fd26933d36d82",
"fileLink": "https://assets.advisr.com/uploads/campaign-assets/862/files/a3ecdc39005cc2e05c5c6d09ef6fd26933d36d82/Screenshot%202023-06-14%20at%203.07.59%20PM.png",
"name": "Sample Display Ad - Instagram",
"size": 488644,
"type": "Image",
"createdByUserGroupId": 242,
"isDeleted": false,
"createdAt": "2020-03-27T21:59:37.566Z",
"updatedAt": "2020-04-06T16:02:15.373Z"
},
{
"id": 48737,
"campaignId": 862,
"path": "assets.advisr.com/uploads/campaign-assets/862/files/29f9114f207e84c6eff0fada9cbf64260364f0b1",
"fileLink": "https://assets.advisr.com/uploads/campaign-assets/862/files/29f9114f207e84c6eff0fada9cbf64260364f0b1/Screenshot%202023-06-14%20at%203.08.04%20PM.png",
"name": "Sample Display Ad - Snapchat",
"size": 27866,
"type": "Image",
"createdByUserGroupId": 242,
"isDeleted": false,
"createdAt": "2023-07-10T14:33:26.464Z",
"updatedAt": "2023-07-10T14:33:26.464Z"
}
]
}
This endpoint lists the files uploaded for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/files
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Query Parameters
Parameter | Default | Description |
---|---|---|
limit | 10 | How many campaigns to return |
page | 1 | What page of the campaign results to return |
sort | updatedAt | The column to sort results by |
sortDesc | false | Sort the results decending |
interval | 10 | [createdAt, updatedAt, campaignDates] |
intervalStart | $now-7days | Datetime to start |
intervalEnd | $now | Datetime to End |
filters | [type, ownerUserCompanyGroupId] |
Files Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
fileCount | int | no | |
files | array of file objects | yes |
File Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
campaignId | int | no | |
name | string | no | |
createdByUserGroupId | int | no | |
size | int | no | |
type | string | no | |
path | string | no | |
fileLink | string | no | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Load campaign export
curl "https://api.advisr.com/v1/campaign/:id/export/:export_type" \
-H "token: api-token"
The above command returns JSON structured like this:
status=400
{"error":true,"message":"Campaign not complete"}
OR
status=202
{"message": "Xlxs export is pending"}
OR
status=200
Binary of File
This endpoint returns the binary xlxs file, a pending or error message specific campaign.
NOTE : campaign must be completed from within the User Interface to download the export
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/export/:export_type
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
export_type | io,full |
Export Properties
Parameter | Datatype | Description |
---|---|---|
error | boolean | |
message | string | |
status codes | int | pending-202, error-400, binary-200 |
Load all campaign support-submission details
curl "https://api.advisr.com/v1/campaign/862/support-submissions" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"results": [
{
"id": 11,
"name": "CampaignSupport",
"displayName": "CampaignSupport",
"type": "support",
"description": "Campaign support for all campaigns",
"status": "submitted",
"submittedAt": "2020-01-13 19:08:51",
"submittedBy": {
"id": 111,
"firstName": "Peter",
"lastName": "Johnson",
"fullName": "Peter Johnson",
"email": "pj@advisremail.com"
},
"hasForm": true,
"form": {
"id": 9,
"name": "submission form",
"sections": [
{
"id": 11,
"name": "General Details",
"key": "details",
"subsections": [
{
"id": 20,
"name": "General Details",
"key": "details",
"isRepeatable": false,
"fields": [
{
"id": 12,
"name": "Request Type",
"key": "Request Type",
"type": "MultiSelect",
"required": true,
"helpText": null
},
{
"id": 13,
"name": "Best Way to Connect",
"key": "Best Way to Connect",
"type": "Select",
"required": false,
"helpText": null
}
],
"data": [
{
"id": 12,
"key": "Request Type",
"values": [
[
{
"text": "Review Proposal",
"value": "Review Proposal"
}
],
[
{
"text": "Discuss Capabilities",
"value": "Discuss Capabilities"
}
]
]
},
{
"id": 13,
"key": "Best Way to Connect",
"values": [
{
"text": "Email",
"value": "email"
}
]
}
]
},
{
"id": 13,
"name": "Additional contacts",
"key": null,
"isRepeatable": true,
"fields": [
{
"id": 15,
"name": "contactName",
"key": "contactName",
"type": "Text",
"required": true,
"helpText": null
},
{
"id": 16,
"name": "contactEmail",
"key": "contactEmail",
"type": "Text",
"required": false,
"helpText": null
}
],
"data": [
[
{
"id": 15,
"key": "contactName",
"values": "Frank Stevens"
},
{
"id": 16,
"key": "contactEmail",
"values": "another@email.com"
}
],
[
{
"id": 15,
"key": "contactName",
"values": "Joe Graham"
},
{
"id": 16,
"key": "contactEmail",
"values": "user@email.com"
}
]
]
}
]
}
]
},
"createdAt": "2020-04-08T13:53:33.605Z",
"updatedAt": "2020-04-08T13:53:43.356Z"
}
]
}
This endpoint loads the data for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/support-submissions
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign Submission Support Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
results | array of submissions | yes | |
id | int | yes | |
name | string | yes | |
displayName | string | yes | |
type | string | no | ['support','fulfillment'] |
status | string | no | ['submitted','ready','pending','in_progress'] |
submittedAt | dateTime | yes | |
submittedBy | user object | yes | |
hasForm | boolean | no | |
form | form object | yes | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Campaign Submission form Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
key | string | yes | |
sections | array of sections | no |
Campaign Submission section Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
key | string | yes | |
Subsections | array of sections | no |
Campaign Submission subSection Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
key | string | yes | |
isRepeatable | boolean | no | |
fields | array of fields | yes | |
data | array of data | yes |
Campaign Submission field Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
field | string | yes | |
type | string | no | ['Boolean', 'CompanySearch', 'Currency', 'Date', 'Empty', 'File', 'Multiline', 'Multiselect', 'MultiselectOverlay', 'Number', 'Phone', 'Radio', 'Select', 'Static', 'String', 'ToggleButtons'] |
required | boolean | no | |
helpText | string | yes |
Campaign Submission data Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
field | string | yes | |
value | string | yes |
Load campaign fulfillment submissions
curl "https://api.advisr.com/v1/campaign/862/fulfillment-submissions" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"results": [
{
"id": 13,
"name": "CampaignSubmission",
"displayName": "CampaignSubmission",
"type": "fulfillment",
"description": "Campaign Submission for all campaigns",
"status": "submitted",
"submittedAt": "2020-01-13 19:08:51",
"submittedBy": {
"id": 111,
"firstName": "Peter",
"lastName": "Johnson",
"fullName": "Peter Johnson",
"email": "pj@advisremail.com"
},
"hasForm": true,
"form": {
"id": 9,
"name": "submission form",
"sections": [
{
"id": 11,
"name": "General Details",
"key": "details",
"subsections": [
{
"id": 20,
"name": "General Details",
"key": "details",
"isRepeatable": false,
"fields": [
{
"id": 12,
"name": "Request Type",
"key": "Request Type",
"type": "MultiSelect",
"required": true,
"helpText": null
},
{
"id": 13,
"name": "Best Way to Connect",
"key": "Best Way to Connect",
"type": "Select",
"required": false,
"helpText": null
}
],
"data": [
{
"id": 12,
"key": "Request Type",
"values": [
[
{
"text": "Review Proposal",
"value": "Review Proposal"
}
],
[
{
"text": "Discuss Capabilities",
"value": "Discuss Capabilities"
}
]
]
},
{
"id": 13,
"key": "Best Way to Connect",
"values": [
{
"text": "Email",
"value": "email"
}
]
}
]
},
{
"id": 13,
"name": "Additional contacts",
"key": null,
"isRepeatable": true,
"fields": [
{
"id": 15,
"name": "contactName",
"key": "contactName",
"type": "Text",
"required": true,
"helpText": null
},
{
"id": 16,
"name": "contactEmail",
"key": "contactEmail",
"type": "Text",
"required": false,
"helpText": null
}
],
"data": [
[
{
"id": 15,
"key": "contactName",
"values": "Frank Stevens"
},
{
"id": 16,
"key": "contactEmail",
"values": "another@email.com"
}
],
[
{
"id": 15,
"key": "contactName",
"values": "Joe Graham"
},
{
"id": 16,
"key": "contactEmail",
"values": "user@email.com"
}
]
]
}
]
}
]
},
"createdAt": "2020-04-08T13:53:33.605Z",
"updatedAt": "2020-04-08T13:53:43.356Z"
}
]
}
This endpoint loads the data for all fulfillment submissions for a specific campaign.
HTTP Request
GET https://api.advisr.com/v1/campaign/:id/fulfillment-submissions
URL Parameters
Parameter | Description |
---|---|
id | The campaign id to load |
Campaign Submission Fulfillment Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
results | array of submissions | yes | |
id | int | yes | |
name | string | yes | |
type | string | no | ['support','fulfillment'] |
displayName | string | yes | |
status | string | no | ['submitted','ready'] |
submittedAt | dateTime | yes | |
submittedBy | user object | yes | |
hasForm | boolean | no | |
form | form object | yes | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Campaign Submission form Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
key | string | yes | |
sections | array of sections | no |
Campaign Submission section Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
key | string | yes | |
Subsections | array of sections | no |
Campaign Submission subSection Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
key | string | yes | |
isRepeatable | boolean | no | |
fields | array of fields | yes | |
data | array of data | yes |
Campaign Submission field Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
name | string | yes | |
field | string | yes | |
type | string | no | ['Boolean', 'CompanySearch', 'Currency', 'Date', 'Empty', 'File', 'Multiline', 'Multiselect', 'MultiselectOverlay', 'Number', 'Phone', 'Radio', 'Select', 'Static', 'String', 'ToggleButtons'] |
required | boolean | no | |
helpText | string | yes |
Campaign Submission data Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | yes | |
field | string | yes | |
values | string or array | yes |
Product
List products
curl "https://api.advisr.com/v1/products?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 3,
"name": "Direct Mail",
"companyId": 1,
"companyGroupName": null,
"companyGroupId": null,
"isActive": true,
"createdAt": "2019-03-28T13:18:15.815Z",
"updatedAt": "2020-08-31T14:32:45.406Z"
},
{
"id": 523,
"name": "Preroll",
"companyId": 1,
"companyGroupName": null,
"companyGroupId": null,
"isActive": true,
"createdAt": "2019-03-28T13:18:15.815Z",
"updatedAt": "2020-08-31T14:32:45.406Z"
},
{
"id": 526,
"name": "Facebook",
"companyId": 1,
"companyGroupId": 13,
"companyGroupName": "Advisr East",
"isActive": true,
"createdAt": "2019-03-28T13:18:15.815Z",
"updatedAt": "2020-08-31T14:32:45.406Z"
}
]
}
This endpoint retrieves the product list for company
HTTP Request
GET https://api.advisr.com/v1/products
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many users to return |
companyGroupId | false | The company group to retrieve products for | |
page | false | 1 | What page of the products results to return |
includeInactive | false | false | |
sort | false | name | The column to sort results by |
sortDesc | false | false | Sort the results decending |
search | false | Search name string to limit products results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of users | no | |
id | int | no | |
name | string | no | |
companyId | int | no | |
companyGroupId | int | yes | if company product then null |
companyGroupName | string | yes | |
isActive | boolean | no | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Load product
curl "https://api.advisr.com/v1/product/9" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 9,
"name": "Direct Mail",
"companyId": 1,
"companyGroupId": null,
"isActive": true,
"isService": false,
"description": "Direct Mail targeted to relevant customers within your target area",
"minSpend": 0,
"maxSpend": null,
"minMonthlySpend": 0,
"minRunDays": 1,
"includeInNewGroups": true,
"showDefaultSlide": true,
"logo": null,
"addonType": "subProducts",
"subProductLabel": "Screen type ",
"vendorId": 1,
"vendorName": "google",
"reportingCategoryId": 3,
"reportingCategoryName": "O&O",
"productCategory": {
"id": 4,
"name": "Direct Mail",
"parentId": null,
"parentName": null
},
"includedCompanyGroups": [
{
"id": 3,
"name": "Internal Group"
},
{
"id": 4,
"name": "Advisr East"
}
],
"customFields": [
{
"categoryKey": "sfdc",
"name": "Id",
"key": "id",
"isArray": false,
"type": "text",
"value": "1123",
"updatedAt": "2020-08-11T12:09:46.992Z"
}
],
"createdAt": "2019-03-28T13:18:15.815Z",
"updatedAt": "2020-08-31T14:32:45.406Z"
}
This endpoint loads the product by id.
HTTP Request
GET https://api.advisr.com/v1/product/:id
URL Parameters
Parameter | Description |
---|---|
id | The product id to load |
Product Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
companyId | int | no | |
companyGroupId | int | no | |
isActive | boolean | no | |
isService | boolean | no | |
description | string | no | HTML |
minSpend | int | yes | |
maxSpend | int | yes | |
minMonthlySpend | int | yes | |
includeNewGroups | boolean | no | |
showDefaultSlide | boolean | no | |
logo | url | yes | |
addOnType | string | yes | SubProducts,Attributes |
subProductLabel | string | yes | |
vendorId | int | yes | |
vendorName | string | yes | |
reportingCategoryId | int | yes | |
reportingCategoryName | string | yes | |
productCategory | object | no | |
includedCompaignGroups | array companyGroup objects | yes | id,name |
customFields | array of custom field objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Products CompanyGroup Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no |
ProductCategory Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
parentId | int | yes | |
parentName | string | yes |
User
List users
curl "https://api.advisr.com/v1/users?companyGroupId=1&limit=10&page=1&sort=email&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 3,
"firstName": "Joe",
"lastName": "Advisr",
"fullName": "Joe Advisr",
"email": "joe@advisr.com",
"isActive": true,
"isAdvisrEmployee": true,
"createdAt": "2018-04-18T20:26:05.566Z",
"updatedAt": "2019-01-23T20:37:33.537Z"
},
{
"id": 2,
"firstName": "Michelle",
"lastName": "Smith",
"fullName": "Michelle Smith",
"email": "michelle@station.com",
"isActive": true,
"isAdvisrEmployee": false,
"createdAt": "2018-04-18T20:26:05.566Z",
"updatedAt": "2019-01-23T20:37:33.537Z"
}
]
}
This endpoint retrieves the user list for company
HTTP Request
GET https://api.advisr.com/v1/users
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
companyGroupId | false | only retrieve users with a userCompanyGroup and status for that userCompanyGroup in the specified CompanyGroup | |
limit | false | 10 | How many users to return |
page | false | 1 | What page of the users results to return |
sort | false | lastName | The column to sort results by |
sortDesc | false | false | Sort the results decending |
includeAdvisrEmployees | false | false | |
search | false | Search firstName, lastName and email string to limit user results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of users | no | |
id | int | no | |
firstName | string | no | |
lastName | string | no | |
fullName | string | no | |
string | no | ||
isActive | boolean | no | |
isAdvisrEmployee | boolean | no | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Load user
curl "https://api.advisr.com/v1/user/3" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 3,
"firstName": "Joe",
"lastName": "Advisr",
"fullName": "Joe Advisr",
"email": "joe@advisr.com",
"avatar": "https://assets.advisr.com/uploads/avatars/0937524ae9665934b5ca97f727a29e11f0918c4b.jpg",
"mobilePhone": "(617) 270-8555",
"officePhone": null,
"isActive": true,
"isAdvisrEmployee": false,
"userCompanyGroups": [
{
"id": 7,
"userId": 3,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"isActive": true,
"title": "Sales Manager",
"isCampaignOwner": true,
"createdAt": "2019-12-18T01:22:10.486Z",
"updatedAt": "2019-12-18T01:22:10.486Z",
"userRoles": [
{
"id": 3,
"name": "Peter's Role",
"companyId": 1,
"companyGroupId": null,
"isCompanyOwned" : true
},
{
"id": 4,
"companyId": 1,
"companyGroupId": 3,
"name": "Another role",
"isCompanyOwned" : false
}
],
"customFields": [
{
"categoryKey": "sfdc",
"name": "User Id",
"key": "user_id",
"isArray": false,
"type": "text",
"value": "12421512",
"updatedAt": "2020-08-11T12:09:46.992Z"
}
]
},
{
"id": 167,
"userId": 3,
"companyGroupId": 8,
"companyGroupName": "Advisr West",
"isActive": true,
"title": "Sales rep",
"isCampaignOwner": true,
"createdAt": "2020-02-11T16:57:24.032Z",
"updatedAt": "2020-02-11T16:57:24.032Z",
"userRoles": [],
"customFields": []
}
],
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
}
This endpoint loads the user requested by email.
HTTP Request
GET https://api.advisr.com/v1/user/:id
URL Parameters
Parameter | Description |
---|---|
id | The user id to load |
User Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
firstName | string | no | |
lastName | string | no | |
fullName | string | no | |
string | no | ||
avatar | string | yes | url of avatar |
mobilePhone | string | yes | |
officePhone | string | yes | |
isActive | boolean | no | isActive for at least one UserCompanyGroup |
isAdvisrEmployee | boolean | no | |
userCompanyGroups | array of userCompanyGroup Objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
UserCompanyGroup Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
userId | int | no | |
companyId | int | no | |
companyGroupId | int | no | |
companyGroupName | string | no | |
isActive | boolean | no | |
title | string | yes | |
isCampaignOwner | boolean | no | |
createdAt | datetime | no | |
updatedAt | datetime | no | |
userRoles | array of userRole Objects | yes | |
permissionGroups | array of permissionGroup Objects | yes | |
ssoProviders | array of ssoProvider Objects | yes | |
customFields | array of custom field objects | yes |
UserRoles Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
companyId | int | no | |
companyGroupId | int | yes | |
isCompanyOwned | boolean | no |
Load user by email
curl "https://api.advisr.com/v1/user/load-by-email?email=joe@advisr.com" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 3,
"firstName": "Joe",
"lastName": "Advisr",
"fullName": "Joe Advisr",
"email": "joe@advisr.com",
"avatar": "https://assets.advisr.com/uploads/avatars/0937524ae9665934b5ca97f727a29e11f0918c4b.jpg",
"mobilePhone": "(617) 270-8555",
"officePhone": null,
"createdAt": "2019-03-28T13:22:25.892Z",
"updatedAt": "2020-03-11T12:09:46.992Z",
"isAdvisrEmployee": false,
"userCompanyGroups": [
{
"id": 7,
"userId": 3,
"companyId": 1,
"companyGroupId": 1,
"companyGroupName": "Advisr East",
"isActive": true,
"title": "Sales Manager",
"isCampaignOwner": true,
"createdAt": "2019-12-18T01:22:10.486Z",
"updatedAt": "2019-12-18T01:22:10.486Z",
"userRoles": [
{
"id": 3,
"name": "Peter's Role",
"companyId": 1,
"companyGroupId": null,
"isCompanyOwned" : true
},
{
"id": 4,
"companyId": 1,
"companyGroupId": 3,
"name": "Another role",
"isCompanyOwned" : false
}
],
"customFields": [
{
"categoryKey": "sfdc",
"name": "User Id",
"key": "user_id",
"isArray": false,
"type": "text",
"value": "12421512",
"updatedAt": "2020-08-11T12:09:46.992Z"
}
]
},
{
"id": 167,
"userId": 3,
"companyGroupId": 8,
"companyGroupName": "Advisr West",
"isActive": true,
"title": "Sales rep",
"isCampaignOwner": true,
"createdAt": "2020-02-11T16:57:24.032Z",
"updatedAt": "2020-02-11T16:57:24.032Z",
"userRoles": [],
"customFields": []
}
],
"createdAt": "2020-04-02T14:45:26.184Z",
"updatedAt": "2020-04-02T14:48:12.840Z"
}
This endpoint loads the user requested by email.
HTTP Request
GET https://api.advisr.com/v1/user/user-by-email?email=joe@advisr.com
URL Parameters
Parameter | Description |
---|---|
id | The user id to load |
User Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
firstName | string | no | |
lastName | string | no | |
fullName | string | no | |
string | no | ||
avatar | string | yes | url of avatar |
mobilePhone | string | yes | |
officePhone | string | yes | |
isAdvisrEmployee | boolean | no | |
userCompanyGroups | array of userCompanyGroup Objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
UserCompanyGroup Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
userId | int | no | |
companyId | int | no | |
companyGroupId | int | no | |
companyGroupName | string | no | |
isActive | boolean | no | |
title | string | yes | |
isCampaignOwner | boolean | no | |
createdAt | datetime | no | |
updatedAt | datetime | no | |
userRoles | array of userRole Objects | yes | |
customFields | array of custom field objects | yes |
UserRoles Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
companyId | int | no | |
companyGroupId | int | yes | |
isCompanyOwned | boolean | no |
Industry & Category
List industries
curl "https://api.advisr.com/v1/industries?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 1,
"name": "Airlines & Travel",
"companyId": 1,
"isDeleted": false,
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
},
{
"id": 2,
"name": "Auto",
"companyId": 1,
"isDeleted": false,
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
},
{
"id": 3,
"name": "Broadcast & Publishing",
"companyId": 1,
"isDeleted": false,
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
}
]
}
This endpoint retrieves the Industry list for the company
HTTP Request
GET https://api.advisr.com/v1/industries
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many industries to return |
page | false | 1 | What page of the results to return |
includeDeleted | false | false | |
sort | false | name | The column to sort results by |
sortDesc | false | false | Sort the results decending |
search | false | Search name string to limit results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of industries | no | |
id | int | no | |
name | string | no | |
companyId | int | no | |
isDeleted | boolean | no | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Load industry
curl "https://api.advisr.com/v1/industry/1" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 3,
"name": "Broadcast & Publishing",
"companyId": 1,
"isDeleted": false,
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
}
This endpoint loads the Industry
HTTP Request
GET https://api.advisr.com/v1/industry/:id
URL Parameters
Parameter | Description |
---|---|
id | The industry id to load |
Industry Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
companyId | int | no | |
isDeleted | boolean | no | |
createdAt | datetime | no | |
updatedAt | datetime | no |
List industry categories
curl "https://api.advisr.com/v1/industry-categories?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 35,
"name": "Amusement Parks",
"industryId": 7,
"industryName": "Entertainment & Amusement",
"isDeleted": false,
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
},
{
"id": 18,
"name": "Apartment Operators",
"industryId": 4,
"industryName": "Business Services",
"isDeleted": false,
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
},
{
"id": 62,
"name": "Apparel and Accessory Stores-Retail",
"industryId": 13,
"industryName": "Retail",
"isDeleted": false,
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
}
]
}
This endpoint retrieves the Industry Categories list for the company
HTTP Request
GET https://api.advisr.com/v1/industry-categories
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many industries to return |
page | false | 1 | What page of the results to return |
includeDeleted | false | false | |
sort | false | name | The column to sort results by |
sortDesc | false | false | Sort the results decending |
search | false | Search name string to limit results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of industries | no | |
id | int | no | |
name | string | no | |
companyId | int | no | |
isDeleted | boolean | no | |
createdAt | datetime | no | |
updatedAt | datetime | no |
Load industry category
curl "https://api.advisr.com/v1/industry-category/35" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 35,
"name": "Amusement Parks",
"industryId": 7,
"industryName": "Entertainment & Amusement",
"dataSetCategoryId": "1212",
"dataSetCategoryName": "Amusement Parks",
"isDeleted": false,
"customFields": [
{
"categoryKey": "sfdc",
"name": "Id",
"key": "id",
"isArray": false,
"type": "text",
"value": "1",
"updatedAt": "2020-08-11T12:09:46.992Z"
}
],
"createdAt": "2019-03-28T13:18:15.514Z",
"updatedAt": "2019-03-28T13:18:15.514Z"
}
This endpoint loads the Industry Category
HTTP Request
GET https://api.advisr.com/v1/industry-category/:id
URL Parameters
Parameter | Description |
---|---|
id | The industryCategory id to load |
IndustryCategory Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
name | string | no | |
industryId | int | no | |
industryName | string | no | |
dataSetCategoryId | string | no | |
dataSetCategoryName | string | no | |
isDeleted | boolean | no | |
customFields | array of custom field objects | yes | |
createdAt | datetime | no | |
updatedAt | datetime | no |
List goals for industry category
curl "https://api.advisr.com/v1/industry-category/:id/goals?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 1,
"name": "Ad Engagement",
"externalLookupId": "12345"
},
{
"id": 2,
"name": "Website Traffic",
"externalLookupId": "37847"
},
{
"id": 3,
"name": "Reach",
"externalLookupId": "84887"
}
]
}
This endpoint retrieves the goals list for the industry category
HTTP Request
GET https://api.advisr.com/v1/industry-category/:id/goals
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many goals to return |
page | false | 1 | What page of the results to return |
sort | false | name | The column to sort results by |
sortDesc | false | false | Sort the results decending |
search | false | Search name string to limit results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of goals | no | |
id | int | no | |
name | string | no | |
externalLookupId | string | yes |
Goal
List goals
curl "https://api.advisr.com/v1/goals?limit=10&page=1&sort=name&sortDesc=false&search=" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"page": 1,
"hasMore": false,
"results": [
{
"id": 1,
"name": "Ad Engagement",
"externalLookupId": "12345"
},
{
"id": 2,
"name": "Website Traffic",
"externalLookupId": "37847"
},
{
"id": 3,
"name": "Reach",
"externalLookupId": "84887"
}
]
}
This endpoint retrieves the goals list for the company
HTTP Request
GET https://api.advisr.com/v1/goals
Query Parameters
Parameter | Required | Default | Description |
---|---|---|---|
limit | false | 10 | How many goals to return |
page | false | 1 | What page of the results to return |
sort | false | name | The column to sort results by |
sortDesc | false | false | Sort the results decending |
search | false | Search name string to limit results by |
List fields Properties
Value | Datatype | Nullable | Description |
---|---|---|---|
page | int | no | |
hasMore | boolean | no | |
results | array of goals | no | |
id | int | no | |
name | string | no | |
externalLookupId | string | yes |
File
Load File
curl "https://api.advisr.com/v1/file/34476" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 34476,
"campaignId": 862,
"path": "assets.advisr.com/uploads/campaign-assets/862/files/a3ecdc39005cc2e05c5c6d09ef6fd26933d36d82",
"fileLink": "https://assets.advisr.com/uploads/campaign-assets/862/files/a3ecdc39005cc2e05c5c6d09ef6fd26933d36d82/Screenshot%202023-06-14%20at%203.07.59%20PM.png",
"name": "Sample Display Ad - Instagram",
"size": 488644,
"type": "Image",
"createdByUserGroupId": 242,
"isDeleted": false,
"createdAt": "2020-03-27T21:59:37.566Z",
"updatedAt": "2020-04-06T16:02:15.373Z"
}
This endpoint loads the file by id.
HTTP Request
GET https://api.advisr.com/v1/file/:id
URL Parameters
Parameter | Description |
---|---|
id | The file id to load |
File Object Properties
Parameter | Datatype | Nullable | Description |
---|---|---|---|
id | int | no | |
campaignId | int | no | |
name | string | no | |
createdByUserGroupId | int | no | |
size | int | no | |
type | string | no | |
path | string | no | |
fileLink | string | no | |
createdAt | timestamp | no | |
updatedAt | timestamp | no |
Export
Export Process
REST API for Data Retrieval
Request a report:
POST https://api.advisr.com/v1/export/request/:object
(export JSON)
Request the status of a report:
GET https://api.advisr.com/v1/export/status/:exportId
Retrieve export data:
GET https://api.advisr.com/v1/export/download/:exportId
Client Export
curl "https://api.advisr.com/v1/export/request/client" \
-H "token: api-token"\
-d '{
"export": {
"interval": "createdAt",
"intervalStart" : "2020-04-02T00:00:00.000Z",
"intervalEnd" : "2020-04-04T00:00:00.000Z",
"filters": {"companyGroupId":[1,2]},
"columns" : ["id","name","companyId","companyName","companyGroupId","companyGroupName","deleted","industryCategoryId","industryCategoryName","industryId","industryName","ownerUserCompanyGroupIds","ownerEmails","createdByUserCompanyGroupId","createdByUserEmail","createdByUserId","createdAt","updatedAt"],
"header" : true,
"format": "csv"
}
}'
The request response JSON is structured like this:
{
"status": "pending",
"exportId": "294d5b5709eafe9aee82f5c1a534gc123"
}
This endpoint retrieves the client export for the company of the API token.
HTTP Request
POST https://api.advisr.com/v1/export/request/client
Post Parameters
Parameter | Required | Default | Description |
---|---|---|---|
interval | true | 10 | [createdAt, updatedAt, campaignDates] |
intervalStart | true | $now-7days | Datetime to start |
intervalEnd | false | $now | Datetime to End |
filters | false | false | [companyGroupId,ownerUserCompanyGroupId,ownerIncludeAdvisrEmployee] |
columns | false | see table | see table |
header | false | true | |
format | false | csv | [csv] |
Client export Properties
Parameter | Datatype | on by Default | Nullable | Description |
---|---|---|---|---|
id | int | yes | no | |
name | string | yes | no | |
companyId | int | yes | no | |
companyName | string | yes | no | |
companyGroupId | int | yes | no | |
companyGroupName | string | yes | no | |
companyGroupStation | string | no | yes | |
companyGroupRegion | string | no | yes | |
deleted | boolean | yes | no | |
primaryContactName | string | no | yes | |
primaryContactPhone | string | no | yes | |
primaryContactEmail | string | no | yes | |
logoUrl | string | no | yes | |
website | string | no | yes | |
string | no | yes | ||
string | no | yes | ||
hasAgency | boolean | no | no | |
agencyName | string | no | yes | |
agencyContact | string | no | yes | |
industryCategoryId | int | yes | no | |
industryCategoryName | string | yes | no | |
industryId | int | yes | no | |
industryName | string | yes | no | |
type | string | no | no | ['local', 'national'] |
ownerUserCompanyGroupIds | array - userCompanyGroup id's | yes | no | |
ownerEmails | array - owner emails | yes | no | |
createdByUserCompanyGroupId | int | yes | no | |
createdByUserEmail | int | yes | no | |
createdByUserId | int | yes | no | |
custom.client.$categoryKey.$fieldKey | number,string | no | yes | |
custom.industryCategory.$categoryKey.$fieldKey | number,string | no | yes | |
custom.company.$categoryKey.$fieldKey | number,string | no | yes | |
custom.companyGroup.$categoryKey.$fieldKey | number,string | no | yes | |
createdAt | datetime | yes | no | |
updatedAt | datetime | yes | no |
Campaign Export
curl "https://api.advisr.com/v1/export/request/campaign" \
-H "token: api-token"\
-d '{
"export": {
"interval": "createdAt",
"intervalStart" : "2020-04-02T00:00:00.000Z",
"intervalEnd" : "2020-04-04T00:00:00.000Z",
"filters": {"companyGroupId":1},
"columns" : ["id","name","creationFlow","deleted","startDate","endDate","status","industryCategoryId","industryCategoryName","budget","clientId","clientName","companyGroupId","companyGroupName","companyId","companyName","completedAt","readyToSubmit","submittedAt","ownerUserCompanyGroupId","ownerUserId","ownerName","ownerEmail","ownerGroupId","ownerGroupName","submittedByUserId","createdByUserEmail","createdAt","updatedAt"],
"header" : true,
"format": "csv"
}
}'
The request response JSON is structured like this:
{
"status": "pending",
"exportId": "294d5b5709eafe9aee82f5c1a534gc123"
}
This endpoint retrieves the campaign export for the company of the API token.
HTTP Request
POST https://api.advisr.com/v1/export/request/campaign
Post Parameters
Parameter | Required | Default | Description |
---|---|---|---|
interval | true | createdAt | [createdAt, updatedAt,campaignDates] |
intervalStart | true | $now-7days | Datetime to start |
intervalEnd | false | $now | Datetime to End |
filters | false | ownerIncludeAdvisrEmployee :false | [companyGroupId,ownerUserCompanyGroupId,ownerUserId,ownerIncludeAdvisrEmployee] |
columns | false | see table | see table |
header | false | true | |
format | false | csv | [csv] |
Campaign Export Properties
Parameter | Datatype | On by Default | Nullable | Description |
---|---|---|---|---|
id | int | yes | no | |
name | string | yes | no | |
creationFlow | string | yes | no | |
deleted | boolean | yes | no | |
description | string | no | yes | |
startDate | date | yes | yes | |
endDate | date | yes | yes | |
status | string | yes | no | defaults:-[ 'New', 'Open', 'Editing', 'Closed - Won', 'Closed - Lost', 'Testing'] |
statusKey | string | yes | no | defaults:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
state | string | yes | no | fixed:-[ 'new', 'open', 'editing', 'submitted', 'closed-lost' ] |
submittedStatus | string | yes | no | fixed:-[ null, 'failed', 'success' ] |
industryCategoryId | int | yes | no | |
industryCategoryName | string | yes | no | |
industryId | int | no | no | |
industryName | string | no | no | |
budget | number | yes | yes | |
clientId | int | yes | no | |
clientName | string | yes | no | |
companyGroupId | int | yes | no | |
companyGroupName | string | yes | no | |
companyGroupStation | string | no | yes | |
companyGroupRegion | string | no | yes | |
companyId | int | yes | no | |
companyName | string | yes | no | |
completedAt | datetime | yes | yes | |
primaryGoalId | int | no | yes | |
primaryGoalName | string | no | yes | |
secondaryGoalId | int | no | yes | |
secondaryGoalName | string | no | yes | |
presentationlLink | string | no | yes | |
readyToSubmit | boolean | yes | no | |
submittedAt | datetime | yes | yes | |
ownerUserCompanyGroupId | int | yes | no | |
ownerUserId | int | yes | no | |
ownerName | string | yes | no | |
ownerEmail | string | yes | no | |
ownerGroupId | int | yes | no | |
ownerGroupName | string | yes | no | |
ownerIsAdvisrEmployee | boolean | no | no | |
createdByUserCompanyGroupId | int | no | no | |
createdByUserId | int | no | no | |
submittedByUserId | int | yes | yes | |
createdByUserEmail | string | yes | no | |
custom.client.$categoryKey.$fieldKey | number,string | no | yes | |
custom.campaign.$categoryKey.$fieldKey | number,string | no | yes | |
custom.industryCategory.$categoryKey.$fieldKey | number,string | no | yes | |
custom.owner.$categoryKey.$fieldKey | number,string | no | yes | |
custom.company.$categoryKey.$fieldKey | number,string | no | yes | |
custom.companyGroup.$categoryKey.$fieldKey | number,string | no | yes | |
createdAt | datetime | yes | no | |
updatedAt | datetime | yes | no |
Campaign Products Export
curl "https://api.advisr.com/v1/export/request/campaign-products" \
-H "token: api-token"\
-d '{
"export": {
"interval": "createdAt",
"intervalStart" : "2020-04-02T00:00:00.000Z",
"intervalEnd" : "2020-04-04T00:00:00.000Z",
"filters": {"companyGroupId":[1]},
"columns" : ["id","name","productId","productName","spend","isService","createdAt","updatedAt"],
"header" : true,
"format": "csv"
}
}'
The request response JSON is structured like this:
{
"status": "pending",
"exportId": "294d5b5709eafe9aee82f5c1a534gc123"
}
This endpoint retrieves the campaign products for the company of the API token.
HTTP Request
POST https://api.advisr.com/v1/export/request/campaign-products
Post Parameters
Parameter | Required | Default | Description |
---|---|---|---|
interval | true | updatedAt | [createdAt, updatedAt, campaignDates] |
intervalStart | true | $now-7days | Datetime to start |
intervalEnd | false | $now | Datetime to End |
filters | false | ownerIncludeAdvisrEmployee:false | [companyGroupId,ownerUserCompanyGroupId,ownerUserId,ownerIncludeAdvisrEmployee] |
columns | false | see table | see table |
header | false | true | |
format | false | csv | [csv] |
Campaign Products Export Properties
Parameter | Datatype | On by Default | Nullable | Description |
---|---|---|---|---|
id | int | yes | no | |
name | string | yes | no | |
productId | int | yes | no | |
productName | string | yes | no | |
spend | number | yes | yes | |
isService | boolean | yes | no | |
vendorId | int | no | yes | |
vendorName | string | no | yes | |
reportingCategoryId | int | no | yes | |
reportingCategoryName | string | no | yes | |
custom.product.$categoryKey.$fieldKey | number,string | no | yes | |
createdAt | datetime | yes | no | |
updatedAt | datetime | yes | no |
Retrieval of an Export
curl "https://api.advisr.com/v1/export/status/:exportId" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"status": "ready",
"createdAt": "2020-04-20T18:15:48.124Z",
"hasMore": false,
"rowCount": "1500",
"url": "https://api.advisr.com/export/download/294d5b5709eafe9aee82f5c1a534gc123"
}
curl "https://api.advisr.com/v1/export/download/:exportId" \
-H "token: api-token"\
The above command returns the CSV file:
This endpoint retrieves export status and download url.
HTTP Request
GET https://api.advisr.com/v1/export/status/:exportId
Query Parameters
Parameter | Description |
---|---|
exportId | The export Id |
Custom Fields
Load custom fields
curl "https://api.advisr.com/v1/custom-fields/:objectType/:id" \'
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 392,
"name": "New Campaign",
"objectType" : "campaign",
"customFields": [
{
"categoryKey": "sfdc",
"name": "Opportunity Id",
"key": "opportunity_id",
"isArray": false,
"type": "text",
"value": "12421512",
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Comments",
"key": "comments",
"isArray": false,
"type": "textarea",
"value": "These are comments that can be left by a user",
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Id",
"key": "opportunity_id",
"isArray": false,
"type": "number",
"value": 12421512,
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Amount",
"key": "opportunity_amount",
"isArray": false,
"type": "currency",
"value": 10000,
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Close Date",
"key": "opportunity_close_date",
"isArray": false,
"type": "datetime",
"value": "2023-01-11T12:09:46.992Z",
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Active",
"key": "opportunity_active",
"isArray": false,
"type": "boolean",
"value": true,
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Status",
"key": "opportunity_status",
"isArray": true,
"type": "select",
"value": "client_review",
"valueOptions": [
{ "value": "client_review", "name": "Client Review" }
],
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Category",
"key": "opportunity_category",
"isArray": true,
"type": "multiselect",
"value": [
"retail",
"amusement_parks"
],
"valueOptions": [
{ "value": "retail", "name": "Retail" },
{ "value": "amusement_parks", "name": "Amusement Parks" }
],
"updatedAt": "2022-08-11T12:09:46.992Z"
}
]
}
This endpoint returns all customFields that have values for the object.
HTTP Request
GET https://api.advisr.com/v1/custom-fields/:objectType/:id
URL Parameters
Parameter | Required | Description |
---|---|---|
id | true | The object's id to request |
objectType | true | object name in the url [product, client, campaign, industryCategory, company, group, userCompanyGroup] |
Custom Fields Reponse Properties
Parameter | Required | Type | Description |
---|---|---|---|
id | true | int | id of the object |
name | true | string | name of the object |
objectType | true | string | [product, client, campaign, industryCategory, company, group, userCompanyGroup] |
customFields | true | array | Array of custom field objects |
Custom Field Object Properties
Parameter | Required | Type | Description |
---|---|---|---|
categoryKey | true | string | The unique key for the category |
name | true | string | The name of the custom field |
key | true | string | The field key |
isArray | false | boolean | is the value an array or single value |
type | false | string | [text, textarea, number, currency, datetime, boolean, select, multiselect] type of the value |
value | true | string, number, datetime, boolean, array | The value or array of values to set |
valueOptions | true | array | Array of value option objects |
updatedAt | true | datetime | Timestamp of when last updated |
Note: examples of all field types can be found in the sample payload to the right.
Value Option Object Properties
Parameter | Required | Type | Description |
---|---|---|---|
name | true | string | The name of the value option |
value | true | string | The value of the value option |
Update custom fields
curl "https://api.advisr.com/v1/custom-fields/:objectType/:id/update" \
-d '
[
{
"categoryKey": "sfdc",
"key": "opportunity_id",
"value": "12421512"
},
{
"categoryKey": "sfdc",
"key": "opportunity_category",
"value": [
"resorts",
"amusement-parks"
]
}
]
' \
-H "Content-Type: application/json" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"result":
{
"id": 392,
"name": "New Campaign",
"objectType" : "campaign",
"customFields": [
{
"categoryKey": "sfdc",
"name": "Opportunity Id",
"key": "opportunity_id",
"isArray": false,
"type": "text",
"value": "12421512",
"updatedAt": "2022-08-11T12:09:46.992Z"
},
{
"categoryKey": "sfdc",
"name": "Opportunity Category",
"key": "opportunity_category",
"isArray": true,
"type": "multiselect",
"value": [
"resorts",
"amusement_parks"
],
"valueOptions": [
{ "value": "resorts", "name": "Resorts" },
{ "value": "amusement_parks", "name": "Amusement Parks" }
],
"updatedAt": "2022-08-11T12:09:46.992Z"
}
]
}
}
This endpoint updates customFields.
All categoryKey/key combinations that are supplied in the post will be fully replaced
Update post can support an array of key/categoryKey updates for one object, or a single update
Value = Empty or missing value will remove all values from the key
All of the objects customFields containing values are returned as a result.
HTTP Request
POST https://api.advisr.com/v1/custom-fields/:objectType/:objectId/update
URL Parameters
Parameter | Required | Description |
---|---|---|
objectId | true | The object's id to update in request |
objectType | true | object name in the url [product, client, campaign, industryCategory, company, group, userCompanyGroup] |
Custom Field Post Properties
Parameter | Required | Type | Description |
---|---|---|---|
categoryKey | true | string | The unique key for the category |
key | true | String | The field key |
value | false | string, number, datetime, boolean, array | The value or array of values to set |
Custom Fields Reponse Properties
This response is wrapped in a result object, with the following inside:
Parameter | Required | Type | Description |
---|---|---|---|
id | true | int | id of the object |
name | true | string | name of the object |
objectType | true | string | [product, client, campaign, industryCategory, company, group, userCompanyGroup] |
customFields | true | array | Array of custom field objects |
Delete custom fields
curl "https://api.advisr.com/v1/custom-fields/:object/:id/delete" \
-d '
{
"categoryKey": "google",
"key": "campaign_id",
}
' \
-H "Content-Type: application/json" \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 392,
"name": "New Campaign",
"objectType" : "campaign",
"customFields": [
{
"categoryKey": "sfdc",
"name": "Opportunity Id",
"key": "opportunity_id",
"isArray": false,
"type": "text",
"value": "12421512",
"updatedAt": "2022-08-11T12:09:46.992Z"
}
]
}
This endpoint deletes an existing objects customFields.
Only categoryKey/key combinations supplied in the post will be deleted.
The full objects customFields are returned as a result.
HTTP Request
POST https://api.advisr.com/v1/custom-fields/:objectType/:objectId/delete
Post Parameters
Parameter | Required | Description |
---|---|---|
objectId | true | The objects id to delete |
objectType | true | object name in the url [product, client, campaign, industryCategory, company, group, userCompanyGroup] |
Custom Field Post Properties
Parameter | Required | Type | Description |
---|---|---|---|
categoryKey | true | string | The unique key for the category |
key | true | String | The field key |
Custom Fields Reponse Properties
Parameter | Required | Type | Description |
---|---|---|---|
id | true | int | id of the object |
name | true | string | name of the object |
objectType | true | string | [product, client, campaign, industryCategory, company, group, userCompanyGroup] |
customFields | true | array | Array of custom field objects |
Delete all custom fields
curl "https://api.advisr.com/v1/custom-fields/:object/:objectId/delete-all" \
' \
-H "token: api-token"
The above command returns JSON structured like this:
{
"id": 392,
"name": "New Campaign",
"objectType" : "campaign",
"customFields": []
}
This endpoint deletes all custom fields for an object.
The full objects customFields are returned as a result.
HTTP Request
POST https://api.advisr.com/v1/custom-fields/:objectType/:objectId/delete-all
Query Parameters
Parameter | Required | Description |
---|---|---|
objectId | true | The objects id to delete |
objectType | true | object name in the url [product, client, campaign, industryCategory, company, group, userCompanyGroup] |
Custom Fields Reponse Properties
Parameter | Required | Type | Description |
---|---|---|---|
id | true | int | id of the object |
name | true | string | name of the object |
objectType | true | string | [product, client, campaign, industryCategory, company, group, userCompanyGrouop] |
customFields | true | array | Array of custom field objects |
Custom field errors
API errors return JSON structured like this, with message strings comma separated in the messages array:
{
"error":
{
"type": "AdvisrInvalidRequestError",
"messages": [ "This is an API error" ]
}
}
Custom Fields can return the following error messages as 400 requests
Error Message | Meaning |
---|---|
categoryKey/key not found | categoryKey/key is not found on this object |
expecting an array | isArray:true and trying to pass a single value |
expecting a single value | isArray:False and trying to pass an array of values |
expecting an integer | field type is a string and trying to pass an integer |
expecting a string | field type is an int and trying to pass an string |
Errors
Error Responses
API errors return JSON structured like this, with message strings comma separated in the messages array:
{
"error":
{
"type": "AdvisrInvalidRequestError",
"messages": [ "This is an API error" ]
}
}
The Advisr API uses the following error types and codes:
Error Type | Error Code | Description |
---|---|---|
AdvisrUnauthorizedError | 401 | Invalid or no API key provided for this request. |
AdvisrPermissionError | 403 | The API key used for this request does not have the necessary permissions. |
AdvisrRateLimitError | 429 | You have exceeded your established rate limit. |
AdvisrAPIError | 500 | Something went wrong on Advisr’s end. |
AdvisrInvalidRequestError | 400 | Parameters with request are not valid. |
AdvisrValidationError | 400 | The request included invalid data or was made in an invalid way. |
Changelog
Below you can find summaries of each release.
July 10, 2023
Adding files retrieval endpoints
Load files uploaded to a campaign with this new endpoint, as well as another endpoint to load individual an individual file.
April 26, 2023
Adding budget recommendation values in responses for campaigns
Budget recommendation values will now be returned with a new load campaign product recommendation endpoint, if there are budget recommendation values.
April 4, 2023
Including street address, agency and full name to campaigns, clients and users
If values exist, the street address and the full name of an agency will now be avaialble when loading a campaign, loading the geo(s) of a campaign, loading a client and loading users. Also, if team members have been added to a client, those will not be returned as well.
February 24, 2023
Including country, test campaign boolean and team members to campaigns
If values exist, the country, team members and a test campaign true/false flag will now be avaialble when loading a campaign.
December 5, 2022
Introducing goals endpoints
There is now a list goals for client endpoint, a brand new list goals endpoint and list goals for industry category endpoint.
October 13, 2022
Adding external lookup IDs to campaign and client
In the load campaign and load client endpoints, the external lookup ID is now returned if values have been added.