StoreOSv0.15.0
REST API

REST API

What the StoreOS REST API is, how it is organized, and every route explained.

What is the REST API?

The REST API is the HTTP interface your storefront app uses to read catalog data, manage customer auth, and place orders. StoreOS hosts it — you call it over HTTPS from your app.

https://storefront-api.storeos.dev/api/v1/...

REST means each action is a URL + HTTP method (GET, POST, …). If you use @storeos/storefront-client, it calls these routes for you. If not, you call them with fetch, curl, or any HTTP client.

Same data as GraphQL — pick whichever style fits your stack.


Interactive reference (Swagger)

storefront-api.storeos.dev/docs — try requests, see request/response schemas, test auth.


Headers on every request

HeaderWhat it doesWhen
x-tenantTells StoreOS which store — your tenant UIDEvery route
Authorization: Bearer <jwt>Identifies the logged-in customerOrder history, profile, cancel
Content-Type: application/jsonJSON request bodyPOST, PATCH

API areas

The REST API is organized into five areas. Each maps to part of your storefront.

Catalog — products & collections

What it is: Everything customers browse before buying.

RouteWhat it doesYour page
GET /api/v1/productsList published products (search, filter, paginate)Shop, search
GET /api/v1/products/handle/:handleOne product by URL slug/product/[handle]
GET /api/v1/products/:idOne product by internal IDCart, admin picks
GET /api/v1/collectionsList product groups (e.g. "Sale")Nav, homepage
GET /api/v1/collections/:idOne collectionCollection page

Auth: Not required — public catalog.

SDK: getProducts, getProduct, getCollections, getCollection

List params: page, limit, sort, sortBy, search, collectionIds[]


Store config — tenant

What it is: Store-wide settings you manage in the StoreOS console — not products, but rules that affect checkout and your site footer.

RouteWhat it returnsYour page
GET /api/v1/tenantName, delivery charges, support contact, legal policies, social linksCheckout, footer, policy pages

Auth: Not required.

SDK: getTenant · GraphQL: storeFront query


Auth — customer accounts

What it is: Sign-up, login, and profile for shoppers on your storefront.

RouteWhat it doesAuth
POST /api/v1/auth/registerCreate accountTenant only
POST /api/v1/auth/loginEmail/phone + passwordTenant only
POST /api/v1/auth/otp/sendSend 4-digit SMS codeTenant only
POST /api/v1/auth/otp/verifyVerify code, sign inTenant only
GET /api/v1/auth/me Current customer profileBearer required
PATCH /api/v1/auth/profile Update name, phone, addressBearer required
POST /api/v1/auth/change-password Change passwordBearer required
POST /api/v1/auth/logoutEnd session (client drops token)Tenant only

SDK: register, login, sendOtp, verifyOtp, getMe, …

GraphQL auth · Phone OTP guide


Orders — checkout & history

What it is: Turning a cart into a placed order and letting customers track or cancel it.

RouteWhat it doesAuth
POST /api/v1/orders/coupons/verifyCheck if discount code applies to cartOptional
POST /api/v1/ordersPlace order (guest or logged-in)Optional
GET /api/v1/orders Customer's order historyBearer required
GET /api/v1/orders/:orderIdOne order by invoice UIDTenant only (public tracking)
POST /api/v1/orders/:orderId/cancel Cancel an orderBearer required

SDK: verifyCoupon, createOrder, getMyOrders, getOrder, cancelOrder

Checkout guide


Pagination

List routes return:

{
  "nodes": [ /* items */ ],
  "meta": {
    "totalCount": 42,
    "currentPage": 1,
    "hasNextPage": true,
    "totalPages": 5
  }
}
ParamPurpose
page, limitPage number and page size
limit: -1Return all items in one response (no paging)

Easier integration

ApproachDocs
TypeScript SDK (recommended)storefront-client
GraphQL (same backend)GraphQL API

On this page