Provisional documentation. These endpoints are not implemented yet and may change before they are published.
Keep a synchronised copy of productions and record stock entries and exits in a store.
GET /integration/productions/changes
GET /integration/productions/deletes
POST /integration/stores/movements
Before you start
Base URL: https://app.tspoonlab.com/recipes/api
Headers
rememberme· required — Session token returned by login.order· optional — Cost center id (Cost centers). Defaults to the user's active center.
Login — Returns the token as plain text.
curl https://app.tspoonlab.com/recipes/api/login \
-d [email protected] \
-d password=XXXXXXX
Permissions — Productions require permission to view production. Store movements require permission to edit stores.
Dates — Returned in milliseconds since 1970 (epoch). When sending them, milliseconds or full ISO 8601 (2026-10-30T09:00:00.000+01:00) are accepted.
Responses may include fields other than those documented. Use only the documented ones.
Sync productions
Works like the purchase and sales sync: /changes returns the productions created or modified and /deletes the deleted ones. Each one has its own cursor.
First call without
cursor: returns every production of the center inchanges. To start from a given day, sendchangedSince.While
hasMoreistrue, call again with thecursorreceived.Save the last
cursor. On the next sync, call with it: you will only get what has changed.
GET /integration/productions/changes
Query parameters
cursorstring · optional — Cursor from the previous call. When sent,changedSinceand$filterare ignored.changedSincedate · optional — Changes since this day, asYYYY-MM-DD. Cannot be later than today.$filterstring · optional — OData filter, same syntax as purchases and sales. It is stored in the cursor: send it only on the first call.rowsinteger · optional — Productions per page, 1 to 100. Default 100.
$filter fields: dateStarted, dateDone (date), idComponent (id), descr (text), type (number, with eq, ne and in).
Example — Productions finished since 1 January 2026:
curl -G https://app.tspoonlab.com/recipes/api/integration/productions/changes \
-H "rememberme: $TOKEN" \
--data-urlencode '$filter=dateDone ge 2026-01-01'
Response
{
"changes": [
{
"id": "3515834441676562996102020301",
"idProduction": "3515834441676562996102020302",
"dateStarted": 1767258000000,
"dateDone": 1767272400000,
"idComponent": "3515834441676562996102020303",
"descr": "Tomato sauce",
"type": 1,
"createdAt": 1767254400000,
"updatedAt": 1767272400000,
"listUnits": [
{
"idUnit": "3515834441676562996102020304",
"descrUnit": "kg",
"quantity": 20.0,
"quantityReal": 18.5
}
]
}
],
"cursor": "MjAyNi0wMS0wMSAxMzowMDowMC4wfDM1MTU4MzQ0NDE2NzY1NjI5OTYxMDIwMjAzMDE",
"hasMore": false
}Each production in changes:
idstring — Identifier of the item production. It is theidProductionComponentof the Productions API.idProductionstring — Identifier of the production day it belongs to.dateStarteddate — When the production starts. The ingredients leave the store at this moment.nullif it has not started.dateDonedate — When the production ends. The finished product enters the store at this moment and can be sold.nullif it has not finished.idComponentstring — Identifier of the product being produced.descrstring — Product name.typenumber — Product type:1recipe ·3dish.createdAt,updatedAtdate — Creation and last modification.listUnitsarray — Quantities per unit.
Each quantity (listUnits):
idUnit,descrUnitstring — Unit: id and name.quantitynumber — Planned quantity to produce.quantityRealnumber — Quantity actually produced.nullif not reported.
Keep in mind
All productions are returned, including those not started or not finished. The date when the finished product enters the store is
dateDone. To get only finished ones, filter ondateDone, for exampledateDone ne null.Some productions last a long time (for example, a curing process of several months). Months can pass between
dateStartedanddateDone, and the production appears inchangesevery time it is modified.Starting, finishing or reopening a production is a modification: it appears in
changeswith the sameid. When reopened,dateDonegoes back tonull.A change in the quantities (
listUnits) is also a modification of the production.Production tasks, which do not produce any product, are not returned.
Changes from the last 5 minutes arrive on the next call. Each
idappears only once per page.
Deleted — Deleted productions are in /integration/productions/deletes.
curl -G https://app.tspoonlab.com/recipes/api/integration/productions/deletes \
-H "rememberme: $TOKEN" \
--data-urlencode cursor=$CURSOR_DELETES
{
"deletes": [
{ "id": "3515834441676562996102020309", "deletedAt": 1767268800000 }
],
"cursor": "djJ8LXwyMDI2LTAxLTAxIDEyOjAwOjAwLjB",
"hasMore": false
}Parameters:
cursor,changedSinceandrows, as in/changes.$filteris not accepted: it returns every deleted production of the center. Delete theids you have and ignore the rest.Without
cursororchangedSince, it starts with the oldest deletion kept.A reopened production has not been deleted: it appears in
/changes.
Errors — An invalid cursor, changedSince or $filter, or rows out of range, returns 400 with code, message and params.
Record store entries and exits
Adds or subtracts product quantities in a store. Each call is one movement with one or more lines. Positive quantities are entries and negative ones are exits. They are recorded as manual stock movements, like an adjustment made in tSpoonLab.
POST /integration/stores/movements
Body
externalIdstring · required — Reference of the movement in your system, up to 128 characters. If the same one is sent again, it is not duplicated (see Retries).idStorestring · required — Store (see Stores). Must belong to the active cost center.datedate · required — Movement date. Stock is recalculated from this date.commentstring · optional — Reason or comment.linesarray · required — 1 to 100 lines.
Each line (lines):
idComponentstring · required — Product or recipe. If it is not in the store yet, it is added.idUnitstring · required — Unit of the quantity. Must be a unit of the product.quantitynumber · required — Positive for an entry and negative for an exit. Cannot be 0.costnumber · optional — Cost per unit. Without cost, the current product cost is used.lotstring · optional — Lot.
Example
curl -X POST https://app.tspoonlab.com/recipes/api/integration/stores/movements \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"externalId": "A3-MOV-2026-000123",
"idStore": "3515834441676562996102020101",
"date": "2026-01-15T10:00:00.000+01:00",
"comment": "Adjustment",
"lines": [
{ "idComponent": "3515834441676562996102020303", "idUnit": "3515834441676562996102020304", "quantity": 12.5, "lot": "L260115" },
{ "idComponent": "3515834441676562996102020305", "idUnit": "3515834441676562996102020304", "quantity": -3 }
]
}'
Response
{
"id": "3515834441676562996102020310",
"externalId": "A3-MOV-2026-000123",
"created": true
}idstring — Movement identifier in tSpoonLab.externalIdstring — The reference sent.createdboolean —trueif it was recorded now andfalseif it had already been received.
Retries — If you get no response, send the same movement again with the same externalId. If it was already recorded, the response returns the same id with created set to false and it is not added again.
Keep in mind
The movement is recorded in full or not at all: if one line is invalid, none is saved.
To correct a movement, send another one with the opposite quantity and a new
externalId.To move stock between stores or centers, use transfers. To record a production, use the Productions API.
Errors — A missing required field, a store, product or unit that does not exist or does not belong to the center, or a quantity of 0, returns 400 with code, message and params.
Need help? Write to us from the support chat, in the bottom right corner.
