Nexta Developer Portal

Nexta Developer Portal

  • Guides
  • API

›Guides

Introduction

  • Overview
  • Getting started
  • Authentication and authorization
  • API health
  • Error handling

Guides

  • Client onboarding
  • Campaign creation
  • Banner upload
  • Goals API
  • Campaign Set Status
  • Facebook Special Ad Categories

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

  1. Check health API
  2. Prepare the campaign creation request (budgets, dates, inventories, targeting, banners)
  3. Validate the campaign creation request
  4. Submit a campaign creation request
  5. Poll until completed

Below you can see the sample process of campaign creation together with health check, validation and suggested polling approach.


Campaign creation flow diagram

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:

  1. As a Draft campaign
  2. 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

FieldTypeDescription
SystemTypeSystemType enumRequired. System type of the campaign.
CampaignTypeCampaignType enumRequired. Type of the campaign.
TemplateIDintRequired. ID of the campaign template to read basic data from.
CampaignSetIDintID of the campaign-set. If provided this campaign will be assigned to given campaign-set.
NamestringRequired. Name of the campaign. Cannot be longer than 99 characters. Cannot contain the following characters: < > * ' ? \ " | ;
DescriptionstringDescription of the campaign.
BudgetdoubleBudget of the campaign. For some of the channels minimum budget is required but it depends on other parameters.
StartDateDateTimeRequired. Start date of the campaign. Cannot be in the past.
EndDateDateTimeRequired. Cannot be in the past. Needs to be at least one and maximum 365 days greater than StartDate.
CurrencystringBudget currency. Considered as obsolete property soon but not yet as there is the same currency for all campaigns in scope of the single client.
StatusStatus stringStatus of the campaign. Campaign can be created in Draft or Paused status.
LineItemsLineItemDTO[]Line items with inventories and targeting setup.
Bannerslong[] or numeric string (long) arrayIDs of the banners from the banner library that should be attached to this campaign. Cannot be empty when campaign status is set to Paused.
BookingDetailsCampaignBookingDetailDTO[]Array of booking details. Each booking detail needs to have valid ID value.
MetaRulesMetaRuleDescritption[]Array of meta rules to be created on this campaign.
RulesCampaignRuleDTO[]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.

  1. 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
         }
     ]
    
  2. Select template by desired CampaignType. Facebook = 3.

  3. Use ID from selected template to obtain additional data from Campaign Template endpoints.

  4. 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
     }
    
  5. 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
     }]
    
  6. 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.

  7. 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
         }]
     }]
    
  8. 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"
     }]
    
  9. 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.

  1. 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"]
     }]
    
  2. Select banners and put their IDs into the CreateCampaignRequest Banners array (long[]).

  3. 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

FieldTypeDescription
Metricsstring[]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
FilterCampaignFilterFilter object.

CampaignFilter

FieldTypeDescription
ClientIdsstring[]Array of client IDs. Only clients belonging to the agency can be inserted.
SystemTypesSystemType[]Array of system types.
CampaignIdslong[]Array of campaign IDs.
SystemCampaignIdslong[]Array of system campaign IDs.
CampaignSetIdsint[]Array of campaign set IDs.
Statusstring[]Array of statuses.
FromDateTimeStart date from.
ToDateTimeEnd date to.

In a result it returns array of CampaignDTO objects.

CampaignDTO

FieldTypeDescription
IDint numeric stringID of the campaign.
ClientIDstringID of the client
SystemTypeSystemType enumSystem type of the campaign.
CampaignTypeCampaignType enumType of the campaign.
TemplateIDintID of the campaign template to read basic data from.
CampaignSetIDintID of the campaign-set. If provided this campaign will be assigned to given campaign-set.
NamestringName of the campaign. Cannot be longer than 99 characters. Cannot contain the following characters: < > * ' ? \ " | ;
DescriptionstringDescription of the campaign.
BudgetdoubleBudget of the campaign. For some of the channels minimum budget is required but it depends on other parameters.
StartDateDateTimeStart date of the campaign.
EndDateDateTimeEnd date of the campaign.
CurrencystringBudget currency.
StatsJSON stringCampaign stats in a JSON format.
StatusStatus stringStatus of the campaign.
StatusInfostringAdditional status data.
ProgressintCampaign status progress. Value from 0 to 100.
LineItemsLineItemDTO[]Line items with inventories and targeting setup.
BannersBannerHeaderDTO[]Banners attached to the campaign.
BookingDetailsCampaignBookingDetailDTO[]Array of booking details.
MetaRulesMetaRuleDTO[]Array of meta rules attached to the campaign.
RulesCampaignRuleDTO[]Obsolete. Old model of campaign rules. Please use MetaRules instead.
CreatedBystringUsername of the author.
DateCreatedDateTimeCampaign created date.
UpdatedBystringUsername of the user who edited campaign last time.
DateUpdatedDateTimeDate 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

FieldTypeDescription
IDint numeric stringID of the campaign.
ClientIDstringID of the client
CampaignSetIDintID of the campaign-set. If provided this campaign will be assigned to given campaign-set.
SystemTypeSystemType enumSystem type of the campaign.
CampaignTypeCampaignType enumType of the campaign.
NamestringName of the campaign. Cannot be longer than 99 characters. Cannot contain the following characters: < > * ' ? \ " | ;
BudgetdoubleBudget of the campaign. For some of the channels minimum budget is required but it depends on other parameters.
CurrencystringBudget currency.
StartDateDateTimeStart date of the campaign.
EndDateDateTimeEnd date of the campaign.
StatsJSON stringCampaign stats in a JSON format.
StatusStatus stringStatus of the campaign.
StatusInfostringAdditional status data.
ProgressintCampaign status progress. Value from 0 to 100.
BookingDetailsCampaignBookingDetailDTO[]Array of booking details.
CreatedBystringUsername of the author.
DateCreatedDateTimeCampaign created date.
UpdatedBystringUsername of the user who edited campaign last time.
DateUpdatedDateTimeDate 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

FieldTypeDescription
IDint numeric stringID of the campaign.
ClientIDstringID of the client
SystemTypeSystemType enumSystem type of the campaign.
StatusStatus stringStatus of the campaign.
StatusInfostringAdditional status data.
ProgressintCampaign 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

FieldTypeDescription
NamestringProperty name
LineItemNamestringName of the line item
ValuestringValue for property
IsInternalboolFlag 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

FieldTypeDescription
DescriptionstringDescription of the campaign.
BudgetdoubleBudget of the campaign. For some of the channels minimum budget is required but it depends on other parameters.
CampaignSetIDintID of the campaign-set. If provided this campaign will be assigned to given campaign-set.
StartDateDateTimeStart date of the campaign. Cannot be in the past.
EndDateDateTimeCannot be in the past. Needs to be at least one and maximum 365 days greater than StartDate.
StatusStatus stringStatus of the campaign. Allowed values: Active or Paused
LineItemsLineItemDTO[]Line items with inventories and targeting setup.
Bannerslong[] or numeric string (long) arrayIDs of the banners from the banner library that should be attached to this campaign. Cannot be empty.
BookingDetailsCampaignBookingDetailDTO[]Array of booking details. Each booking detail needs to have valid ID value.
MetaRulesMetaRuleDescritption[]Array of meta rules to be created on this campaign.
RulesCampaignRuleDTO[]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

FieldTypeDescription
PropertiesCampaignPropertyDTO[]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

FieldTypeDescription
StatusStatus stringStatus 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

FieldTypeDescription
NamestringName of the line item. On create or edit please use names from the campaign-template.
InventoriesInventoryDTO[]Selected inventories. To get possible values see: Read template inventories
TargetingTargetingDTO[]Selected targeting. To get possible values see: Read template targeting

InventoryDTO

FieldTypeDescription
IDlongID of the inventory
InventorySourceIDintSource of the inventories. Required by Adform
NamestringName of the inventory

TargetingDTO

FieldTypeDescription
IDnumeric string (long)ID of the targeting
NamestringName of the targeting
TargetingRulesTargetingRuleDTO[]Collection of targeting rules

TargetingRuleDTO

FieldTypeDescription
TargetingTypeTargetingType enumType of the targeting.
TypeIDlongID of the targeting type. Depends on the external systems.
TypeNamestringName of the targeting type.
ProviderIDlongID of the provider. Depends on the external systems.
ProviderNamestringName of the provider.
ZipCodesZipCodeDTO[]Array of the zipcodes. Used when TargetingType is set to Location.
LocationsLocationHeaderDTO[]Array of the locations. Used when TargetingType is set to Location.
HyperLocationsHyperLocationDTO[]Array of the hyper locations. Used when TargetingType is set to HyperLocation.
SegmentsSegmentDTO[]Array of the segments. Used when TargetingType is set to SegmentData.
AgesAgeSegmentDTO[]Array of the age segments. Used when Targeting type is set to Age.
GendersSegmentDTO[]Array of the gender segments. Used when TargetingType is set to Gender.
Countriesstring[]Read only value. Returns country codes of the available countries. Can be used to search for locations in Location search.

TargetingType Enum

EnumValueDescription
Location0Geo-location targeting type.
SegmentData1Custom segment targeting type.
HyperLocation2Coordinate based location type. Lat-long-radius.
Age3Age semgents targeting type.
Gender4Gender segments targeting type.

ZipCodeDTO

FieldTypeDescription
IDstringID of the Zip Code
NamestringName of the Zip Code

LocationHeaderDTO

FieldTypeDescription
IDstringID of the location
NamestringName of the location

HyperLocationDTO

FieldTypeDescription
IDstringID of the hyper location.
NamestringName of the hyper location.
LongitudedoubleLongitude coordinate.
LatitudedoubleLatitude coordinate.
RadiusdoubleRadius in meters.

SegmentDTO

FieldTypeDescription
IDnumeric stringID of the segment
NamestringName of the segment

AgeSegmentDTO

FieldTypeDescription
IDnumeric stringID of the segment.
NamestringName of the segment.
MinintMinimum age on the segment.
MaxintMaximume age on the segment.

CampaignType Enum

EnumValueDescription
None0None.
AdformRTB1Adform Real Time Bidding.
AdformDirect2Adform Direct.
Facebook3Facebook
AdwordsSearch4AdWords Search Network.
AdwordsDisplay5AdWords Display Network.
Dfp6DoubleClick for Publishers.
AdwordsDynamicSearch7AdWords Search Network (dynamic).
Xandr8Xandr display.

SystemType Enum

EnumValueDescription
None0None.
Adform1Adform.
Facebook2Facebook.
Adwords3Google AdWords.
Dfp4Google DFP (ad manager).
Xandr5Xandr.

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
FieldTypeDescription
Countriesstring[]Array of country codes. Required.
LocationTypesLocationType[]Array of location types. Required.
SystemTypeSystemTypeSystem type. Required.
QuerystringQuery 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.

FieldTypeDescription
SystemTypeSystemTypeSystem type
Locationsstring[]Array of Location or Zip Code names. E.g. ["Copenhagen", "4200"]
Countriesstring[]Array of country codes.

It will return LocationValidationDTO response.

LocationValidationDTO
FieldTypeDescription
ValidLocationsLocationHeaderDTO[]Array of valid locations.
InvalidLocationsstring[]Array of locations which are invalid or not exist in our location repository.

Location type Enum

EnumValueDescription
None0Default. Not defined.
City1City.
Region2Region.
Country3Country.
ZipCode4Zip/Postal code.
← Client onboardingBanner upload →
  • Campaign resource
  • Campaign creation process
  • Create campaign
    • CreateCampaignRequest
    • Examples of campaign creation
    • Campaign statuses
  • Campaign read
    • Campaign search
    • CampaignDTO
    • Campaign read many
    • Campaign read single
    • Get campaign container
    • Get campaign inventories
    • Get campaign targeting
    • Get campaign banners
    • Get campaign status
    • Get campaign properties
  • Update campaign
    • EditCampaignRequest
    • Update campaign properties
    • Change status (Activate - Deactivate)
  • Delete campaign
  • DTOs
    • LineItemDTO
    • InventoryDTO
    • TargetingDTO
    • TargetingRuleDTO
    • TargetingType Enum
    • ZipCodeDTO
    • LocationHeaderDTO
    • HyperLocationDTO
    • SegmentDTO
    • AgeSegmentDTO
    • CampaignType Enum
    • SystemType Enum
  • Campaign Template
    • Get campaign template
  • Locations
    • Get locations
Copyright © 2024 Nexta ApS