Publish your first API product
Import an OpenAPI document, connect your origin, choose the endpoints and plans to sell, check the endpoints, and publish to your Online Store.
On this page
Before you start
- You finished the setup checklist on the app’s Home page.
- You have a public HTTPS API you control and a self-contained OpenAPI 3.0 or 3.1 document. This example assumes GET /health returns HTTP 200 and {"status":"ok"}.
Try the example API first (optional)
- On the app’s Home page, click Try with an example API. It returns fixed sample data and is ready to publish, so you can walk through a test purchase.
- When you are done, click Stop selling in the product editor; the product becomes a draft in Shopify.
1. Import the API document
- On the app’s Home page, enter a product name and click Create API product.
- Under API contract, paste or upload your OpenAPI document (JSON or YAML, up to 5 MiB), or import it from a public HTTPS URL.
- Save and check that the page shows the number of endpoints the document describes.
openapi: 3.0.3
info:
title: Status API
version: 1.0.0
paths:
/health:
get:
operationId: getHealth
summary: Check service health
responses:
'200':
description: Service is healthy
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: ok2. Connect your origin
- Under Upstream, enter the origin URL, such as https://api.your-domain.com. Every call is forwarded to it, whatever the document’s servers say.
- If your API needs a credential, choose whether it goes in a header or a query parameter and enter its name (such as Authorization or X-Api-Key) and value. The value is stored encrypted and never shown again; leave it empty to keep the stored value.
3. Choose endpoints and set up plans
- Under Endpoints to sell, untick the endpoints you don’t sell. A newly imported document has every endpoint selected, and every plan includes the selected endpoints.
- Under Plans, turn on the plans you offer and set each one’s request quota (per day, per month, or unlimited) and rate limit. You set prices when you publish.
- Save the draft.
4. Check the endpoints
- Under Try a request, choose an endpoint and send a real request. Any origin answer below 500 counts as that endpoint’s reachability check.
- Publishing sends one request to each GET endpoint for you. Write endpoints (POST, PUT, PATCH, DELETE) are never called for you: check them first by hand, or click Check all and confirm.
5. Set prices and publish
- Under Publish and sell, enter a price for each plan, such as 10 or 9.99.
- Click Publish and start selling. The first publish creates the Shopify product with one variant per plan and puts it on sale in your Online Store at those prices.
- After that you can edit its images and description directly in Shopify.
Check your result
- The API product appears in Shopify with one variant per plan and is on sale in your Online Store.
