Skip to main content

REST API: Waste

How to list and retrieve daily waste and sale types via API

Retrieve recorded waste, of products and of recipes and dishes, valued at cost, and the waste types.

GET /listThrownPaged
GET /thrown/{idThrown}
GET /listThrownTypesPaged

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 — Waste requires permission to view waste; waste types, permission to view waste types.

Dates — Returned as milliseconds since 1970 (epoch).

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


List waste

Returns the waste entries of the active cost center, newest first.

GET /listThrownPaged

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 description or code.

Example

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

Response

[
{
"id": "3515834441676562996102020401",
"descr": "Daily waste",
"codi": "ME-0118",
"date": "Fri 10/30/2026"
}
]
  • id string — Waste entry id.

  • descr string — Description.

  • codi string — Code.

  • date string — Date formatted for display.


Retrieve a waste entry

GET /thrown/{idThrown}

Path parameters

  • idThrown string · required — Waste entry id.

Example

curl https://app.tspoonlab.com/recipes/api/thrown/3515834441676562996102020401 \
-H "rememberme: $TOKEN"

Response

{
"id": "3515834441676562996102020401",
"descr": "Daily waste",
"codi": "ME-0118",
"dateFormatted": "Fri 10/30/2026 23:00",
"comment": null,
"dateGenerated": 1793397600000,
"currency": "€",
"cost": 3.3,
"listThrownComponents": [
{
"id": "3515834441676562996102020402",
"descr": "Onion",
"idComponent": "3515834441676562996102020403",
"idThrown": "3515834441676562996102020401",
"type": 0,
"color": 5025616,
"quantity": 1.5,
"idUnit": "3515834441676562996102020404",
"unit": "kg",
"cost": 2.2,
"currency": "€",
"idUse": "3515834441676562996102020405",
"use": "Julienne",
"idComponentType": "3515834441676562996102020406",
"componentType": "Vegetables",
"idThrownType": "3515834441676562996102020407",
"thrownType": "Expired",
"thrownTypeCodi": "EXP"
}
]
}
  • id string — Waste entry id.

  • descr string — Description.

  • codi string — Code.

  • dateFormatted string — Date and time formatted for display.

  • comment string — Comment.

  • dateGenerated date — Waste date.

  • currency string — Currency symbol.

  • cost number — Total cost: sum of cost × quantity of the lines. null if any line with a quantity has no cost.

  • listThrownComponents array — Wasted products, recipes and dishes.

Each line:

  • id string — Line id.

  • descr string — Product, recipe or dish name.

  • idComponent string — Product, recipe or dish id.

  • idThrown string — Waste entry id.

  • type integer — 0 product · 1 recipe · 2 material · 3 dish.

  • color number — Color of the main category.

  • quantity number — Wasted quantity.

  • idUnit, unit string — Unit.

  • cost number — Unit cost. Multiply it by quantity to get the line cost.

  • currency string — Currency symbol.

  • idUse, use string — Cut or breakdown, if the whole product was not wasted (for example, julienned onion).

  • idComponentType, componentType string — Main category (Categories).

  • idThrownType, thrownType, thrownTypeCodi string — Waste type: id, name and code.


List waste types

Returns the account's waste types, sorted by name.

GET /listThrownTypesPaged

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 or code.

Example

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

Response

[
{ "id": "3515834441676562996102020407", "descr": "Expired", "codi": "EXP" }
]
  • id string — Waste type id.

  • descr string — Name.

  • codi string — Code.

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

Did this answer your question?