Ads and Commerce

Ad Account Product Audiences

Updated: May 18, 2019
Copy for LLM

Reading

You can’t perform this operation on this endpoint.

Creating

/act_{ad_account_id}/product_audiences

You can make a POST request to product_audiences edge from the following paths:
When posting to this edge, an AdAccount will be created.

Example

POST /v25.0/act_<AD_ACCOUNT_ID>/product_audiences HTTP/1.1
Host: graph.facebook.com

name=Test+Iphone+Product+Audience&product_set_id=%3CPRODUCT_SET_ID%3E&inclusions=%5B%7B%22retention_seconds%22%3A86400%2C%22rule%22%3A%7B%22and%22%3A%5B%7B%22event%22%3A%7B%22eq%22%3A%22AddToCart%22%7D%7D%2C%7B%22userAgent%22%3A%7B%22i_contains%22%3A%22iPhone%22%7D%7D%5D%7D%7D%5D&exclusions=%5B%7B%22retention_seconds%22%3A172800%2C%22rule%22%3A%7B%22event%22%3A%7B%22eq%22%3A%22Purchase%22%7D%7D%7D%5D
If you want to learn how to use the Graph API, read our Using Graph API guide

Parameters

Parameter Description
associated_audience_id
int64
SELF_EXPLANATORY
creation_params
dictionary { string : <string> }
SELF_EXPLANATORY
description
string
SELF_EXPLANATORY
enable_fetch_or_create
boolean
enable_fetch_or_create
event_sources
array<JSON object>
event_sources

id int64
id
required
type enum {APP, OFFLINE_EVENTS, PAGE, PIXEL}
type
required
Show child parameters
exclusions
list<Object>
SELF_EXPLANATORY

booking_window Object

min_seconds int64
max_seconds int64
Show child parameters
count Object
event string
type enum {CUSTOM, PRIMARY, WEBSITE, APP, OFFLINE_CONVERSION, CLAIM, MANAGED, PARTNER, VIDEO, LOOKALIKE, ENGAGEMENT, BAG_OF_ACCOUNTS, STUDY_RULE_AUDIENCE, FOX, MEASUREMENT, REGULATED_CATEGORIES_AUDIENCE, BIDDING, EXCLUSION, MESSENGER_SUBSCRIBER_LIST}
retention Object

min_seconds integer
required
max_seconds integer
required
Show child parameters
retention_days int64
retention_seconds integer
rule Object
pixel_id int64
Show child parameters
inclusions
list<Object>
SELF_EXPLANATORY

booking_window Object

min_seconds int64
max_seconds int64
Show child parameters
count Object
event string
type enum {CUSTOM, PRIMARY, WEBSITE, APP, OFFLINE_CONVERSION, CLAIM, MANAGED, PARTNER, VIDEO, LOOKALIKE, ENGAGEMENT, BAG_OF_ACCOUNTS, STUDY_RULE_AUDIENCE, FOX, MEASUREMENT, REGULATED_CATEGORIES_AUDIENCE, BIDDING, EXCLUSION, MESSENGER_SUBSCRIBER_LIST}
retention Object

min_seconds integer
required
max_seconds integer
required
Show child parameters
retention_days int64
retention_seconds integer
rule Object
pixel_id int64
Show child parameters
name
string
SELF_EXPLANATORY
required
opt_out_link
string
SELF_EXPLANATORY
parent_audience_id
int64
SELF_EXPLANATORY
product_set_id
numeric string or integer
SELF_EXPLANATORY
required
subtype
enum {CUSTOM, PRIMARY, WEBSITE, APP, OFFLINE_CONVERSION, CLAIM, MANAGED, PARTNER, VIDEO, LOOKALIKE, ENGAGEMENT, BAG_OF_ACCOUNTS, STUDY_RULE_AUDIENCE, FOX, MEASUREMENT, REGULATED_CATEGORIES_AUDIENCE, BIDDING, EXCLUSION, MESSENGER_SUBSCRIBER_LIST}
SELF_EXPLANATORY

Return Type

This endpoint supports read-after-write and will read the node represented by id in the return type.
Struct  {
id: numeric string,
message: string,
}

Error Codes

Error Code Description
100
Invalid parameter
2654
Failed to create custom audience

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.