Back to all docs
/api/ecommerce

E-commerce API

Products, orders, cart, and payment endpoints

11 endpointsPagination & delay readyMock base URL: fakeapifordevs.vercel.app

Endpoints

11 routes

Active selection

GET

/api/ecommerce/products

Prefilled in the playground CTA below.

Sample request

JAVASCRIPT example
1const payload = {
2 "example": "payload"
3}
4fetch('https://fakeapifordevs.vercel.app/api/ecommerce/products?page=1&per_page=5&delay=1', {
5 method: 'GET',
6 headers: { 'Content-Type': 'application/json' }
7})
8 .then(res => res.json())
9 .then(console.log)

Response contract

All list responses include pagination + optional latency metadata.

Sample response
1{
2 "data": [
3 {
4 "id": "prod_456-1",
5 "name": "Demo Product",
6 "price": 129.99,
7 "stock": 42
8 },
9 {
10 "id": "prod_456-2",
11 "name": "Demo Product",
12 "price": 129.99,
13 "stock": 42
14 }
15 ],
16 "pagination": {
17 "page": 1,
18 "perPage": 5,
19 "total": 42,
20 "totalPages": 9
21 },
22 "meta": {
23 "delayMs": 0
24 }
25}

Query controls

Every collection endpoint accepts the following parameters.

page

1-indexed page number. Defaults to 1.

per_page

Number of records per page. Defaults to 10, max 50.

delay

Simulate latency in seconds (max 10s).

Integration checklist

  • • Use page and per_page for cursor-free pagination.
  • • Append delay to simulate client-side loading states.
  • • Expect pagination + meta.delayMs in responses.
  • • Point SDKs to /api/ecommerce.

Playground shortcut

Test this request directly from the landing page playground.

Open playground

https://fakeapifordevs.vercel.app/api/ecommerce/products?page=1&per_page=5&delay=1

Need more domains?

Explore 14+ prebuilt industries covering auth, finance, HR, healthcare, and more.

AuthenticationE-commerceSocial MediaSaaSLogisticsPayments

Keep these docs online

Buy the maintainers a coffee

Coffee donations help us keep E-commerce accurate and add bonus sample responses.

  • Covers storage for ecommerce payloads
  • Funds schema QA sprints
E-commerce API Docs | Fake API for Devs