Manage suppliers, their items, orders and purchases.
GET /listVendorsPaged
GET /listVendorTypesPaged
POST /vendorType
DELETE /vendorType/{idVendorType}
POST /vendor
DELETE /vendor/{idVendor}
PUT /vendor/{idVendor}/hide
PUT /vendor/{idVendor}/unhide
GET /vendor/{idVendor}
GET /vendor/{idVendor}/orders/paged
POST /vendor/{idVendor}/components/other
POST /vendor/{idVendor}/components/add
DELETE /vendor/{idVendor}/component/{idVendorComponent}
GET /listOrdersPagedExt
POST /order
GET /order/{idOrder}
DELETE /order/{idOrder}
POST /order/{idOrder}/vendor/{idVendor}
PUT /orderVendor/{idOrderVendor}/edit
DELETE /orderVendor/{idOrderVendor}
Each supplier has a list of items with their own code, description, purchase format and price. An item may or may not be linked to a tSpoonLab product. An order groups purchases (for example, all of one day's purchases), and each purchase goes to a single supplier.
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 — Suppliers: permission to view or edit suppliers. Supplier types: permission to view or edit supplier types. Orders and purchases: permission to view or edit orders; adding a purchase to an order requires permission to add purchases. Item costs are only returned with permission to view purchase costs.
Dates — Numeric date fields are returned as milliseconds since 1970 (epoch). Text fields such as dateGenerated or lastModified are dates already formatted for display. When sending a date, milliseconds or ISO 8601 with time are accepted, for example 2026-10-30T09:00:00.000+01:00.
Responses may include fields other than the documented ones. Use only the documented fields.
List suppliers
Returns the cost center's suppliers.
GET /listVendorsPaged
Query parameters
startinteger · optional — Position of the first row, starting at 0. If neitherstartnorrowsis sent, all suppliers are returned.rowsinteger · optional — Number of rows to return.filterstring · optional — Text to search by name or code.hiddenboolean · optional —truereturns only hidden suppliers. Defaults tofalse: visible suppliers only.
Example
curl "https://app.tspoonlab.com/recipes/api/listVendorsPaged?start=0&rows=50" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020301",
"descr": "Garriga Foods",
"codi": "P-001",
"defecte": false,
"idType": "3515834441676562996102020302",
"descrType": "Fruit and vegetables",
"orderCenter": null
}
]
idstring — Supplier id.descrstring — Name.codistring — Code.defecteboolean — Whether it is the cost center's default supplier: the one that receives the purchase of a product with no supplier assigned.idType,descrTypestring — Supplier type.orderCenterobject — If the supplier is another cost center in the account (for example, a central kitchen), that center:idanddescr. Otherwisenull.
List supplier types
GET /listVendorTypesPaged
Query parameters
startinteger · required — Position of the first row, starting at 0.rowsinteger · required — Number of rows to return.filterstring · optional — Text to search by name or code.
Example
curl "https://app.tspoonlab.com/recipes/api/listVendorTypesPaged?start=0&rows=50" \
-H "rememberme: $TOKEN"
Response
[
{ "id": "3515834441676562996102020302", "descr": "Fruit and vegetables", "codi": "FV" }
]
idstring — Type id.descrstring — Name.codistring — Code.
Create a supplier type
POST /vendorType
Body
descrstring · required — Name.codistring · optional — Code.commentstring · optional — Comment.
Example
curl https://app.tspoonlab.com/recipes/api/vendorType \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"descr": "Fruit and vegetables", "codi": "FV"}'
Response
{ "id": "3515834441676562996102020302" }Delete a supplier type
Suppliers of that type are left without a type.
DELETE /vendorType/{idVendorType}Path parameters
idVendorTypestring · required — Type id.
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/vendorType/3515834441676562996102020302 \
-H "rememberme: $TOKEN"
Response — No content.
Create a supplier
The supplier is created in the cost center of the call.
POST /vendor
Body
descrstring · required — Name.codistring · optional — Code.nifstring · optional — Tax id.address,city,cpstring · optional — Address, city and postcode.webstring · optional — Supplier website.mailccstring · optional — Email that gets a copy of the orders sent to the supplier.commentstring · optional — Comment.defecteboolean · optional — Whether it is the cost center's default supplier.creditorboolean · optional —trueif it is a creditor. Defaults tofalse.idVendorTypestring · optional — Supplier type.listContactarray · optional — Contacts.listMailarray · optional — Contact emails.
Each contact:
descrstring · optional — Contact name.phonestring · optional — Phone.
Each email:
descrstring · optional — Email address.
Example
curl https://app.tspoonlab.com/recipes/api/vendor \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"descr": "Garriga Foods",
"codi": "P-001",
"nif": "B17000000",
"idVendorType": "3515834441676562996102020302",
"listContact": [{ "descr": "Marta Puig", "phone": "600 000 000" }],
"listMail": [{ "descr": "[email protected]" }]
}'
Response
{ "id": "3515834441676562996102020301" }Delete a supplier
Recalculates the default supplier and the cost of the products it was linked to. A supplier with invoices (error 409, VENDOR_HAS_INVOICES) or with purchases cannot be deleted: hide it instead.
DELETE /vendor/{idVendor}Path parameters
idVendorstring · required — Supplier id.
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301 \
-H "rememberme: $TOKEN"
Response — No content.
Hide a supplier
PUT /vendor/{idVendor}/hidePath parameters
idVendorstring · required — Supplier id.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301/hide \
-H "rememberme: $TOKEN"
Response — No content.
Unhide a supplier
PUT /vendor/{idVendor}/unhidePath parameters
idVendorstring · required — Supplier id.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301/unhide \
-H "rememberme: $TOKEN"
Response — No content.
Retrieve a supplier
Returns the supplier with its contacts, its items and its last 10 purchases. Items and purchases are those of the cost center of the call. If the supplier doesn't exist, the response is empty.
GET /vendor/{idVendor}Path parameters
idVendorstring · required — Supplier id.
Example
curl https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301 \
-H "rememberme: $TOKEN"
Response
{
"id": "3515834441676562996102020301",
"descr": "Garriga Foods",
"codi": "P-001",
"nif": "B17000000",
"address": "Carrer del Mercat, 3",
"city": "Girona",
"cp": "17003",
"web": "https://garriga.com",
"mailcc": "[email protected]",
"comment": null,
"defecte": false,
"creditor": false,
"vendorType": { "id": "3515834441676562996102020302", "descr": "Fruit and vegetables" },
"listContact": [{ "id": "3515834441676562996102020303", "descr": "Marta Puig", "phone": "600 000 000" }],
"listMail": [{ "id": "3515834441676562996102020304", "descr": "[email protected]" }],
"listComponent": [
{
"id": "3515834441676562996102020305",
"descr": "Sunflower oil 5 L",
"codi": "AG5",
"comment": null,
"cost": 1.85,
"lastModified": "Thu, Oct 29, 2026 10:12",
"idComponent": "3515834441676562996102020306",
"component": "Sunflower oil",
"idUnit": "3515834441676562996102020307",
"unit": "L",
"defecte": true,
"listFormat": [
{
"id": "3515834441676562996102020308",
"descr": "5 L jug",
"codi": "AG5-G",
"comment": null,
"costFormat": 9.25,
"quantityFormat": 5,
"idUnitFormat": "3515834441676562996102020309",
"unitFormat": "Jug",
"lastModified": "Thu, Oct 29, 2026 10:12"
}
]
}
],
"listOther": [
{
"id": "3515834441676562996102020310",
"descr": "Cardboard boxes",
"codi": "CC-01",
"comment": "Pack of 25",
"cost": 12.5,
"lastModified": "Mon, Oct 12, 2026 08:30"
}
],
"listOrders": [
{
"id": "3515834441676562996102020311",
"descr": "Order 29/10",
"idProveidorComanda": "3515834441676562996102020312",
"cost": 46.25,
"dateGenerated": "Thu, Oct 29, 2026 09:00",
"type": 2
}
]
}idstring — Supplier id.descr,codi,nifstring — Name, code and tax id.address,city,cpstring — Address, city and postcode.web,mailcc,commentstring — Website, copy email for orders and comment.defecteboolean — Whether it is the cost center's default supplier.creditorboolean — Whether it is a creditor.vendorTypeobject — Supplier type:idanddescr.nullif none.listContactarray — Contacts:id,descr(name) andphone.listMailarray — Emails:idanddescr(address).listComponentarray — Items linked to a product.listOtherarray — Unlinked items.listOrdersarray — Last 10 purchases from the supplier.
Each unlinked item:
idstring — Item id.descr,codistring — The supplier's name and code for the item.commentstring — Comment, for example the purchase format.costnumber — Cost.lastModifiedstring — Date of the last cost change.
Each linked item — The same fields, plus:
idComponent,componentstring — Linked product.idUnit,unitstring — Product unit.costis the cost of one unit: for example, of 1 L if you buy 5 L jugs.defecteboolean — Whether it is the default item for buying that product in the cost center.listFormatarray — Purchase formats.
Each format:
idstring — Format id.descrstring — Format name.codi,commentstring — The supplier's code for the format and comment.costFormatnumber — Cost of one format (the whole jug).quantityFormatnumber — Format size in the product unit (5 for a 5 L jug).idUnitFormat,unitFormatstring — Format unit (Jug).lastModifiedstring — Date of the last cost change.
Each purchase:
id,descrstring — Order the purchase belongs to.idProveidorComandastring — Purchase id.costnumber — Amount excluding taxes.dateGeneratedstring — Reception date; if there is none, the purchase date.typeinteger — Status:-1pending approval ·0pending to send ·1pending to receive ·2received ·3pending scan.
List a supplier's purchases
Like listOrders in Retrieve a supplier, but paginated.
GET /vendor/{idVendor}/orders/pagedPath parameters
idVendorstring · required — Supplier 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 purchases.
Example
curl "https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301/orders/paged?start=0&rows=50" \
-H "rememberme: $TOKEN"
Response — List of purchases with the same fields as listOrders.
[
{
"id": "3515834441676562996102020311",
"descr": "Order 29/10",
"idProveidorComanda": "3515834441676562996102020312",
"cost": 46.25,
"dateGenerated": "Thu, Oct 29, 2026 09:00",
"type": 2
}
]
Add an unlinked item
POST /vendor/{idVendor}/components/otherPath parameters
idVendorstring · required — Supplier id.
Body
descrstring · optional — The supplier's name for the item.codistring · optional — The supplier's code for the item.costnumber · optional — Cost.commentstring · optional — Comment, for example the purchase format.
Example
curl https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301/components/other \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"descr": "Cardboard boxes", "codi": "CC-01", "cost": 12.5, "comment": "Pack of 25"}'
Response — The new item, with the fields of an unlinked item (see Retrieve a supplier).
{
"id": "3515834441676562996102020310",
"descr": "Cardboard boxes",
"codi": "CC-01",
"comment": "Pack of 25",
"cost": 12.5,
"lastModified": "Fri, Oct 30, 2026 11:05"
}Add linked items
Creates one or more items linked to products. The item unit is always the product unit. Recalculates the cost of the affected products.
POST /vendor/{idVendor}/components/addPath parameters
idVendorstring · required — Supplier id.
Body
componentsarray · required — Items to create.
Each item:
idComponentstring · required — Product to link to.descrstring · optional — The supplier's name for the item.codistring · optional — The supplier's code for the item.commentstring · optional — Comment.costnumber · optional — Cost of one product unit. Ignored without permission to view purchase costs.defecteboolean · optional —trueto make it the default item for buying that product.listFormatarray · optional — Purchase formats.
Each format:
idUnitstring · required — Format unit, for example Jug (see Rest API: Units).quantitynumber · required — Format size in the product unit: 5 for a 5 L jug.descrstring · optional — Format name.codistring · optional — The supplier's code for the format.commentstring · optional — Comment.costnumber · optional — Cost of one format (the whole jug). Ignored without permission to view purchase costs.
Example
curl https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301/components/add \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"components": [
{
"idComponent": "3515834441676562996102020306",
"descr": "Sunflower oil 5 L",
"codi": "AG5",
"cost": 1.85,
"defecte": true,
"listFormat": [
{ "idUnit": "3515834441676562996102020309", "quantity": 5, "descr": "5 L jug", "cost": 9.25 }
]
}
]
}'
Response — List of the new items, with the fields of a linked item (see Retrieve a supplier).
Delete an item
Works for linked and unlinked items. Also deletes its formats and recalculates the default supplier and the cost of the linked product.
DELETE /vendor/{idVendor}/component/{idVendorComponent}Path parameters
idVendorstring · required — Supplier id.idVendorComponentstring · required — Item id.
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/vendor/3515834441676562996102020301/component/3515834441676562996102020310 \
-H "rememberme: $TOKEN"
Response — No content.
List orders
Returns the cost center's orders.
GET /listOrdersPagedExt
Query parameters
startinteger · required — Position of the first row, starting at 0.rowsinteger · required — Number of rows to return.filterstring · optional — Text to search in the order name, in its purchases' description and in the delivery note number.
Example
curl "https://app.tspoonlab.com/recipes/api/listOrdersPagedExt?start=0&rows=50" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020311",
"descr": "Order 29/10",
"data": "Thu, Oct 29, 2026 09:00",
"year": 2026,
"month": 10,
"pendingSend": 1,
"pendingReceive": 2
}
]
idstring — Order id.descrstring — Name.datastring — Order date, formatted for display.year,monthinteger — Order year and month.pendingSendinteger — Purchases pending to send to the supplier.pendingReceiveinteger — Purchases pending to receive.
Create an order
Creates an empty order in the cost center of the call. Returns its id.
POST /order
Body
descrstring · required — Name.datadate · optional — Order date.
Example
curl https://app.tspoonlab.com/recipes/api/order \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"descr": "Order 30/10", "data": 1793350800000}'
Response
{ "id": "3515834441676562996102020313" }Retrieve an order
Returns the order with its purchases and each purchase's lines. If the order doesn't exist, the response is empty.
GET /order/{idOrder}Path parameters
idOrderstring · required — Order id.
Example
curl https://app.tspoonlab.com/recipes/api/order/3515834441676562996102020311 \
-H "rememberme: $TOKEN"
Response
{
"id": "3515834441676562996102020311",
"descr": "Order 29/10",
"data": 1793264400000,
"dateGenerated": "10/29/2026",
"cost": 46.25,
"taxes": 4.63,
"listComandes": [
{
"id": "3515834441676562996102020301",
"descr": "Garriga Foods",
"idVendor": "3515834441676562996102020301",
"idProveidorComanda": "3515834441676562996102020312",
"status": 2,
"comment": null,
"dateGenerated": "Thu, Oct 29, 2026 09:00",
"dateReceptionFlat": "Thu, Oct 29, 2026 12:40",
"cost": 46.25,
"taxes": 4.63,
"listComponents": [
{
"id": "3515834441676562996102020314",
"idVendorComponent": "3515834441676562996102020305",
"comment": null,
"rebut": true,
"idFormat": "3515834441676562996102020308",
"quantityFormat": 5,
"idUnitFormat": "3515834441676562996102020309",
"quantity": 25,
"idUnit": "3515834441676562996102020307",
"cost": 46.25
}
]
}
]
}id,descrstring — Order id and name.datanumber — Order date (epoch milliseconds).dateGeneratedstring — Order date, formatted for display.costnumber — Sum of all purchases' amounts excluding taxes.taxesnumber — Sum of taxes.listComandesarray — Purchases.
Each purchase:
id,descrstring — Supplier id and name. Without permission to view suppliers,idisnull.idVendorstring — Supplier id.idProveidorComandastring — Purchase id.statusinteger — Status:-1pending approval ·0pending to send ·1pending to receive ·2received ·3pending scan.commentstring — Comment.dateGeneratedstring — Purchase date, formatted for display.dateReceptionFlatstring — Reception date, formatted for display.costnumber — Amount excluding taxes.taxesnumber — Taxes.listComponentsarray — Purchase lines.
Each line:
idstring — Line id.idVendorComponentstring — Supplier item.commentstring — Comment.rebutboolean — Whether the goods have been received.idFormat,quantityFormat,idUnitFormat— When buying by format: format, number of formats and format unit.quantitynumber,idUnitstring — Purchase quantity and unit. Used whenidFormatisnull.costnumber — Line amount: unit cost ×quantityFormat(or ×quantityif there is no format).
Delete an order
Also deletes all its purchases and their lines, including purchases already received.
DELETE /order/{idOrder}Path parameters
idOrderstring · required — Order id.
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/order/3515834441676562996102020313 \
-H "rememberme: $TOKEN"
Response — No content.
Add a purchase to an order
Creates an empty purchase to the supplier, pending to send and dated now. Returns the purchase id (idProveidorComanda).
POST /order/{idOrder}/vendor/{idVendor}Path parameters
idOrderstring · required — Order id.idVendorstring · required — Supplier id.
Example
curl -X POST https://app.tspoonlab.com/recipes/api/order/3515834441676562996102020313/vendor/3515834441676562996102020301 \
-H "rememberme: $TOKEN"
Response
{ "id": "3515834441676562996102020315" }Set the lines of a purchase
Replaces the purchase's lines with the ones you send: existing lines that you don't send are deleted. The comment and any other purchase details not sent are cleared.
PUT /orderVendor/{idOrderVendor}/editPath parameters
idOrderVendorstring · required — Purchase id (idProveidorComanda).
Body
componentsarray · required — Lines. Can be empty.
Each line:
idstring · optional — Id of an existing line of this purchase (see Retrieve an order). With it, the line is kept and updated with the data you send; without it, a new line is created.idVendorComponentstring · optional — Supplier item.idFormatstring · optional — Purchase format. If sent, the quantity goes inquantityFormatand the unit inidUnitFormat.quantityFormatnumber · optional — Number of formats.idUnitFormatstring · optional — Format unit.quantitynumber · optional — Quantity, when there is no format.idUnitstring · optional — Purchase unit, when there is no format.costnumber · optional — Total line amount, not the unit cost: it is divided by the quantity to get the unit cost.commentstring · optional — Comment.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/orderVendor/3515834441676562996102020312/edit \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"components": [
{
"id": "3515834441676562996102020314",
"idVendorComponent": "3515834441676562996102020305",
"idFormat": "3515834441676562996102020308",
"quantityFormat": 6,
"idUnitFormat": "3515834441676562996102020309",
"cost": 55.5
},
{
"idVendorComponent": "3515834441676562996102020316",
"quantity": 2,
"idUnit": "3515834441676562996102020317",
"cost": 7.8,
"comment": "New line"
}
]
}'
Response
{ "id": "3515834441676562996102020312" }Delete a purchase
Deletes the purchase and its lines, even if it has already been received.
DELETE /orderVendor/{idOrderVendor}Path parameters
idOrderVendorstring · required — Purchase id (idProveidorComanda).
Example
curl -X DELETE https://app.tspoonlab.com/recipes/api/orderVendor/3515834441676562996102020315 \
-H "rememberme: $TOKEN"
Response — No content.
Need help? Message us from the support chat in the bottom-right corner.
