Quotes
The full quote lifecycle — read, create, edit, revise, send
GET /quotes
Query params: status (draft|sent|viewed|accepted|rejected|expired), submissionId, limit, cursor. Items:
{
"id": "k61…", "quoteNumber": "Q-2026-0042", "version": 2, "status": "sent",
"submissionId": "k57…", "reference": "ERP order 5512",
"validUntil": 1783700000000, "validityDays": 30,
"subtotal": 1390.5, "taxRate": 21, "taxAmount": 292.01, "total": 1682.51,
"currency": "EUR", "sentAt": 1781100500000, "viewedAt": null,
"externalRef": null, "createdAt": 1781100300000, "updatedAt": 1781100500000
}GET /quotes/{id}
Adds notes, ordered lineItems[] (description, quantity, unitPrice, total, itemType, order), and:
"pdf": { "status": "ready", "url": "https://…signed…" }pdf.status: pending|generating|ready|failed|null. The url is short-lived — fetch fresh when you need it. PDFs are generated when the quote is prepared or sent in the app.
PATCH /quotes/{id}
Update terms: notes, reference, validityDays, taxRate, currency — and/or externalRef.
externalRefalone is allowed in any status (pure CRM linkage, no version bump).- Term changes on a
draftapply directly. Onsent/viewedthey require"revise": true, which snapshots history, bumpsversion, and returns the quote todraft— exactly like editing in the app.accepted/rejected/expired→409 quote_not_editable.
curl -X PATCH -H "Authorization: Bearer $WF_API_KEY" -H "Content-Type: application/json" \
https://app.winfactor.app/api/v1/quotes/k61… \
-d '{ "validityDays": 45, "revise": true }'Returns 200 { "quoteId": "k61…", "version": 3 }.
PUT /quotes/{id}/line-items
Full replace of the breakdown: { "lineItems": [ … ], "revise": true?, "changeDescription": "…"? }. Same status rules as PATCH. Totals are recomputed server-side; the previous version is preserved in quote history.
POST /quotes/{id}/send
{ "recipients": ["[email protected]"], "locale": "en"? } — flips the quote to sent and dispatches the same quote.sent event/email path the app uses. Sendable from draft or sent (re-send); otherwise 409 quote_not_sendable.