Free · No signup · CORS enabled

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/fake

Documentation page

https://fakedatahub.com/fake-api
  1. Discover resources GET https://fakedatahub.com/api/fake returns every model URL (users, products, orders, …).
  2. Read data GET https://fakedatahub.com/api/fake/products or /users/1. Add ?_limit=10 to paginate.
  3. Optional auth POST https://fakedatahub.com/api/fake/auth/login with JSON body, then send Authorization: Bearer <token> to /auth/me.
  4. 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/fake

Send 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.

GET

API index

Lists all resources, base URLs, and global query parameter names.

GET /api/fake

Response

200API metadata
{
  "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.

POST

Login user

Authenticate with username and password. Returns a Bearer token for protected routes.

POST /api/fake/auth/login

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
usernamestringyesUsername or email
passwordstringyesUser password

Request body example (editable)

Response

200JWT-style fake token and user profile401Invalid credentials
{
  "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"
    }
  }
}
POST

Register user

Creates a fake user and returns tokens. Not persisted.

POST /api/fake/auth/register

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
usernamestringyesUnique username
emailstringyesEmail address
passwordstringyesPassword
namestringnoDisplay name (optional)

Request body example (editable)

Response

201Registered + tokens
{
  "message": "User registered (fake — not persisted)",
  "token": "fdh....fake",
  "user": {
    "id": 111,
    "username": "newdev",
    "email": "newdev@example.com"
  }
}
POST

Refresh access token

Exchange a refresh token from login for a new access token.

POST /api/fake/auth/refresh

Request body (JSON)

FieldTypeRequiredDescription
refreshTokenstringyesRefresh token from login

Request body example (editable)

Response

200New tokens401Invalid token
{
  "token": "fdh....fake",
  "refreshToken": "fdh....refresh",
  "expiresIn": 3600
}
GETAuth required

Current user profile

Returns the authenticated user. Requires Bearer token from login.

GET /api/fake/auth/me

Headers

FieldTypeRequiredDescription
AuthorizationstringyesBearer <token>

Response

200User profile401Missing or invalid token
{
  "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.

GET

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

FieldTypeRequiredDescription
_limitnumbernoMaximum rows returned
_startnumbernoOffset — skip first N rows
_pagenumbernoPage index starting at 1
_pageSizenumbernoRows per page when using _page

Response

200Filtered or paginated array
[
  {
    "id": 1
  },
  {
    "id": 2
  }
]

Users

User profiles with address and company.

GET

Get all users

Returns an array of 10 users records. Supports pagination and filters.

GET /api/fake/users

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page

Response

200Array of records
[
  {
    "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

Get a single user

Returns one record by numeric id, or 404 if not found.

GET /api/fake/users/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "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"
  }
}
POST

Add a new user

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/users

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching users model

Request body example (editable)

Response

201Created record with assigned id
{
  "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"
  }
}
PUT

Update a user (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/users/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching users model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a user (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/users/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching users model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a user

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/users/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}
GET

Get posts for user

Nested collection filtered by parent id (userId).

GET /api/fake/users/1/posts

Path parameters

FieldTypeRequiredDescription
idnumberyesParent id

Response

200Array of posts
[
  {
    "id": 1,
    "userId": 1
  }
]
GET

Get todos for user

Nested collection filtered by parent id (userId).

GET /api/fake/users/1/todos

Path parameters

FieldTypeRequiredDescription
idnumberyesParent id

Response

200Array of todos
[
  {
    "id": 1,
    "userId": 1
  }
]
GET

Get orders for user

Nested collection filtered by parent id (userId).

GET /api/fake/users/1/orders

Path parameters

FieldTypeRequiredDescription
idnumberyesParent id

Response

200Array of orders
[
  {
    "id": 1,
    "userId": 1
  }
]

Posts

Blog posts linked to users.

GET

Get all posts

Returns an array of 100 posts records. Supports pagination and filters.

GET /api/fake/posts

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
userIdnumber | stringnoFilter by author

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /posts/1 for full posts shape"
  }
]
GET

Get a single post

Returns one record by numeric id, or 404 if not found.

GET /api/fake/posts/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full posts object"
}
POST

Add a new post

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/posts

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
userIdnumberyesAuthor user id
titlestringyesPost title
bodystringyesPost body

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /posts/1 for full posts shape"
}
PUT

Update a post (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/posts/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
userIdnumberyesAuthor user id
titlestringyesPost title
bodystringyesPost body

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a post (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/posts/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
userIdnumbernoAuthor user id
titlestringnoPost title
bodystringnoPost body

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a post

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/posts/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}
GET

Get comments for post

Nested collection filtered by parent id (postId).

GET /api/fake/posts/1/comments

Path parameters

FieldTypeRequiredDescription
idnumberyesParent id

Response

200Array of comments
[
  {
    "id": 1,
    "postId": 1
  }
]

Comments

Comments on posts.

GET

Get all comments

Returns an array of 500 comments records. Supports pagination and filters.

GET /api/fake/comments

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
postIdnumber | stringnoFilter by post

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /comments/1 for full comments shape"
  }
]
GET

Get a single comment

Returns one record by numeric id, or 404 if not found.

GET /api/fake/comments/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full comments object"
}
POST

Add a new comment

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/comments

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching comments model

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /comments/1 for full comments shape"
}
PUT

Update a comment (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/comments/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching comments model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a comment (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/comments/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching comments model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a comment

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/comments/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}

Products

E-commerce catalog items with price and rating.

GET

Get all products

Returns an array of 50 products records. Supports pagination and filters.

GET /api/fake/products

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
categorynumber | stringnoFilter by category

Response

200Array of records
[
  {
    "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

Get a single product

Returns one record by numeric id, or 404 if not found.

GET /api/fake/products/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "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"
}
POST

Add a new product

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/products

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
titlestringyesProduct name
pricenumberyesUnit price
descriptionstringnoLong description
categorystringnoCategory slug
imagestringnoImage URL

Request body example (editable)

Response

201Created record with assigned id
{
  "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"
}
PUT

Update a product (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/products/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
titlestringyesProduct name
pricenumberyesUnit price
descriptionstringnoLong description
categorystringnoCategory slug
imagestringnoImage URL

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a product (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/products/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
titlestringnoProduct name
pricenumbernoUnit price
descriptionstringnoLong description
categorystringnoCategory slug
imagestringnoImage URL

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a product

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/products/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}

Orders

Purchase orders with status and totals.

GET

Get all orders

Returns an array of 50 orders records. Supports pagination and filters.

GET /api/fake/orders

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
userIdnumber | stringnoFilter by customer
statusnumber | stringnopending | shipped | delivered

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /orders/1 for full orders shape"
  }
]
GET

Get a single order

Returns one record by numeric id, or 404 if not found.

GET /api/fake/orders/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full orders object"
}
POST

Add a new order

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/orders

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching orders model

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /orders/1 for full orders shape"
}
PUT

Update a order (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/orders/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching orders model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a order (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/orders/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching orders model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a order

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/orders/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}

Todos

Task list items per user.

GET

Get all todos

Returns an array of 200 todos records. Supports pagination and filters.

GET /api/fake/todos

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
userIdnumber | stringnoFilter by user
completedbooleannotrue | false

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /todos/1 for full todos shape"
  }
]
GET

Get a single todo

Returns one record by numeric id, or 404 if not found.

GET /api/fake/todos/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full todos object"
}
POST

Add a new todo

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/todos

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching todos model

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /todos/1 for full todos shape"
}
PUT

Update a todo (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/todos/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching todos model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a todo (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/todos/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching todos model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a todo

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/todos/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}

Companies

B2B company records.

GET

Get all companies

Returns an array of 20 companies records. Supports pagination and filters.

GET /api/fake/companies

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
industrynumber | stringnoFilter by industry

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /companies/1 for full companies shape"
  }
]
GET

Get a single companie

Returns one record by numeric id, or 404 if not found.

GET /api/fake/companies/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full companies object"
}
POST

Add a new companie

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/companies

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching companies model

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /companies/1 for full companies shape"
}
PUT

Update a companie (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/companies/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching companies model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a companie (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/companies/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching companies model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a companie

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/companies/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}
GET

Get employees for companie

Nested collection filtered by parent id (companyId).

GET /api/fake/companies/1/employees

Path parameters

FieldTypeRequiredDescription
idnumberyesParent id

Response

200Array of employees
[
  {
    "id": 1,
    "companyId": 1
  }
]

Employees

Staff linked to companies.

GET

Get all employees

Returns an array of 30 employees records. Supports pagination and filters.

GET /api/fake/employees

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
companyIdnumber | stringnoFilter by company

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /employees/1 for full employees shape"
  }
]
GET

Get a single employee

Returns one record by numeric id, or 404 if not found.

GET /api/fake/employees/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full employees object"
}
POST

Add a new employee

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/employees

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching employees model

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /employees/1 for full employees shape"
}
PUT

Update a employee (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/employees/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching employees model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a employee (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/employees/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching employees model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a employee

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/employees/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}

Invoices

Billing invoices for customers.

GET

Get all invoices

Returns an array of 40 invoices records. Supports pagination and filters.

GET /api/fake/invoices

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
customerIdnumber | stringnoFilter by customer
statusnumber | stringnodraft | paid | overdue

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /invoices/1 for full invoices shape"
  }
]
GET

Get a single invoice

Returns one record by numeric id, or 404 if not found.

GET /api/fake/invoices/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full invoices object"
}
POST

Add a new invoice

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/invoices

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching invoices model

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /invoices/1 for full invoices shape"
}
PUT

Update a invoice (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/invoices/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching invoices model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a invoice (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/invoices/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching invoices model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a invoice

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/invoices/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}

Customers

CRM customer accounts.

GET

Get all customers

Returns an array of 25 customers records. Supports pagination and filters.

GET /api/fake/customers

Query parameters

FieldTypeRequiredDescription
_limitnumbernoMax items to return
_startnumbernoSkip first N items
_pagenumbernoPage number (use with _pageSize)
_pageSizenumbernoItems per page
tiernumber | stringnobronze | silver | gold

Response

200Array of records
[
  {
    "id": 1,
    "note": "See GET /customers/1 for full customers shape"
  }
]
GET

Get a single customer

Returns one record by numeric id, or 404 if not found.

GET /api/fake/customers/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Single record404Not found
{
  "id": 1,
  "note": "Full customers object"
}
POST

Add a new customer

Accepts JSON body. Returns 201 with a new id. Data is not persisted (fake API).

POST /api/fake/customers

Headers

FieldTypeRequiredDescription
Content-Typestringyesapplication/json

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching customers model

Request body example (editable)

Response

201Created record with assigned id
{
  "id": 101,
  "note": "See GET /customers/1 for full customers shape"
}
PUT

Update a customer (full)

Replaces the record with the JSON body (fake — not persisted).

PUT /api/fake/customers/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching customers model

Request body example (editable)

Response

200Updated record
{
  "id": 1,
  "title": "Updated"
}
PATCH

Update a customer (partial)

Merges fields from JSON body into the record (fake — not persisted).

PATCH /api/fake/customers/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Request body (JSON)

FieldTypeRequiredDescription
...mixednoFields matching customers model

Request body example (editable)

Response

200Patched record
{
  "id": 1,
  "title": "Patched"
}
DELETE

Delete a customer

Returns an empty object. Does not remove data from the in-memory store.

DELETE /api/fake/customers/1

Path parameters

FieldTypeRequiredDescription
idnumberyesRecord id

Response

200Empty object
{}
GET

Get invoices for customer

Nested collection filtered by parent id (customerId).

GET /api/fake/customers/1/invoices

Path parameters

FieldTypeRequiredDescription
idnumberyesParent id

Response

200Array of invoices
[
  {
    "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());