Documents
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.
/documentsList documents, with filtering by type, date, client, origin and operational status. Also serves the incremental change feed when `updatedSince` or `cursor` is supplied.
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", 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. | |
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. |
Request
curl -X GET "https://api.glance.co.il/documents" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"documents": [
{
"id": 84213,
"visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
"type": "INVOICE",
"number": 1042,
"externalId": "erp-9912",
"origin": "API",
"creationDate": "2026-08-15T10:30:00.000Z",
"updateDate": "2026-08-18T10:30:00.000Z",
"amount": 5000,
"tax": 850,
"totalWithTax": 5850,
"status": "PARTIALLY_PAID",
"isOpen": true,
"remainingAmount": 850,
"coveredAmount": 5000,
"executionStatus": {
"id": 3,
"name": "נשלח",
"color": "#2563EB",
"isTerminal": false
},
"client": {
"id": 5531,
"name": "Acme Corp"
}
}
],
"data": "… same rows as `documents`",
"total": 500,
"page": 1,
"pageSize": 50,
"pagination": {
"total": 500,
"limit": 50,
"offset": 0,
"hasMore": true,
"page": 1,
"pageSize": 50,
"totalPages": 10
}
}/documents/id/:visibleIdGet a single document with full details: lines, payments, client, the document chain, allocation history and settlement state.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The document's visibleId (UUID). |
Request
curl -X GET "https://api.glance.co.il/documents/id/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"id": 84213,
"visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
"type": "INVOICE",
"number": 1042,
"externalId": "erp-9912",
"origin": "API",
"retainerId": null,
"recurringPaymentId": null,
"creationDate": "2026-08-15T10:30:00.000Z",
"updateDate": "2026-08-18T10:30:00.000Z",
"amount": 5000,
"tax": 850,
"totalWithTax": 5850,
"taxAuthorityApprovalNumber": "31530001234567890",
"approvalNumberStatus": null,
"internalNote": "לגבות דרך המשרד בתל אביב",
"url": "https://files.glance.co.il/documents/1042.pdf",
"client": {
"id": 5531,
"visibleId": "7c1a...",
"name": "Acme Corp",
"taxId": "515000000",
"email": "info@acme.com"
},
"raw": {
"products": [
{
"uuid": "a1b2c3d4",
"description": "Website Development",
"units": 1,
"price": 5000,
"typeOfUnit": "project",
"discount": 0
},
{
"uuid": "e5f6a7b8",
"description": "Replacement unit",
"units": 1,
"price": 0,
"nonBillable": true,
"nonBillableOriginalPrice": 400
}
],
"payments": [],
"notes": "Net 30 payment terms",
"payBy": "2026-09-15",
"documentCurrency": "ILS"
},
"status": "PARTIALLY_PAID",
"isOpen": true,
"remainingAmount": 850,
"coveredAmount": 5000,
"hasBeenRefunded": false,
"remainingProducts": [],
"coveredProducts": [],
"executionStatus": {
"id": 3,
"name": "נשלח",
"color": "#2563EB",
"isDefault": false,
"isTerminal": false
},
"relatedDocuments": [
{
"id": 84190,
"visibleId": "b7c2...",
"type": "ORDER",
"number": 318,
"amount": 5850,
"direction": "SOURCE"
}
],
"allocations": [
{
"id": 991,
"transactionType": "COVER",
"direction": "INCOMING",
"amount": 5000,
"date": "2026-08-18T10:30:00.000Z",
"createdBy": {
"id": 12,
"name": "Efi"
},
"document": {
"id": 84250,
"visibleId": "9a4e...",
"type": "RECEIPT",
"number": 771
}
}
]
}/documents/by-external-id/:externalIdLook a document up by the identifier you supplied at creation. The answer to "did my document actually go out?" after a create timed out.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
externalId | string | required | The `externalId` sent when the document was created (max 64 characters). |
Request
curl -X GET "https://api.glance.co.il/documents/by-external-id/:externalId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"…": "identical to GET /documents/id/:visibleId"
}/documents/allocations/:visibleIdAllocation history for a document, in both directions: which receipt settled this invoice, or which invoices this receipt settled, for how much and when.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The document's visibleId. |
Request
curl -X GET "https://api.glance.co.il/documents/allocations/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"allocations": [
{
"id": 991,
"transactionType": "COVER",
"direction": "INCOMING",
"amount": 5000,
"date": "2026-08-18T10:30:00.000Z",
"createdBy": {
"id": 12,
"name": "Efi"
},
"document": {
"id": 84250,
"visibleId": "9a4e...",
"type": "RECEIPT",
"number": 771
}
},
{
"id": 994,
"transactionType": "MANUAL_CLOSE",
"direction": "INCOMING",
"amount": 850,
"date": "2026-08-20T08:05:00.000Z",
"createdBy": {
"id": 12,
"name": "Efi"
},
"document": null
}
]
}/documents/:visibleId/internal-noteSet or clear the office-only note on a document.
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. |
Request
curl -X PATCH "https://api.glance.co.il/documents/:visibleId/internal-note" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
"internalNote": "לגבות דרך המשרד בתל אביב"
}/documents/:visibleId/execution-statusSet or clear the operational status of a document.
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. |
Request
curl -X PATCH "https://api.glance.co.il/documents/:visibleId/execution-status" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
"executionStatusId": 3
}/documents/create/{type}Create a new document of the specified type. The type is part of the URL path.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
type | string | required | Document type: "quotation", "order", "delivery", "return", "invoice", "invoiceReceipt", "refund", "bill", or "receipt". |
Body Parameters
| Name | Type | Description | |
|---|---|---|---|
clientId | number | 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. | |
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". | |
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", or "other". | |
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. | |
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. | |
withSignature | string[] | Signature fields to include: "company" and/or "client". | |
relatedDocuments | object[] | Link to related documents (e.g. convert a quotation to an invoice). | |
id | number | string | required | The related document's `visibleId`, or its internal numeric id. An id that resolves to nothing is a 404 — the link is never silently dropped. |
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. | |
emailRecipients | string[] | Additional email addresses to send the document to. | |
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. |
Request
curl -X POST "https://api.glance.co.il/documents/create/{type}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"clientId": 0,
"client": {},
"identifyClientBy": "example_identifyClientBy",
"title": "example_title",
"products": "example_products",
"payments": "example_payments",
"date": "example_date",
"payBy": "example_payBy",
"tax": 0,
"discount": 0,
"discountType": "example_discountType",
"taxMode": "example_taxMode",
"notes": "example_notes",
"withSignature": "example_withSignature",
"relatedDocuments": "example_relatedDocuments",
"sendToClient": true,
"emailRecipients": "example_emailRecipients",
"skipInventoryActions": true,
"externalId": "example_externalId",
"internalNote": "example_internalNote",
"allowMissingApprovalNumber": true,
"exchangeRates": {},
"currencyCode": "example_currencyCode",
"recipientAddressId": 0
}'Response
{
"id": 84213,
"visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
"type": "INVOICE",
"number": 1042,
"externalId": "erp-9912",
"origin": "API",
"amount": 10000,
"tax": 1700,
"totalWithTax": 11700,
"creationDate": "2026-08-20T14:30:00.000Z",
"taxAuthorityApprovalNumber": "31530001234567890",
"approvalNumberStatus": null,
"fileId": 90211,
"fileUrl": "https://files.glance.co.il/documents/1042.pdf"
}/documents/preview/{type}Generate a PDF preview without saving the document. Accepts the same body as create.
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
(binary — the rendered PDF, with Content-Type: application/pdf)/documents/preview/html/{type}Generate an HTML preview of the document. Accepts the same body as create.
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
(the rendered HTML itself, as text/html)/documents/edit/:visibleIdEdit a quotation or an order. No other document type can be edited.
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)"
}'Response
{
"id": 84120,
"visibleId": "a9b8c7d6-e5f4-4321-8098-7654321fedcb",
"type": "QUOTATION",
"number": 512,
"amount": 6000,
"tax": 1080,
"totalWithTax": 7080,
"fileId": 90477,
"filePath": "documents/512.pdf"
}/documents/close/:visibleIdClose a document by hand — settle it without a covering document.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The document's `visibleId`. |
Request
curl -X POST "https://api.glance.co.il/documents/close/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"success": true,
"message": "Document closed successfully"
}/documents/approval-number/:visibleIdComplete 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.
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. |
Request
curl -X POST "https://api.glance.co.il/documents/approval-number/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "example_mode",
"approvalNumber": "example_approvalNumber"
}'Response
{
"visibleId": "9f1c...",
"type": "INVOICE",
"number": 1002,
"taxAuthorityApprovalNumber": "12345678",
"approvalNumberStatus": "RESOLVED_MANUAL",
"pdfRegenerated": true
}/documents/allocate/:visibleIdAllocate a receipt against one or more open invoices or bills.
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. | |
documentId | number | string | Alias of `invoiceId`. | |
visibleId | string | Alias of `invoiceId`. | |
amount | number | required | Amount to allocate. Must be at least 0.01. |
Request
curl -X POST "https://api.glance.co.il/documents/allocate/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"allocations": "example_allocations"
}'Response
{
"success": true,
"message": "Receipt allocated successfully",
"allocations": [
{
"documentId": 84213,
"amount": 3000
},
{
"documentId": 84240,
"amount": 2850
}
]
}/documents/cancel-receipt/:visibleIdCancel a receipt, reversing its allocations and the payments recorded on it.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The receipt's `visibleId`. |
Request
curl -X POST "https://api.glance.co.il/documents/cancel-receipt/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"success": true,
"message": "Receipt cancelled successfully",
"cancellationDocumentId": 84999,
"cancellationDocumentNumber": 1088,
"visibleId": "6b5a4938-2c1d-4e0f-9a8b-7c6d5e4f3a21"
}/documents/settings/:routeDefaults for a new document of the given type: the VAT rate and the earliest date it may carry.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
route | string | required | "quotation", "order", "delivery", "return", "invoice", "invoiceReceipt", "refund", "bill" or "receipt". |
Request
curl -X GET "https://api.glance.co.il/documents/settings/:route" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"lastDocumentDate": "2026-08-20T14:30:02.000Z",
"tax": 18
}/documents/payment-link/:visibleIdWhether this document can be paid online right now, and for how much.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The document's `visibleId`. |
Request
curl -X GET "https://api.glance.co.il/documents/payment-link/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"success": true,
"data": {
"available": true,
"remainingAmount": 1783,
"currencyCode": "ILS",
"reason": null
}
}/documents/payment-link/:visibleIdMint (or recover) a hosted payment link for the document's open balance.
Path Parameters
| Name | Type | Description | |
|---|---|---|---|
visibleId | string | required | The document's `visibleId`. |
Request
curl -X POST "https://api.glance.co.il/documents/payment-link/:visibleId" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"Response
{
"success": true,
"data": {
"url": "https://clients.glance.co.il/payments/page/3f8b5c2a-1d4e-4a7b-9c6f-2e1a0b8d7c5e",
"amount": 1783,
"created": true
}
}