Convert a quote
Get a quote accepted, then turn it into an order, a delivery note or an invoice.
In the ERP, a sale moves from document to document: quote → sales order → delivery note → invoice. The API follows the same path: each conversion creates the next document from the previous one, copies its lines and keeps the link between them. Required key: sales:write.
Possible conversions
| Source document | Route | Converts to (target) |
|---|---|---|
| Quote | /sales/quotes/{id}/convert | sales_order, delivery_note, invoice |
| Sales order | /sales/orders/{id}/convert | delivery_note, invoice |
| Invoice | /sales/invoices/{id}/convert | credit_note |
| Purchase order | /purchases/orders/{id}/convert | goods_receipt, purchase_invoice |
| Goods receipt | /purchases/receipts/{id}/convert | purchase_invoice |
A delivery note is not “converted” into an invoice: you create the invoice with deliveryNoteIds (grouped invoicing of several delivery notes of the same customer) — see Create an invoice.
1. Get the quote accepted
A created quote (POST /sales/quotes) is a draft. Send it, then record the customer’s answer:
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/sales/quotes/9c3a1f2e-4b5d-4c6e-8f7a-0b1c2d3e4f5a/status' \
-H "Authorization: Bearer $QUOSUITE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"status": "SENT"
}'curl -X POST 'https://quosuite.com/api/public/v1/quosuite/sales/quotes/9c3a1f2e-4b5d-4c6e-8f7a-0b1c2d3e4f5a/status' \
-H "Authorization: Bearer $QUOSUITE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"status": "ACCEPTED"
}'REFUSED closes a refused quote. A transition the ERP does not allow answers 422 BUSINESS_RULE_VIOLATION.
2. Convert
The conversion is a creation: send an Idempotency-Key, so that a retry never creates two invoices from the same quote.
POST/sales/quotes/{id}/convert
# One key per operation, reused as is on every retry.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/sales/quotes/9c3a1f2e-4b5d-4c6e-8f7a-0b1c2d3e4f5a/convert' \
-H "Authorization: Bearer $QUOSUITE_API_KEY" \
-H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
-H 'Content-Type: application/json' \
-d '{
"target": "invoice"
}'The 201 response returns the created document — here the invoice, as a draft, with its own number. What the conversion does:
- the lines are copied (articles, quantities, prices, discounts);
- footer taxes are recomputed for the target kind (an invoice’s stamp duty, for instance);
- the new document points to its origin in
parent, and the origin lists its descendants inchildren; - converting to an invoice moves the source document to
INVOICED.
{
"success": true,
"data": {
"id": "5b0e7c1a-2f3d-4e8b-9a6c-1d2e3f4a5b6c",
"kind": "invoice",
"number": "FAC-2026-0002",
"status": "DRAFT",
"parent": { "id": "9c3a1f2e-4b5d-4c6e-8f7a-0b1c2d3e4f5a", "kind": "quote", "type": "DEVIS", "number": "DEV-2026-0014", "status": "INVOICED" },
"totals": { "totalExclTax": 1000, "totalVat": 190, "totalInclTax": 1191, "paidAmount": 0, "balanceDue": 1191 }
},
"timestamp": "2026-10-02T09:15:00.000Z"
}The invoice is then validated like any other (POST /sales/invoices/{id}/status, "VALIDATED").
Going through delivery
When the goods leave before being invoiced:
- convert the quote (or the order) into a delivery note —
"target": "delivery_note"; - deliver the note:
POST /sales/delivery-notes/{id}/deliverissues the goods from the note’s warehouse and moves it toDELIVERED. An already delivered note is refused (422): nothing leaves twice; - invoice one or more delivered notes of the same customer:
POST /sales/invoiceswithdeliveryNoteIds.
POST/sales/delivery-notes/{id}/deliver
# One key per operation, reused as is on every retry.
curl -X POST 'https://quosuite.com/api/public/v1/quosuite/sales/delivery-notes/2d4f6a8c-1e3b-4d5f-8a7c-9e0b1c2d3e4f/deliver' \
-H "Authorization: Bearer $QUOSUITE_API_KEY" \
-H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30'