Facebook Special Ad Categories
General description
All businesses using the Marketing API must identify whether or not new and edited campaigns belong to a Special Ad Category.
All Facebook advertising campaigns are required to set a special ad category type durring campaign creation. The Special Ad Category can be of type NONE for campaigns that do not fall within a special ad category.
Important: When any of the special ad categories is selected a Special Ad Category country must be selected also.
The special ad categories can be one or many of the following types:
- CREDIT
- EMPLOYMENT
- HOUSING
- ISSUES_ELECTIONS_POLITICS
- NONE
When creating a campaign that belongs to a special ad category the process is the same as with any campaign creation. The main difference is that now the payload has to contain a list [] as follows:
The addition to the payload for campaign creation is the following:
Example
{ "CampaignProperties": [ { "LineItemName": null, "Name": "SpecialAdCategories", "Value": "["CREDIT"]" }, { "LineItemName": "", "Name": "SpecialAdCategoryCountries", "Value": "["DK"]" } ] }
In order to optain the available Special Ad Categories a call can be made to the following endpoint:
- GET /api/v3.0/client/{clientId}/reference-data/{advertisingPlatformName}
Example of request:
The response will contain all the availalable Special Ad Categories and Special Ad Categories Countries as a list [] as in the following response example:
Response:
{
"Name": "SpecialAdCategories",
"Value": "[\"HOUSING\",\"CREDIT\",\"EMPLOYMENT\",\"ISSUES_ELECTIONS_POLITICS\"]"
},
{
"Name": "SpecialAdCategoryCountries",
"Value": "[{\"Id\":\"DK\",\"Name\":\"Denmark\"},{\"Id\":\"DE\",\"Name\":\"Germany\"},{\"Id\":\"NO\",\"Name\":\"Norway\"},{\"Id\":\"CH\",\"Name\":\"Switzerland\"},{\"Id\":\"CA\",\"Name\":\"Canada\"},{\"Id\":\"BE\",\"Name\":\"Belgium\"},{\"Id\":\"IT\",\"Name\":\"Italy\"},{\"Id\":\"PT\",\"Name\":\"Portugal\"},{\"Id\":\"ES\",\"Name\":\"Spain\"},{\"Id\":\"SE\",\"Name\":\"Sweden\"},{\"Id\":\"SA\",\"Name\":\"Saudi Arabia\"},{\"Id\":\"KW\",\"Name\":\"Kuwait\"},{\"Id\":\"AE\",\"Name\":\"United Arab Emirates\"},{\"Id\":\"QA\",\"Name\":\"Qatar\"},{\"Id\":\"BH\",\"Name\":\"Bahrain\"},{\"Id\":\"OM\",\"Name\":\"Oman\"},{\"Id\":\"CL\",\"Name\":\"Chile\"},{\"Id\":\"PE\",\"Name\":\"Peru\"},{\"Id\":\"MX\",\"Name\":\"Mexico\"},{\"Id\":\"GT\",\"Name\":\"Guatemala\"},{\"Id\":\"UY\",\"Name\":\"Uruguay\"},{\"Id\":\"CR\",\"Name\":\"Costa Rica\"},{\"Id\":\"CO\",\"Name\":\"Colombia\"},{\"Id\":\"SV\",\"Name\":\"El Salvador\"},{\"Id\":\"PL\",\"Name\":\"Poland\"},{\"Id\":\"US\",\"Name\":\"United States\"},{\"Id\":\"AU\",\"Name\":\"Australia\"},{\"Id\":\"AL\",\"Name\":\"Albania\"},{\"Id\":\"BA\",\"Name\":\"Bosnia and Herzegovina\"},{\"Id\":\"BG\",\"Name\":\"Bulgaria\"},{\"Id\":\"HR\",\"Name\":\"Croatia\"},{\"Id\":\"CY\",\"Name\":\"Cyprus\"},{\"Id\":\"CZ\",\"Name\":\"Czech Republic\"},{\"Id\":\"EE\",\"Name\":\"Estonia\"},{\"Id\":\"GR\",\"Name\":\"Greece\"},{\"Id\":\"HU\",\"Name\":\"Hungary\"},{\"Id\":\"XK\",\"Name\":\"Kosovo\"},{\"Id\":\"LU\",\"Name\":\"Luxembourg\"},{\"Id\":\"MD\",\"Name\":\"Moldova\"},{\"Id\":\"ME\",\"Name\":\"Montenegro\"},{\"Id\":\"MK\",\"Name\":\"Macedonia\"},{\"Id\":\"RO\",\"Name\":\"Romania\"},{\"Id\":\"RS\",\"Name\":\"Serbia\"},{\"Id\":\"SK\",\"Name\":\"Slovakia\"},{\"Id\":\"SI\",\"Name\":\"Slovenia\"},{\"Id\":\"FI\",\"Name\":\"Finland\"},{\"Id\":\"FR\",\"Name\":\"France\"},{\"Id\":\"IE\",\"Name\":\"Ireland\"},{\"Id\":\"NL\",\"Name\":\"Netherlands\"},{\"Id\":\"GB\",\"Name\":\"United Kingdom\"},{\"Id\":\"AT\",\"Name\":\"Austria\"}]"
}
Full example of CreateCampaignRequest with Special Ad Categories:
{
"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"
}],
"CampaignProperties": [
{
"LineItemName": null,
"Name": "SpecialAdCategories",
"Value": "[\"CREDIT\"]"
},
{
"LineItemName": "",
"Name": "SpecialAdCategoryCountries",
"Value": "[\"DK\"]"
}],
}
Targeting and Audience Changes
When a campaign falls under a special ad cateogory the following restrictions are applied:
Age
Specific age can not be targeted. You have two options:
- No ages TargetingRuleDTO present in the payload
- All ages TargetingRuleDTO present in the payload
Genders
Specific genders can not be targeted. You have two options:
- No genders TargetingRuleDTO present in the payload
- All genders TargetingRuleDTO present in the payload
Locations Targeting
- Location exclusion is not supported.
- Location selection must include all areas equal or larger than 15 mile or 25 kilometer radius for the US and Canada, and 15 kilometer radius for Europe of any selected city, address or dropped pin.
- No ZipCodes allowed.
Detailed Targeting
The following Interest Targeting options are not permitted:
- Behavior and Demographic targeting
- Interest exclusion
- Excluding detailed targeting selections
Important
A call to POST /api/v3.0/campaign/{clientId}/validate
Will validate if the CreateCampaignRequest payload is complying with the Special Ad Categories regulations.
Facebook complete guideline regarding Special Ad Categories: https://developers.facebook.com/docs/marketing-api/audiences/special-ad-category