List, retrieve, create and delete stores, their components and locations, and retrieve their inventories.
GET /listStoresPaged
GET /store/{idStore}/inventory/{idInventory}/components/num/{numComponents}
GET /store/{idStore}/inventory/{idInventory}/components/paged
POST /store
DELETE /store/{idStore}
PUT /store/{idStore}/components
DELETE /store/{idStore}/component/{idStoreComponent}
GET /store/{idStore}/locations
POST /store/{idStore}/location
DELETE /store/{idStore}/location/{idStoreLocation}
GET /storeLocation/{idStoreLocation}/storeComponents
POST /storeLocation/{idStoreLocation}/storeComponents/add
POST /storeLocation/{idStoreLocation}/storeComponents/remove
PUT /store/{idStore}/components/move/some/{idStoreDest}
GET /listInventoriesPaged
GET /inventory/{idInventory}/total
GET /inventory/{idInventory}/components/paged
Before you start
Base URL: https://app.tspoonlab.com/recipes/api
Headers
rememberme· required — Session token returned by the login.order· optional — Cost center id (Cost centers). Defaults to the user's active cost center.
Login — Returns the token as plain text.
curl https://app.tspoonlab.com/recipes/api/login \
-d [email protected] \
-d password=XXXXXXX
Permissions — Viewing stores and locations requires permission to view stores (listing them also works with permission to view inventories); creating, changing or deleting, permission to edit stores; the inventory endpoints, permission to view inventories.
Components — A store component is a product, material, recipe or dish kept in that store. It has its own id (idStoreComponent), different from the id of the product or recipe (idComponent).
Dates — Returned as milliseconds since 1970 (epoch).
Responses may include fields other than the documented ones. Use only the documented fields.
List stores
Returns the visible stores of the active cost center, sorted by name.
GET /listStoresPaged
Query parameters
startinteger · optional — Position of the first row, starting at 0. Defaults to 0.rowsinteger · optional — Number of rows to return. Defaults to all.filterstring · optional — Text to filter by store name.
Example
curl "https://app.tspoonlab.com/recipes/api/listStoresPaged?start=0&rows=50" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020101",
"descr": "Cold room",
"defecte": true
}
]
idstring — Store id.descrstring — Name.defecteboolean —trueif it is the default store for reception, production or dispatch in the active cost center.
Retrieve a store
Returns the store and its first components, with stock calculated from an inventory.
GET /store/{idStore}/inventory/{idInventory}/components/num/{numComponents}Path parameters
idStorestring · required — Store id.idInventorystring · required — Starting inventory for the stock calculation. Withnull(or any value that is not an id), the store's latest inventory. With a specific inventory, movements are counted up to the next inventory.numComponentsinteger · required — Number of components to return, starting from the first one.
Example
curl https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/inventory/null/components/num/50 \
-H "rememberme: $TOKEN"
Response
{
"id": "3515834441676562996102020101",
"descr": "Cold room",
"comment": null,
"listComponent": [
{
"id": "3515834441676562996102020102",
"descr": "Onion",
"idComponent": "3515834441676562996102020103",
"idUse": null,
"use": null,
"idUnit": "3515834441676562996102020104",
"unit": "kg",
"quantityInventory": 12.5,
"quantityInput": 20,
"quantityOutput": -18.25,
"quantityDesviation": null
}
]
}idstring — Store id.descrstring — Name.commentstring — Comment.listComponentarray — Store components.
Each component:
idstring — Id of the component in the store (idStoreComponent).descrstring — Name of the product, material, recipe or dish.idComponentstring — Id of the product, material, recipe or dish.idUse,usestring — Cut or breakdown, if any.idUnit,unitstring — Unit of the quantities.quantityInventorynumber — Quantity in the starting inventory or, if there is a later stock adjustment, in the latest adjustment.quantityInputnumber — Sum of later inputs.quantityOutputnumber — Sum of later outputs, as a negative number.quantityDesviationnumber — Differences detected in stock adjustments.
If the store has no inventory, the quantities are null.
List a store's components
Same as Retrieve a store, but paginated and with a filter.
GET /store/{idStore}/inventory/{idInventory}/components/pagedPath parameters
idStorestring · required — Store id.idInventorystring · required — Starting inventory (see Retrieve a store).
Query parameters
startinteger · required — Position of the first row, starting at 0.rowsinteger · required — Number of rows to return.filterstring · optional — Text to filter by component name, alternative name or code.
Example
curl "https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/inventory/null/components/paged?start=50&rows=50" \
-H "rememberme: $TOKEN"
Response — List of components with the same fields as listComponent in Retrieve a store.
Create a store
Creates the store in the active cost center, with an initial inventory dated today. Returns its id.
POST /store
Body
descrstring · required — Name.commentstring · optional — Comment.defaultReceptionboolean · optional — Default store for reception in the active cost center. Defaults tofalse.defaultProductionboolean · optional — Default store for production in the active cost center. Defaults tofalse.defaultExpeditionboolean · optional — Default store for dispatch in the active cost center. Defaults tofalse.
Example
curl https://app.tspoonlab.com/recipes/api/store \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"descr": "Cold room", "defaultReception": true}'
Response
{ "id": "3515834441676562996102020101" }Delete a store
Also deletes its inventories, its components and their stock movements.
DELETE /store/{idStore}Path parameters
idStorestring · required — Store id.
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101 \
-H "rememberme: $TOKEN"
Response — No content.
Add components to a store
Replaces the store's component list: components not sent are deleted, together with their stock movements. To keep a component, send it with its id.
PUT /store/{idStore}/componentsPath parameters
idStorestring · required — Store id.
Body
componentsarray · required — Every component the store must have.
Each component:
idstring · optional — Id of the component in the store, to keep an existing one. Withoutid, it is added as new.idComponentstring · required — Id of the product, material, recipe or dish.idUsestring · optional — Cut or breakdown id.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/components \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"components": [
{ "id": "3515834441676562996102020102", "idComponent": "3515834441676562996102020103" },
{ "idComponent": "3515834441676562996102020105" }
]
}'
Response — No content.
Delete a component from a store
Also deletes its stock movements.
DELETE /store/{idStore}/component/{idStoreComponent}Path parameters
idStorestring · required — Store id.idStoreComponentstring · required — Id of the component in the store.
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/component/3515834441676562996102020102 \
-H "rememberme: $TOKEN"
Response — No content.
List a store's locations
GET /store/{idStore}/locationsPath parameters
idStorestring · required — Store id.
Example
curl https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/locations \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020106",
"descr": "Shelf 1",
"comment": null,
"countStoreComponents": 14
}
]
idstring — Location id.descrstring — Name.commentstring — Comment.countStoreComponentsinteger — Number of visible components in the location.
Create a location
Returns its id.
POST /store/{idStore}/locationPath parameters
idStorestring · required — Store id.
Body
descrstring · required — Name.commentstring · optional — Comment.
Example
curl https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/location \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"descr": "Shelf 1"}'
Response
{ "id": "3515834441676562996102020106" }Delete a location
DELETE /store/{idStore}/location/{idStoreLocation}Path parameters
idStorestring · required — Store id.idStoreLocationstring · required — Location id. It must belong to that store.
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/location/3515834441676562996102020106 \
-H "rememberme: $TOKEN"
Response — No content.
List a location's components
Returns the visible components in the location, sorted by name.
GET /storeLocation/{idStoreLocation}/storeComponentsPath parameters
idStoreLocationstring · required — Location id.
Example
curl https://app.tspoonlab.com/recipes/api/storeLocation/3515834441676562996102020106/storeComponents \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020102",
"descr": "Onion",
"idComponent": "3515834441676562996102020103",
"idUse": null,
"use": null
}
]
idstring — Id of the component in the store (idStoreComponent).descrstring — Name of the product, material, recipe or dish.idComponentstring — Id of the product, material, recipe or dish.idUse,usestring — Cut or breakdown, if any.
Add components to a location
Ids that do not exist are ignored.
POST /storeLocation/{idStoreLocation}/storeComponents/addPath parameters
idStoreLocationstring · required — Location id.
Body
storeComponentsarray · required — Components to add.
Each component:
idStoreComponentstring · required — Id of the component in the store.
Example
curl https://app.tspoonlab.com/recipes/api/storeLocation/3515834441676562996102020106/storeComponents/add \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"storeComponents": [{"idStoreComponent": "3515834441676562996102020102"}]}'
Response — No content.
Remove components from a location
Removes them from the location; they stay in the store.
POST /storeLocation/{idStoreLocation}/storeComponents/removePath parameters
idStoreLocationstring · required — Location id.
Body
storeComponentsarray · required — Components to remove.
Each component:
idstring · required — Id of the component in the store (theidreturned by List a location's components).
Example
curl https://app.tspoonlab.com/recipes/api/storeLocation/3515834441676562996102020106/storeComponents/remove \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"storeComponents": [{"id": "3515834441676562996102020102"}]}'
Response — No content.
Move components to another store
Moves the current stock of each component to the destination store, where it is created if it does not exist, and hides the component in the source store.
PUT /store/{idStore}/components/move/some/{idStoreDest}Path parameters
idStorestring · required — Source store id.idStoreDeststring · required — Destination store id.
Body
listIdsarray · required — Ids of the components in the source store. Ids that do not belong to that store are ignored.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/store/3515834441676562996102020101/components/move/some/3515834441676562996102020107 \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020102"]}'
Response — No content.
List inventories
Returns the inventories of the active cost center's stores, newest first.
GET /listInventoriesPaged
Query parameters
startinteger · required — Position of the first row, starting at 0.rowsinteger · required — Number of rows to return.filterstring · optional — Text to filter by store name.yearinteger · optional — Inventory year.monthinteger · optional — Inventory month, from 1 to 12.
Example
curl "https://app.tspoonlab.com/recipes/api/listInventoriesPaged?start=0&rows=50&year=2026" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020108",
"descr": "Cold room",
"idAux": "3515834441676562996102020101",
"year": 2026,
"month": 9,
"dateGenerated": 1790762400000
}
]
idstring — Inventory id.descrstring — Store name.idAuxstring — Store id.year,monthinteger — Inventory year and month.dateGenerateddate — Inventory date.
Retrieve an inventory's value
GET /inventory/{idInventory}/totalPath parameters
idInventorystring · required — Inventory id.
Example
curl https://app.tspoonlab.com/recipes/api/inventory/3515834441676562996102020108/total \
-H "rememberme: $TOKEN"
Response
{ "value": 4825.3 }valuenumber — Inventory value: sum of the value of the lines that have a quantity.
List an inventory's lines
GET /inventory/{idInventory}/components/pagedPath parameters
idInventorystring · required — Inventory id.
Query parameters
startinteger · required — Position of the first row, starting at 0.rowsinteger · required — Number of rows to return.filterstring · optional — Text to filter the components.
Example
curl "https://app.tspoonlab.com/recipes/api/inventory/3515834441676562996102020108/components/paged?start=0&rows=50" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020109",
"descr": "Onion",
"idComponent": "3515834441676562996102020103",
"idComponentType": "3515834441676562996102020110",
"componentType": "Vegetables",
"quantity": 12.5,
"cost": 13.75
}
]
idstring — Inventory line id.descrstring — Name of the product, material, recipe or dish.idComponentstring — Id of the product, material, recipe or dish.idComponentType,componentTypestring — Main category (Categories).quantitynumber — Counted quantity.costnumber — Line value.
Need help? Message us from the support chat in the bottom-right corner.
