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
Try it in Graph API Explorer
If you want to learn how to use the Graph API, read our Using Graph API guide
Parameters
| Parameter | Description |
|---|---|
associated_audience_idint64 |
SELF_EXPLANATORY
|
creation_paramsdictionary { string : <string> } |
SELF_EXPLANATORY
|
descriptionstring |
SELF_EXPLANATORY
|
enable_fetch_or_createboolean |
enable_fetch_or_create
|
event_sourcesarray<JSON object> |
event_sources
id int64
id
required type enum {APP, OFFLINE_EVENTS, PAGE, PIXEL}
type
required Show child parameters |
exclusionslist<Object> |
SELF_EXPLANATORY
booking_window Objectmin_seconds int64max_seconds int64Show child parameters count Objectevent stringtype 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 Objectmin_seconds integerrequired max_seconds integerrequired Show child parameters retention_days int64retention_seconds integerrule Objectpixel_id int64Show child parameters |
inclusionslist<Object> |
SELF_EXPLANATORY
booking_window Objectmin_seconds int64max_seconds int64Show child parameters count Objectevent stringtype 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 Objectmin_seconds integerrequired max_seconds integerrequired Show child parameters retention_days int64retention_seconds integerrule Objectpixel_id int64Show child parameters |
namestring |
SELF_EXPLANATORY
required |
opt_out_linkstring |
SELF_EXPLANATORY
|
parent_audience_idint64 |
SELF_EXPLANATORY
|
product_set_idnumeric string or integer |
SELF_EXPLANATORY
required |
subtypeenum {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.