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.

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

NameTypeDescription
type
stringDocument 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
stringFilter from date (YYYY-MM-DD).
endDate
stringFilter to date (YYYY-MM-DD).
dateField
stringWhich date `startDate`/`endDate` apply to. Default is the issue date; pass "payBy" to filter by due date instead.
clientId
stringFilter 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
stringComma-separated internal client ids.
vendorId
stringFilter purchase documents by vendor. Same rules as `clientId`.
open
booleanIf true, return only open / unsettled documents.
origin
stringHow 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
stringOperational 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
booleanIf 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
stringFilter by the customer's own order number.
productSku
stringOnly documents containing a line with this SKU.
productManufacturerSku
stringOnly documents containing a line with this manufacturer SKU.
hasOpenProducts
booleanIf true, only documents with product lines not yet fully supplied.
updatedSince
stringOpen 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
stringContinue a change feed. Pass the `nextCursor` from the previous response verbatim — it is opaque. Wins over `updatedSince`. Invalid value returns 400 INVALID_CURSOR.
limit
numberItems per page. Default 50, clamped to 1-200.
offset
numberRow offset to start from (default 0).
page
number1-based page number (default 1). Converted to an offset; an explicit `offset` wins over it.
pageSize
numberAlias 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

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
  }
}
GET/documents/id/:visibleId

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.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe 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

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
      }
    }
  ]
}
GET/documents/by-external-id/:externalId

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.

Path Parameters

NameTypeDescription
externalId
stringrequiredThe `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

Response
{
  "…": "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.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe 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

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
    }
  ]
}
PATCH/documents/:visibleId/internal-note

Set or clear the office-only note on a document.

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

NameTypeDescription
visibleId
stringrequiredThe document's visibleId.

Body Parameters

NameTypeDescription
internalNote
string | nullrequiredThe 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

Response
{
  "visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
  "internalNote": "לגבות דרך המשרד בתל אביב"
}
PATCH/documents/:visibleId/execution-status

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

NameTypeDescription
visibleId
stringrequiredThe document's visibleId.

Body Parameters

NameTypeDescription
executionStatusId
number | nullrequiredA 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

Response
{
  "visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
  "executionStatusId": 3
}
POST/documents/create/{type}

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. 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.

Path Parameters

NameTypeDescription
type
stringrequiredDocument type: "quotation", "order", "delivery", "return", "invoice", "invoiceReceipt", "refund", "bill", or "receipt".

Body Parameters

NameTypeDescription
clientId
numberThe 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
objectInline client data. Used to create or match a client on-the-fly.
name
stringClient name.
taxId
stringClient tax ID.
email
stringClient email.
type
stringClient type: "MURSHE", "COMPANY", or "PATOOR".
identifyClientBy
stringWhen using the client object, specify how to match an existing client: "taxId", "name", or "email".
title
stringDocument title / subject.
products
object[]Array of line items.
description
stringrequiredLine item description. Required on every document type, receipts included — a line without one is rejected, on preview as well as on create.
units
numberrequiredQuantity. 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
numberrequiredPrice per unit. Must be zero or greater, for the same reason as `units`.
productId
numberInternal product id. Links the line to a catalogue product; also how a quotation → order → invoice chain carries the reference across.
nonBillable
booleanMark 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
stringThree-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
numberIncome / expense category override for this line.
sku
stringProduct SKU. If provided, links to an existing product.
typeOfUnit
stringUnit label (e.g. "pcs", "hours").
discount
numberDiscount amount.
discountOn
stringApply discount on "unit" or "row".
discountType
stringDiscount type: "absolute" or "percents".
warehouseId
numberWarehouse to deduct inventory from.
serialNumbers
string[]Serial numbers to associate with this line item.
customFields
object[]Custom field values for this line item.
label
stringCustom field label.
value
stringCustom field value.
payments
object[]Array of payment records (for receipts and invoice-receipts).
amount
numberrequiredPayment amount.
paymentMethod
stringPayment method: "cash", "check", "creditCard", "bankTransfer", "giftCard", "replacement", "note", or "other".
date
stringPayment date (YYYY-MM-DD).
details
string[]Additional payment details (max 5 strings). E.g. check number, last 4 digits.
ledgerId
numberLedger account ID for accounting.
date
stringDocument date (YYYY-MM-DD). Defaults to today.
payBy
stringPayment due date (YYYY-MM-DD). Required for invoices.
tax
numberTax rate override (e.g. 17 for 17%).
discount
numberDocument-level discount.
discountType
stringDiscount type: "absolute" or "percents".
taxMode
string"beforeTax" (prices exclude tax) or "includeTax" (prices include tax).
notes
stringNotes 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 | stringrequiredThe 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
numberAmount to apply from the related document.
products
object[]Products to carry over from the related document.
sendToClient
booleanIf true, email the document to the client after creation.
emailRecipients
string[]Additional email addresses to send the document to.
skipInventoryActions
booleanIf true, do not adjust inventory when creating the document.
externalId
stringYour 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
stringOffice-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
booleanOpt 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
objectManual 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
stringDocument currency (three letters). Defaults to the company currency.
recipientAddressId
numberWhich 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

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"
}
POST/documents/preview/{type}

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

NameTypeDescription
type
stringrequiredDocument type.

Body Parameters

NameTypeDescription
(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

NameTypeDescription
type
stringrequiredThe document type, exactly as on the create route — the preview routes are the create routes mounted under a different prefix.

Body Parameters

NameTypeDescription
(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

NameTypeDescription
visibleId
stringrequiredThe document's `visibleId`.

Body Parameters

NameTypeDescription
(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

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"
}
POST/documents/close/:visibleId

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.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe 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

Response
{
  "success": true,
  "message": "Document closed successfully"
}
POST/documents/approval-number/:visibleId

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

NameTypeDescription
visibleId
stringrequiredThe document visible ID.

Body Parameters

NameTypeDescription
mode
stringrequired"retry" to ask the Tax Authority again, or "manual" to store a number you already hold.
approvalNumber
stringThe 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

Response
{
  "visibleId": "9f1c...",
  "type": "INVOICE",
  "number": 1002,
  "taxAuthorityApprovalNumber": "12345678",
  "approvalNumberStatus": "RESOLVED_MANUAL",
  "pdfRegenerated": true
}
POST/documents/allocate/:visibleId

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

NameTypeDescription
visibleId
stringrequiredThe receipt's visibleId.

Body Parameters

NameTypeDescription
allocations
object[]requiredOne entry per target document. At least one required.
invoiceId
number | stringThe 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 | stringAlias of `invoiceId`.
visibleId
stringAlias of `invoiceId`.
amount
numberrequiredAmount 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

Response
{
  "success": true,
  "message": "Receipt allocated successfully",
  "allocations": [
    {
      "documentId": 84213,
      "amount": 3000
    },
    {
      "documentId": 84240,
      "amount": 2850
    }
  ]
}
POST/documents/cancel-receipt/:visibleId

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.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe 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

Response
{
  "success": true,
  "message": "Receipt cancelled successfully",
  "cancellationDocumentId": 84999,
  "cancellationDocumentNumber": 1088,
  "visibleId": "6b5a4938-2c1d-4e0f-9a8b-7c6d5e4f3a21"
}
GET/documents/settings/:route

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

NameTypeDescription
route
stringrequired"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

Response
{
  "lastDocumentDate": "2026-08-20T14:30:02.000Z",
  "tax": 18
}
GET/documents/share/:visibleId/recipients

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.

Path Parameters

NameTypeDescription
visibleId
stringrequiredThe document's `visibleId`.

Request

curl -X GET "https://api.glance.co.il/documents/share/:visibleId/recipients" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "success": true,
  "data": {
    "documentType": "INVOICE",
    "documentNumber": 150162,
    "recipients": [
      {
        "source": "client",
        "id": 4821,
        "name": "אלקבץ יזמות בע״מ",
        "email": "billing@example.co.il",
        "phoneNumber": "0501234567"
      },
      {
        "source": "contact",
        "id": 91,
        "name": "Dana Levi",
        "email": "dana@example.co.il",
        "phoneNumber": null
      }
    ],
    "defaultEmails": [
      "billing@example.co.il"
    ],
    "payment": {
      "available": true,
      "remainingAmount": 1783,
      "currencyCode": "ILS",
      "reason": null
    }
  }
}
POST/documents/share/:visibleId

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. `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

NameTypeDescription
visibleId
stringrequiredThe document's `visibleId`.

Body Parameters

NameTypeDescription
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
booleanAttach 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.

Request

curl -X POST "https://api.glance.co.il/documents/share/:visibleId" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "emails": "example_emails",
  "phones": "example_phones",
  "includePaymentLink": true
}'

Response

Response
{
  "success": true,
  "data": {
    "sentEmails": [
      "billing@example.co.il",
      "cpa@example.co.il"
    ],
    "sentPhones": [
      "0501234567"
    ],
    "failed": [],
    "pdfAttached": true,
    "paymentLinkIncluded": true,
    "paymentUrl": "https://clients.glance.co.il/payments/page/3f8b5c2a-1d4e-4a7b-9c6f-2e1a0b8d7c5e"
  }
}

Last updated