BillOS v1
Console llms.txt OpenAPI
PATCH/businesses/{bid}/quotes/{id}

Update a quote

PATCH /businesses/{bid}/quotes/{id}

Requires the documents scope.

Editable while it is a draft or sent, because an offer gets haggled over, and re-sending re-freezes it under the SAME link. A quote the customer already answered is refused: rewriting it would make the record of his answer a lie. Reopen it, or make a new one.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.
idstringrequiredQuote id.

Body

FieldTypeDescription
partyobject{partyId} to reference a saved party, or an inline {name, taxId?, phone?, email?, address?}.
party.partyIdstring
party.namestring
party.taxIdstring
party.phonestring
party.emailstring
party.addressstring
linesarray of DocumentLine
titlestringPrinted under the heading, for example "טיפול שנתי במשרדים".
quoteDatestringDefault: today, Israel time.
validUntilstringDefault: 14 days out. Send null for a standing offer with no expiry.
termsstringThe offer's terms. Printed at the end and shown to the customer above the accept button.
notestring
discountAmountintegerInteger agorot (₪1 = 100).
priceModestringOne of: net, gross. Default net.
currencystringOne of: ILS, USD, EUR, GBP, CHF, AUD, CAD. Default ILS.
fxRatenumberYour own rate. Omit for the Bank of Israel rate of the quote date. Unlike a document, a quote that cannot get one still renders.
langstringOne of: he, en. Default he.
brandingThemeIdstringThe branding theme it prints in (GET /businesses/{bid}/branding-themes). Omit or null for the customer's default, else the main design; "main" for the main design whatever the customer's default. Frozen at issue: the issued row names the theme it used, null for the main design.
zeroVatbooleanמע״מ בשיעור אפס on the quoted lines.

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
quoteQuoterequiredהצעת מחיר: 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).

PATCH /businesses/{bid}/quotes/{id}
curl -X PATCH "$BASE/businesses/$BID/quotes/$DOC_ID" \
  -H "X-Api-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "party": {
      "name": "דנה לוי",
      "taxId": "514667426",
      "phone": "0521111111",
      "email": "dana@example.com",
      "address": "הרצל 12, תל אביב"
    },
    "lines": [
      {
        "description": "איפור כלה",
        "quantity": 1,
        "unitPriceExVat": 120000
      }
    ],
    "priceMode": "gross"
  }'
const res = await fetch(`${BASE}/businesses/${BID}/quotes/${DOC_ID}`, {
  method: 'PATCH',
  headers: {
    'X-Api-Key': KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "party": {
      "name": "דנה לוי",
      "taxId": "514667426",
      "phone": "0521111111",
      "email": "dana@example.com",
      "address": "הרצל 12, תל אביב"
    },
    "lines": [
      {
        "description": "איפור כלה",
        "quantity": 1,
        "unitPriceExVat": 120000
      }
    ],
    "priceMode": "gross"
  }),
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.patch(
    f"{BASE}/businesses/{BID}/quotes/{DOC_ID}",
    headers={"X-Api-Key": KEY},
    json={
      "party": {
        "name": "דנה לוי",
        "taxId": "514667426",
        "phone": "0521111111",
        "email": "dana@example.com",
        "address": "הרצל 12, תל אביב"
      },
      "lines": [
        {
          "description": "איפור כלה",
          "quantity": 1,
          "unitPriceExVat": 120000
        }
      ],
      "priceMode": "gross"
    },
)
data = res.json()
Set BASE to https://api.billos.co.il/v1 and KEY to your bk_live_… key, or a bk_test_… key to run it against the sandbox.
Manage your businesses, keys and webhooks in the BillOS Console.