/businesses/{bid}/quotes/{id}/convertOpen a document from a quote
POST /businesses/{bid}/quotes/{id}/convert
Requires the documents scope.
Creates a DRAFT document with the quote's lines, in the quote's own price mode and currency, filed under externalRef: quote:<id>, so two calls return the one draft rather than a twin. It stops at the draft deliberately: issuing takes a permanent number and may call the tax authority, and an acceptance landing on a public link at 2am must not do that by itself. The quote is untouched: it stays exactly as the customer accepted it, linked by convertedDocumentId.
Path parameters
| Name | Type | Description | |
|---|---|---|---|
bid | string | required | Business id, from POST /businesses. |
id | string | required | Quote id. |
Body (optional)
| Field | Type | Description | |
|---|---|---|---|
docType | integer | 305 (default) or 300. A receipt-bearing type is refused: an offer states no payment. One of: 300, 305. | |
documentDate | string | Defaults to today. | |
dueDate | string |
Response
201: { "ok": true, … }
| Field | Type | Description | |
|---|---|---|---|
ok | boolean | required | |
document | Document | required | A draft is freely mutable. An issued document is immutable forever, blocked at the database engine, not merely in application code. |
quote | Quote | הצעת מחיר: an OFFER, and deliberately not a document: it carries no statutory number, it is freely editable and deletable, and it appears in no export, no VAT return and no income report. What it becomes when the customer accepts is an ordinary draft document (POST .../convert). |
Errors: 400, 401, 403, 404, 429. Every failure answers { "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }: branch on reason, and read hint for what to change (https://docs.billos.co.il/errors.md).