Fake JSON API
https://fakedatahub.com/api/fake
Full REST API reference: every endpoint documents what to send, what you get back, status codes, and live Try it requests—including /auth/login and Bearer tokens.
10
API models
How others use your API
Share the base URL and docs link. No API key or signup—works from any app, Postman, or browser.
Base URL (all requests)
https://fakedatahub.com/api/fakeDocumentation page
https://fakedatahub.com/fake-api- Discover resources —
GET https://fakedatahub.com/api/fakereturns every model URL (users, products, orders, …). - Read data —
GET https://fakedatahub.com/api/fake/productsor/users/1. Add?_limit=10to paginate. - Optional auth —
POST https://fakedatahub.com/api/fake/auth/loginwith JSON body, then sendAuthorization: Bearer <token>to/auth/me. - Create / update (fake) — POST, PUT, PATCH, DELETE return success JSON but do not save to a database (good for demos and tests).
Example — cURL
List users
curl "https://fakedatahub.com/api/fake/users"Login
curl -X POST "https://fakedatahub.com/api/fake/auth/login" \
-H "Content-Type: application/json" \
-d '{"username":"demo","password":"demo123"}'Base URL
https://fakedatahub.com/api/fakeSend Content-Type: application/json on POST, PUT, and PATCH. Use Authorization: Bearer <token> after POST /auth/login. CORS is enabled for all origins. Write operations return fake success and do not persist data.
Introduction
Base URL, headers, and how this fake API works.
API index
Lists all resources, base URLs, and global query parameter names.
GET /api/fakeResponse
{
"name": "Fake Data Hub Fake JSON API",
"documentation": "/fake-api",
"resources": [
{
"slug": "users",
"url": "/api/fake/users",
"count": 10
}
]
}Authentication
Login, register, refresh token, and current user profile.
Login user
Authenticate with username and password. Returns a Bearer token for protected routes.
POST /api/fake/auth/loginHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| username | string | yes | Username or email |
| password | string | yes | User password |
Request body example (editable)
Response
{
"token": "fdh.eyJzdWIiOjEsInVzZXJuYW1lIjoiZGVtbyIsImV4cCI6MTcwMDAwMDAwMCwidHlwIjoiYWNjZXNzIn0.fake",
"refreshToken": "fdh....refresh",
"expiresIn": 3600,
"user": {
"id": 1,
"name": "Demo User",
"username": "demo",
"email": "demo.user@example.com",
"phone": "1-555-0100",
"website": "https://demo.example",
"address": {
"street": "123 Main St",
"suite": "Apt. 101",
"city": "Springfield",
"zipcode": "62701",
"geo": {
"lat": "39.7817",
"lng": "-89.6501"
}
},
"company": {
"name": "Acme Labs",
"catchPhrase": "User-centric fault-tolerant portal",
"bs": "harness real-time e-markets"
}
}
}Register user
Creates a fake user and returns tokens. Not persisted.
POST /api/fake/auth/registerHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| username | string | yes | Unique username |
| string | yes | Email address | |
| password | string | yes | Password |
| name | string | no | Display name (optional) |
Request body example (editable)
Response
{
"message": "User registered (fake — not persisted)",
"token": "fdh....fake",
"user": {
"id": 111,
"username": "newdev",
"email": "newdev@example.com"
}
}Refresh access token
Exchange a refresh token from login for a new access token.
POST /api/fake/auth/refreshRequest body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| refreshToken | string | yes | Refresh token from login |
Request body example (editable)
Response
{
"token": "fdh....fake",
"refreshToken": "fdh....refresh",
"expiresIn": 3600
}Current user profile
Returns the authenticated user. Requires Bearer token from login.
GET /api/fake/auth/meHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | yes | Bearer <token> |
Response
{
"id": 1,
"name": "Demo User",
"username": "demo",
"email": "demo.user@example.com",
"phone": "1-555-0100",
"website": "https://demo.example",
"address": {
"street": "123 Main St",
"suite": "Apt. 101",
"city": "Springfield",
"zipcode": "62701",
"geo": {
"lat": "39.7817",
"lng": "-89.6501"
}
},
"company": {
"name": "Acme Labs",
"catchPhrase": "User-centric fault-tolerant portal",
"bs": "harness real-time e-markets"
}
}Global query params
Pagination and filtering available on list endpoints.
Pagination & filters (all list routes)
Append these query parameters to any GET list endpoint (e.g. GET /products?_limit=5).
GET /api/fake/{resource}Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Maximum rows returned |
| _start | number | no | Offset — skip first N rows |
| _page | number | no | Page index starting at 1 |
| _pageSize | number | no | Rows per page when using _page |
Response
[
{
"id": 1
},
{
"id": 2
}
]Users
User profiles with address and company.
Get all users
Returns an array of 10 users records. Supports pagination and filters.
GET /api/fake/usersQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
Response
[
{
"id": 1,
"name": "Demo User",
"username": "demo",
"email": "demo.user@example.com",
"phone": "1-555-0100",
"website": "https://demo.example",
"address": {
"street": "123 Main St",
"suite": "Apt. 101",
"city": "Springfield",
"zipcode": "62701",
"geo": {
"lat": "39.7817",
"lng": "-89.6501"
}
},
"company": {
"name": "Acme Labs",
"catchPhrase": "User-centric fault-tolerant portal",
"bs": "harness real-time e-markets"
}
}
]Get a single user
Returns one record by numeric id, or 404 if not found.
GET /api/fake/users/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"name": "Demo User",
"username": "demo",
"email": "demo.user@example.com",
"phone": "1-555-0100",
"website": "https://demo.example",
"address": {
"street": "123 Main St",
"suite": "Apt. 101",
"city": "Springfield",
"zipcode": "62701",
"geo": {
"lat": "39.7817",
"lng": "-89.6501"
}
},
"company": {
"name": "Acme Labs",
"catchPhrase": "User-centric fault-tolerant portal",
"bs": "harness real-time e-markets"
}
}Add a new user
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/usersHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching users model |
Request body example (editable)
Response
{
"id": 101,
"name": "Demo User",
"username": "demo",
"email": "demo.user@example.com",
"phone": "1-555-0100",
"website": "https://demo.example",
"address": {
"street": "123 Main St",
"suite": "Apt. 101",
"city": "Springfield",
"zipcode": "62701",
"geo": {
"lat": "39.7817",
"lng": "-89.6501"
}
},
"company": {
"name": "Acme Labs",
"catchPhrase": "User-centric fault-tolerant portal",
"bs": "harness real-time e-markets"
}
}Update a user (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/users/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching users model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a user (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/users/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching users model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a user
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/users/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Get posts for user
Nested collection filtered by parent id (userId).
GET /api/fake/users/1/postsPath parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Parent id |
Response
[
{
"id": 1,
"userId": 1
}
]Get todos for user
Nested collection filtered by parent id (userId).
GET /api/fake/users/1/todosPath parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Parent id |
Response
[
{
"id": 1,
"userId": 1
}
]Get orders for user
Nested collection filtered by parent id (userId).
GET /api/fake/users/1/ordersPath parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Parent id |
Response
[
{
"id": 1,
"userId": 1
}
]Posts
Blog posts linked to users.
Get all posts
Returns an array of 100 posts records. Supports pagination and filters.
GET /api/fake/postsQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| userId | number | string | no | Filter by author |
Response
[
{
"id": 1,
"note": "See GET /posts/1 for full posts shape"
}
]Get a single post
Returns one record by numeric id, or 404 if not found.
GET /api/fake/posts/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full posts object"
}Add a new post
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/postsHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| userId | number | yes | Author user id |
| title | string | yes | Post title |
| body | string | yes | Post body |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /posts/1 for full posts shape"
}Update a post (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/posts/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| userId | number | yes | Author user id |
| title | string | yes | Post title |
| body | string | yes | Post body |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a post (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/posts/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| userId | number | no | Author user id |
| title | string | no | Post title |
| body | string | no | Post body |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a post
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/posts/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Get comments for post
Nested collection filtered by parent id (postId).
GET /api/fake/posts/1/commentsPath parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Parent id |
Response
[
{
"id": 1,
"postId": 1
}
]Comments
Comments on posts.
Get all comments
Returns an array of 500 comments records. Supports pagination and filters.
GET /api/fake/commentsQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| postId | number | string | no | Filter by post |
Response
[
{
"id": 1,
"note": "See GET /comments/1 for full comments shape"
}
]Get a single comment
Returns one record by numeric id, or 404 if not found.
GET /api/fake/comments/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full comments object"
}Add a new comment
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/commentsHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching comments model |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /comments/1 for full comments shape"
}Update a comment (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/comments/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching comments model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a comment (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/comments/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching comments model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a comment
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/comments/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Products
E-commerce catalog items with price and rating.
Get all products
Returns an array of 50 products records. Supports pagination and filters.
GET /api/fake/productsQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| category | number | string | no | Filter by category |
Response
[
{
"id": 1,
"title": "Wireless Mouse",
"description": "Lorem ipsum dolor sit amet.",
"price": 29.99,
"category": "electronics",
"rating": {
"rate": 4.2,
"count": 120
},
"image": "https://placehold.co/200x200/1e293b/94a3b8?text=Product+1"
}
]Get a single product
Returns one record by numeric id, or 404 if not found.
GET /api/fake/products/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"title": "Wireless Mouse",
"description": "Lorem ipsum dolor sit amet.",
"price": 29.99,
"category": "electronics",
"rating": {
"rate": 4.2,
"count": 120
},
"image": "https://placehold.co/200x200/1e293b/94a3b8?text=Product+1"
}Add a new product
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/productsHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | yes | Product name |
| price | number | yes | Unit price |
| description | string | no | Long description |
| category | string | no | Category slug |
| image | string | no | Image URL |
Request body example (editable)
Response
{
"id": 101,
"title": "Wireless Mouse",
"description": "Lorem ipsum dolor sit amet.",
"price": 29.99,
"category": "electronics",
"rating": {
"rate": 4.2,
"count": 120
},
"image": "https://placehold.co/200x200/1e293b/94a3b8?text=Product+1"
}Update a product (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/products/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | yes | Product name |
| price | number | yes | Unit price |
| description | string | no | Long description |
| category | string | no | Category slug |
| image | string | no | Image URL |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a product (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/products/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | no | Product name |
| price | number | no | Unit price |
| description | string | no | Long description |
| category | string | no | Category slug |
| image | string | no | Image URL |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a product
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/products/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Orders
Purchase orders with status and totals.
Get all orders
Returns an array of 50 orders records. Supports pagination and filters.
GET /api/fake/ordersQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| userId | number | string | no | Filter by customer |
| status | number | string | no | pending | shipped | delivered |
Response
[
{
"id": 1,
"note": "See GET /orders/1 for full orders shape"
}
]Get a single order
Returns one record by numeric id, or 404 if not found.
GET /api/fake/orders/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full orders object"
}Add a new order
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/ordersHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching orders model |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /orders/1 for full orders shape"
}Update a order (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/orders/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching orders model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a order (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/orders/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching orders model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a order
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/orders/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Todos
Task list items per user.
Get all todos
Returns an array of 200 todos records. Supports pagination and filters.
GET /api/fake/todosQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| userId | number | string | no | Filter by user |
| completed | boolean | no | true | false |
Response
[
{
"id": 1,
"note": "See GET /todos/1 for full todos shape"
}
]Get a single todo
Returns one record by numeric id, or 404 if not found.
GET /api/fake/todos/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full todos object"
}Add a new todo
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/todosHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching todos model |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /todos/1 for full todos shape"
}Update a todo (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/todos/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching todos model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a todo (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/todos/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching todos model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a todo
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/todos/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Companies
B2B company records.
Get all companies
Returns an array of 20 companies records. Supports pagination and filters.
GET /api/fake/companiesQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| industry | number | string | no | Filter by industry |
Response
[
{
"id": 1,
"note": "See GET /companies/1 for full companies shape"
}
]Get a single companie
Returns one record by numeric id, or 404 if not found.
GET /api/fake/companies/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full companies object"
}Add a new companie
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/companiesHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching companies model |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /companies/1 for full companies shape"
}Update a companie (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/companies/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching companies model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a companie (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/companies/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching companies model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a companie
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/companies/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Get employees for companie
Nested collection filtered by parent id (companyId).
GET /api/fake/companies/1/employeesPath parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Parent id |
Response
[
{
"id": 1,
"companyId": 1
}
]Employees
Staff linked to companies.
Get all employees
Returns an array of 30 employees records. Supports pagination and filters.
GET /api/fake/employeesQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| companyId | number | string | no | Filter by company |
Response
[
{
"id": 1,
"note": "See GET /employees/1 for full employees shape"
}
]Get a single employee
Returns one record by numeric id, or 404 if not found.
GET /api/fake/employees/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full employees object"
}Add a new employee
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/employeesHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching employees model |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /employees/1 for full employees shape"
}Update a employee (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/employees/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching employees model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a employee (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/employees/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching employees model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a employee
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/employees/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Invoices
Billing invoices for customers.
Get all invoices
Returns an array of 40 invoices records. Supports pagination and filters.
GET /api/fake/invoicesQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| customerId | number | string | no | Filter by customer |
| status | number | string | no | draft | paid | overdue |
Response
[
{
"id": 1,
"note": "See GET /invoices/1 for full invoices shape"
}
]Get a single invoice
Returns one record by numeric id, or 404 if not found.
GET /api/fake/invoices/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full invoices object"
}Add a new invoice
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/invoicesHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching invoices model |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /invoices/1 for full invoices shape"
}Update a invoice (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/invoices/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching invoices model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a invoice (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/invoices/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching invoices model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a invoice
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/invoices/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Customers
CRM customer accounts.
Get all customers
Returns an array of 25 customers records. Supports pagination and filters.
GET /api/fake/customersQuery parameters
| Field | Type | Required | Description |
|---|---|---|---|
| _limit | number | no | Max items to return |
| _start | number | no | Skip first N items |
| _page | number | no | Page number (use with _pageSize) |
| _pageSize | number | no | Items per page |
| tier | number | string | no | bronze | silver | gold |
Response
[
{
"id": 1,
"note": "See GET /customers/1 for full customers shape"
}
]Get a single customer
Returns one record by numeric id, or 404 if not found.
GET /api/fake/customers/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{
"id": 1,
"note": "Full customers object"
}Add a new customer
Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).
POST /api/fake/customersHeaders
| Field | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | yes | application/json |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching customers model |
Request body example (editable)
Response
{
"id": 101,
"note": "See GET /customers/1 for full customers shape"
}Update a customer (full)
Replaces the record with the JSON body (fake — not persisted).
PUT /api/fake/customers/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching customers model |
Request body example (editable)
Response
{
"id": 1,
"title": "Updated"
}Update a customer (partial)
Merges fields from JSON body into the record (fake — not persisted).
PATCH /api/fake/customers/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| ... | mixed | no | Fields matching customers model |
Request body example (editable)
Response
{
"id": 1,
"title": "Patched"
}Delete a customer
Returns an empty object. Does not remove data from the in-memory store.
DELETE /api/fake/customers/1Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Record id |
Response
{}Get invoices for customer
Nested collection filtered by parent id (customerId).
GET /api/fake/customers/1/invoicesPath parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | number | yes | Parent id |
Response
[
{
"id": 1,
"customerId": 1
}
]Live API response
Click Try it on any endpoint. Login first to test GET /auth/me.
Quick reference
72 documented endpoints across 10 resources + auth.
// Login
const { token } = await fetch('https://fakedatahub.com/api/fake/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ username: 'demo', password: 'demo123' }),
}).then((r) => r.json());
// Authenticated request
const me = await fetch('https://fakedatahub.com/api/fake/auth/me', {
headers: { Authorization: 'Bearer ' + token },
}).then((r) => r.json());
// Products with pagination
const products = await fetch('https://fakedatahub.com/api/fake/products?_limit=5').then((r) => r.json());