Campaign creation
Campaign resource
Campaign is a resource that contains line items, targeting setup and banners. It can be assigned to the single specific channel (Adform, Facebook, Google Adwords etc.). This is the basic entity on which we can measure the performance of the advertisement.
Campaign creation process
- Check health API
- Prepare the campaign creation request (budgets, dates, inventories, targeting, banners)
- Validate the campaign creation request
- Submit a campaign creation request
- Poll until completed
Below you can see the sample process of campaign creation together with health check, validation and suggested polling approach.
Create campaign
To create a campaign please make a call to the POST /api/v3.0/campaign/{clientId} endpoint. There are 2 ways of creating campaigns in Nexta:
- As a Draft campaign
- As a Paused campaign Using drafts is beneficial when campaign needs to be created, but banners are not (yet) available. Campaigns in Draft status do not get pushed to the 3rd party systems and only exist in Nexta. Draft can be made into a normal campaign by Nexta automation or by adding banners and changing the campaign status to Paused in one campaign PUT request.
Request body:
CreateCampaignRequest
Field | Type | Description |
---|---|---|
SystemType | SystemType enum | Required. System type of the campaign. |
CampaignType | CampaignType enum | Required. Type of the campaign. |
TemplateID | int | Required. ID of the campaign template to read basic data from. |
CampaignSetID | int | ID of the campaign-set. If provided this campaign will be assigned to given campaign-set. |
Name | string | Required. Name of the campaign. Cannot be longer than 99 characters. Cannot contain the following characters: < > * ' ? \ " | ; |
Description | string | Description of the campaign. |
Budget | double | Budget of the campaign. For some of the channels minimum budget is required but it depends on other parameters. |
StartDate | DateTime | Required. Start date of the campaign. Cannot be in the past. |
EndDate | DateTime | Required. Cannot be in the past. Needs to be at least one and maximum 365 days greater than StartDate. |
Currency | string | Budget currency. Considered as obsolete property soon but not yet as there is the same currency for all campaigns in scope of the single client. |
Status | Status string | Status of the campaign. Campaign can be created in Draft or Paused status. |
LineItems | LineItemDTO[] | Line items with inventories and targeting setup. |
Banners | long[] or numeric string (long) array | IDs of the banners from the banner library that should be attached to this campaign. Cannot be empty when campaign status is set to Paused. |
BookingDetails | CampaignBookingDetailDTO[] | Array of booking details. Each booking detail needs to have valid ID value. |
MetaRules | MetaRuleDescritption[] | Array of meta rules to be created on this campaign. |
Rules | CampaignRuleDTO[] | Obsolete. Old model of campaign rules. Please use MetaRules instead. |
Examples of campaign creation
CreateCampaignRequest is quite complex object. It is because it contains data about line items, inventories & targeting setup.
Inventories & targeting setup are channel dependent. Which means - API Client can't use the same setup for each channel (Adform, Facebook, AdWords etc.).
To make it easier to manage targeting and ivnentories data from external systems we introduced a Template Pattern.
For each advertising channel we have a Template created in external system. We can see all available templates for by calling Template Read endpoint.
Default setup for each channel can be downloaded from Campaign Template endpoints.
It can be done by getting one full CampaignDTO object from GET Campaign Template endpoint or by calling GET Campaign Template Container, GET Campaign Template Inventories, GET Campaign Template Targeting, GET Campaign Template Banners and Search Locations separately.
Facebook Campaign Example
Follow these steps to create a campaign on Facebook channel. The example below is done on our test client MediaGroup-UK_MRHL.
Get templates from Read Templates This should return a full collection of templates available on this client.
Example (TemplateDTO[]):
[{ "ID": 5579, "ClientID": "MediaGroup-UK_MRHL", "Name": "Display", "Description": "Campaign template for client: MediaGroup-UK_MRHL", "CampaignID": "1424282", "CampaignType": 1, "DateCreated": "2018-08-12T08:30:39Z", "CreatedBy": "sko", "DateUpdated": null, "UpdatedBy": null }, { "ID": 5580, "ClientID": "MediaGroup-UK_MRHL", "Name": "Facebook", "Description": "Campaign template for client: MediaGroup-UK_MRHL", "CampaignID": "23842900539250789", "CampaignType": 3, "DateCreated": "2018-08-12T08:30:45Z", "CreatedBy": "sko", "DateUpdated": null, "UpdatedBy": null } ]
Select template by desired CampaignType. Facebook = 3.
Use ID from selected template to obtain additional data from Campaign Template endpoints.
Call Campaign template container endpoint to get campaign basic campaign data like default budget, period etc.
Example (CampaignDTO):
{ "ID": "0", "ClientID": "MediaGroup-UK_MRHL", "SystemType": 2, "CampaignType": 3, "TemplateID": 5580, "CampaignSetID": null, "Name": "", "Description": "LINK_CLICKS", "Budget": 600.0, "Currency": "DKK", "Stats": null, "StartDate": "2019-09-16T22:00:00Z", "EndDate": "2019-10-16T21:59:59Z", "Status": "Paused", "StatusInfo": null, "Progress": 0, "LineItems": [{ "Name": "Instagram", "Inventories": null, "Targeting": null }, { "Name": "Facebook", "Inventories": null, "Targeting": null }], "Banners": null, "Rules": [], "MetaRules": [], "BookingDetails": [], "CreatedBy": null, "DateCreated": null, "UpdatedBy": null, "DateUpdated": null }
Call Campaign template inventories endpoint to get avaiable inventories for this CampaignType.
Example response (LineItemDTO[]):
[{ "Name": "Instagram", "Inventories": [{ "ID": 11, "InventorySourceID": 0, "Name": "Instagram stream" }], "Targeting": null }, { "Name": "Facebook", "Inventories": [{ "ID": 6, "InventorySourceID": 0, "Name": "Facebook feed" }, { "ID": 7, "InventorySourceID": 0, "Name": "Facebook right hand column" }, { "ID": 8, "InventorySourceID": 0, "Name": "Facebook instant article" }, { "ID": 13, "InventorySourceID": 0, "Name": "Messenger home" }], "Targeting": null }]
Remove inventories (or line item) that you don't want to advertise on and replace LineItems on the object taken obtained in point no 4. There has to be at least one line item with at least one inventory defined on the campaign.
Call Campaign template targeting to get available targeting for this CampaignType.
Example response (TargetingDTO[]):
[{ "ID": "0", "Name": null, "TargetingRules": [{ "TargetingType": 2, "TypeID": 37, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "HyperLocations", "ZipCodes": null, "Locations": null, "HyperLocations": [], "Segments": null, "Ages": null, "Genders": null, "Countries": null }, { "TargetingType": 0, "TypeID": 1, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "Location", "ZipCodes": null, "Locations": [{ "ID": "DK", "Name": "Denmark, DK, country" }], "HyperLocations": null, "Segments": null, "Ages": null, "Genders": null, "Countries": ["DK"] }, { "TargetingType": 3, "TypeID": 2, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "Age", "ZipCodes": null, "Locations": null, "HyperLocations": null, "Segments": null, "Ages": [{ "Min": 18, "Max": 24, "ID": "1", "Name": "18-24" }, { "Min": 25, "Max": 34, "ID": "2", "Name": "25-34" }, { "Min": 35, "Max": 44, "ID": "3", "Name": "35-44" }, { "Min": 45, "Max": 54, "ID": "4", "Name": "45-54" }, { "Min": 55, "Max": 64, "ID": "5", "Name": "55-64" }, { "Min": 65, "Max": 65, "ID": "6", "Name": "65+" }], "Genders": null, "Countries": null }, { "TargetingType": 4, "TypeID": 3, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "Gender", "ZipCodes": null, "Locations": null, "HyperLocations": null, "Segments": null, "Ages": null, "Genders": [{ "ID": "1", "Name": "Male" }, { "ID": "2", "Name": "Female" }], "Countries": null }, { "TargetingType": 1, "TypeID": 14, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "Behaviors", "ZipCodes": null, "Locations": null, "HyperLocations": null, "Segments": [{ "ID": "6002714895372", "Name": "Frequent Travelers" }, { "ID": "6013516370183", "Name": "Commuters" }, { "ID": "6022788483583", "Name": "Frequent international travelers" }], "Ages": null, "Genders": null, "Countries": null }, { "TargetingType": 1, "TypeID": 27, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "Demographics > Work > Industries", "ZipCodes": null, "Locations": null, "HyperLocations": null, "Segments": [{ "ID": "6008888961983", "Name": "IT and Technical Services" }, { "ID": "6009003307783", "Name": "Business and Finance" }, { "ID": "6012903126783", "Name": "Architecture and Engineering" }, { "ID": "6012903167783", "Name": "Computation and Mathematics" }, { "ID": "6012903320983", "Name": "Transportation and Moving" }], "Ages": null, "Genders": null, "Countries": null }, { "TargetingType": 1, "TypeID": 5, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "Interest", "ZipCodes": null, "Locations": null, "HyperLocations": null, "Segments": [{ "ID": "6003074954515", "Name": "Sales" }, { "ID": "6003252179711", "Name": "Engineering" }, { "ID": "6003279598823", "Name": "Marketing" }, { "ID": "6003402305839", "Name": "Business" }, { "ID": "6003578086487", "Name": "Real estate" }, { "ID": "6004140335706", "Name": "Architecture" }], "Ages": null, "Genders": null, "Countries": null }] }]
To use correct geo location targeting use Search Locations endpoint and put the result into Locations or ZipCodes arrays on the LocationTargetingRule targeting rule on the targeting.
Example usage: System type = 2 (Facebook), Countries (got from targeting -> location targeting rules -> countries) and given Location types
Request payload:
{ "Countries": ["DK"], "Query": "Co", "SystemType": 2, "LocationTypes": [1, 2, 3] }
Response body:
[{ "ID": "609672", "Name": "Copenhagen, DK, city" }, { "ID": "DK", "Name": "Denmark, DK, country" }]
Remove targeting rules or segments that you don't want to use in the campaign. When it's done you can replace Targeting object on each of the campaign LineItem.
Targeting object needs to contain one of Hyper Location or Location targeting rule with at least one Hyper Location or Location / ZipCode.
Call Campaign template banners to get banners from banner library.
Example response (BannerHeaderDTO[]):
[{ "ID": "263937", "Name": "MediaGroup-UK_MRHL - Headline", "Description": "", "Labels": null, "BannerType": 5, "BannerCategory": 2, "SystemType": 2, "CampaignType": 3, "Size": null, "Width": 600, "Height": 600, "Status": "Active", "StatusInfo": "Banner successfully uploaded", "Progress": 100, "CreatedBy": "nw_sales", "DateCreated": "2019-09-16T11:11:40Z", "UpdatedBy": "nw_sales", "DateUpdated": "2019-09-16T11:11:48Z", "Formats": ["RIGHT_COLUMN_STANDARD", "DESKTOP_FEED_STANDARD", "MOBILE_FEED_STANDARD", "INSTAGRAM_STANDARD", "MESSENGER_MOBILE_INBOX_MEDIA"] }]
Select banners and put their IDs into the CreateCampaignRequest Banners array (long[]).
When all that is done, CreateCampaignRequest should be ready to send to Create Campaign endpoint.
Example of CreateCampaignRequest:
{ "ClientID": "MediaGroup-UK_MRHL", "SystemType": 2, "CampaignType": 3, "TemplateID": 5580, "CampaignSetID": 3161, "Name": "Test campaign", "Description": "LINK_CLICKS", "Budget": 1000, "Currency": "DKK", "StartDate": "2019-09-20T22:00:00.000Z", "EndDate": "2019-09-28T21:59:59.999Z", "Status": "Paused", "LineItems": [{ "Name": "Instagram", "Inventories": [{ "ID": 11, "InventorySourceID": 0, "Name": "Instagram stream" }], "Targeting": [{ "ID": "0", "Name": null, "TargetingRules": [{ "TargetingType": 2, "TypeID": 37, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "HyperLocations", "ZipCodes": null, "Locations": null, "HyperLocations": [{ "Latitude": 56.252616154438606, "Longitude": 9.151730270180224, "Radius": 68000, "Name": "Lat, Lng: 56.252616154438606; 9.151730270180224", "uid": "jvPKnDX" }], "Segments": null, "Ages": null, "Genders": null, "Countries": null }] }] }, { "Name": "Facebook", "Inventories": [{ "ID": 6, "InventorySourceID": 0, "Name": "Facebook feed" }, { "ID": 7, "InventorySourceID": 0, "Name": "Facebook right hand column" }, { "ID": 8, "InventorySourceID": 0, "Name": "Facebook instant article" }, { "ID": 13, "InventorySourceID": 0, "Name": "Messenger home" }], "Targeting": [{ "ID": "0", "Name": null, "TargetingRules": [{ "TargetingType": 2, "TypeID": 37, "ProviderID": 2, "ProviderName": "Facebook", "TypeName": "HyperLocations", "ZipCodes": null, "Locations": null, "HyperLocations": [{ "Latitude": 56.252616154438606, "Longitude": 9.151730270180224, "Radius": 68000, "Name": "Lat, Lng: 56.252616154438606; 9.151730270180224", "uid": "jvPKnDX" }], "Segments": null, "Ages": null, "Genders": null, "Countries": null }] }] }], "Banners": ["263937"], "Rules": [], "MetaRules": [], "BookingDetails": [{ "Type": "input_multiline_text", "Field": { "Label": "Comments", "Value": "" }, "ID": "eFXIhFwyhO" }, { "Type": "input_timestamp", "Field": { "Label": "Created at", "Value": "20190916111209" }, "ID": "EV9red2eF" }] }
Campaign statuses
"Active"
"Paused"
"InActive"
"Draft"
"Processing"
"Completed"
"Error"
Campaign read
There are three ways of getting campaigns.
Campaign search
To search in campaigns make a call to POST /api/v3.0/campaign/search endpoint.
Request body:
SearchCampaignQuery
Field | Type | Description |
---|---|---|
Metrics | string[] | List of campaign metrics. Available values: ID, ClientID, Name, Description, Budget, Currency, StartDate, EndDate, Fee, Status, Process, StatusInfo, Stats,DateCreated, CreatedBy, DateUpdate, UpdatedBy, TemplateID, SystemType, CampaignType, SystemClientID, SystemCampaignID, SystemTemplateID |
Filter | CampaignFilter | Filter object. |
CampaignFilter
Field | Type | Description |
---|---|---|
ClientIds | string[] | Array of client IDs. Only clients belonging to the agency can be inserted. |
SystemTypes | SystemType[] | Array of system types. |
CampaignIds | long[] | Array of campaign IDs. |
SystemCampaignIds | long[] | Array of system campaign IDs. |
CampaignSetIds | int[] | Array of campaign set IDs. |
Status | string[] | Array of statuses. |
From | DateTime | Start date from. |
To | DateTime | End date to. |
In a result it returns array of CampaignDTO objects.
CampaignDTO
Field | Type | Description |
---|---|---|
ID | int numeric string | ID of the campaign. |
ClientID | string | ID of the client |
SystemType | SystemType enum | System type of the campaign. |
CampaignType | CampaignType enum | Type of the campaign. |
TemplateID | int | ID of the campaign template to read basic data from. |
CampaignSetID | int | ID of the campaign-set. If provided this campaign will be assigned to given campaign-set. |
Name | string | Name of the campaign. Cannot be longer than 99 characters. Cannot contain the following characters: < > * ' ? \ " | ; |
Description | string | Description of the campaign. |
Budget | double | Budget of the campaign. For some of the channels minimum budget is required but it depends on other parameters. |
StartDate | DateTime | Start date of the campaign. |
EndDate | DateTime | End date of the campaign. |
Currency | string | Budget currency. |
Stats | JSON string | Campaign stats in a JSON format. |
Status | Status string | Status of the campaign. |
StatusInfo | string | Additional status data. |
Progress | int | Campaign status progress. Value from 0 to 100. |
LineItems | LineItemDTO[] | Line items with inventories and targeting setup. |
Banners | BannerHeaderDTO[] | Banners attached to the campaign. |
BookingDetails | CampaignBookingDetailDTO[] | Array of booking details. |
MetaRules | MetaRuleDTO[] | Array of meta rules attached to the campaign. |
Rules | CampaignRuleDTO[] | Obsolete. Old model of campaign rules. Please use MetaRules instead. |
CreatedBy | string | Username of the author. |
DateCreated | DateTime | Campaign created date. |
UpdatedBy | string | Username of the user who edited campaign last time. |
DateUpdated | DateTime | Date of the last update. |
Campaign read many
To get campaigns belonging to specific client send a request to GET /api/v3.0/campaign/{clientId} endpoint.
It will return an array of CampaignHeaderDTO objects.
CampaignHeaderDTO
Field | Type | Description |
---|---|---|
ID | int numeric string | ID of the campaign. |
ClientID | string | ID of the client |
CampaignSetID | int | ID of the campaign-set. If provided this campaign will be assigned to given campaign-set. |
SystemType | SystemType enum | System type of the campaign. |
CampaignType | CampaignType enum | Type of the campaign. |
Name | string | Name of the campaign. Cannot be longer than 99 characters. Cannot contain the following characters: < > * ' ? \ " | ; |
Budget | double | Budget of the campaign. For some of the channels minimum budget is required but it depends on other parameters. |
Currency | string | Budget currency. |
StartDate | DateTime | Start date of the campaign. |
EndDate | DateTime | End date of the campaign. |
Stats | JSON string | Campaign stats in a JSON format. |
Status | Status string | Status of the campaign. |
StatusInfo | string | Additional status data. |
Progress | int | Campaign status progress. Value from 0 to 100. |
BookingDetails | CampaignBookingDetailDTO[] | Array of booking details. |
CreatedBy | string | Username of the author. |
DateCreated | DateTime | Campaign created date. |
UpdatedBy | string | Username of the user who edited campaign last time. |
DateUpdated | DateTime | Date of the last update. |
Campaign read single
To get the full campaign resource please make a call to GET /api/v3.0/campaign/{clientId}/{id} endpoint.
It will return a single CampaignDTO object.
Get campaign container
It is a part of the campaign resource. It is used to get basic data about the campaign.
To get this resource please make a call to GET /api/v3.0/campaign/{clientId}/{id}/container endpoint.
It will return CampaignDTO response with a limited data.
Result will contain information about the line items but without Inventories and Targeting details.
It will not return data about the Banners.
Get campaign inventories
It is a part of the campaign resource. It will contain information about the line items and Inventories.
It will not contain information about the line item Targeting.
To get this resource please make a call to GET /api/v3.0/campaign/{clientId}/{id}/inventory endpoint.
Result of the request will be an array of LineItemDTO objects.
Get campaign targeting
It is a part of the campaign line item resource.
To get this resource please make a call to GET /api/v3.0/campaign/{clientId}/{id}/targeting endpoint.
Result of the request will be an array of TargetingDTO objects.
Get campaign banners
It is a part of the campaign resource. Returns banners connected to the given campaign.
To get this resource please make a call to GET /api/v3.0/campaign/{clientId}/{id}/banners endpoint.
It will return a response with an array of BannerHeaderDTO objects.
Get campaign status
To get status of the campaign without loading full resource please make a call to GET /api/v3.0/campaign/{clientId}/{id}/status endpoint.
It will return a response with CampaignStatusDTO object.
CampaignStatusDTO
Field | Type | Description |
---|---|---|
ID | int numeric string | ID of the campaign. |
ClientID | string | ID of the client |
SystemType | SystemType enum | System type of the campaign. |
Status | Status string | Status of the campaign. |
StatusInfo | string | Additional status data. |
Progress | int | Campaign status progress. Value from 0 to 100. |
Get campaign properties
To get campaign properties for campaign please make a call to GET /api/v3.0/campaign/{clientId}/{id}/properties endpoint.
It will return a response with an array of CampaignPropertyDTO objects.
CampaignPropertyDTO
Field | Type | Description |
---|---|---|
Name | string | Property name |
LineItemName | string | Name of the line item |
Value | string | Value for property |
IsInternal | bool | Flag if property is internal or external |
Update campaign
To update campaign resource please make a call to PUT /api/v3.0/campaign/{clientId}/{id} endpoint.
Request body:
EditCampaignRequest
Field | Type | Description |
---|---|---|
Description | string | Description of the campaign. |
Budget | double | Budget of the campaign. For some of the channels minimum budget is required but it depends on other parameters. |
CampaignSetID | int | ID of the campaign-set. If provided this campaign will be assigned to given campaign-set. |
StartDate | DateTime | Start date of the campaign. Cannot be in the past. |
EndDate | DateTime | Cannot be in the past. Needs to be at least one and maximum 365 days greater than StartDate. |
Status | Status string | Status of the campaign. Allowed values: Active or Paused |
LineItems | LineItemDTO[] | Line items with inventories and targeting setup. |
Banners | long[] or numeric string (long) array | IDs of the banners from the banner library that should be attached to this campaign. Cannot be empty. |
BookingDetails | CampaignBookingDetailDTO[] | Array of booking details. Each booking detail needs to have valid ID value. |
MetaRules | MetaRuleDescritption[] | Array of meta rules to be created on this campaign. |
Rules | CampaignRuleDTO[] | Obsolete. Old model of campaign rules. Please use MetaRules instead. |
Update campaign properties
To update campaign properties please make a call to PUT /api/v3.0/campaign/{clientId}/{id}/properties endpoint.
Request body:
UpdateCampaignPropertiesRequest
Field | Type | Description |
---|---|---|
Properties | CampaignPropertyDTO[] | Array of the campaign properties. |
Change status (Activate - Deactivate)
To change just a Status of the campaign, please make a call to PUT /api/v3.0/campaign/{clientId}/{id}/status endpoint.
Request body:
ChangeCampaignStatusRequest
Field | Type | Description |
---|---|---|
Status | Status string | Status of the campaign. Allowed values: Active or Paused |
Delete campaign
To delete the campaign please make a call to DELETE /api/v3.0/campaign/{clientId}/{id} endpoint.
DTOs
LineItemDTO
Field | Type | Description |
---|---|---|
Name | string | Name of the line item. On create or edit please use names from the campaign-template. |
Inventories | InventoryDTO[] | Selected inventories. To get possible values see: Read template inventories |
Targeting | TargetingDTO[] | Selected targeting. To get possible values see: Read template targeting |
InventoryDTO
Field | Type | Description |
---|---|---|
ID | long | ID of the inventory |
InventorySourceID | int | Source of the inventories. Required by Adform |
Name | string | Name of the inventory |
TargetingDTO
Field | Type | Description |
---|---|---|
ID | numeric string (long) | ID of the targeting |
Name | string | Name of the targeting |
TargetingRules | TargetingRuleDTO[] | Collection of targeting rules |
TargetingRuleDTO
Field | Type | Description |
---|---|---|
TargetingType | TargetingType enum | Type of the targeting. |
TypeID | long | ID of the targeting type. Depends on the external systems. |
TypeName | string | Name of the targeting type. |
ProviderID | long | ID of the provider. Depends on the external systems. |
ProviderName | string | Name of the provider. |
ZipCodes | ZipCodeDTO[] | Array of the zipcodes. Used when TargetingType is set to Location. |
Locations | LocationHeaderDTO[] | Array of the locations. Used when TargetingType is set to Location. |
HyperLocations | HyperLocationDTO[] | Array of the hyper locations. Used when TargetingType is set to HyperLocation. |
Segments | SegmentDTO[] | Array of the segments. Used when TargetingType is set to SegmentData. |
Ages | AgeSegmentDTO[] | Array of the age segments. Used when Targeting type is set to Age. |
Genders | SegmentDTO[] | Array of the gender segments. Used when TargetingType is set to Gender. |
Countries | string[] | Read only value. Returns country codes of the available countries. Can be used to search for locations in Location search. |
TargetingType Enum
Enum | Value | Description |
---|---|---|
Location | 0 | Geo-location targeting type. |
SegmentData | 1 | Custom segment targeting type. |
HyperLocation | 2 | Coordinate based location type. Lat-long-radius. |
Age | 3 | Age semgents targeting type. |
Gender | 4 | Gender segments targeting type. |
ZipCodeDTO
Field | Type | Description |
---|---|---|
ID | string | ID of the Zip Code |
Name | string | Name of the Zip Code |
LocationHeaderDTO
Field | Type | Description |
---|---|---|
ID | string | ID of the location |
Name | string | Name of the location |
HyperLocationDTO
Field | Type | Description |
---|---|---|
ID | string | ID of the hyper location. |
Name | string | Name of the hyper location. |
Longitude | double | Longitude coordinate. |
Latitude | double | Latitude coordinate. |
Radius | double | Radius in meters. |
SegmentDTO
Field | Type | Description |
---|---|---|
ID | numeric string | ID of the segment |
Name | string | Name of the segment |
AgeSegmentDTO
Field | Type | Description |
---|---|---|
ID | numeric string | ID of the segment. |
Name | string | Name of the segment. |
Min | int | Minimum age on the segment. |
Max | int | Maximume age on the segment. |
CampaignType Enum
Enum | Value | Description |
---|---|---|
None | 0 | None. |
AdformRTB | 1 | Adform Real Time Bidding. |
AdformDirect | 2 | Adform Direct. |
3 | ||
AdwordsSearch | 4 | AdWords Search Network. |
AdwordsDisplay | 5 | AdWords Display Network. |
Dfp | 6 | DoubleClick for Publishers. |
AdwordsDynamicSearch | 7 | AdWords Search Network (dynamic). |
Xandr | 8 | Xandr display. |
SystemType Enum
Enum | Value | Description |
---|---|---|
None | 0 | None. |
Adform | 1 | Adform. |
2 | Facebook. | |
Adwords | 3 | Google AdWords. |
Dfp | 4 | Google DFP (ad manager). |
Xandr | 5 | Xandr. |
Campaign Template
Campaign template is a detailed Template resource.
It extends Template with campaign related data.
Campaign template is a source of inventories, targeting and banners for a campaign.
Banners uploaded to the Campaign Template become a banner library.
Get campaign template
To read full Campaign Template resource please make a call to GET /api/v3.0/campaigntemplate/{clientId}/{templateId} endpoint.
templateId parameter is the ID of the template that can be found in Template Read endpoint.
It will return campaign template data as CampaignDTO object.
Get campaign template container
It is a similar resource to Campaign Container but filled with data from the Campaign Template.
To get campaign template container please call GET /api/v3.0/campaigntemplate/{clientId}/{templateId}/container endpoint.
It will return campaign template container data as CampaignDTO object.
Get campaign template inventories
It is a similar resource to Campaign Inventories but filled with data from the Campaign Template.
It returns full range of possible inventories for given CampaignType.
To get campaign template inventories please call GET /api/v3.0/campaigntemplate/{clientId}/{templateId}/inventory endpoint.
It will return campaign template inventories data as LineItemDTO array.
Get campaign template targeting
It is a similar resource to Campaign Targeting but filled with data from the Campaign Template.
It returns full range of possible targeting rules and segments for given CampaignType.
To get campaign template targeting please call GET /api/v3.0/campaigntemplate/{clientId}/{templateId}/targeting?detailedLocations=false endpoint.
We advise to set detailedLocations query parameter to false because of poor performance of loading geo-location segments and use Location Search endpoint instead to receive filtered data.
It will return campaign template targeting data as TargetingDTO array.
Get campaign template banners
It is a similar resource to Campaign Banners but filled with data from the Campaign Template.
It returns banners uploaded to the Campaign Template that we call banner library.
Banners from banner library can be attached later to the live campaigns.
To get banners from banner library please make a call to GET /api/v3.0/campaigntemplate/{clientId}/{templateId}/banners endpoint.
It will return banners as an array of BannerHeaderDTO objects.
Locations
Location is a resource which represents geo-location entity that we can use in external system. Location that is not present in our repository cannot be used in the campaign targeting.
It is also possible that some location resources can exist in one system type and not exist in the other.
Get locations
Locations depends on the system type. To get location elements please call Search endpoint or check if given location exist in our system by calling Validate endpoint.
Search locations
To search for locations please call POST /api/v3.0/locations/search endpoint with the LocationSearchQuery in the request body.
Location Search Query
Field | Type | Description |
---|---|---|
Countries | string[] | Array of country codes. Required. |
LocationTypes | LocationType[] | Array of location types. Required. |
SystemType | SystemType | System type. Required. |
Query | string | Query string. Required. Minimum 2 chars. |
It will return array of LocationHeaderDTO objects.
Validate Location
To validate if provided Zip Codes or Locations exists in our system please call **** endpoint with the ValidateLocationsRequest object in the request body.
Field | Type | Description |
---|---|---|
SystemType | SystemType | System type |
Locations | string[] | Array of Location or Zip Code names. E.g. ["Copenhagen", "4200"] |
Countries | string[] | Array of country codes. |
It will return LocationValidationDTO response.
LocationValidationDTO
Field | Type | Description |
---|---|---|
ValidLocations | LocationHeaderDTO[] | Array of valid locations. |
InvalidLocations | string[] | Array of locations which are invalid or not exist in our location repository. |
Location type Enum
Enum | Value | Description |
---|---|---|
None | 0 | Default. Not defined. |
City | 1 | City. |
Region | 2 | Region. |
Country | 3 | Country. |
ZipCode | 4 | Zip/Postal code. |