Overview
The Marketplaces API enables you to run queries and actions on behalf of different shops in a marketplace without needing individual shop-level access tokens. 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 services
Anchor link to section titled "Endpoints and services"Shopify Admin API (GraphQL/REST) and Storefront API requests can be made to shops in the marketplace using the following endpoints. Requests are proxied to the shop that's specified in the request URL.
The following are some example queries and responses for shop https://www.{shop}.myshopify.com
:
- Shopify Admin API Proxy:
POST https://marketplaces.shopify.com/api/admin/{shop}/2023-10/graphql.json
- Shopify Storefront API Proxy:
POST https://marketplaces.shopify.com/api/storefront/{shop}/2023-10/graphql.json
View response
You can access the Marketplaces API using curl or any HTTP client.
The following example shows a query for fetching a product on a shop using the Marketplaces API endpoint.
Replace {my-marketplace-access-token}
with the access token that you generate for authentication.
View response