objective field. For Advantage+ catalog ads, supported objectives are PRODUCT_CATALOG_SALES, CONVERSIONS, LINK_CLICKS, or APP_INSTALLS. If the objective you provide is CONVERSIONS, LINK_CLICKS, or APP_INSTALLS, then the promoted_object field is not required.curl \
-F 'name=Product Catalog Sales Campaign' \
-F 'objective=PRODUCT_CATALOG_SALES' \
-F 'promoted_object={"product_catalog_id":"<PRODUCT_CATALOG_ID>"}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/campaigns
product_set_id in promoted_object for your ad set level to promote products from that product set.custom_event_type in promoted_object when the optimization_goal is OFFSITE_CONVERSIONS. This targets your ads to people who performed that event in your app or site.ADD_TO_CART, it means an Add to Cart event is the conversion event. By default custom_event_type is set to PURCHASE. Learn more about standard events and values for custom_event_type at Meta Pixel Conversion Tracking.optimization_goal to OFFSITE_CONVERSIONSbilling_event to IMPRESSIONSoptimization_goal and billing_event combinations can be found in Optimization Goal and Billing Events.IMPRESSIONS and optimizes for OFFSITE_CONVERSIONS:curl \
-F 'name=Product Catalog Sales Adset' \
-F 'bid_amount=3000' \
-F 'billing_event=IMPRESSIONS' \
-F 'optimization_goal=OFFSITE_CONVERSIONS' \
-F 'daily_budget=15000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={ "geo_locations": {"countries":["US"]},
"dynamic_audience_ids": ["<DYNAMIC_AUDIENCE_ID>"]
}' \
-F 'promoted_object={"product_set_id":"<PRODUCT_SET_ID>"}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adsets
DYNAMIC_AUDIENCE_ID refers to a product audience. Optionally, you can omit dynamic_audience_ids from the call.dynamic_audience_ids from the call and instead send the behavioral targeting information as part of product_audience_specs or excluded_product_audience_specs parameters. These specs are defined by the same parameters you use to create a product audience.| Name | Description |
|---|---|
product_set_id
numeric string
| Required. The product set to target with this audience. |
inclusions
JSON object
| Required. A set of events to target. At least one inclusion is required. Each inclusion should have exactly one event. |
inclusions.retention_seconds
int
| Required. The number of seconds to keep the Accounts Center account in the audience. |
inclusions.rule
object[]
| |
exclusions
JSON object
| Optional. A set of events that remove an Accounts Center account from targeting. |
exclusions.retention_seconds
int
| Required, if exclusion is specified. The number seconds to retain the exclusion. |
exclusions.rule
object[]
|
event with the eq operator either as a top-level rule or as part of a top-level and rule.curl \
-F 'name=Product Catalog Sales Adset' \
-F 'bid_amount=3000' \
-F 'billing_event=LINK_CLICKS' \
-F 'optimization_goal=LINK_CLICKS' \
-F 'daily_budget=15000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"publisher_platforms": ["facebook","audience_network"],
"device_platforms": ["mobile"],
"geo_locations": {"countries":["US"]},
"product_audience_specs": [
{
"product_set_id": "<PRODUCT_SET_ID>",
"inclusions": [{"retention_seconds":432000,"rule":{"event":{"eq":"ViewContent"}}}],
"exclusions": [{"retention_seconds":432000,"rule":{"event":{"eq":"Purchase"}}}]
}
],
"excluded_product_audience_specs": [
{
"product_set_id": "<PRODUCT_SET_ID>",
"inclusions": [{"retention_seconds":259200,"rule":{"event":{"eq":"ViewContent"}}}]
}
]
}' \
-F 'promoted_object={"product_set_id":<PRODUCT_SET_ID>"}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adsets
curl \ -F 'name=Case 1 Adset' \ -F 'bid_amount=3000' \ -F 'billing_event=IMPRESSIONS' \ -F 'status=ACTIVE' \ -F 'daily_budget=15000' \ -F 'campaign_id=<CAMPAIGN_ID>' \ -F 'targeting= { \ "geo_locations": { \ "countries":["US"], \ }, \ "interests":[ \ {"id":6003397425735,"name":"Tennis"}, \ ], \ }' \ -F 'promoted_object={"product_set_id”:<PRODUCT_SET_ID>}' \ -F 'access_token=<ACCESS_TOKEN>’ \ https://graph.facebook.com/<API_VERSION>/act_<ACCOUNT_ID>/adsets
product_set_id to product set B at the ad creative level.product_set_id in product_audience_specs to PRODUCT_SET_2’s ID or shoes and the product_set_id in promoted_object to PRODUCT_SET_1’s ID or handbags.curl \
-F 'name=My cross sell ad set' \
-F 'bid_amount=3000' \
-F 'billing_event=LINK_CLICKS' \
-F 'optimization_goal=LINK_CLICKS' \
-F 'daily_budget=15000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"geo_locations": {"countries":["US"]},
"product_audience_specs": [
{
"product_set_id": "<PRODUCT_SET_2_ID>",
"inclusions": [{"retention_seconds":432000,"rule":{"event":{"eq":"ViewContent"}}}],
"exclusions": [{"retention_seconds":432000,"rule":{"event":{"eq":"Purchase"}}}]
}
],
"excluded_product_audience_specs": [
{
"product_set_id": "<PRODUCT_SET_2_ID>",
"inclusions": [{"retention_seconds":259200,"rule":{"event":{"eq":"ViewContent"}}}]
}
]
}' \
-F 'promoted_object={"product_set_id":"<PRODUCT_SET_1_ID>"}' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adsets
product_set_id in the creative as PRODUCT_SET_1’s ID.curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"description": "Description {{product.description}}",
"link": "<LINK>",
"message": "Test {{product.name | titleize}}",
"name": "Headline {{product.price}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
customOptimize for OFFSITE_CONVERSIONS with stronger intent signals such as Purchase or InitiateCheckout.OFFSITE_CONVERSIONS for PURCHASE events.curl \
-F 'name=Broad Audience Targeting' \
-F 'bid_amount=800' \
-F 'billing_event=IMPRESSIONS' \
-F 'daily_budget=15000' \
-F 'campaign_id=<CAMPAIGN_ID>' \
-F 'targeting={
"age_max": 65,
"age_min": 30,
"geo_locations": {"countries":["US"]},
"genders": [2],
"excluded_product_audience_specs": [
{
"product_set_id": "<PRODUCT_SET_ID>",
"inclusions": [{"retention_seconds":864000,"rule":{"event":{"eq":"Purchase"}}}]
}
]
}' \
-F 'promoted_object={"product_set_id":"<PRODUCT_SET_ID>","custom_event_type":"PURCHASE"}' \
-F 'optimization_goal=OFFSITE_CONVERSIONS' \
-F 'status=PAUSED' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adsets
product_type. The product type is the category’s categorization criteria, which is the catalog field name used to define the categories. The catalog field’s value is the category’s criteria value.| Retailer | ID Name | Price | Product Type | Brand | Category |
|---|---|---|---|---|---|
prod_1 | T-Shirt | USD 25 | Clothes | Brand A | Category A |
prod_2 | FB Hoodie | USD 30 | Clothes | Brand B | Category A |
prod_3 | iPhone 6 | USD 800 | Phone | Brand C | Category B |
prod_4 | Samsung Galaxy S5 | USD 750 | Phone | Brand C | Category B |
prod_5 | Rice cooker | USD 120 | Appliance | Brand C | Category C |
prod_6 | Parker Sofa | USD 500 | Appliance | Brand D | Category D |
prod_7 | Sunscreen | USD 14 | Personal Care | Brand E | Category E |
destination_uri — The URL of the landing page when a user clicks the category.image_url — Optional. The URL of a life style image representing the category. If no image_url is provided, we will autogenerate a collage of top products from that category.curl -G \
-d 'fields=["criteria_value","name","description","destination_uri","image_url"]' \
-d 'categorization_criteria=product_type' \
-d 'filter={"price_amount":{"gt":1500}}' \ # optional
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<PRODUCT_CATALOG_ID>/categories
{ "data": [ { "criteria_value": "clothes", "name": "Awesome clothes", "description": "Check out these awesome clothes!", "destination_uri": "http://www.example.com/clothes", "image_url": "http://www.example.com/clothes.jpg" }, ... { "criteria_value": "shoes", "name": "Awesome shoes", "description": "Check out these awesome shoes!", "destination_uri": "http://www.example.com/shoes", "image_url": "http://www.example.com/shoes.jpg" } ] }
categorization_criteria and criteria_value are required, while the name, description, destination_uri, and image_url fields are optional. When updating the information of a category for the first time, you must specify the destination_uri. If you want to skip delivery of a category, simply set its destination_uri to be empty.curl \
-F 'data=[{"categorization_criteria":"product_type","criteria_value":"product_type_value","name":"Name","description":"Description","destination_uri":"http://www.example.com/","image_url":"<IMAGE_URL>"}]' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<lPRODUCT_CATALOG_ID>/categories
curl \
-F "name=Dynamic Category Ad Creative" \
-F 'object_story_spec={"page_id": "<PAGE_ID>", "template_data": {"description": "{{category.description}}", "link": "https://www.example.com/", "message": "<MESSAGE>", "name": "{{category.name}}"}}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'categorization_criteria=brand' \
-F 'category_media_source=MIXED' \ # optional
-F access_token=<ACCESS_TOKEN> \
https://graph.facebook.com/v25.0/act_<ACCOUNT_ID>/adcreatives

category.name — The category name within the promoted product set.category.description — The category description within the promoted product set.category.destination_uri — The category destination URI.category.min_price — The minimum price for this category within the promoted product set. This information is pulled from the catalog.| Name | Description |
|---|---|
categorization_criteria | Specifies which category type to use. Values:
|
category_media_source | Specifies how to render the category carousel card. Values:
![]()
|
category_media_source = category.template_data object of the object_story_spec and use the following fields:| Name | Description | Accepts Template Parameters |
|---|---|---|
call_to_action
object
| No | |
message
string
| Message for your ad, visible on Instagram. | Yes |
link
string
| Link to your website, used to generate the caption of the ad. This field will always be replaced with the link field from your data feed file, except for the end card of carousel ads, which will link to this.Note: This cannot be a Facebook URL. | No |
name
string
| Name or title for your ad, visible on Instagram. | Yes |
description
string
| Description for your ad, not visible on Instagram. | Yes |
force_single_link
boolean
| Optional. Force to render a single link format. When set to true, the creative will be a link page post ad showing a single product. When left out, the resulting ad will be a carousel ad. Facebook will choose the number of cards to optimize the performance of your ad. | No |
show_multiple_images
boolean
| Show multiple images in the carousel for a single product. Note: force_single_link and multi_share_end_card must be set to true and false respectively. | No |
multi_share_end_card
boolean
| Optional. Default is true.Use this in carousel format. If set to false, it will remove the end card that displays the page icon. | No |
child_attachments
array
| Enables you to provide one or more static cards in Advantage+ catalog ads for the carousel format. The static cards appear either before or after all Advantage+ catalog ads. Provide the static_card field set to true for each static card under child_attachments. | No |
image_layer_specsAdCreativeLinkDataImageLayerSpecs | Specifies how to transform the images when they are delivered to users in the ad. One AdCreativeLinkDataImageOverlaySpec is needed for each layer to define how to render the layer. The layers will be rendered in the order they appear in the list.Note: AdCreativeLinkDataImageLayerSpec is available on a limited basis. Please contact your Facebook representative for more details. | No |
image_overlay_specAdCreativeLinkDataImageOverlaySpec | Specifies how to render overlays on an image for a dynamic item. | No |
preferred_image_tags
array
| Selects which image to use, if you have added tags to your images. For any item, we choose the image as follows: we get the first tag in preferred_image_tags that has at least one image for the item, then render the first image for that tag. If no tags correspond to an image, we serve the first image. | No |
preferred_video_tags | Selects which video to use, if you have added tags to your videos. For any item, we choose the video as follows: we get the first tag in preferred_video_tags that has at least one video for the item, then render the most performant video for that tag and placement. If no tags correspond to a video, we serve the first video. If there are no videos, we fall back to image rendering.Note: preferred_video_tags will only be applied if your ad is opted into Dynamic Media. | No |
curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"description": "Description {{product.description}}",
"link": "<LINK>",
"message": "Test {{product.name | titleize}}",
"name": "Headline {{product.price}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
curl \ -F 'name=Advantage+ Catalog Ads Template Creative Sample' \ -F 'object_story_spec={ "page_id": "<PAGE_ID>", "template_data": { "call_to_action": {"type":"SHOP_NOW"}, "description": "Description {{product.description}}", "link": "<LINK>", "message": "Test {{product.name | titleize}}", "name": "Headline {{product.price}}", "image_layer_specs": [ { "layer_type": "image", "image_source": "catalog" }, { "layer_type": "frame_overlay", "blending_mode": "lighten", "frame_image_hash": "<HASH>", "frame_source": "custom", "opacity": 100, "overlay_position": "center", "scale": 100 }, { "layer_type": "text_overlay", "content": { "type": "price", "auto_show_enroll_status": "OPT_IN" }, "opacity": 100, "overlay_position": "top_left", "overlay_shape": "rectangle", "shape_color": "DF0005", "text_color": "FFFFFF", "text_font": "open_sans_bold" } ] } }' \ -F 'product_set_id=<PRODUCT_SET_ID>' \ -F 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/adcreatives
curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"call_to_action": {"type":"SHOP_NOW"},
"description": "Description {{product.description}}",
"force_single_link": true,
"link": "<LINK>",
"message": "Test {{product.name | titleize}}",
"name": "Headline {{product.price}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
curl -X POST \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'object_story_spec={
"page_id": <PAGE_ID>,
"template_data": {
"message": "Test {{product.name | titleize}}",
"link": "<YOUR_LINK_URL>",
"name": "Headline {{product.price}}",
"description": "Description {{product.description}}",
"multi_share_end_card": false,
"force_single_link": true,
"show_multiple_images": true,
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"child_attachments": [
{
"call_to_action": {"type":"SHOP_NOW"},
"description": "30% off",
"image_hash": "<IMAGE_HASH>",
"link": "https:\/\/www.link.com\/coupon",
"name": "Coupon Static Card",
"static_card": true
},
{
"call_to_action": {"type":"SHOP_NOW"},
"description": "Description {{product.description}}",
"name": "Headline {{product.price}}"
}
],
"link": "<LINK>",
"message": "Test Message"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'object_story_spec={
"page_id": "PAGE_ID",
"template_data": {
"call_to_action": {"type":"SHOP_NOW"},
"description": "Description {{product.description}}",
"link": "LINK",
"message": "Test {{product.name | titleize}}",
"name": "Headline {{product.price}}",
"format_option": "carousel_slideshows"
}
}' \
-F 'product_set_id=PRODUCT_SET_ID' \
-F 'access_token=ACCESS_TOKEN' \
https://graph.facebook.com/v25.0/AD_ACCOUNT_ID/adcreatives
{"id":"creative_id"}
<listing> <hotel_id>hotel_1</hotel_id> ... <image> <url>https://media-cdn.tripadvisor.com/media/photo-o/05/ca/40/af/the-epiphany-a-joie-de.jpg (https://l.facebook.com/l.php?u=https%3A%2F%2Fmedia-cdn.tripadvisor.com%2Fmedia%2Fphoto-o%2F05%2Fca%2F40%2Faf%2Fthe-epiphany-a-joie-de.jpg&h=ATPTuLcCa7Vsnmn07cEVa0YseTFl1C2hOax9NezejmXDbR48w3CLdjLlwlpuGCRDQmuafQvk03ybGqfhk-2mBcH7xtuKAsnuuq9xKwBd8DwfuBMZkq3n1qX5MdychRKGy2bo2ax9BZQzgqVDY_AvC1EqE6aAdUEc)</url> <tag>exterior</tag> <tag>first image</tag> <tag>tree</tag> </image> <image> <url>http://www3.hilton.com/resources/media/hi/DFWANHH/en_US/img/shared/full_page_image_gallery/main/HH_exteriorview001_1270x560_FitToBoxSmallDimension_Center.jpg (http://l.facebook.com/l.php?u=http%3A%2F%2Fwww3.hilton.com%2Fresources%2Fmedia%2Fhi%2FDFWANHH%2Fen_US%2Fimg%2Fshared%2Ffull_page_image_gallery%2Fmain%2FHH_exteriorview001_1270x560_FitToBoxSmallDimension_Center.jpg&h=ATPTuLcCa7Vsnmn07cEVa0YseTFl1C2hOax9NezejmXDbR48w3CLdjLlwlpuGCRDQmuafQvk03ybGqfhk-2mBcH7xtuKAsnuuq9xKwBd8DwfuBMZkq3n1qX5MdychRKGy2bo2ax9BZQzgqVDY_AvC1EqE6aAdUEc)</url> <tag>skyline</tag> ... </image> ... </listing>
preferred_image_tags can be passed in the object_story_spec.curl \
-F 'name=Ad Creative Test'\
-F 'object_story_spec={
"page_id": '<PAGE_ID>',
"template_data": {
"preferred_image_tags": ["skyline","exterior"],
"preferred_video_tags": ["landscape","city"],
"call_to_action": {"type":"BOOK_TRAVEL"},
"description": "{{hotel.description}}",
"link": "<URL>",
"message": "Book your stay in {{hotel.city}}",
"name": "{{hotel.name | titleize}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
url and tag fields are supported. Currently, only one video is supported for each product.<?xml version="1.0" encoding="utf-8"?> <listings> <title>Test hotel feed</title> <listing> <hotel_id>hotel_1</hotel_id> <name>Test Hotel 1</name> <description>A very nice hotel</description> <brand>Facebook</brand> <address format="simple"> <component name="addr1">180 Hamilton Ave</component> <component name="city">Palo Alto</component> <component name="city_id">12345</component> <component name="region">California</component> <component name="postal_code">94301</component> <component name="country">United States</component> </address> <latitude>37.4435997</latitude> <longitude>-122.1615219</longitude> <neighborhood>Palo Alto</neighborhood> <neighborhood>Silicon Valley</neighborhood> <margin_level>8</margin_level> <base_price>200.5 USD</base_price> <phone>+1 650 666-3311</phone> <star_rating>2.5</star_rating> <guest_rating> <score>7.8</score> <rating_system>tripAdvisor</rating_system> <number_of_reviewers>300</number_of_reviewers> </guest_rating> <guest_rating> <score>9.8</score> <rating_system>Hotels.com</rating_system> <number_of_reviewers>35000</number_of_reviewers> </guest_rating> <image> <url>https://media-cdn.tripadvisor.com/media/photo-o/05/ca/40/af/the-epiphany-a-joie-de.jpg</url> <tag>front view</tag> <tag>first image</tag> </image> <image> <url>http://www.jdvhotels.com/content/uploads/2014/06/72-1200x800.jpg</url> <tag>room</tag> <tag>bed</tag> </image> <loyalty_program>Starwood</loyalty_program> <url>http://www.jdvhotels.com/hotels/california/silicon-valley-hotels/the-epiphany-hotel/</url> <applink property="ios_url" content="example-ios://electronic"/> <applink property="ios_app_store_id" content="42"/> <applink property="ios_app_name" content="Electronic Example iOS"/> * <video> <url>http://example.com/some_video1.mp4</url> <tag>City</tag> <tag>Package</tag> </video>* </listing> </listings>

videos field to access video metadata. For earlier versions, use videos_metadata. We recommend upgrading to v23.0 or above and using the videos field.curl -i -X GET \
"https://graph.facebook.com/v25.0/1234567890?fields=videos&access_token=<ACCESS TOKEN>"

template_url_spec field in the ad creative. This allows adding a click tracker template to the ad level without the need to hard code it in your data feed file. You can also use this field to create templates for deep linking.template_url_spec setting:curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"description": "Description {{product.description}}",
"link": "<URL>",
"message": "Test {{product.name | titleize}}",
"name": "Headline {{product.price}}"
}
}' \
-F 'template_url_spec={
"ios": {
"app_store_id": "123",
"url": "example:\/\/link\/?nav=item.view&id={{product.retailer_id | urlencode}}&referrer=http:\/\/rover.example.com\/rover\/1\/711-198453-24755-9\/16%3Fitemid={{product.retailer_id | urlencode | urlencode}}"
},
"web": {
"url": "http:\/\/clicktrack.com\/cm325?id={{product.retailer_id | urlencode}}&redirect_url={{product.url | urlencode | urlencode}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
{{ }} section with the proper values from your data feed file. Available template values are:| Name | Description |
|---|---|
brand | The item’s brand value from your data feed file. |
current_price | The formatted sale price if the product has a specified sale price. Optionally you can specify sale start and end dates for a product and current_price will show the sale price while the item is on sale. If no sale price is specified or the sale dates have passed, this will show the price field. |
description | The item’s description value from your data feed file. |
name | The item’s title value from your data feed file. |
price | The formatted price column (like $1,234.56). |
retailer_id | The item’s id value from your data feed file. |
url | The item’s link value from your data feed file. |
custom_label_0 | The item’s custom_label_0 value from your data feed file. |
custom_label_1 | The item’s custom_label_1 value from your data feed file. |
custom_label_2 | The item’s custom_label_2 value from your data feed file. |
custom_label_3 | The item’s custom_label_3 value from your data feed file. |
custom_label_4 | The item’s custom_label_4 value from your data feed file. |
{{field option1 option2 ...}}
| Option | Description | Supported by |
|---|---|---|
raw | Omits the currency symbol | pricecurrent_price |
strip_zeros | Omits the cents part in currency if cents are zeros | pricecurrent_price |
round | Omits the cent amount of the currency while rounding up the price | All price fields |
{{field | transform}}
| Transformations | Description |
|---|---|
number_format | Format the number in a default format, using a comma (“,”) as thousand separator, rounded to the nearest integer (e.g., 1234.56->“1,235”). The value to format must be an unformatted number (“1234”, not “1,234”). |
titleize | Capitalize the words for a better looking title (e.g., “box” -> “Box”). |
urlencode | Encode the value for URL. |
applink_treatment field while creating an ad creative to specify the desired behavior when a user clicks on an ad.| Name | Description |
|---|---|
web_only | Always send the user to the given web URL. |
deeplink_with_web_fallback | If the app is installed on the user’s phone and we have corresponding deep link information, send the user to the app. If one of these conditions is not met, send them to the website. |
deeplink_with_appstore_fallback | Default when app links are present for the product. If the app is installed on the user’s phone and we have corresponding deep link information, send the user to the app. If the app is not installed, send them to the app store for the app. |
curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'applink_treatment=deeplink_with_web_fallback' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"call_to_action": {"type":"SHOP_NOW"},
"description": "Description {{product.description}}",
"link": "<LINK>",
"message": "Test {{product.name | titleize}}",
"name": "Headline {{product.price}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
curl \
-F 'name=Advantage+ Catalog Ads Template Creative Sample' \
-F 'applink_treatment=deeplink_with_appstore_fallback' \
-F 'object_story_spec={
"page_id": "<PAGE_ID>",
"template_data": {
"call_to_action": {"type":"SHOP_NOW"},
"description": "Description {{product.description}}",
"link": "<LINK>",
"message": "Test {{product.name | titleize}}",
"name": "Headline {{product.price}}"
}
}' \
-F 'product_set_id=<PRODUCT_SET_ID>' \
-F 'access_token<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
automated_product_tags to true in the template_data of the object_story_spec. You must also provide a product set ID.curl \
-F 'name=Sample Creative' \
-F 'product_set_id="<PRODUCT_SET_ID>"' \
-F 'object_story_spec={
"template_data": {
"automated_product_tags": true
"call_to_action": {
"type": "SHOP_NOW"
},
"link": "<OFFSITE_LANDING_URL>",
"multi_share_end_card": false,
"name": "{{product.name}}"
},
"page_id": "<PAGE_ID>",
"instagram_user_id": "<IG_USER_ID>"
}' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/adcreatives
curl -X POST \
-F 'name="My Ad"' \
-F 'adset_id="<AD_SET_ID>"' \
-F 'creative={
"creative_id": "<CREATIVE_ID>"
}' \
-F 'status="PAUSED"' \
-F 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/ads
product_item_ids parameter or specify multiple product_item_ids to preview a carousel ad.curl -X GET \
-d 'ad_format="DESKTOP_FEED_STANDARD"' \
-d 'product_item_ids=[
"<PRODUCT_ITEM_ID>"
]' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/<CREATIVE_ID>/previews
| Name | Description |
|---|---|
product_item_ids
array[string]
| List of product FBIDs or Base64 URL-encoded product ID tokens. Each token is of the form catalog:{catalog_id}:{base64urlencode(retailer_id)}. |
GET call to the insights endpoint. Add product_id to the fields parameter.clicks, actions, and impressions for each product_id.curl -G \
-d 'date_preset=last_week' \
-d 'action_breakdowns=["action_type"]' \
-d 'breakdowns=["product_id"]' \
-d 'fields=account_name,impressions,actions' \
-d 'access_token=<ACCESS_TOKEN>' \
https://graph.facebook.com/v25.0/act_<AD_ACCOUNT_ID>/insights
{ "data": [ { "account_id": "123456", "product_id": "60750", "date_start": "2015-02-03", "date_stop": "2015-02-03", "impressions": 880, "clicks": 8, "actions": [ { "action_type": "link_click", "value": 6 }, { "action_type": "offsite_conversion.other", "value": 5 }, { "action_type": "offsite_conversion", "value": 5 } ], "account_name": "My Account" }, ], ... }
product_id for an Advantage+ catalog ads post. Make a GET call as follows with a post_id. The post_id is the effective_object_story_id of an ad creative, in the format of PageID_PostID.curl -G \ -d 'access_token=<ACCESS_TOKEN>' \ https://graph.facebook.com/<API_VERSION>/<POST_ID>/dynamic_posts
comments, likes, product_id, and child_attachments for carousel format, if applicable.dynamic_posts edge.