Skip to main content

REST API: Productions

Learn how to list batches, view productions, and create or update production records through the tSpoonLab REST API.

List stations and a day's productions, create productions and start, finish or delete them.

GET    /listPartidesPaged
POST /production/day/{year}/{month}/{day}
GET /productionComponentList
PUT /productionComponent/{idProductionComponent}/start/status
PUT /productionComponent/{idProductionComponent}/done
PUT /productionComponent/{idProductionComponent}/redo
GET /listComponentsPartidaPagedEx
GET /component/{idComponent}/quantityUnit
POST /production/{idProduction}/component/{idComponent}/quantities/events
DELETE /productionComponent/{idProductionComponent}
POST /production/component

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.

  • recipe · optional — Final-dish book id (Recipe centers), or all for every book. Defaults to the user's active book.

Login — Returns the token as plain text.

curl https://app.tspoonlab.com/recipes/api/login \
-d [email protected] \
-d password=XXXXXXX

Permissions — Listing stations requires permission to view stations; getting the day and listing its productions, permission to view production; everything else, permission to edit production.

Dates — Returned as milliseconds since 1970 (epoch). When sending, milliseconds or full ISO 8601 (2026-10-30T09:00:00.000+01:00) are accepted.

Responses may include fields other than the documented ones. Use only the documented fields.


List stations

Returns the stations of the active cost center, sorted by name.

GET /listPartidesPaged

Query parameters

  • start integer · required — Position of the first row, starting at 0.

  • rows integer · required — Number of rows to return.

  • filter string · optional — Text to filter by name.

Example

curl "https://app.tspoonlab.com/recipes/api/listPartidesPaged?start=0&rows=50" \
-H "rememberme: $TOKEN"

Response

[
{ "id": "3515834441676562996102020201", "descr": "Hot kitchen" }
]
  • id string — Station id.

  • descr string — Name.


Get the id of a day's productions

Returns the id of the day's production in the active cost center and creates it if it does not exist. If there are automatic production templates for that weekday that have not been applied yet, their productions are added.

POST /production/day/{year}/{month}/{day}

Path parameters

  • year integer · required — Year.

  • month integer · required — Month, from 1 to 12.

  • day integer · required — Day of the month.

Example

curl -X POST https://app.tspoonlab.com/recipes/api/production/day/2026/10/30 \
-H "rememberme: $TOKEN"

Response

{ "id": "3515834441676562996102020202" }

List a day's productions

GET /productionComponentList

Query parameters

  • id string · required — Id of the day's production (see Get the id of a day's productions).

  • idPartida string · optional — Only productions of this station.

  • start integer · optional — Position of the first row, starting at 0. Pagination applies only when both start and rows are sent.

  • rows integer · optional — Number of rows to return. Without start and rows, all rows are returned.

Example

curl "https://app.tspoonlab.com/recipes/api/productionComponentList?id=3515834441676562996102020202&idPartida=3515834441676562996102020201" \
-H "rememberme: $TOKEN"

Response

{
"id": "3515834441676562996102020202",
"date": "Friday, October 30, 2026",
"year": 2026,
"month": 10,
"day": 30,
"listComponents": [
{
"id": "3515834441676562996102020203",
"idComponent": "3515834441676562996102020204",
"descr": "Brown stock",
"comment": null,
"dateGeneratedFlat": "Fri 10/30/2026",
"lot": "L261030-01",
"idPartida": "3515834441676562996102020201",
"partida": "Hot kitchen",
"status": {
"dateGenerated": "Fri 10/30/2026 08:12",
"dateStarted": "Fri 10/30/2026 09:05",
"dateDone": null,
"started": true,
"done": false
},
"listComponentService": [
{ "id": "3515834441676562996102020205", "idUnit": "3515834441676562996102020206", "unit": "l", "quantity": 10 }
]
}
]
}
  • id string — Id of the day's production.

  • date string — Date formatted for display.

  • year, month, day integer — Year, month and day.

  • listComponents array — The day's productions.

Each production:

  • id string — Id of the recipe or dish production (idProductionComponent).

  • idComponent string — Recipe or dish id. null if the line is not a recipe or dish.

  • descr string — Name.

  • comment string — Comment.

  • dateGeneratedFlat string — Production day, formatted for display.

  • lot string — Batch.

  • idPartida, partida string — Station.

  • status object — Status (see Start a production).

  • listComponentService array — Quantities to produce: id string, idUnit and unit string (unit), quantity number.


Start a production

Marks the production as started, assigns it a batch and generates its stock movements. If it was already started, nothing changes and the response is empty.

PUT /productionComponent/{idProductionComponent}/start/status

Path parameters

  • idProductionComponent string · required — Id of the recipe or dish production.

Example

curl -X PUT https://app.tspoonlab.com/recipes/api/productionComponent/3515834441676562996102020203/start/status \
-H "rememberme: $TOKEN"

Response

{
"id": "3515834441676562996102020203",
"dateGenerated": "Fri 10/30/2026 08:12",
"dateStarted": "Fri 10/30/2026 09:05",
"dateDone": null,
"started": true,
"done": false
}
  • id string — Id of the recipe or dish production.

  • dateGenerated, dateStarted, dateDone string — Creation, start and finish dates, formatted for display.

  • started boolean — Whether it has started.

  • done boolean — Whether it has finished.

Statuses: pending (started and done false) · started (started true, done false) · finished (started and done true).


Finish a production

Marks the production as finished. If it was started, generates the stock movements for what was produced. If the recipe's cost is calculated from productions, the affected costs are recalculated.

PUT /productionComponent/{idProductionComponent}/done

Path parameters

  • idProductionComponent string · required — Id of the recipe or dish production.

Example

curl -X PUT https://app.tspoonlab.com/recipes/api/productionComponent/3515834441676562996102020203/done \
-H "rememberme: $TOKEN"

Response — The status, with the same fields as in Start a production.


Reopen a finished production

Marks the production as not finished again. The stock movements generated when it was finished are not undone.

PUT /productionComponent/{idProductionComponent}/redo

Path parameters

  • idProductionComponent string · required — Id of the recipe or dish production.

Example

curl -X PUT https://app.tspoonlab.com/recipes/api/productionComponent/3515834441676562996102020203/redo \
-H "rememberme: $TOKEN"

Response — The status, with the same fields as in Start a production.


Search recipes and dishes to produce

First step to create a production. Dishes are limited to the book in the recipe header.

GET /listComponentsPartidaPagedEx

Query parameters

  • filterType string · required — Always recipeAndDish.

  • filter string · optional — Text to filter by name.

  • partida string · optional — Station id: only recipes and dishes assigned to that station in the active cost center.

  • start integer · optional — Position of the first row, starting at 0. Pagination applies only when both start and rows are sent.

  • rows integer · optional — Number of rows to return. Without start and rows, all rows are returned.

Example

curl "https://app.tspoonlab.com/recipes/api/listComponentsPartidaPagedEx?filterType=recipeAndDish&filter=stock&start=0&rows=50" \
-H "rememberme: $TOKEN"

Response

{
"filter": "stock",
"list": [
{ "id": "3515834441676562996102020204", "type": 1, "descr": "Brown stock", "codi": "EI-012" }
]
}
  • filter string — Filter applied.

  • list array — Recipes and dishes found.

Each recipe or dish:

  • id string — Recipe or dish id (idComponent).

  • type integer — 1 recipe · 3 dish.

  • descr string — Name.

  • codi string — Code.


Retrieve the default quantity of a recipe or dish

GET /component/{idComponent}/quantityUnit

Path parameters

  • idComponent string · required — Recipe or dish id.

Example

curl https://app.tspoonlab.com/recipes/api/component/3515834441676562996102020204/quantityUnit \
-H "rememberme: $TOKEN"

Response

{
"id": "3515834441676562996102020206",
"descr": "l",
"quantity": 10
}
  • id string — Id of the recipe or dish's main unit.

  • descr string — Unit name.

  • quantity number — Default quantity to produce, in that unit.


Create a production

Adds a pending production of the recipe or dish to the day's production. Returns its id (idProductionComponent).

POST /production/{idProduction}/component/{idComponent}/quantities/events

Path parameters

  • idProduction string · required — Id of the day's production.

  • idComponent string · required — Recipe or dish id.

Body

  • quantities array · required — Quantities to produce.

Each quantity:

  • idUnit string · required — Unit id.

  • quantity number · required — Quantity.

Example

curl https://app.tspoonlab.com/recipes/api/production/3515834441676562996102020202/component/3515834441676562996102020204/quantities/events \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"quantities": [{"idUnit": "3515834441676562996102020206", "quantity": 10}]}'

Response

{ "id": "3515834441676562996102020203" }

Delete a production

Deletes the recipe or dish production and recalculates the recipe or dish costs.

DELETE /productionComponent/{idProductionComponent}

Path parameters

  • idProductionComponent string · required — Id of the recipe or dish production.

Example

curl -X DELETE https://app.tspoonlab.com/recipes/api/productionComponent/3515834441676562996102020203 \
-H "rememberme: $TOKEN"

Response — No content.


Create, start and finish a production

In a single step: creates the production on the day of date (and the day's production if it does not exist), starts it and finishes it, with its stock movements. Returns its id (idProductionComponent).

POST /production/component

Body

  • idComponent string · required — Recipe or dish id.

  • quantity number · required — Quantity produced, in the recipe or dish's main unit.

  • date date · required — Production date and time.

Example

curl https://app.tspoonlab.com/recipes/api/production/component \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"idComponent": "3515834441676562996102020204", "quantity": 10, "date": "2026-10-30T09:00:00.000+01:00"}'

Response

{ "id": "3515834441676562996102020207" }

Need help? Message us from the support chat in the bottom-right corner.

Did this answer your question?