This page has guidance on how to onboard a seller into managed partner ads (MPA) using the Seller Business Creation API.
Once you verify a seller is eligible for MPA using the Seller Eligibility API, you will use the Seller Business Creation API to onboard the seller.
Calling the Seller Business Creation API using an eligible seller’s vendor_id
automatically performs the following actions:
vendor_id=<child_business_external_id>
as the filterOnce you onboard a seller into MPA, they are considered a managed partner.
Before you onboard a seller, make sure you have completed these steps:
To call the Seller Business Creation API, you will need the following permissions:
curl \
-F 'access_token=<ACCESS_TOKEN>' \
-F 'asyncbatch=[
{
"method": "POST",
"relative_url": "<MARKETPLACE_BM_ID>/managed_partner_businesses",
"name": "<ASYNC_SESSION_NAME>",
"body": "child_business_external_id=<VENDOR_ID>&line_of_credit_id=<LINE_OF_CREDIT_ID>&credit_limit=<CREDIT_LIMIT>&partition_type=<PARTITION_TYPE>&catalog_id=<PARENT_CATALOG_ID>&ad_account_currency=<AD_ACCOUNT_CURRENCY>&seller_targeting_countries=['COUNTRY_CODE1','COUNTRY_CODE2']&timezone_id=<TIMEZONE_ID>&name=<BUSINESS_MANAGER_NAME>&seller_external_website_url=<SELLER_EXTERNAL_WEBSITE_URL>&partner_facebook_page_url=<PARTNER_FACEBOOK_PAGE_&page_profile_image_url=<PROFILE_PIC_URL>&vertical=<VERTICAL>&partner_registration_countries=<PARTNER_REGISTRATION_COUNTRY>"
}
]' \
"https://graph.facebook.com/v21.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.
Name | Description |
---|---|
string | Required. |
numeric string | Required. |
string | Required. |
numeric string | Required. You should only set it if the Condition: Available credit in |
enum string | Required. Set to one of the following values:
Default value: Fixed partition or unrestricted credit partition. The value set for |
numeric string | Required.
|
string | Required. |
string | Required. |
bool | Optional. Default value: |
string | Optional. The name to assign to the page created for the seller. Skip setting this parameter when Condition: Page name must meet Facebook's page name requirements. Default value: Partner's Facebook page name configured during Managed Partner Ads API onboarding in the Collaboration Center. |
string | Optional Skip setting this parameter when Conditions:
Default value: Partner's Facebook page profile picture configured during Managed Partner Ads API onboarding in the Collaboration Center. |
string | Required. |
list<string> | Required. |
string | Optional. |
string | Required. |
numeric string | Required. |
enum string | Required.
|
{ "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.
If the status is COMPLETED
, the resulting data of polling async session will look like:
{ "result": "{\"id\":\"<NEWLY_CREATED_MANAGED_PARTNER_BM_ID>\"}", "status": "COMPLETED", "id": "<ASYNC_SESSION_ID>" }
If the status is FAILED
, the resulting data of polling async session will look like:
Requests made to seller onboarding API can result in several different error responses. See How to handle an error for more information.
Error Code | Error Subcode | Error Message |
---|---|---|
1800000 | 2310114 | Complete the managed partner ads onboarding process in Collaboration Center |
1800001 | 2310118 | The vendor ID {vendor_id} is already in use. Enter a unique vendor ID that is not used anywhere else. |
1800002 | 2310138 | The business name {invalid_business_name} is not a valid name. Consider using {suggested_business_name} instead. Business names must meet Facebook's business name requirements. |
1800002 | 2310139 | The business name {invalid_business_name} is not a valid name. Business names must meet Facebook's business name requirements. |
1800003 | 2310133 | Enter a valid registration country code for this partner's business |
1800004 | 2310127 | Remove or update the following invalid country codes listed for the partner's registration countries: [{invalid_registration_country_codes}] |
1800006 | 2310141 | Remove or update the following invalid country codes you entered: [{invalid_targeting_country_codes}] |
1800100 | 2310117 | The catalog ID you entered {catalog_id} cannot be used to create a catalog segment. You can go to the Commerce Manager to find the correct catalog ID number that contains this partner's items. Retry onboarding the partner with the correct catalog ID. |
1800101 | 2310116 | Your business {business_id} does not manage the catalog ID you entered {catalog_id}. Enter a catalog ID that your business manages. |
1800102 | 2310115 | Check the catalog ID you entered {catalog_id}. If it's the correct ID and you need access to this catalog, ask someone with full control to go to Business settings in Business Manager to give you access. Once assigned, retry onboarding the partner. |
1800200 | 2310119 | Enter a line of credit ID you will use to share credit with partners |
1800201 | 2310144 | The line of credit ID you entered {line_of_credit_id} is not an invoicing account or credit line ID. Enter the line of credit ID associated with Business ID {marketplace_business_id}. This should be the line of credit your business uses to share credit with partners. |
1800202 | 2310122 | Check the line of credit ID you entered {line_of_credit_id}. If it's the correct ID and you need access, ask someone with full control to go to Business settings in Business Manger to give you access to manage finance. Retry onboarding the partner once you have access to manage finance. |
1800203 | 2310123 | Your business {business_id} does not manage the line of credit entered {line_of_credit_id}. Provide an invoicing account or line of credit ID managed by your business. |
1800204 | 2310120 | Enter the currency for the ad account. This cannot be changed later. |
1800205 | 2310145 | The line of credit ID {line_of_credit_id} does not support the currency entered {ad_account_currency}. Update the partner's ad account currency to one the credit line supports. |
1800206 | 2310121 | Enter a credit limit amount greater than 0 |
1800207 | 2310143 | The credit limit you entered ${credit_limit} is more than the available credit balance of ${available_credit}. Either decrease the assigned credit limit or use a different line of credit ID with a higher balance. |
1800305 | 2310149 | Enter an image URL for the partner's profile picture. The image should be 180 x 180 pixels or larger and less than 1 MB. |
1800306 | 2310150 | Images should be 180 x 180 pixels or larger and less than 1 MB. Check the image size and the URL {page_profile_image_url} and try again or enter a new image URL. |
1800306 | 2310151 | Check the link {page_profile_image_url} or enter a new one |
1800307 | 2310148 | The system timed out trying to process the image URL {page_profile_image_url}. Check the image URL, retry the request or enter a new image URL. |
1800311 | 2310181 | The page name {invalid_page_name} is not a valid name. Consider using {suggested_page_name} instead. Page names must meet Facebook's page name requirements. |
1800311 | 2310182 | The page name {invalid_page_name} is not a valid name. Page names must meet Facebook's page name requirements. |