Template
E-commerce Product API
A product catalog anyone can browse and orders that only their customer can see. Filter by category or price range with query parameters, and add Stripe checkout with a custom endpoint.
- Small shops and product catalogs
- Mobile shopping prototypes
- Learning how real store data is modelled
What's inside
Anyone can browse products. Only admins manage the catalogue. Signed-in customers place orders and only see their own. Work out order totals in a custom endpoint rather than trusting the browser.
Categories
/categoriesProduct categories
| name | string | required |
| slug | string | required |
Read: Anyone with the API key · Write: Admins
Products
/productsThings you sell
| name | string | required |
| description | text | |
| price | number | required |
| image_url | url | |
| in_stock | boolean | |
| category | → categories |
Read: Anyone with the API key · Write: Admins
Orders
/ordersOrders placed by signed-in customers
| items | json | required |
| total | number | |
| status | string | |
| shipping_address | text |
Read: Only the record's owner · Write: Signed-in users
Call it from your app
Every entity is a REST endpoint with filtering, sorting and paging. Sample data is included so the first request returns something.
curl "https://YOUR_PROJECT.codefreeapi.com/api/v1/products?sort=-createdAt&limit=20" \ -H "X-API-Key: YOUR_API_KEY"
curl -X POST "https://YOUR_PROJECT.codefreeapi.com/api/v1/products" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "House blend, 250 g", "price": 12.5 }'{
"id": "b3f1…",
"name": "House blend, 250 g",
"description": "Chocolate and hazelnut, medium roast.",
"price": 12.5,
"in_stock": true,
"category": "categories-record-id",
"createdAt": "2026-10-26T09:00:00.000Z"
}Other templates
Start your online store backend now
Free plan, no credit card. One click copies this template into your account.