Create and manage business documents: quotations, orders, delivery notes, returns, invoices, invoice-receipts, refunds, bills, and receipts. Documents follow Israeli tax authority (Rashut HaMisim) requirements.
Use cases: Use the Documents API to automate invoice generation, sync orders from e-commerce platforms, and manage the full document lifecycle.
GET/documents
List documents, with filtering by type, date, client, origin and operational status. Also serves the incremental change feed when `updatedSince` or `cursor` is supplied.
`documents` and `data` hold the same rows — `data` is the shape shared with every other list. On a change feed (`updatedSince` / `cursor`) the response also carries `nextCursor` and `hasMore`, and the order becomes oldest-change-first instead of newest-issued-first.
Query Parameters
Name
Type
Description
type
string
Document type filter. Accepts the enum form ("INVOICE", "INVOICE_RECEIPT") or the create-route form ("invoice", "invoiceReceipt"), comma-separated for several, or "ALL" for no filter. An unrecognised value returns 400 with `invalidTypes` and `supportedTypes` — it is never silently ignored.
startDate
string
Filter from date (YYYY-MM-DD).
endDate
string
Filter to date (YYYY-MM-DD).
dateField
string
Which date `startDate`/`endDate` apply to. Default is the issue date; pass "payBy" to filter by due date instead.
clientId
string
Filter by client. Accepts the client's `visibleId` (UUID) or the internal numeric id. An id that matches nothing returns an empty list rather than every document.
clientIds
string
Comma-separated internal client ids.
vendorId
string
Filter purchase documents by vendor. Same rules as `clientId`.
open
boolean
If true, return only open / unsettled documents.
origin
string
How the document was issued. Comma-separated list of "MANUAL", "RETAINER", "RECURRING_PAYMENT", "API", "POS", "ONLINE_PAYMENT", "IMPORT", "CONSOLIDATION", "BOOKING", "PORTAL" (ordered by the client in the customer portal), "ONLINE_ORDER" (an order from the online shop), plus "UNCLASSIFIED" for documents issued before the field existed.
executionStatus
string
Operational status filter — comma-separated status ids from GET /document-execution-statuses, plus "UNSET" for documents with no status. Independent of the financial status: a document can be paid and unshipped.
externalIncome
string
"include" adds invoices that another party issued on the business's behalf (recorded as external income) to the list; "only" returns just those. Omit it and the list is unchanged. These rows carry isExternalIncome: true, type "EXTERNAL_INCOME", a negative id, visibleId and number null, and their own document number in externalNumber. They are never part of the incremental-sync feed.
pendingApproval
boolean
If true (send "1" or "true"), return only documents that were issued without a Tax Authority allocation number and are still waiting for one — i.e. approvalNumberStatus = "PENDING". This is the follow-up queue after a Tax Authority outage.
customerOrderNumber
string
Filter by the customer's own order number.
productSku
string
Only documents containing a line with this SKU.
productManufacturerSku
string
Only documents containing a line with this manufacturer SKU.
hasOpenProducts
boolean
If true, only documents with product lines not yet fully supplied.
updatedSince
string
Open a change feed: return documents changed at or after this ISO 8601 timestamp, oldest change first. See Incremental Sync. Invalid value returns 400 INVALID_UPDATED_SINCE.
cursor
string
Continue a change feed. Pass the `nextCursor` from the previous response verbatim — it is opaque. Wins over `updatedSince`. Invalid value returns 400 INVALID_CURSOR.
limit
number
Items per page. Default 50, clamped to 1-200.
offset
number
Row offset to start from (default 0).
page
number
1-based page number (default 1). Converted to an offset; an explicit `offset` wins over it.
pageSize
number
Alias of `limit`. Wins over `limit` when both are sent.
Get a single document with full details: lines, payments, client, the document chain, allocation history and settlement state.
`status` is the settlement in one word — CANCELLED, REFUNDED, CLOSED, PARTIALLY_PAID or OPEN, evaluated in that precedence. `isOpen` keeps its original meaning and cannot express PARTIALLY_PAID, which is why `status` exists. `relatedDocuments[].direction` is SOURCE (this document was created from it) or DERIVED (it was created from this one). `internalNote` is office-only and is never returned by the public document endpoint.
**Walk-in buyers.** When a counter sale or payment link goes on the company's walk-in card, the buyer's own name, tax id, phone and email — when given — replace the card's on `client`, and `client.walkIn` is `true`. The same applies on GET /documents. Other documents have no `walkIn` field.
Look a document up by the identifier you supplied at creation. The answer to "did my document actually go out?" after a create timed out.
Returns exactly the GET /documents/id/:visibleId payload, or 404 when nothing was issued under that id — which is your signal that retrying the create is safe. See Idempotency.
Needs the `viewer` role or the `documents.view` action role, which also opens GET /documents/id/:visibleId — so a key with action roles only can reconcile what it issued.
Path Parameters
Name
Type
Description
externalId
string
required
The `externalId` sent when the document was created (max 64 characters).
{
"…": "identical to GET /documents/id/:visibleId"
}
GET/documents/allocations/:visibleId
Allocation history for a document, in both directions: which receipt settled this invoice, or which invoices this receipt settled, for how much and when.
`transactionType` is COVER (settled by another document), MANUAL_CLOSE (closed by hand — `document` is null) or REVERT (a previous allocation was undone). Both ends are company-scoped: a transaction is only reported when the counterpart document is yours.
Separate from /documents/edit on purpose: editing is restricted to quotations and orders because an issued document must not change, but the note is not part of the issued document — it is never printed, never emailed and never returned publicly, so it stays editable on an invoice that already went out and updating it re-renders nothing.
Path Parameters
Name
Type
Description
visibleId
string
required
The document's visibleId.
Body Parameters
Name
Type
Description
internalNote
string | null
required
The note, up to 5,000 characters. `null` (or an empty string) clears it. The field must be present — omitting it is a 400, so a client that forgets it cannot wipe a note.
{
"visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
"internalNote": "לגבות דרך המשרד בתל אביב"
}
PATCH/documents/:visibleId/payment-installments
Set how many installments the customer may choose when paying this document through its payment link.
Like the internal note, this is a setting of the deal, not part of the issued document: it is never printed, so it stays editable after issue and re-renders nothing. It applies the next time the customer opens the payment link, including a link already sent. The number set on the document is what the customer is offered, above or below the business-wide setting in the payment provider settings; `null` means the document follows that setting (one payment when the business has none). The customer still chooses on the payment page, from one payment up to this number.
400 INVALID_FIELD for a value outside 1–12; 404 when the document does not exist in your company. Requires the `editor` role or the `documents.edit` action role.
Path Parameters
Name
Type
Description
visibleId
string
required
The document's visibleId.
Body Parameters
Name
Type
Description
paymentMaxInstallments
number | null
required
1–12, or `null` to fall back to the business-wide setting. The field must be present — omitting it is a 400, so a client that forgets it cannot reset a document.
Set or clear the operational status of a document.
The operational status is a separate axis from the financial one: it never closes a document, never changes a balance and never enters `status`. Like the internal note, it stays editable after issue and re-renders nothing.
Path Parameters
Name
Type
Description
visibleId
string
required
The document's visibleId.
Body Parameters
Name
Type
Description
executionStatusId
number | null
required
A status id from GET /document-execution-statuses, or `null` to clear it. The status must belong to your company.
Set or clear the same operational status on several documents at once.
Same rules as PATCH /documents/:visibleId/execution-status. Ids that are not documents of your company are listed in `skipped` instead of failing the request; `updated` counts the rest. 400 `INVALID_FIELD` for an empty or oversized list; 403 when the status is not one of yours. Requires the `editor` role or the `documents.edit` action role.
Body Parameters
Name
Type
Description
documentIds
number[]
required
Internal numeric document ids (`id` on the document, not its `visibleId`), 1–500.
executionStatusId
number | null
required
A status id from GET /document-execution-statuses, or `null` to clear it. The status must belong to your company.
Create a new document of the specified type. The type is part of the URL path.
The "payBy" field is required when creating invoices. For receipts and invoice-receipts, include the "payments" array.
**Credit limit.** When the company's credit-limit policy is "block" (`creditLimitPolicy` on PUT /settings) and the client has a `creditLimit`, an order, delivery note, invoice or invoice-receipt that would take the client past it is refused with 409 `CREDIT_LIMIT_EXCEEDED` before a document number is used. The client's exposure is its debt plus the open orders and delivery notes not yet invoiced (`totalObligation` on GET /clients/entity/:entityId). The document adds its total — on an invoice-receipt only the unpaid part — minus whatever it pulls from open orders or delivery notes through `relatedDocuments`, which are already counted. `error.details` carries `creditLimit`, `totalObligation`, `documentEffect` (what this document adds), `excess` (how far past the limit it would go) and `canOverride`. With an owner-level key `canOverride` is true, and resending the same request with `creditLimitOverride: true` issues the document. Under the default policy ("warn") or "off", nothing is blocked.
**Overdue invoices.** When the company sets `overdueBlockDays` on PUT /settings, a sales document that adds to the debt of a client with an open invoice more than that many days past its `payBy` is refused with 409 `CLIENT_OVERDUE_DEBT`, also before a document number is used. Debt without a `payBy` is never overdue. `error.details` carries `overdueBlockDays`, `overdueAmount`, `overdueDocuments`, `maxDaysOverdue` and `canOverride`; an owner-level key may resend with `creditLimitOverride: true`. With `overdueBlockDays` null (the default) nothing is blocked.
Credit notes ("refund"): relatedDocuments is optional. Link the invoices being credited and the credit is applied against them - cumulatively never past an invoice's own total, or the call is refused with REFUND_EXCEEDS_INVOICE. Omit it for a standalone credit note that is not tied to one particular invoice. Lines are required either way, since a credit note itemises what is being credited. A line whose uuid is not on any linked invoice - a shipping fee, a difference - is credited normally and does not count against that invoice's ceiling.
Crediting an invoice-receipt also issues a matching negative receipt, so the payment side is reversed together with the sale. On a partial credit both are scaled to the credited share. On every other credit, the "payments" array describes money actually handed back to the customer and posts the matching cash movement; leave it out when the credit only reverses an unpaid invoice.
Idempotency: send an Idempotency-Key header so a retry after a timeout cannot issue a second document, and set externalId to your own id for the operation. When externalId matches a document you already issued, the response is a 200 carrying that document with alreadyExists: true. See the Idempotency page.
Origin: a document created with an API key is always recorded with origin = API. That cannot be overridden by the request.
Tax Authority allocation number (מספר הקצאה): a number is requested only for invoices and invoice-receipts, and only above the statutory threshold for the current year — 20,000 ILS before tax in 2025, 10,000 through May 2026, and 5,000 from June 2026 onwards. Below the threshold no number is requested and both approval fields stay null.
When a number is requested and the Tax Authority answers, the document is issued with taxAuthorityApprovalNumber set and approvalNumberStatus = RESOLVED_AUTO.
When the Tax Authority cannot be reached, the default is that the whole issuance fails: HTTP 500 with code FAILD_TO_GENERATE_APPROVAL_NUMBER, and no document is created. Send allowMissingApprovalNumber: true to issue anyway — the document is created with no number and approvalNumberStatus = PENDING, and the number is completed later through POST /documents/approval-number/:visibleId.
Retrying a failed issuance is only safe with an Idempotency-Key. A 500 here can also mean the Tax Authority timed out after allocating the number, so a bare retry issues a second invoice. Send Idempotency-Key on every create and the retry returns the original response instead.
The number is printed on the PDF, returned by both create and read, and carried onto every copy printed later.
Amounts and rounding: every computed amount — line totals, discounts, tax and the document total — is rounded to 2 decimal places. On top of that, a company (or an individual client) can opt into rounding the document total to whole shekels, in one of three modes: round to nearest, always up, or always down. Rounding the total is treated as a before-tax adjustment, exactly like a discount: the total is rounded first, then the before-tax amount and the tax are back-calculated from it so that before-tax x (1 + VAT) equals the printed total. The default is no total rounding, in which case the total is the 2-decimal sum.
Negative lines: units and price must both be zero or greater. A negative line used to be accepted and then flowed into the VAT computation, the inventory movements and the BKMV export to the Tax Authority, none of which handle one. Express a reduction with discount and discountType instead.
The client's **numeric entity id** — the `id` on the client record, not its `visibleId`. Either this or the `client` object (with `identifyClientBy`) must be given.
client
object
Inline client data. Used to create or match a client on-the-fly.
name
string
Client name.
taxId
string
Client tax ID.
email
string
Client email.
phoneNumber
string
Client phone. Saved only when this request creates the client — a matched existing client is never changed.
address
object
Becomes the new client's primary address. Like `phoneNumber`, used only when this request creates the client, and ignored when `addressId` is sent.
street
string
Street and number.
city
string
City.
zip
string
Postal code.
country
string
Country.
addressId
number
Id of an existing address record to attach to a new client. Takes precedence over `address`.
type
string
Client type: "MURSHE", "COMPANY", or "PATOOR".
identifyClientBy
string
When using the client object, specify how to match an existing client: "taxId", "name", or "email". `email` is an exact, case-insensitive match with surrounding spaces ignored — never a substring. `taxId` and `name` must match exactly. When nothing matches, a new client is created from the `client` object.
title
string
Document title / subject.
products
object[]
Array of line items.
description
string
required
Line item description. Required on every document type, receipts included — a line without one is rejected, on preview as well as on create.
units
number
required
Quantity. Must be zero or greater — a negative line is rejected. Express a reduction with `discount` / `discountType`, which every downstream path (VAT, inventory, ledger, the Tax Authority export) already handles.
price
number
required
Price per unit. Must be zero or greater, for the same reason as `units`.
productId
number
Internal product id. Links the line to a catalogue product; also how a quotation → order → invoice chain carries the reference across.
nonBillable
boolean
Mark the line as "not for billing" — a replacement item, a sample, a warranty repair. It is stored at price 0 (the original price is kept as `nonBillableOriginalPrice`), so it stays out of the totals, the VAT, the ledger, the Tax Authority export and any consolidated invoice, while the inventory movement is still recorded in full.
currencyCode
string
Three-letter currency for this line. Omit to use the document currency. A line in another currency is converted to the document currency at the rate frozen on the document, before any calculation.
categoryId
number
Income / expense category override for this line.
sku
string
Product SKU. If provided, links to an existing product.
typeOfUnit
string
Unit label (e.g. "pcs", "hours").
discount
number
Discount amount.
discountOn
string
Apply discount on "unit" or "row".
discountType
string
Discount type: "absolute" or "percents".
warehouseId
number
Warehouse to deduct inventory from.
serialNumbers
string[]
Serial numbers to associate with this line item.
customFields
object[]
Custom field values for this line item.
label
string
Custom field label.
value
string
Custom field value.
payments
object[]
Array of payment records (for receipts and invoice-receipts).
amount
number
required
Payment amount.
paymentMethod
string
Payment method: "cash", "check", "creditCard", "bankTransfer", "giftCard", "replacement", "note", "other", "bit", "paypal", or "wallet" (Apple Pay / Google Pay). Installments are available on "creditCard" only.
date
string
Payment date (YYYY-MM-DD).
details
string[]
Additional payment details (max 5 strings). E.g. check number, last 4 digits.
ledgerId
number
Ledger account ID for accounting.
date
string
Document date (YYYY-MM-DD). Defaults to today.
payBy
string
Payment due date (YYYY-MM-DD). Required for invoices. On a bill sent without it, the due date is computed from the client's payment terms (`paymentTermType` / `paymentTermDays`), or the company's default terms when the client has none; with neither, the bill has no due date. A date you send always wins.
tax
number
Tax rate override (e.g. 17 for 17%).
discount
number
Document-level discount.
discountType
string
Discount type: "absolute" or "percents".
taxMode
string
"beforeTax" (prices exclude tax) or "includeTax" (prices include tax).
notes
string
Notes to display on the document.
paymentMaxInstallments
number | null
Most installments the customer may choose when paying this document through its payment link, 1–12. Overrides the business-wide setting in either direction; omitted or `null` follows that setting. Not printed on the document; change it later with PATCH /documents/:visibleId/payment-installments.
withSignature
string[]
Signature fields to include: "company" and/or "client".
relatedDocuments
object[]
Link to related documents (e.g. convert a quotation to an invoice, or name the invoices a credit note credits). Optional for every type, credit notes included - see the notes below.
id
number | string
required
The related document's `visibleId`, or its internal numeric id. An id that resolves to nothing is a 404. A numeric id of another company's document is ignored, and the document is issued without that link.
amount
number
Amount to apply from the related document.
products
object[]
Products to carry over from the related document.
sendToClient
boolean
If true, email the document to the client after creation. Accepted on every document type, `invoiceReceipt` included.
emailRecipients
string[]
Where to send the document when `sendToClient` is true. Given, these addresses replace the default recipients (the client's email for this document type, then its main email); ignored without `sendToClient`.
skipInventoryActions
boolean
If true, do not adjust inventory when creating the document.
externalId
string
Your own identifier for this document, up to 64 characters, unique within your company. Repeating one returns the document already issued under it (with `alreadyExists: true`) instead of issuing a second — the safe-retry path for an integration that timed out. Also the lookup key for GET /documents/by-external-id/:externalId.
internalNote
string
Office-only note, up to 5,000 characters. Never printed, never emailed, never returned by the public document endpoint — unlike `notes`, which is. Editable afterwards through PATCH /documents/:visibleId/internal-note.
allowMissingApprovalNumber
boolean
Opt in to issuing the document even if the Tax Authority does not return an allocation number. Default (and every caller that omits it): the whole issuance fails with 500 FAILD_TO_GENERATE_APPROVAL_NUMBER and no document is created. With this flag the document is issued with approvalNumberStatus = "PENDING" and the number can be completed later via POST /documents/approval-number/:visibleId.
exchangeRates
object
Manual exchange-rate override, keyed by three-letter currency code (e.g. `{ "USD": 3.71 }`). Without it the rate follows the company / client policy against the official rate. The rate used is frozen onto the document.
currencyCode
string
Document currency (three letters). Defaults to the company currency.
recipientAddressId
number
Which of the client's addresses this document is issued to. Snapshotted onto the document and printed on the PDF.
creditLimitOverride
boolean
Issue past the client's credit limit when the company's credit-limit policy is "block". Honoured only for an owner-level key, and only on "order", "delivery", "invoice" and "invoiceReceipt". Not stored on the document. Also lets the owner issue to a client blocked for overdue invoices (`overdueBlockDays`). Without either block it has no effect.
Generate a PDF preview without saving the document. Accepts the same body as create.
The PDF comes back in the response body itself; there is no URL, and nothing is saved. The document is rendered as a draft, with no number and no allocation number.
Path Parameters
Name
Type
Description
type
string
required
Document type.
Body Parameters
Name
Type
Description
(same as create)
Accepts the same body parameters as the create endpoint.
Request
curl -X POST "https://api.glance.co.il/documents/preview/{type}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"(same as create)": "example_(same as create)"
}'
Response
Response
(binary — the rendered PDF, with Content-Type: application/pdf)
POST/documents/preview/html/{type}
Generate an HTML preview of the document. Accepts the same body as create.
The HTML comes back as the response body — the same markup the PDF is rendered from. Useful for showing a preview in a browser without waiting for a PDF.
Path Parameters
Name
Type
Description
type
string
required
The document type, exactly as on the create route — the preview routes are the create routes mounted under a different prefix.
Body Parameters
Name
Type
Description
(same as create)
Accepts the same body parameters as the create endpoint.
Request
curl -X POST "https://api.glance.co.il/documents/preview/html/{type}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"(same as create)": "example_(same as create)"
}'
Response
Response
(the rendered HTML itself, as text/html)
PUT/documents/edit/:visibleId
Edit a quotation or an order. No other document type can be edited.
Anything else answers INVALID_DOCUMENT_TYPE — an issued invoice or receipt is immutable, and is corrected with a credit note rather than an edit. The response is the updated document, flat, with the re-rendered PDF's `fileId` and `filePath`: editing regenerates the file.
Path Parameters
Name
Type
Description
visibleId
string
required
The document's `visibleId`.
Body Parameters
Name
Type
Description
(same as create)
Accepts the same body parameters as the create endpoint. No fields are required.
Request
curl -X PUT "https://api.glance.co.il/documents/edit/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"(same as create)": "example_(same as create)"
}'
Close a document by hand — settle it without a covering document.
Closing is an operational decision, not an accounting one: no payment is recorded and no ledger entry is written. A document is otherwise closed automatically when a later document in its chain covers it.
Complete the Tax Authority allocation number on an invoice or invoice-receipt that was issued without one. Retries against the Tax Authority, or stores a number obtained elsewhere. The archived PDF is regenerated so the filed document carries the number.
Only invoices and invoice-receipts can carry an allocation number. Any other document type returns 400 APPROVAL_NUMBER_NOT_APPLICABLE, as does a document imported from another system.
A document that already has a number returns 400 APPROVAL_NUMBER_ALREADY_SET — this endpoint completes a missing number, it never replaces one. A retry the Tax Authority refuses again returns 500 FAILD_TO_GENERATE_APPROVAL_NUMBER and the document stays PENDING, so it can be retried later.
approvalNumberStatus becomes RESOLVED_AUTO after a successful retry and RESOLVED_MANUAL after a manual entry, so the two remain distinguishable in an audit.
Use GET /documents?pendingApproval=1 to list the documents waiting for this call.
Path Parameters
Name
Type
Description
visibleId
string
required
The document visible ID.
Body Parameters
Name
Type
Description
mode
string
required
"retry" to ask the Tax Authority again, or "manual" to store a number you already hold.
approvalNumber
string
The number to store. Required when mode is "manual", rejected otherwise. 1-50 characters.
Allocate a receipt against one or more open invoices or bills.
Only charge documents can be allocated against: INVOICE, INVOICE_RECEIPT and BILL. An identifier that resolves to nothing fails the whole request — it is never skipped, which would allocate less than you asked for and still report success. Read the result back with GET /documents/allocations/:visibleId; a `document.allocated` webhook fires on success.
Path Parameters
Name
Type
Description
visibleId
string
required
The receipt's visibleId.
Body Parameters
Name
Type
Description
allocations
object[]
required
One entry per target document. At least one required.
invoiceId
number | string
The target document — its `visibleId` or its internal numeric id. `documentId` and `visibleId` are accepted as spellings of the same field; supply exactly one of the three.
Cancel a receipt, reversing its allocations and the payments recorded on it.
The original receipt is not deleted — a cancelling document is issued against it, and the response names it. That is what the Tax Authority requires, and it is why the invoice the receipt covered goes back to open.
Defaults for a new document of the given type: the VAT rate and the earliest date it may carry.
**No document number is returned** — numbering is assigned at creation, and there is no way to reserve one in advance. `lastDocumentDate` is the last document of this type plus two seconds, the earliest date a new one may carry, and is `null` when there is no such document yet. `tax` is the company VAT rate, or 0 for an exempt dealer (PATOOR).
Path Parameters
Name
Type
Description
route
string
required
"quotation", "order", "delivery", "return", "invoice", "invoiceReceipt", "refund", "bill" or "receipt".
Whether this document can be paid online right now, and for how much.
Creates nothing — ask it before offering a payment link, then call POST to mint one.
`remainingAmount` is what is still **open** on the document, not its total: an invoice for 10,000 that has taken 4,000 in receipts offers 6,000.
When `available` is false, `reason` says which gate closed:
- `NO_PAYMENT_PROVIDER` — the company has no active payment processing.
- `DOCUMENT_TYPE_NOT_PAYABLE` — only `INVOICE` can be paid this way. An `INVOICE_RECEIPT` already carries its own payment, and a quotation or delivery note is not a debt.
- `DOCUMENT_SETTLED` — already paid, closed, cancelled or credited.
Mint (or recover) a hosted payment link for the document's open balance.
The body is ignored — the amount is always the document's open balance, never a number you send. Send `url` to the customer however you like; they pay by card on the hosted page, and **a receipt is issued automatically against this document** and closes it.
`created` is false when an existing link still describing the same debt was returned instead of a new one. Links are reused per (document, amount): if 400 came in against a 1,000 invoice since the last link, the next call mints a fresh link for 600 and leaves the old one alive, so a customer who already clicked the emailed one does not hit a dead page. Every link is single-use, so the stale one cannot charge twice.
201 on a new link, 200 on a reused one. 409 when a link is not available, with the same `reason` codes GET returns in `error.code`; 404 when the document does not exist in your company.
Requires an API key with at least the `viewer` role — no dedicated action role.
Who an issued document can be sent to: the customer's own card and its contacts.
`source` is `client` for the customer's own record and `contact` for a linked contact. A contact with neither an email nor a phone is left out — there is nothing to send it.
`defaultEmails` is where the system would send this document on its own, honouring the customer's per-document-type email routing. It deliberately does **not** fall back to the company's own address: in a recipient picker that reads as a mistake.
`payment` is the same shape GET /documents/payment-link/:visibleId returns — use it to decide whether to offer `includePaymentLink` on the send below.
`paymentMaxInstallments` is the installments setting saved on the document (`null` = the business-wide setting), so a send dialog can show it next to the payment link and change it with PATCH /documents/:visibleId/payment-installments before sending.
Send an already-issued document to chosen addresses and phone numbers.
This is a different act from the send that happens at issue time, which is aimed at the customer and resolved from their record. Here the recipients are named by you — a contact, their accountant, a one-off address nobody keeps on file.
**Each email is sent separately**, not one message to everyone: a shared document goes to people who have no reason to see each other's addresses.
A partial failure is still a 200 — `failed[]` names the recipients that did not get it, with the channel and the error. An SMS refused because the company's SMS quota is used up also carries `code: "USAGE_QUOTA_BLOCKED"`. `pdfAttached` is false when the archived PDF could not be fetched; the mail then carries the document link only, and you should not tell the user a file went out. `paymentLinkIncluded` is false when a link was asked for but could not be attached.
Phone numbers are de-duplicated by their comparable core, so `050-123-4567` and `+972501234567` in the same request are one recipient — but the string you sent is the one dialled. Emails de-duplicate case-insensitively.
Requires an API key with at least the `viewer` role — no dedicated action role.
Path Parameters
Name
Type
Description
visibleId
string
required
The document's `visibleId`.
Body Parameters
Name
Type
Description
emails
string[]
Addresses to email. The document PDF is attached. At least one of `emails` or `phones` is required.
phones
string[]
Numbers to text. SMS carries links only — never the file.
includePaymentLink
boolean
Attach a pay-now button (email) and link (SMS) for the document's open balance. Ignored silently when the company has no payment processing or the document is not an open invoice — the send still goes out, and the response says what was actually attached.