Prood
ApplicationsCommerce API

API Endpoints

Complete REST endpoint reference for the Commerce API v1.

All endpoints are prefixed with /v1. The interactive OpenAPI reference at Commerce API provides request/response schemas, try-it-out, and code samples.

Health & identity

MethodPathScopeDescription
GET/v1/healthPublicHealth check
GET/v1/meAny authCurrent caller info (orgId, scopes, type)
GET/v1/openapi.jsonPublicOpenAPI 3.1 specification

Catalog (storefront)

MethodPathDescription
GET/v1/productsList products (search, sort, pagination)
GET/v1/products/{id}Get product by ID or slug
GET/v1/categoriesList categories
GET/v1/storeStore info (name, currency, locales)
GET/v1/countriesCountry list for address forms

Query parameters for /v1/products:

ParamTypeDescription
querystringSearch term
categoryIdstringFilter by category
sortstringSort field (price, name, createdAt)
pagenumberPage number (default 1)
limitnumberItems per page (default 20)

Cart (storefront)

MethodPathDescription
POST/v1/cartsCreate a new cart
GET/v1/carts/{id}Get cart with items and totals
POST/v1/carts/{id}/itemsAdd item to cart
PATCH/v1/carts/{id}/items/{itemId}Update item quantity
DELETE/v1/carts/{id}/items/{itemId}Remove item from cart
POST/v1/carts/{id}/couponApply coupon code
DELETE/v1/carts/{id}/couponRemove applied coupon
GET/v1/carts/{id}/shipping-methodsList available shipping methods
POST/v1/carts/{id}/shipping-methodSet shipping method
GET/v1/carts/{id}/payment-methodsList available payment methods
POST/v1/carts/{id}/shipping-addressSet shipping address
POST/v1/carts/{id}/billing-addressSet billing address
POST/v1/carts/{id}/place-orderConvert cart to order

Orders (storefront)

MethodPathDescription
GET/v1/ordersList customer's orders (requires session)
GET/v1/orders/{id}Get order detail

Admin — Products

MethodPathDescription
GET/v1/admin/productsList all products
POST/v1/admin/productsCreate product
GET/v1/admin/products/{id}Get product
PATCH/v1/admin/products/{id}Update product
DELETE/v1/admin/products/{id}Delete product

Admin — Categories

MethodPathDescription
GET/v1/admin/categoriesList categories
POST/v1/admin/categoriesCreate category
PATCH/v1/admin/categories/{id}Update category
DELETE/v1/admin/categories/{id}Delete category

Admin — Orders

MethodPathDescription
GET/v1/admin/ordersList all orders
GET/v1/admin/orders/{id}Get order detail
POST/v1/admin/orders/{id}/fulfillMark order as fulfilled
POST/v1/admin/orders/{id}/refundRefund order (full or partial)

Admin — Customers

MethodPathDescription
GET/v1/admin/customersList customers
GET/v1/admin/customers/{id}Get customer detail

Admin — Store & inventory

MethodPathDescription
GET/v1/admin/storeGet store settings
PATCH/v1/admin/storeUpdate store settings
PATCH/v1/admin/inventory/{variantId}Update variant inventory
GET/v1/admin/dashboard/statsDashboard statistics

Webhooks

MethodPathAuthDescription
POST/v1/webhooks/payments/{provider}x-checkout-secretProcess payment webhook
GET/v1/webhooks/payments/{provider}Provider verification challenge

Query param: org={orgId} for tenant-scoped webhook verification.

Response format

Success

{
  "data": { ... },
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 42
  }
}

Error

{
  "error": "Product not found",
  "code": "NOT_FOUND",
  "status": 404
}

Using the API client

import { createCommerceApiClient } from '@prood/api-client'

const api = createCommerceApiClient({
  baseUrl: 'http://localhost:3005/v1',
  headers: { 'x-api-key': 'pk_xxx' },
})

const { data } = await api.GET('/products', {
  params: { query: { query: 'shirt', limit: 10 } },
})

See @prood/api-client for full client documentation.

On this page