---
title: "Leveraging Shopify’s API to Build the Latest Marketplace Kit"
description: "Marketplace Kit 2.0 decouples its sample code from the Shopify CLI's generated Node app and splits it into a full-stack Express/React admin app and a Next.js buyer app, both open-sourced."
url: "https://swe.quest/articles/leveraging-shopify-s-api-to-build-the-latest-marketplace-kit-a198dca7199a1ac1"
canonical: "https://shopify.engineering/shopify-api-build-latest-marketplace-kit"
source: "Shopify Engineering"
published: "2022-04-08"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["graphql","javascript","identity-auth","ecommerce","api-design"]
---

# Leveraging Shopify’s API to Build the Latest Marketplace Kit

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2022-04-08, 5 min read, How-to. Original: [https://shopify.engineering/shopify-api-build-latest-marketplace-kit](https://shopify.engineering/shopify-api-build-latest-marketplace-kit)

## Summary

Marketplace Kit 2.0 decouples its sample code from the Shopify CLI's generated Node app and splits it into a full-stack Express/React admin app and a Next.js buyer app, both open-sourced. The admin app uses App Bridge's authenticatedFetch to attach JWT session tokens, which the server decodes with Shopify's Node API inside the Apollo Server context to load the store's access token. Running apollo-server-express instead of apollo-server lets one Express instance serve REST and GraphQL together and reuse Node middleware for rate limiting and auth, at the cost of slightly more boilerplate and no performance penalty. Custom GraphQL and REST client wrappers add project-specific User-Agent headers, and REST is kept for simple calls like product listing counts where a GraphQL query adds nothing.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [GraphQL](https://swe.quest/tags/graphql.md) (Backend & APIs)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [E-commerce](https://swe.quest/tags/ecommerce.md) (Domains)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)

## Prerequisites

- Node.js and Express ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- React ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))
- GraphQL with Apollo ([easy posts on GraphQL](https://swe.quest/tags/graphql.md?difficulty=easy))
- JWT authentication ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))

## Keywords

Shopify Marketplace Kit, App Bridge, Shopify Node API, Apollo Server, Express, Next.js, Shopify CLI

## Related posts

- [Shopify’s platform is the Web platform](https://swe.quest/articles/shopify-s-platform-is-the-web-platform-7efe3322420f447d.md): Shopify Engineering · 2023-07-26 · Medium · 10 min read · Frontend, Browsers, React, Developer tools, E-commerce
  Remix is now Shopify's recommended framework for building Admin apps, backed by a rewritten, final version of App Bridge that makes cross-origin iframes behave like a normal web environment.
- [Implementing Server-Driven UI Architecture on the Shop App](https://swe.quest/articles/implementing-server-driven-ui-architecture-on-the-shop-app-6be47fae080cf1dc.md): Shopify Engineering · 2022-11-22 · Medium · 10 min read · Mobile, GraphQL, React, System design, API design
  Shopify's Shop App moved its Store Screen from client-driven to server-driven UI so the backend decides which sections (Best Sellers, Collections, All Products) and layouts (Grid, Shelf) each merchant's store renders.
- [Build Well-Documented and Authenticated APIs in Node.js with Fastify](https://swe.quest/articles/build-well-documented-and-authenticated-apis-in-node-js-with-fastify-6b62dcc6e17b78f9.md): Heroku Engineering · 2024-04-29 · Medium · 15 min read · JavaScript, API design, Identity & auth, PostgreSQL
  Fastify, a plugin-based Node.js web framework, can be used to build a small API with a public Postgres-backed \`/directory\` route and a \`/profile\` route protected by RS256-signed JWTs verified against a base64-encoded public key.
- [How we use GraphQL at Europe's largest fashion e-commerce company](https://swe.quest/articles/how-we-use-graphql-at-europe-s-largest-fashion-e-commerce-company-98c53d6b8b858147.md): Zalando Engineering · 2021-03-03 · Easy · 6 min read · GraphQL, API design, Microservices, E-commerce, Resilience
  Zalando replaced a sprawl of per-page and per-platform Backend-for-Frontend services with a single unified GraphQL API owned via a shared monorepo across 12+ domain teams.
- [Native is now the future of mobile at Shopify](https://swe.quest/articles/native-is-now-the-future-of-mobile-at-shopify-4bc17172ea398962.md): Shopify Engineering · 2026-09-10 · Easy · 10 min read · Mobile, AI for coding, React, Refactoring & migrations, AI agents
  Shopify is moving its mobile apps from React Native back to native Swift and Kotlin because coding agents have cut the cost of building and keeping features in parity across two platforms, while native still gives closer access to platform capabilities and first-party tooling.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
