online job

Friday 14 March 2014

Ads opi Overview

Overview

An ad account is an account object for managing ads. Each ad account can have multiple users, each with a different role. You may also create groups of ad accounts - learn more in the ad account group documentation.

Read

To read information about an ad account, make an HTTP GET call to
https://graph.facebook.com/act_{ad_account_id}/?fields=<comma separated list of fields>
And specify any of the following fields. Only id is returned by default.
NameDescriptionType
account_groupsContainer for the ID, name, and status of the account's account groupsarray
account_idThe ID of the ad accountlong
account_statusStatus of the account.
1 = Active
2 = Disabled
3 = Unsettled
7 = Pending Review
101 = temporarily unavailable
100 = pending closure.)
integer
ageAmount of time the ad account has been open, in daysinteger
agency_client_declarationDetails of the agency advertising on behalf of this client account, if applicable. See table below for more detailobject
amount_spentCurrent total amount spent by the account. This can be reset.integer
balanceBill amount dueinteger
business_cityCity for business addressstring
business_country_codeCountry code for the business addressstring
business_nameThe business name for the accountstring
business_stateState abbreviation for business addressstring
business_street2Second line of the business street address for the accountstring
business_streetFirst line of the business street address for the accountstring
business_zipZip code for business addressstring
capabilities1=DIRECT_SALES
2=PREMIUM
4= VIEW_TAGS
5= CUSTOM_CLUSTER_SHARING
6= LOOKALIKE_AUDIENCE
7= CUSTOM_AUDIENCES_OPT_OUT_LINK
12= CUSTOM_AUDIENCES_FOLDERS
28=NEW_CAMPAIGN_STRUCTURE
array. 
April 9th breaking change notice: The enum (string) value will be used instead of the array value.
currencyThe currency used for the account, based on the corresponding value in the account settings. The list of supported currencies can be found herestring
daily_spend_limitThe account's limit for daily spend, based on the corresponding value in the account settingsinteger
idThe string act_{ad_account_id}string
is_personalIf this is a personal or business accountinteger
nameName of the account; note that many accounts are unnamed, so this field may be emptystring
offsite_pixels_tos_acceptedIndicates whether the offsite pixel Terms Of Service contract was signedboolean
spend_capThe maximum that can be spent by this account after which campaigns will be paused.integer
timezone_idID for the timezone. See hereinteger
timezone_nameName for the time zonestring
timezone_offset_hours_utcTime Zone difference from UTCinteger
tos_acceptedIDs of Terms of Service contracts signedarray
usersContainer for the user ID, permissions, and rolearray
vat_statusVat status code for the account.
0: Unknown
1: VAT not required- US/CA
2: VAT information required
3: VAT information submitted
4: Offline VAT validation failed
5: Account is a personal account
integer
Description of the fields in array agency_client_declaration:
NameDescriptionType
agency_representing_clientWhether this account is for an agency representing a clientinteger
client_based_in_franceWhether the client is based in Franceinteger
has_written_mandate_from_advertiserWhether the agency has a written mandate to advertise on behalf of this clientinteger
is_client_paying_invoicesWhether the client is paying via invoiceinteger
client_nameName of the clientstring
client_email_addressClient's email addressstring
client_streetFirst line of client's street addressstring
client_street2Second line of client's street addressstring
client_cityClient's citystring
client_provinceClient's provincestring
client_postal_codeClient's postal codestring
client_country_codeClient's country codestring

Update

To update the below fields of an ad account, make an HTTP POST call to
 https://graph.facebook.com/act_{ad_account_id}
with the following mutable fields:
You can only update one field at a time.
NameDescriptionType
spend_capThe total amount that this account can spend, after which all campaigns will be paused, based on amount_spent.integer
spend_cap_actionSetting this parameter to reset sets the amount_spent back to 0. Setting it to delete removes the spend_cap from the account.string
The response will be true.

Connections

An Ad Account object has connections to other information. To query an account's connections, make an HTTP GET call to
 https://graph.facebook.com/act_{ad_account_id}/{connection_name}
The list below details which connections are available:
NameDescriptionType
usersThe users of the ad accountarray of aduser objects
adcampaign_groupsThe ad campaigns in the accountarray of ad campaign objects
adcampaignsThe ad sets in the accountarray of ad set objects
adgroupsThe ads of the accountarray of adgroup objects
adcreativesThe creatives in the account's creative libraryarray of adcreative objects
adimagesThe ad images of the accountarray of adimage objects
adcampaignstatsThe statistics for the account by ad campaignarray of adstatistics objects
adgroupstatsThe statistics for the account by ad grouparray of adstatistics objects
statsThe statistics for the account in aggregatearray of adstatistics objects
reportstatsThe statistics for the account using the new Ad Report Stats APIDependent on input, see report stats documentation
adpreviewscssThe Ad Preview CSS for the accountAd Preview CSS snippet
broadtargetingcategoriesArray of broad category targeting (BCT) that you can specify for adsarray of broadcategorytargetingobjects
connectionobjectsThe Connection Objects of the ad account userarray of connectionobjects objects
ratecardThe Rate Cards for Homepage Ads for this accountarray of objects containing the country, currency and price for each rate
reachestimateUsed to estimate the reach of intended targetingarray of reachestimate objects
transactionsThe payment order for the accountPayment Order object

Limits

The following are the limits on ad account
  • What is the maximum amount of accounts that a user can have? : 25
  • What is the maximum number of users per account? : 25
  • How many ads can a regular ad account have? : 5,000 non-deleted ads
  • How many ads can a bulk ad account have? : 50,000 non-deleted ads
  • How many sets can a regular ad account have? : 1,000 non-deleted sets
  • How many sets can a bulk ad account have? : 10,000 non-deleted sets
  • How many campaigns can a regular ad account have? : 1,000 non-deleted campaigns
  • How many campaigns can a bulk ad account have? : 10,000 non-deleted campaigns
  • How many images can be uploaded to each ad account? There is no limit

Examples

Updating the spend cap of an ad account
curl \
-F "spend_cap=1000" \
-F "access_token=_____" \
"https://graph.facebook.com/act_12345678"
Querying for all ad campaigns in this ad account
curl -G \
-d "access_token=_____" \
"https://graph.facebook.com/act_12345678/adcampaigns"
Querying for the objects that this ad account's user is connected to
curl -G \
-d "access_token=_____" \
"https://graph.facebook.com/act_12345678/connectionobjects"
Finding the list of users who have access to this ad account
curl -G \
-d "access_token=_____" \
"https://graph.facebook.com/act_12345678/users"
Was this document helpful?

No comments: