SnapCart

Endpoints

Copy any endpoint and check its health. Base URL: …

Health checks only call read-only GET endpoints. POST endpoints are listed for copying and are never called from this page.

Products

List / search products

—

Buyable products only (in stock). Add include_sold_out=true for all.

GET/api/products

Search products with filters

—

Filters: size, color (case-insensitive), max_price in paise (₹499 = 49900).

GET/api/products?size=M&color=Black&max_price=200000

Product detail

—

One product with live stock_count. Replace :product_id with a product UUID.

GET/api/products/:product_id

Restock all products

Not auto-checked

Admin/testing: sets every product to 50 units and available.

POST/api/products/restock

Orders

Order status

Not auto-checked

Current status of one order. Replace :order_id with an order UUID.

GET/api/orders/:order_id

Place order (programmatic / agents)

Not auto-checked

Reserves stock and creates a Razorpay order. All amounts in paise.

POST/api/orders
{
  "product_id": "<product uuid>",
  "customer_name": "Jane Doe",
  "customer_email": "jane@example.com",
  "quantity": 1,
  "discount_percent": 0
}

Place order (storefront checkout)

Not auto-checked

One unit, no discount; returns Checkout.js options.

POST/api/orders/create
{
  "product_id": "<product uuid>",
  "customer_name": "Jane Doe",
  "customer_email": "jane@example.com"
}

Verify payment

Not auto-checked

Confirms a Razorpay payment signature for an order.

POST/api/orders/verify

Razorpay webhook

Not auto-checked

Server-to-server payment events from Razorpay.

POST/api/orders/webhook

Cancel expired reservations

Not auto-checked

Releases stock held by unpaid orders (cron). Also accepts POST.

GET/api/orders/cancel-expired

Admin & discovery

Admin overview

—

Stats, all products and recent orders.

GET/api/admin/overview

UCP business profile

—

Discovery profile for agents, proxied from the Discovery Service.

GET/.well-known/ucp