Updating Ad Campaigns

This page provides steps to update ad campaigns for the managed partners (sellers) you onboarded to managed partner ads.

Before You Begin

Before you updaten ad campaigns for your partners, make sure you have completed these steps:

  1. Create an Admin System User
  2. Assign Permissions to the Admin System User
  3. Generate an Access Token for the Admin System User
  4. Check Seller Eligibility
  5. Onboard a Seller

Required Permissions

To call the Seller Ad Update API, the user will need the following permissions:

  • Seller Business Admin

Targeting DSA Regulated Locations (European Union)

For ad campaigns targeting the European Union (EU) and/or associated territories, the dsa_payor and dsa_beneficiary fields are required. The information provided in these 2 fields will be shown to end users to indicate who is paying for the ad and who is the beneficiary of the ad. If the fields are not provided, the advertisers will not be able to edit MPA campaigns and the API will return a failed response with error codes listed below.

Seller Ad Update API Call

Request

curl \
  -F 'access_token=<ACCESS_TOKEN>' \
  -F 'asyncbatch=[ 
       { 
         "method": "POST", 
         "relative_url": "act_<ACCOUNT_ID>/managed_partner_ads", 
         "name": "create1", 
         "body": "campaign_group_id=123456789&lifetime_budget=100000" 
       }, 
     ]' \
  "https://graph.facebook.com/v20.0"

The response to the API call is returned immediately with an ASYNC_SESSION_ID. While the request continues to be processed, the ASYNC_SESSION_ID should be polled until a terminal state [COMPLETED|FAILED] is reached.

Parameters

NameDescription

campaign_group_id

string

Required.
ID for the campaign that needs to be updated.

campaign_group_status

string

Optional.
ACTIVE or PAUSED

dsa_payor

string (max 512 char)

Optional.
The payor of the campaign.


Note: This field is Required for campaigns targeting EU and/or associated territories.

dsa_beneficiary

string (max 512 char)

Optional.
The beneficiary of the campaign.


Note: This field is Required for campaigns targeting EU and/or associated territories.

end_time

datetime

Optional.
The new end time for the ad campaign, in UTC UNIX timestamp. The end time cannot be updated to be before the previous end time; it must be after.

lifetime_budget

numeric string

Optional.
The new budget of the campaign in the ad account's currency. The budget cannot be updated to be smaller than the previous budget; it must be larger.

Response

{
  "async_sessions": [
    {
      "id": "<ASYNC_SESSION_ID>",
      "name": "<ASYNC_SESSION_NAME>"
    }
  ]
}

Use the ASYNC_SESSION_ID to get the corresponding ID of a seller onboarded to managed partner ads.

See How to Poll Async Session for Response for more information.

Success Response

If the status is COMPLETED, the resulting data of polling async session will look like:

{
  "result": "{\"id\":\"<NEWLY_UPDATED_CAMPAIGN_ID>\",\"success\":true}",
  "id": "<ASYNC_SESSION_ID>"
}

Failure Response

If the status is FAILED, the resulting data of polling async session will look like:

Error Codes

Error CodeError SubcodeDescription

1800700

2310172

Enter the person or organization paying for this ad set.

1800701

2310171

Enter the person or organization benefiting from this ad set.