AI-generated Key Takeaways
-
The Merchant API is the new version of the Content API for Shopping and represents the future of the platform.
-
The
listlinksmethod allows retrieval of all flagged links between accounts, providing insight into account relationships. -
Each service within a link has a status, starting as
pending, transitioning toactiveupon approval, and ultimately becominginactivewhen removed. -
A simple HTTP GET request to the
listlinksendpoint is sufficient to retrieve link information without requiring any parameters.
Both Shopping partners and individual merchant accounts can have multiple
flagged links between their accounts and others.
The listlinks method
returns a list of all these links for the merchant center account
making the API call. It does not require any parameters and is invoked using an
HTTP GET request.
Service status
When listing links, responses will show a status for each individual service
within a link. Merchants have the option to either approve all listed services
or only a subset of those proposed in the request.
Services start out in a pending status until explicitly approved by a
merchant. After they are approved, services have an active status.
Removed services will show a status of inactive if there are other pending
or active services also present. Once all services comprising a link are
removed, the link will no longer be returned by the
listlinks method.
Example request
To list the link request sent by partner 123456789, send a GET
request with no parameters using the listlinks method.
GET https://shoppingcontent.googleapis.com/content/v2.1/123456789/accounts/123456789/listlinks
Example response
In this example, the merchant 98765 has yet to approve the request, so the
individual services have a pending status.
{
"linkedAccountId": "98765",
"services": [
{
"service": "shoppingAdsProductManagement",
"status": "pending"
},
{
"service": "shoppingActionsOrderManagement",
"status": "pending"
}
]
}
The next section describes how to approve a linking request.