Ecommerce REST API

A clean REST API for products, carts, checkout, and orders.

Skip building auth, inventory locking, digital file delivery, and multi-gateway payment normalization. Use Shoprivet public Storefront APIs in your frontend and /v1 API keys on your server.

Does Shoprivet provide a REST API for custom ecommerce apps?

Yes. Shoprivet provides unauthenticated /public/stores/{slug} storefront and guest cart endpoints for client UIs alongside authenticated /v1/stores/{storeId} endpoints (and an OpenAPI 3.0.3 spec) for server-side catalog, order, discount, and payment management.

Practical implementation

API architecture in two clear layers

  1. 1

    Public Storefront & Guest Cart API

    Read active products, categories, and payment methods without an API key, create scoped guest carts, and run idempotent checkout.

  2. 2

    Server-side /v1 Management API

    Authenticate with Authorization: Bearer shoprivet_live_... to manage stores, products, variants, categories, inventory, orders, refunds, and discounts.

  3. 3

    Machine-readable OpenAPI 3.0.3 contract

    Download /docs/openapi.json generated from Shoprivet Zod validation schemas to scaffold typed clients or configure AI coding assistants.

Fetch catalog + create guest cart checkout (Node/Browser)

const API = "https://api.shoprivet.io";
const { products } = await fetch(`${API}/public/stores/downtown-shop/products`).then(r => r.json());
const { credential } = await fetch(`${API}/public/stores/downtown-shop/carts`, { method: "POST" }).then(r => r.json());
await fetch(`${API}/public/stores/downtown-shop/carts/current/items`, {
  method: "POST",
  headers: { Authorization: `Bearer ${credential}`, "Content-Type": "application/json" },
  body: JSON.stringify({ productId: products[0].id, quantity: 1 }),
});

Requirements, pricing & limits

Rate limits, security, and honest capabilities

Rate limits by plan

Merchant /v1 endpoints allow 60 req/min on Free, 300 req/min on Premium, and 1,000 req/min on Business with X-RateLimit-* headers.

Pagination & validation

List endpoints accept page and limit (default 20, max 100) and return structured Zod field-level validation errors on HTTP 400.

Webhook scope clarity

Shoprivet handles incoming payment webhooks from Stripe, Paystack, Flutterwave, Razorpay, and PayPal. Outbound merchant webhooks are not currently supported.

Server-only key rule

Never place shoprivet_live_... keys in browser JS or NEXT_PUBLIC_/VITE_ variables; use /public routes on the client.

Direct answers

Frequently asked questions

Is the API available on the Free plan?
Yes. Free accounts can generate API keys (up to 5 keys per account) with a 60 requests/minute rate limit.
Where is the OpenAPI specification hosted?
The OpenAPI 3.0.3 JSON specification is publicly available at https://shoprivet.io/docs/openapi.json without signing in.
Can I use Shoprivet without its hosted storefront builder?
Yes. You can build 100% custom Next.js, React, Vue, Astro, or mobile frontends using only the REST API.
Does Shoprivet support GraphQL or outbound webhooks?
Shoprivet provides a JSON REST API and incoming payment gateway webhooks. GraphQL and outbound merchant order webhooks are not currently supported.

Start free at $0/month

Launch with 0% Shoprivet platform fees.

Create a store in minutes, embed a catalog on your existing site, or call our public Storefront and /v1 APIs.

Create your free store