A free fake API for testing and prototyping e-commerce applications — Next.js clone of fakestoreapi.com. Writes are simulated: they validate input and echo back what a real store would return, but never change the shared catalog (see README.md).
Version 3.0.0 · https://__BRANCH___-__MR_ID___-hogwarts.devmev.ir · View in Swagger
/products
Retrieve a list of all available products.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Limit the number of results. |
sort | query | string | Sort order by id. |
Responses
Success
Example
/products
Simulates creating a product — returns it with a new id, without adding it to the shared catalog.
Request body
| Property | Type | Required |
|---|---|---|
title | string | yes |
price | number (float) | yes |
description | string | yes |
category | string | yes |
image | string (uri) | yes |
Responses
Product created
Bad request — invalid parameters or payload.
Example
/products/categories
Retrieve the list of category names products can belong to.
Responses
Success
Example
/products/category/{category}
Retrieve all products belonging to the given category.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
categoryrequired | path | string | — |
limit | query | integer | — |
sort | query | string | — |
Responses
Success
Bad request — invalid parameters or payload.
Example
/products/{id}
Retrieve details of a specific product by id.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Responses
Success
No resource found with the given id.
Example
/products/{id}
Simulates replacing a product — returns the resulting resource without mutating the catalog.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Request body
| Property | Type | Required |
|---|---|---|
title | string | yes |
price | number (float) | yes |
description | string | yes |
category | string | yes |
image | string (uri) | yes |
Responses
Success
Bad request — invalid parameters or payload.
Example
/products/{id}
Same simulated-write behavior as PUT.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Request body
| Property | Type | Required |
|---|---|---|
title | string | yes |
price | number (float) | yes |
description | string | yes |
category | string | yes |
image | string (uri) | yes |
Responses
Success
Bad request — invalid parameters or payload.
Example
/products/{id}
Simulates deleting a product — returns the product that would have been deleted, without removing it from the catalog.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Responses
Success
No resource found with the given id.
Example
/carts
Retrieve a list of all carts, optionally filtered by date range.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | — |
sort | query | string | — |
startdate | query | string (date) | — |
enddate | query | string (date) | — |
Responses
Success
Bad request — invalid parameters or payload.
Example
/carts
Simulates creating a cart — returns it with a new id, without adding it to the shared store.
Request body
| Property | Type | Required |
|---|---|---|
userId | integer | yes |
date | string (date) | yes |
products | CartProduct[] | yes |
Responses
Cart created
Bad request — invalid parameters or payload.
Example
/carts/user/{userId}
Retrieve all carts belonging to a user, optionally filtered by date range.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
userIdrequired | path | integer | — |
startdate | query | string (date) | — |
enddate | query | string (date) | — |
Responses
Success
Bad request — invalid parameters or payload.
Example
/carts/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Responses
Success
No resource found with the given id.
Example
/carts/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Request body
| Property | Type | Required |
|---|---|---|
userId | integer | yes |
date | string (date) | yes |
products | CartProduct[] | yes |
Responses
Success
Bad request — invalid parameters or payload.
Example
/carts/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Request body
| Property | Type | Required |
|---|---|---|
userId | integer | yes |
date | string (date) | yes |
products | CartProduct[] | yes |
Responses
Success
Bad request — invalid parameters or payload.
Example
/carts/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Responses
Success
No resource found with the given id.
Example
/users
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | — |
sort | query | string | — |
Responses
Success
Example
/users
Simulates creating a user — returns it with a new id, without adding it to the shared store.
Request body
| Property | Type | Required |
|---|---|---|
email | string (email) | yes |
username | string | yes |
password | string | yes |
name | Name | yes |
address | Address | yes |
phone | string | yes |
Responses
User created
Bad request — invalid parameters or payload.
Example
/users/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Responses
Success
No resource found with the given id.
Example
/users/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Request body
| Property | Type | Required |
|---|---|---|
email | string (email) | yes |
username | string | yes |
password | string | yes |
name | Name | yes |
address | Address | yes |
phone | string | yes |
Responses
Success
Bad request — invalid parameters or payload.
Example
/users/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Request body
| Property | Type | Required |
|---|---|---|
email | string (email) | yes |
username | string | yes |
password | string | yes |
name | Name | yes |
address | Address | yes |
phone | string | yes |
Responses
Success
Bad request — invalid parameters or payload.
Example
/users/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | — |
Responses
Success
No resource found with the given id.
Example
/auth/login
Exchange a fixture username/password (see README.md) for a signed JWT.
Request body
| Property | Type | Required |
|---|---|---|
username | string | no |
password | string | no |
Responses
Success
Bad request — invalid parameters or payload.
Username or password is incorrect.
Example
Rating| Property | Type | Required |
|---|---|---|
rate | number | no |
count | integer | no |
Product| Property | Type | Required |
|---|---|---|
id | integer | no |
title | string | no |
price | number (float) | no |
description | string | no |
category | string | no |
image | string (uri) | no |
rating | Rating | no |
ProductInput| Property | Type | Required |
|---|---|---|
title | string | yes |
price | number (float) | yes |
description | string | yes |
category | string | yes |
image | string (uri) | yes |
CartProduct| Property | Type | Required |
|---|---|---|
productId | integer | no |
quantity | integer | no |
Cart| Property | Type | Required |
|---|---|---|
id | integer | no |
userId | integer | no |
date | string (date) | no |
products | CartProduct[] | no |
CartInput| Property | Type | Required |
|---|---|---|
userId | integer | yes |
date | string (date) | yes |
products | CartProduct[] | yes |
Geolocation| Property | Type | Required |
|---|---|---|
lat | string | no |
long | string | no |
Address| Property | Type | Required |
|---|---|---|
city | string | no |
street | string | no |
number | integer | no |
zipcode | string | no |
geolocation | Geolocation | no |
Name| Property | Type | Required |
|---|---|---|
firstname | string | no |
lastname | string | no |
User| Property | Type | Required |
|---|---|---|
id | integer | no |
email | string (email) | no |
username | string | no |
password | string | no |
name | Name | no |
address | Address | no |
phone | string | no |
UserInput| Property | Type | Required |
|---|---|---|
email | string (email) | yes |
username | string | yes |
password | string | yes |
name | Name | yes |
address | Address | yes |
phone | string | yes |
Login| Property | Type | Required |
|---|---|---|
username | string | no |
password | string | no |
LoginResponse| Property | Type | Required |
|---|---|---|
token | string | no |
Error| Property | Type | Required |
|---|---|---|
status | string | no |
message | string | no |