Link your Merchant Center and Google Ads accounts

Before you can create a Shopping campaign, you need to first link your Google Ads account to your Google Merchant Center account as follows:

  1. Send a link request from your Merchant Center account to your Google Ads account.
  2. Approve the link request in your Google Ads account.

There are two ways of sending a link request:

  1. Use the Merchant Center web interface to send a link request.
  2. Use the Content API for Shopping to update the adsLinks of your Account.

You can change the status of Merchant Center links in your Google Ads account by using the Google Ads web interface to approve or reject an invitation. You can also update invitations or remove existing links using the Google Ads API as explained below.

List all Merchant Center invitations

You can run a Google Ads API report using the following GAQL query to retrieve a list of all pending invitations to link a Google Ads customer ID to a Merchant Center account.

SELECT
    product_link_invitation.merchant_center.merchant_center_id,
    product_link_invitation.type
FROM product_link_invitation
WHERE product_link_invitation.status = 'PENDING_APPROVAL'
    AND product_link_invitation.type = 'MERCHANT_CENTER'

To retrieve all invitations, remove the filtering condition for the product_link_invitation.status field in the query above.

Accept an invitation

You can approve the link by setting the product_link_invitation status to ACCEPTED.

  1. Construct an UpdateProductLinkInvitationRequest object and set the customer_id field as the Google Ads customer ID.

  2. Set the resource_name field as the resource name of the product_link_invitation.

  3. Set the product_link_invitation_status to ACCEPTED.

  4. Issue an UpdateProductLinkInvitation API call.

If the invitation flow is attempted by a user who is already an administrator on both accounts, then a NO_INVITATION_REQUIRED error is thrown. You can check for this error and fall back to the direct link flow in such cases.

Reject an invitation

Rejecting an invitation is similar to accepting an invitation except that the product_link_invitation_status field is set to REJECTED. If an invitation is rejected, it remains in the REJECTED state and cannot be accepted. You must then create a new invitation if required.

Direct linking without invitation

If the user attempting to link the Google Ads account to the Merchant Center account is an administrator on both accounts, then you can bypass the invitation step and link both accounts directly using the Google Ads API.

  1. Construct a CreateProductLinkRequest object and set the customer_id field as the Google Ads customer ID.

  2. Create a new ProductLink object and set its merchant_center_id field to the ID of the Merchant Center account.

  3. Set the ProductLink to the product_link field of the request object.

  4. Issue a CreateProductLink API call.

If direct linking is attempted by a user who doesn't have sufficient permissions, then a CREATION_NOT_PERMITTED error is thrown. You can check for this error and fall back to the invitation flow in such cases.

You can run a Google Ads API report using the following GAQL query to retrieve a list of links for a Google Ads customer ID.

SELECT
    product_link.merchant_center.merchant_center_id,
    product_link.product_link_id
FROM product_link
WHERE product_link.type = 'MERCHANT_CENTER'

Take the following steps to unlink a link:

  1. Construct a RemoveProductLinkRequest object and set the customer_id field as the Google Ads customer ID.

  2. Set the resource_name as the resource name of the product_link.

  3. Issue a RemoveProductLink API call.

Business Manager is a unified representation of a business on Google. When you manage both your Google Ads account and your Merchant Center accounts using a Business Manager account, Business Manager automatically creates links between your Google Ads account and the Merchant Center account. You can retrieve these links using the Google Ads API, but these links cannot be mutated with the Google Ads API.