Overview
The Marketplaces API enables you to run queries and actions across all shops in a marketplace. The API is only available in GraphQL.
Authentication
Anchor link to section titled "Authentication"The Marketplaces API requires a multi-shop marketplace access token to authenticate requests.
Create access tokens in the Partner Dashboard. You can create up to five access tokens for each channel app.
Include the access token in the authorization header of every request, as Authorization: Bearer {my-marketplace-access-token}
.
Endpoints and queries
Anchor link to section titled "Endpoints and queries"Data for the shops in the marketplace is available at a single GraphQL endpoint. A single request can contain up to ten IDs in the argument.
The following are some example queries and responses:
POST https://marketplaces.shopify.com/api/storefront/2023-01/graphql.json
View response
You can access the Marketplaces API using curl or any HTTP client.
A multi-shop request resolver retrieves data from shops in the marketplace using the Storefront API, and returns aggregated results.
The following example shows a query for two products in the marketplace and the shops that carry those products. The request also retrieves the products' statuses in each shop.
Replace {my-marketplace-access-token}
with the access token that you generate for authentication.
View response
Product lookup
Anchor link to section titled "Product lookup"ProductLookup
enables multiple, single-shop product requests in parallel. ProductLookup
uses all nested fields and types in the Storefront API's Product object. Use ProductLookup
to request product data for any shop in the marketplace.