A stock list, an item detail page or a low-stock warning needs inventory data before a warehouse backend exists. The inventory template gives you a small stock keeping API behind a real URL: items with quantities and locations, adjustments and movements.
What you get
The template creates a project with the base path /inventory-api and 5 endpoints. Each endpoint has one ready response, so the API answers as soon as the project exists.
| Method | Path | What it answers |
|---|---|---|
GET |
/items |
200 with ten generated stock items. |
GET |
/items/:id |
200 with one item. The id is the one from the path. |
POST |
/items/:id/adjustments |
201 with delta and reason from the request body and a generated id for the item in the path. |
GET |
/low-stock |
200 with four generated items whose quantity is below their reorderLevel. |
GET |
/items/:id/movements |
200 with six generated movements for the item in the path. |
An item in the list has id, sku, name, quantity, location (Warehouse A, Warehouse B, Shop floor or Returns) and updatedAt. The single item adds description, reserved, reorderLevel and bin. An adjustment has id, itemId, delta, reason and createdAt. A movement has id, itemId, type (received, shipped, adjusted or returned), delta, user and createdAt. Item names and descriptions are generated filler text, not product names.
Sample response
$ curl -s -X POST $URL/inventory-api/items/42/adjustments \
-H "Content-Type: application/json" \
-d '{"delta":-3,"reason":"damaged"}'
{
"id": "6127",
"itemId": "42",
"delta": -3,
"reason": "damaged",
"createdAt": "2026-11-15T09:12:44Z"
}
itemId is the id from the path, delta and reason come from your request. delta can be positive or negative. The id and createdAt are generated on every call. Without a body, the mock answers with a delta of 5 and the reason stock count.
How to start
- Sign up at
https://app.mockhop.com/register. The quickstart explains the account and the address of your organization. - Open Projects and select Start from a template.
- Choose Example inventory API and select Use template.
Then call the mock. Replace acme with your organization's address. Your mocks answer from outside once you've confirmed your email address.
$ URL=https://acme.mockhop.cloud
$ curl -s $URL/inventory-api/items
$ curl -s $URL/inventory-api/low-stock
The first call returns ten items, the second four items with a quantity between 0 and 9 and a reorderLevel between 10 and 40.
What to do next
- Change the responses. Open an endpoint and edit the status code, headers and body of its response, or add more responses with matching rules.
- Add error cases and delays. For example a
404for an unknown item, a409for an adjustment that would make the stock negative, or a422for a missingdelta. See Simulate API errors, timeouts and rate limits. - Use scenarios for flows. For example an item whose
quantityis12on the first call and9after an adjustment. See Scenarios; scenarios are included from the Pro plan. - Export the project. Under Import/Export you can download the project as an OpenAPI 3.0 file.
Good to know
- No stock is kept. The template is an example shape for your own code: it is connected to no warehouse or shop system.
- Responses are generated per request and the mock keeps no state. An adjustment does not change the item's
quantityand does not appear in its movements. - The same
idreturns a differentsku, name and quantity on every call. In the movements,typeanddeltaare generated separately, so ashippedmovement can have a positivedelta. - Nothing is validated: an adjustment can be larger than the stock.
GET /itemsalways returns ten items with the ids1to10; there is no paging, filtering or search. - The template creates a new project, and no other project in your organization may use the base path
/inventory-api. The Free plan includes one project. - You can change or delete the project and each of its endpoints at any time.
New to Mockhop? Start with the quickstart. Plans: pricing.