Field mappings

Use the field mappings to upgrade each step of your partner link workflows from the Google Ads API to the Data Manager API:

Object field mappings

Use the mappings in the tables to map a ProductLink in the Google Ads API to its PartnerLink equivalent in the Data Manager API.

ProductLink (Google Ads API) PartnerLink (Data Manager API) Notes
  • advertising_partner
  • data_partner
  • google_ads
  • merchant_center
partner_account The Data Manager API doesn't have separate fields for each type of linked account. For all account types, set the partner_account field to a ProductAccount, and set its account_type and account_id to identify the linked account.
product_link_id partner_link_id
resource_name name

In the Google Ads API, the customer_id of the resource_name of a ProductLink indicates which account owns an existing link. When you create a ProductLink, you indicate the owner of the link by setting the customer_id of a CreateProductLinkRequest.

In the Data Manager API, the combination of accountType and accountId of the owning_account indicates which account owns an existing link. When you create a PartnerLink, you indicate the owner of the link by setting the name to the resource name of the owner.

See Resource names and Create request for details.

type owning_account.account_type

Resource names

The Data Manager API uses a different resource name format than the Google Ads API.

Google Ads API

In the Google Ads API, a ProductLink resource name uses the format:

customers/{customer_id}/productLinks/{product_link_id}

Data Manager API

In the Data Manager API, a PartnerLink resource name uses the format:

accountTypes/{account_type}/accounts/{account}/partnerLinks/{partner_link}

Link management request mappings

Use the request mappings in this section to convert requests for creating, deleting, and retrieving partner links.

Create request

Here are the field mappings to convert a CreateProductLinkRequest in the Google Ads API to its equivalent CreatePartnerLinkRequest in the Data Manager API.

CreateProductLinkRequest (Google Ads API) CreatePartnerLinkRequest (Data Manager API) Notes
customer_id parent Set to the resource name of the owning advertiser account.
product_link partner_link Set to the PartnerLink resource. See Object field mappings

Delete request

Here are the field mappings to convert a RemoveProductLinkRequest in the Google Ads API to its equivalent DeletePartnerLinkRequest in the Data Manager API.

RemoveProductLinkRequest (Google Ads API) DeletePartnerLinkRequest (Data Manager API) Notes
customer_id No equivalent. The name field encapsulates the owning and partner accounts, so this additional field isn't needed.
resource_name name Set to the resource name of the PartnerLink you want to remove.
validate_only No equivalent.

Link retrieval request mappings

The approach for retrieving partner links differs between the Google Ads API and the Data Manager API.

Google Ads API

Send a SearchGoogleAdsRequest containing a query. The optional WHERE clause of the query defines which resources to return. The SELECT clause of the query defines which fields to populate on the returned partial resources.

SELECT
  product_link.product_link_id,
  ...
FROM product_link
WHERE
  ...
Data Manager API

Send a SearchPartnerLinkRequest. The optional filter request field defines which resources to return. The response contains complete resources, with all fields populated.

Here are the field mappings to convert a SearchGoogleAdsRequest in the Google Ads API to its equivalent SearchPartnerLinksRequest in the Data Manager API.

SearchGoogleAdsRequest (Google Ads API) SearchPartnerLinksRequest (Data Manager API) Notes
customer_id parent Set to the resource name of the account to search.
page_size page_size
page_token page_token
query filter Set the filter to define which resources to return. The Data Manager API returns complete resources, so there isn't an equivalent to the SELECT clause.
search_settings No equivalent.
validate_only No equivalent.

Check out Retrieve partner links for more information, including how to construct the filter of a SearchPartnerLinksRequest request and set request headers for different scenarios.