Notice: some calls in this article will stop working on 31 January 2027.
This affects purchase delivery notes, purchase invoices and sales invoices: fetching pending or all documents (/pending, /all) and marking them as processed, accounted or not accounted (/processed, /accounted, /not/accounted).
To keep these documents up to date, use Purchase and sales sync: it also returns updates and deletions, without marking anything.
Purchase orders, sales delivery notes, locking (/lock) and creating purchase and sales orders keep working.
Bring purchase and sales orders, delivery notes and invoices into a billing or accounting system, mark them as processed, and create purchase and sales orders.
GET /integration/purchases/orders/pending
PUT /integration/purchases/orders/processed
GET /integration/purchases/deliveries/pending
GET /integration/purchases/deliveries/all
PUT /integration/purchases/deliveries/processed
PUT /integration/purchases/deliveries/lock
GET /integration/purchases/invoices/pending
GET /integration/purchases/invoices/all
GET /exportFileBoundFile/{fileName}
PUT /integration/purchases/invoices/accounted
PUT /integration/purchases/invoices/not/accounted
PUT /integration/purchases/invoices/lock
GET /integration/purchases/totals
GET /integration/sales/deliveries/pending
GET /integration/sales/deliveries/all
PUT /integration/sales/deliveries/accounted
PUT /integration/sales/deliveries/not/accounted
PUT /integration/sales/deliveries/lock
GET /integration/sales/invoices/pending
PUT /integration/sales/invoices/accounted
PUT /integration/sales/invoices/not/accounted
PUT /integration/sales/invoices/lock
POST /integration/purchases/orders
PUT /vendorOrder/{idProvCom}/sent
PUT /vendorOrder/{idProvCom}/received/date
POST /integration/sales/orders
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 cost center. Every call works on that cost center.
Login — Returns the token as plain text.
curl https://app.tspoonlab.com/recipes/api/login \
-d [email protected] \
-d password=XXXXXXX
Permissions — Reading purchases and downloading documents: permission to view purchase orders. Marking purchases, creating purchase orders and marking them as sent: permission to edit purchase orders. Receiving orders: permission to receive orders. Locking purchase invoices: permission to edit supplier invoices. Locking purchase delivery notes: permission to edit suppliers. Reading sales: permission to view sales. Marking sales and creating sales orders: permission to edit sales. Locking sales: permission to edit customers.
Dates — Returned in milliseconds since 1970 (epoch). In query parameters, send them as YYYY-MM-DD; ranges include the first and last day. In the body, milliseconds or ISO 8601 with time are accepted (2026-11-03T08:00:00.000+01:00).
Responses may include fields other than the documented ones. Use only the documented fields.
List pending purchase orders
Orders sent to the supplier that are not marked as processed. An order created with the API shows up once it is marked as sent.
GET /integration/purchases/orders/pending
Query parameters
startDatedate · optional — From this sent date. Without dates, returns all.endDatedate · optional — Up to this sent date.includeInternalboolean · optional —falseexcludes internal-type suppliers. Defaults totrue.idVendorstring · optional — Only this supplier's orders (Suppliers and purchases).
Example
curl "https://app.tspoonlab.com/recipes/api/integration/purchases/orders/pending?startDate=2026-10-01&endDate=2026-10-31" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020001",
"numOrder": "PED-0153",
"idVendor": "3515834441676562996102020004",
"vendor": "Distribuciones García",
"codeVendor": "P001",
"accountVendor": "40000001",
"nif": "B12345678",
"date": 1761897600000,
"dateFormatted": "2026/10/31",
"dateReception": 1761984000000,
"dateReceptionFormatted": "2026/11/01",
"sentBy": "Ana López",
"listOrders": [
{
"id": "3515834441676562996102020007",
"position": 1,
"idComponent": "3515834441676562996102020008",
"component": "Plum tomato",
"codeComponent": "ING-0042",
"codeVendorComponent": "TP-5",
"comment": null,
"quantity": 20.0,
"idUnit": "3515834441676562996102020009",
"unit": "kg",
"cost": 5.0,
"hasFormat": true,
"quantityFormat": 4.0,
"idUnitFormat": "3515834441676562996102020010",
"unitFormat": "5 kg box",
"costFormat": 25.0,
"iva": 10.0,
"listTypes": [ { "id": "3515834441676562996102020011", "descr": "Vegetables" } ]
}
]
}
]
idstring — Order id.numOrderstring — Order number.idVendor,vendor,codeVendor,accountVendor,nifstring — Supplier: id, name, code, ledger account and tax id.datedate — Sent date.dateFormattedstring — The same, asYYYY/MM/DD.dateReceptiondate — Expected delivery date.dateReceptionFormattedstring — The same, asYYYY/MM/DD.sentBystring — Who placed the order.listOrdersarray — Order lines.
Each line:
idstring — Line id.positioninteger — Order.idComponent,component,codeComponentstring — Product: id, name and code.codeVendorComponentstring — Product code at the supplier.commentstring — Comment.quantitynumber,idUnit,unitstring — Quantity in the product's base unit.costnumber — Cost per base unit.hasFormatboolean — Whether it is ordered in a format (e.g. boxes).quantityFormatnumber,idUnitFormat,unitFormatstring,costFormatnumber — Format: quantity, unit and price per format.nullifhasFormatisfalse.ivanumber — VAT %.idCostType,costType,codeCostType,accountCostType,accountAuxCostTypestring — Line cost account: id, name, code, ledger account and auxiliary account.idBusinessLine,businessLine,codeBusinessLinestring — Line business line.listTypesarray — Product families:idanddescr.
Mark purchase orders as processed
They no longer appear in List pending purchase orders. When the order is received, the delivery note becomes unprocessed again.
PUT /integration/purchases/orders/processed
Query parameters
lockboolean · required —truemarks and also locks;falseonly marks. Without it, the call fails.
Body
listIdsarray · required — Order ids.
Example
curl -X PUT "https://app.tspoonlab.com/recipes/api/integration/purchases/orders/processed?lock=false" \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020001", "3515834441676562996102020002"]}'
Response — No content.
List pending purchase delivery notes
Retiring on 31 January 2027. Use Purchase and sales sync. Received delivery notes that are not marked as processed.
GET /integration/purchases/deliveries/pending
Query parameters
startDatedate · optional — From this reception date. Without dates, returns all.endDatedate · optional — Up to this reception date.includeInternalboolean · optional —falseexcludes internal-type suppliers. Defaults totrue.idVendorstring · optional — Only this supplier's delivery notes.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/purchases/deliveries/pending?startDate=2026-10-01&endDate=2026-10-31" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020002",
"deliveryNum": "A-7781",
"deliveryFor": "PED-0153",
"date": 1761984000000,
"dateFormatted": "2026/11/01",
"dateSent": 1761897600000,
"dateSentFormatted": "2026/10/31",
"idVendor": "3515834441676562996102020004",
"vendor": "Distribuciones García",
"codeVendor": "P001",
"accountVendor": "40000001",
"nif": "B12345678",
"vendorType": "Fruit and vegetables",
"vendorTypeCode": "FV",
"vendorTypeInternal": false,
"locked": false,
"sentBy": "Ana López",
"receivedBy": "Marc Puig",
"baseCalculated": 100.0,
"base": 100.0,
"taxes": 10.0,
"total": 110.0,
"listTaxes": [
{ "id": "3515834441676562996102020006", "type": 0, "base": 100.0, "percent": 10.0, "total": 10.0 }
],
"listDeliveries": [
{
"id": "3515834441676562996102020007",
"position": 1,
"idComponent": "3515834441676562996102020008",
"component": "Plum tomato",
"quantity": 20.0,
"unit": "kg",
"cost": 5.0,
"hasFormat": true,
"quantityFormat": 4.0,
"unitFormat": "5 kg box",
"costFormat": 25.0,
"iva": 10.0,
"recibido": true,
"idStore": "3515834441676562996102020012",
"store": "Cold room"
}
],
"listSent": [ … ]
}
]
idstring — Delivery note id.deliveryNumstring — Delivery note number.deliveryForstring — Delivery note reference, usually the order number.datedate — Reception date; if there is none, the sent date.dateFormattedstring — The same, asYYYY/MM/DD.dateSentdate — Date the order was sent.dateSentFormattedstring — The same, asYYYY/MM/DD.idVendor,vendor,codeVendor,accountVendor,nifstring — Supplier: id, name, code, ledger account and tax id.vendorType,vendorTypeCodestring,vendorTypeInternalboolean — Supplier type: name, code and whether it is internal.lockedboolean — Locked.sentBy,receivedBystring — Who placed the order and who received it.idCostType,costType,codeCostType,accountCostType,accountAuxCostTypestring — Delivery note cost account. If assigned per line, it is on each line.idBusinessLine,businessLine,codeBusinessLinestring — Business line.baseCalculatednumber — Base calculated from the received lines, with 5 decimals.base,taxes,totalnumber — Base, taxes (includes shipping, discounts and others) and total.listTaxesarray — Taxes:id,type,base,percentandtotal.type:0VAT ·1shipping ·2discount ·3other.listDeliveriesarray — Received lines.listSentarray — Lines of the order as sent.
Each received line (listDeliveries):
idstring — Line id.positioninteger — Order.idComponent,component,codeComponentstring — Product: id, name and code.codeVendorComponentstring — Product code at the supplier.commentstring — Comment.recibidoboolean — Alwaystrue.quantitynumber,idUnit,unitstring — Quantity in the product's base unit.costnumber — Cost per base unit. Line amount:quantity×cost.hasFormatboolean — Whether it was bought in a format (e.g. boxes).quantityFormatnumber,idUnitFormat,unitFormatstring,costFormatnumber — Format: quantity, unit and price per format.nullifhasFormatisfalse.idStore,storestring — Store.ivanumber — VAT %.idCostType,costType,codeCostType,accountCostType,accountAuxCostTypestring — Line cost account.idBusinessLine,businessLine,codeBusinessLinestring — Line business line.listTypesarray — Product families:idanddescr.
Each line of the order as sent (listSent): the same product, comment and format fields as a received line, with quantity, idUnit and unit in the purchase unit and cost as the purchase price.
List all purchase delivery notes
Retiring on 31 January 2027. Use Purchase and sales sync. Like List pending purchase delivery notes, including processed ones.
GET /integration/purchases/deliveries/all
Query parameters — The same as List pending purchase delivery notes.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/purchases/deliveries/all?startDate=2026-10-01&endDate=2026-10-31" \
-H "rememberme: $TOKEN"
Response — The same fields as List pending purchase delivery notes.
Mark purchase delivery notes as processed
Retiring on 31 January 2027. Use Purchase and sales sync. They no longer appear in List pending purchase delivery notes.
PUT /integration/purchases/deliveries/processed
Query parameters
lockboolean · optional —truealso locks them. Defaults tofalse.
Body
listIdsarray · required — Delivery note ids.
Example
curl -X PUT "https://app.tspoonlab.com/recipes/api/integration/purchases/deliveries/processed?lock=true" \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020002"]}'
Response — No content.
Lock purchase delivery notes
This API has no call to unlock them. It does not count as a change in Purchase and sales sync.
PUT /integration/purchases/deliveries/lock
Body
listIdsarray · required — Delivery note ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/purchases/deliveries/lock \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020002"]}'
Response — No content.
List pending purchase invoices
Retiring on 31 January 2027. Use Purchase and sales sync. Invoices that are not marked as accounted.
GET /integration/purchases/invoices/pending
Query parameters
startDatedate · optional — From this invoice date. Without dates, returns all.endDatedate · optional — Up to this invoice date.includeInternalboolean · optional —falseexcludes internal-type suppliers. Defaults totrue.onlyValidatedboolean · optional —truereturns only validated invoices. Defaults tofalse.idVendorstring · optional — Only this supplier's invoices.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/purchases/invoices/pending?startDate=2026-10-01&endDate=2026-10-31&onlyValidated=true" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020001",
"invoiceNum": "F-2026-0042",
"documentNum": "000123",
"date": 1761955200000,
"dateAccounting": null,
"dateDue": 1764547200000,
"idVendor": "3515834441676562996102020004",
"vendor": "Distribuciones García",
"codeVendor": "P001",
"accountVendor": "40000001",
"nif": "B12345678",
"inEuropeanUnion": false,
"inVies": false,
"country": "ES",
"paid": false,
"validated": true,
"locked": false,
"comment": null,
"codePaymentType": "TRANSF",
"idDocument": "3515834441676562996102020013",
"extDocument": "pdf",
"base": 100.0,
"taxes": 10.0,
"total": 110.0,
"listTaxes": [
{ "id": "3515834441676562996102020006", "type": 0, "base": 100.0, "percent": 10.0, "total": 10.0 }
],
"listCostTypeTaxes": [
{
"id": "3515834441676562996102020014",
"descr": "Raw materials",
"listTaxes": [ { "type": 0, "base": 100.0, "percent": 10.0, "total": 10.0 } ]
}
],
"listDeliveries": [ … ]
}
]
idstring — Invoice id.invoiceNumstring — Supplier's invoice number.documentNumstring — Internal document number.date,dateAccounting,dateDuedate — Invoice date, accounting date (ifnull, usedate) and due date.idVendor,vendor,codeVendor,accountVendor,nifstring — Supplier: id, name, code, ledger account and tax id.inEuropeanUnion,inViesboolean — Intra-EU supplier and registered in VIES.countrystring — Supplier's country.paid,validated,lockedboolean — Paid, validated and locked.commentstring — Comment.codePaymentTypestring — Payment method code.idCostTypeVendor,costTypeVendor,codeCostTypeVendor,accountCostTypeVendor,accountAuxCostTypeVendorstring — Supplier's default cost account: id, name, code, ledger account and auxiliary account.idBusinessLine,businessLine,codeBusinessLinestring — Business line.idDocument,extDocumentstring — Attached document: id and extension (see Download an invoice document).base,taxes,totalnumber — Taxable base, taxes and total.totalincludes withholding.listTaxesarray — Taxes:id,type,base,percentandtotal.type:0VAT ·1shipping ·2discount ·3other ·4withholding.listCostTypeTaxesarray — VAT per cost account, calculated from the received lines: accountidanddescr(nullif the lines have none) andlistTaxes(base,percent,total).listDeliveriesarray — The invoice's delivery notes, with the fields of List pending purchase delivery notes.
List all purchase invoices
Retiring on 31 January 2027. Use Purchase and sales sync. Like List pending purchase invoices, including accounted ones.
GET /integration/purchases/invoices/all
Query parameters — The same as List pending purchase invoices.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/purchases/invoices/all?startDate=2026-10-01&endDate=2026-10-31" \
-H "rememberme: $TOKEN"
Response — The same fields as List pending purchase invoices.
Download an invoice document
Returns the file attached to an invoice.
GET /exportFileBoundFile/{fileName}Path parameters
fileNamestring · required — File name, e.g.{idDocument}.{extDocument}. The file downloads with its original name.
Query parameters
idstring · required — The invoice'sidDocument.
Example
curl -OJ "https://app.tspoonlab.com/recipes/api/exportFileBoundFile/3515834441676562996102020013.pdf?id=3515834441676562996102020013" \
-H "rememberme: $TOKEN"
Response — The file.
Mark purchase invoices as accounted
Retiring on 31 January 2027. Use Purchase and sales sync. They no longer appear in List pending purchase invoices.
PUT /integration/purchases/invoices/accounted
Query parameters
lockboolean · optional —truealso locks them. Defaults tofalse.
Body
listIdsarray · required — Invoice ids.
Example
curl -X PUT "https://app.tspoonlab.com/recipes/api/integration/purchases/invoices/accounted?lock=true" \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020001"]}'
Response — No content.
Mark purchase invoices as not accounted
Retiring on 31 January 2027. Use Purchase and sales sync. They appear again in List pending purchase invoices.
PUT /integration/purchases/invoices/not/accounted
Body
listIdsarray · required — Invoice ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/purchases/invoices/not/accounted \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020001"]}'
Response — No content.
Lock purchase invoices
This API has no call to unlock them. It does not count as a change in Purchase and sales sync.
PUT /integration/purchases/invoices/lock
Body
listIdsarray · required — Invoice ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/purchases/invoices/lock \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020001"]}'
Response — No content.
Get purchase totals by status
Sum of the lines of the period's purchases in a given status, excluding taxes, shipping and discounts. Each purchase counts by its reception date or, if it has none, by its sent date.
GET /integration/purchases/totals
Query parameters
startDatedate · required — From this date.endDatedate · required — Up to this date.typeinteger · required — Status:0not sent ·1not received ·2received, not invoiced ·3received and invoiced ·4received, invoice accounted ·5received, invoice not accounted ·6pending approval ·7pending review ·8scanned, pending validation ·9received ·10received, invoice validated ·11received, invoice not validated.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/purchases/totals?startDate=2026-10-01&endDate=2026-10-31&type=2" \
-H "rememberme: $TOKEN"
Response
{ "value": 1250.75 }valuenumber — Total amount.0if there are no purchases.
List pending sales delivery notes
Sales delivery notes and orders not marked as accounted, including those not yet sent.
GET /integration/sales/deliveries/pending
Query parameters
startDatedate · optional — From this delivery date (or creation date, if it has none). Without dates, returns all.endDatedate · optional — Up to this date.includeInternalboolean · optional —falseexcludes internal-type customers. Defaults totrue.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/sales/deliveries/pending?startDate=2026-10-01&endDate=2026-10-31" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020020",
"invoiceNum": "AV-0311",
"date": 1761984000000,
"idCustomer": "3515834441676562996102020010",
"customer": "Hotel Mediterráneo",
"customerCode": "C015",
"nif": "A87654321",
"address": "Passeig Marítim 12",
"cp": "08003",
"city": "Barcelona",
"contact": "Laura Vidal",
"phone": "933000000",
"mail": "[email protected]",
"customerType": "Hotels",
"customerTypeCode": "HOT",
"customerTypeInternal": false,
"base": 180.0,
"listLines": [
{
"id": "3515834441676562996102020021",
"position": 0,
"idComponent": "3515834441676562996102020022",
"component": "Tomato sauce",
"codeComponent": "ELB-0007",
"codeCustomerProduct": "ST-1",
"sent": true,
"quantity": 12.0,
"unit": "kg",
"cost": 15.0,
"costRecipe": 6.2,
"iva": 10.0
}
],
"listLinesPending": []
}
]
idstring — Delivery note id.invoiceNumstring — Delivery note number.datedate — Delivery date.idCustomer,customer,customerCode,nifstring — Customer: id, name, code and tax id.address,cp,citystring — Customer's address, postcode and city.contact,phone,contactAux,phoneAux,mail,mailAux,mailCC,webstring — Customer contacts.customerType,customerTypeCodestring,customerTypeInternalboolean — Customer type: name, code and whether it is internal.basenumber — Base of the sent lines.listLines,listLinesPendingarray — Sent lines and lines pending to send.
Each line (listLines, listLinesPending):
idstring — Line id.positioninteger — Order within the list, from 0.idComponent,component,codeComponentstring — Product sold.idMenu,menu,codeMenustring — Group sold.codeCustomerProductstring — Product's sales code for the customer.idCustomerGroup,customerGroupstring — Product group.commentstring — Comment. On lines with no product or group, the name of the sales product.sentboolean — Sent.quantitynumber,idUnit,unitstring — Quantity and unit.costnumber — Unit sale price excluding VAT.costRecipenumber — Recipe unit cost.ivanumber — VAT %.listTypesarray — Product families:idanddescr.
List all sales delivery notes
Like List pending sales delivery notes, including accounted ones.
GET /integration/sales/deliveries/all
Query parameters — The same as List pending sales delivery notes.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/sales/deliveries/all?startDate=2026-10-01&endDate=2026-10-31" \
-H "rememberme: $TOKEN"
Response — The same fields as List pending sales delivery notes.
Mark sales delivery notes as accounted
They no longer appear in List pending sales delivery notes.
PUT /integration/sales/deliveries/accounted
Body
listIdsarray · required — Sales delivery note ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/sales/deliveries/accounted \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020020"]}'
Response — No content.
Mark sales delivery notes as not accounted
They appear again in List pending sales delivery notes.
PUT /integration/sales/deliveries/not/accounted
Body
listIdsarray · required — Sales delivery note ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/sales/deliveries/not/accounted \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020020"]}'
Response — No content.
Lock sales delivery notes
This API has no call to unlock them.
PUT /integration/sales/deliveries/lock
Body
listIdsarray · required — Sales delivery note ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/sales/deliveries/lock \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020020"]}'
Response — No content.
List pending sales invoices
Retiring on 31 January 2027. Use Purchase and sales sync. Invoices that are not marked as accounted.
GET /integration/sales/invoices/pending
Query parameters
startDatedate · optional — From this invoice date. Without dates, returns all.endDatedate · optional — Up to this invoice date.includeInternalboolean · optional —falseexcludes internal-type customers. Defaults totrue.onlyValidatedboolean · optional —truereturns only validated invoices. Defaults tofalse.
Example
curl "https://app.tspoonlab.com/recipes/api/integration/sales/invoices/pending?startDate=2026-10-01&endDate=2026-10-31" \
-H "rememberme: $TOKEN"
Response
[
{
"id": "3515834441676562996102020003",
"invoiceNum": "V-2026-0010",
"documentNum": "000045",
"date": 1761955200000,
"dateAccounting": null,
"dateDue": 1764547200000,
"idCustomer": "3515834441676562996102020010",
"customer": "Hotel Mediterráneo",
"codeCustomer": "C015",
"accountCustomer": "43000015",
"nif": "A87654321",
"paid": false,
"locked": false,
"comment": null,
"codePaymentType": "TRANSF",
"base": 180.0,
"taxes": 18.0,
"total": 198.0,
"listTaxes": [
{ "id": "3515834441676562996102020015", "type": 0, "base": 180.0, "percent": 10.0, "total": 18.0 }
],
"listCostTypeTaxes": [ … ],
"listDeliveries": [ … ]
}
]
idstring — Invoice id.invoiceNumstring — Invoice number.documentNumstring — Document number.date,dateAccounting,dateDuedate — Invoice date, accounting date (ifnull, usedate) and due date.idCustomer,customer,codeCustomer,accountCustomer,nifstring — Customer: id, name, code, ledger account and tax id.paid,lockedboolean — Collected and locked.commentstring — Comment.codePaymentTypestring — Payment method code.idCostTypeVendor,costTypeVendor,codeCostTypeVendor,accountCostTypeVendor,accountAuxCostTypeVendorstring — Customer's default cost account: id, name, code, ledger account and auxiliary account.idDocument,extDocumentstring — Attached document: id and extension.base,taxes,totalnumber — Taxable base, taxes and total.listTaxesarray — Taxes:id,type,base,percentandtotal.type:0VAT ·1shipping ·2discount ·3other.listCostTypeTaxesarray — VAT per cost account, calculated from the sent lines: accountidanddescr(nullif the lines have none) andlistTaxes(base,percent,total).listDeliveriesarray — The invoice's sales delivery notes, with the fields of List pending sales delivery notes.
Mark sales invoices as accounted
Retiring on 31 January 2027. Use Purchase and sales sync. They no longer appear in List pending sales invoices.
PUT /integration/sales/invoices/accounted
Body
listIdsarray · required — Sales invoice ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/sales/invoices/accounted \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020003"]}'
Response — No content.
Mark sales invoices as not accounted
Retiring on 31 January 2027. Use Purchase and sales sync. They appear again in List pending sales invoices.
PUT /integration/sales/invoices/not/accounted
Body
listIdsarray · required — Sales invoice ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/sales/invoices/not/accounted \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020003"]}'
Response — No content.
Lock sales invoices
This API has no call to unlock them. It does not count as a change in Purchase and sales sync.
PUT /integration/sales/invoices/lock
Body
listIdsarray · required — Sales invoice ids.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/integration/sales/invoices/lock \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"listIds": ["3515834441676562996102020003"]}'
Response — No content.
Create a purchase order
Creates the order as pending to send, with each product's price from the supplier's catalogue. Returns its id. Each line is identified by ids or by codes.
POST /integration/purchases/orders
Body
idVendorstring · required unless you sendcodeVendor— Supplier id (Suppliers and purchases). If you send both,idVendorwins.codeVendorstring · required unless you sendidVendor— Supplier code.dateSenddate · optional — Order date.dateReceptiondate · optional — Expected delivery date.listLinesarray · optional — Order lines.
The supplier must belong to the cost center.
Each line:
idComponentstring · required unless you sendcodeComponent— Product id (idComponentof the supplier's products).codeComponentstring · required unless you sendidComponent— Product or format code at the supplier. If you send both, they must match.quantitynumber · required — Quantity, in the line's unit.idUnitstring · required unless you sendunit— Unit id (Units).unitstring · required unless you sendidUnit— Unit name.
The unit must be the product's purchase unit at the supplier or its format's unit.
Example
curl https://app.tspoonlab.com/recipes/api/integration/purchases/orders \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"codeVendor": "P001",
"dateSend": "2026-11-03T08:00:00.000+01:00",
"dateReception": "2026-11-04T08:00:00.000+01:00",
"listLines": [
{ "codeComponent": "TP-5", "quantity": 4, "unit": "5 kg box" },
{ "idComponent": "3515834441676562996102020016", "quantity": 2, "idUnit": "3515834441676562996102020009" }
]
}'
Response
{ "id": "3515834441676562996102020001" }Errors — If the supplier, a product or a unit does not exist or does not match, it returns 406 with { "message": "…" }.
Mark a purchase order as sent
Nothing is sent to the supplier. The sent date becomes the time of the call. If the order is already received, it does not change.
PUT /vendorOrder/{idProvCom}/sentPath parameters
idProvComstring · required — Order id.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/vendorOrder/3515834441676562996102020001/sent \
-H "rememberme: $TOKEN"
Response — No content.
Receive a purchase order
Marks every line as received and creates the delivery note. If the order was marked as processed, it is unmarked.
PUT /vendorOrder/{idProvCom}/received/datePath parameters
idProvComstring · required — Order id.
Body
datedate · optional — Reception date. Only applied if the order does not already have one.deliveryNumstring · optional — Delivery note number.
Example
curl -X PUT https://app.tspoonlab.com/recipes/api/vendorOrder/3515834441676562996102020001/received/date \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{"date": "2026-11-04T09:30:00.000+01:00", "deliveryNum": "A-7781"}'
Response — No content.
Create a sales order
Creates a sales order with each product's price from the customer's sales products. Returns its id. Each line is identified by ids or by codes.
POST /integration/sales/orders
Body
idCustomerstring · required unless you sendcodeCustomer— Customer id (Customers). If you send both,idCustomerwins.codeCustomerstring · required unless you sendidCustomer— Customer code.dateSenddate · optional — Order date.dateReceptiondate · optional — Expected delivery date.listLinesarray · optional — Order lines.
The customer must belong to the cost center.
Each line:
idComponentstring · required unless you sendcodeComponent— Id of the customer's sales product.codeComponentstring · required unless you sendidComponent— Product's sales code for the customer. If you send both, they must match.quantitynumber · required — Quantity.idUnitstring · required unless you sendunit— Unit id (Units).unitstring · required unless you sendidUnit— Unit name.
The unit must be the unit of the customer's sales product.
Example
curl https://app.tspoonlab.com/recipes/api/integration/sales/orders \
-H "rememberme: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"codeCustomer": "C015",
"dateSend": "2026-11-03T08:00:00.000+01:00",
"dateReception": "2026-11-05T08:00:00.000+01:00",
"listLines": [
{ "codeComponent": "ST-1", "quantity": 12, "unit": "kg" }
]
}'
Response
{ "id": "3515834441676562996102020020" }Errors — If the customer, a product or a unit does not exist or does not match, it returns 406 with { "message": "…" }.
Need help? Message us from the support chat in the bottom-right corner.
