Reports

Financial and operational reports. Most come in two halves: a preview endpoint that returns the numbers as JSON, and a generate endpoint that renders a PDF or Excel file and returns its URL.

Use cases: Use the preview endpoints to pull figures into your own dashboards, and the generate endpoints when a person needs the file itself.
POST/reports/income/preview

The income report as data: every income document in the period, with totals.

A refund is returned with its amounts negated, so summing the rows gives net income. Unlike the generate call, this one is not metered.

Body Parameters

NameTypeDescription
startDate
stringStart of the period (YYYY-MM-DD).
endDate
stringEnd of the period (YYYY-MM-DD).

Request

curl -X POST "https://api.glance.co.il/reports/income/preview" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "startDate": "example_startDate",
  "endDate": "example_endDate"
}'

Response

Response
{
  "documents": [
    {
      "id": 84213,
      "visibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
      "number": 1042,
      "type": "INVOICE",
      "creationDate": "2026-08-20T14:30:00.000Z",
      "clientName": "אלקבץ בע״מ",
      "amount": 10000,
      "tax": 1800,
      "totalWithTax": 11800,
      "currency": "ILS"
    }
  ],
  "documentCount": 1,
  "totals": {
    "beforeTax": 10000,
    "tax": 1800,
    "includeTax": 11800
  }
}
POST/reports/income

Generate the income report as a file.

Returns the URL of the generated file, which is also filed under the company's documents. Counts against the plan's report quota.

Body Parameters

NameTypeDescription
startDate
stringStart of the period (YYYY-MM-DD).
endDate
stringEnd of the period (YYYY-MM-DD).
type
string"excel" or "pdf".

Request

curl -X POST "https://api.glance.co.il/reports/income" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "startDate": "example_startDate",
  "endDate": "example_endDate",
  "type": "example_type"
}'

Response

Response
{
  "url": "https://files.glance.co.il/reports/income-2026-08.xlsx"
}
POST/reports/expenses

Generate the expenses report as a file.

Covers both sources of expense — the expenses module and supplier invoices — so it agrees with the books rather than with `GET /expenses` alone.

Body Parameters

NameTypeDescription
startDate
stringStart of the period (YYYY-MM-DD).
endDate
stringEnd of the period (YYYY-MM-DD).
type
string"excel" or "pdf".

Request

curl -X POST "https://api.glance.co.il/reports/expenses" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "startDate": "example_startDate",
  "endDate": "example_endDate",
  "type": "example_type"
}'

Response

Response
{
  "url": "https://files.glance.co.il/reports/expenses-2026-08.xlsx"
}
POST/reports/documents

Generate a documents report as a file.

Unlike the other generate endpoints, this one returns the whole upload result rather than just a URL — read `file.remoteUrl`.

Body Parameters

NameTypeDescription
documentIds
number[]Report on exactly these documents (numeric ids). Either this or `filters` must be given — with neither, the call answers 400 DOCUMENT_IDS_REQUIRED.
filters
objectSelect the documents by criteria instead: `startDate`, `endDate`, `type` (array), `clientIds` (array), `open`, `customerOrderNumber`, `productSku`, `productManufacturerSku`, `hasOpenProducts`.
type
string"pdf" (the default) or "excel".
includeProducts
booleanBreak each document down to its line items. Defaults to false.
groupBy
string"none" (the default), "client", "document" or "product".
includePrices
booleanPrint prices. Defaults to true.
visibleColumns
string[]Which columns to print, in order.
savedReportName
stringSave these filters under this name at the same time, for reuse through the saved-reports endpoints.

Request

curl -X POST "https://api.glance.co.il/reports/documents" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "documentIds": "example_documentIds",
  "filters": {},
  "type": "example_type",
  "includeProducts": true,
  "groupBy": "example_groupBy",
  "includePrices": true,
  "visibleColumns": "example_visibleColumns",
  "savedReportName": "example_savedReportName"
}'

Response

Response
{
  "success": true,
  "file": {
    "id": 90512,
    "visibleId": "c4d5e6f7-8901-4a2b-9c3d-4e5f60718293",
    "name": "דוח מסמכים.xlsx",
    "remoteUrl": "https://files.glance.co.il/reports/documents.xlsx",
    "type": "xlsx",
    "size": 24118
  }
}
POST/reports/maam

Generate the VAT (מע״מ) report for a period.

Body Parameters

NameTypeDescription
startDate
stringrequiredStart of the period. Required — missing, it answers 400.
endDate
stringrequiredEnd of the period. Required.

Request

curl -X POST "https://api.glance.co.il/reports/maam" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "startDate": "example_startDate",
  "endDate": "example_endDate"
}'

Response

Response
{
  "success": true,
  "url": "https://files.glance.co.il/reports/maam-2026-08.pdf"
}
GET/reports/documents-by-origin

How many documents each channel produced, and for how much — the API, the web app, the POS, an import.

`POST /reports/documents-by-origin` takes the same four fields in a JSON body and returns `{ url }` — the same report as a file.

Query Parameters

NameTypeDescription
from
stringStart of the period (YYYY-MM-DD). Defaults to the current month.
to
stringEnd of the period (YYYY-MM-DD).
origins
stringComma-separated origins to include, e.g. "API,POS". "UNCLASSIFIED" covers documents issued before origin was recorded.
types
stringComma-separated document types to include.

Request

curl -X GET "https://api.glance.co.il/reports/documents-by-origin" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "from": "2026-08-01",
  "to": "2026-08-31",
  "origins": [
    {
      "origin": "API",
      "count": 412,
      "total": 512300
    },
    {
      "origin": "WEB",
      "count": 88,
      "total": 96200
    }
  ],
  "totals": {
    "count": 500,
    "total": 608500
  }
}
POST/reports/quantities-by-customer/preview

How much of each product went to each customer in a period, optionally against a comparison period.

`POST /reports/quantities-by-customer` takes the same body plus `type` ("excel" or "pdf") and returns `{ url }`. `/reports/quantities-by-supplier/preview` and `/reports/quantities-by-supplier` are the buy-side twins, counting what came in from each supplier. All four need the advanced-reports permission.

Body Parameters

NameTypeDescription
startDate
stringStart of the period (YYYY-MM-DD).
endDate
stringEnd of the period (YYYY-MM-DD).
compareStartDate
stringStart of a comparison period. Supplying either comparison date turns the comparison columns on.
compareEndDate
stringEnd of the comparison period.
entityIds
number[]Limit to these customers (numeric entity ids).
types
string[]Limit to these document types.

Request

curl -X POST "https://api.glance.co.il/reports/quantities-by-customer/preview" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "startDate": "example_startDate",
  "endDate": "example_endDate",
  "compareStartDate": "example_compareStartDate",
  "compareEndDate": "example_compareEndDate",
  "entityIds": "example_entityIds",
  "types": "example_types"
}'

Response

Response
{
  "hasComparison": false,
  "entities": [
    {
      "entityId": 7742,
      "entityName": "אלקבץ בע״מ",
      "quantity": 120,
      "value": 3600,
      "compareQuantity": 0,
      "compareValue": 0,
      "products": [
        {
          "key": "sku:WDG-001",
          "name": "Widget Pro",
          "sku": "WDG-001",
          "unit": "יח'",
          "quantity": 120,
          "value": 3600,
          "compareQuantity": 0,
          "compareValue": 0
        }
      ]
    }
  ],
  "grandQuantity": 120,
  "grandValue": 3600,
  "grandCompareQuantity": 0,
  "grandCompareValue": 0
}
GET/reports/aging

Open customer balances bucketed by how long they have been overdue.

`buckets` names the five ageing bands in order, so a client can render the columns without hard-coding them. Built on the same open-items engine as the debtors report, so the two always agree. `POST /reports/aging/pdf` takes `{ clientIds, asOfDate }` and returns the file; `POST /reports/aging/customer-pdf` renders one customer's statement, and `POST /reports/aging/send-email` mails it. Needs the advanced-reports permission.

Query Parameters

NameTypeDescription
clientIds
stringClient entity ids to limit the report to, as a **JSON array** in the query string — `clientIds=[7742,7743]`. Malformed JSON is ignored rather than rejected.
asOfDate
stringAge the balances as of this date (YYYY-MM-DD) rather than today.

Request

curl -X GET "https://api.glance.co.il/reports/aging" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "asOfDate": "2026-08-24",
  "currencyCode": "ILS",
  "buckets": [
    {
      "key": "current",
      "label": "שוטף"
    },
    {
      "key": "d0_30",
      "label": "0-30"
    },
    {
      "key": "d31_60",
      "label": "31-60"
    },
    {
      "key": "d61_90",
      "label": "61-90"
    },
    {
      "key": "d90_plus",
      "label": "90+"
    }
  ],
  "customers": [
    {
      "entityId": 7742,
      "visibleId": "3a1b2c3d-4e5f-4061-8273-8495a6b7c8d9",
      "name": "אלקבץ בע״מ",
      "taxId": "514789632",
      "phones": [
        "03-1234567"
      ],
      "buckets": {
        "current": 1200,
        "d0_30": 0,
        "d31_60": 3400,
        "d61_90": 0,
        "d90_plus": 800
      },
      "total": 5400,
      "debts": [
        {
          "documentId": 84213,
          "documentVisibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
          "documentNumber": 1042,
          "documentType": "INVOICE",
          "creationDate": "2026-06-20",
          "payBy": "2026-07-20",
          "totalAmount": 3400,
          "remainingAmount": 3400,
          "isOverdue": true,
          "bucket": "d31_60",
          "daysOverdue": 35,
          "notes": []
        }
      ]
    }
  ],
  "totals": {
    "current": 1200,
    "d0_30": 0,
    "d31_60": 3400,
    "d61_90": 0,
    "d90_plus": 800,
    "total": 5400
  }
}
GET/reports/customer-ledger

One customer's ledger — every document and payment, with a running balance.

A positive balance means the customer owes you. Reads the double-entry ledger where the customer has one and the older balance transactions where they do not — the shape is the same either way. `POST /reports/customer-ledger/pdf` renders it as a file.

Query Parameters

NameTypeDescription
clientId
numberrequiredThe client's numeric entity id. Required; missing or non-numeric answers 400.
fromDate
stringStart of the period (YYYY-MM-DD). Omitted, everything is in `rows` and `openingBalance` is 0.
toDate
stringEnd of the period (YYYY-MM-DD).

Request

curl -X GET "https://api.glance.co.il/reports/customer-ledger" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "customerName": "אלקבץ בע״מ",
  "fromDate": "2026-08-01",
  "toDate": "2026-08-31",
  "openingBalance": 0,
  "rows": [
    {
      "date": "2026-08-20",
      "documentType": "INVOICE",
      "documentNumber": 1042,
      "reference": null,
      "debit": 11800,
      "credit": 0,
      "runningBalance": 11800,
      "documentId": 84213,
      "documentVisibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
      "transactionType": "SUBTRACT"
    }
  ],
  "finalBalance": 11800,
  "currencyCode": "ILS"
}
GET/reports/debtors-detailed

Who owes what, document by document — or, in vendor mode, what you owe.

The key is `customers` in both modes — in vendor mode it holds vendors. `ledgerBalance` is present when it differs from `totalDebt`, which is exactly the discrepancy `unmatchedBalanceOnly` filters for. `POST /reports/debtors-detailed/pdf` and `POST /reports/debtors-detailed/excel` take the same criteria in a JSON body and return the file.

Query Parameters

NameTypeDescription
mode
string"customers" (the default — receivables) or "vendors" (payables). Any other value falls back to "customers".
clientIds
stringClient entity ids as a **JSON array** in the query string — `clientIds=[7742]`.
vendorIds
stringVendor entity ids, likewise a JSON array.
overdueOnly
boolean"true" to list only balances past their due date.
asOfDate
stringReport as of this date (YYYY-MM-DD).
includeDeletedNotes
boolean"true" to keep notes that have since been deleted.
unmatchedBalanceOnly
boolean"true" to list only customers whose ledger balance disagrees with the sum of their open documents — the ones worth investigating. Customer mode only.

Request

curl -X GET "https://api.glance.co.il/reports/debtors-detailed" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "customers": [
    {
      "entityId": 7742,
      "visibleId": "3a1b2c3d-4e5f-4061-8273-8495a6b7c8d9",
      "name": "אלקבץ בע״מ",
      "taxId": "514789632",
      "email": "office@elkabetz.co.il",
      "phones": [
        "03-1234567"
      ],
      "contacts": [
        {
          "name": "מיכל",
          "phone": "050-1234567"
        }
      ],
      "totalDebt": 11800,
      "totalOverdue": 0,
      "ledgerBalance": 11800,
      "debts": [
        {
          "documentId": 84213,
          "documentVisibleId": "d0f3a1c7-5b2e-4d8a-9f6c-1e3b5d7a9c2f",
          "documentNumber": 1042,
          "documentType": "INVOICE",
          "documentTitle": "עבודות אוגוסט",
          "creationDate": "2026-08-20",
          "payBy": "2026-09-20",
          "totalAmount": 11800,
          "remainingAmount": 11800,
          "isOverdue": false,
          "notes": []
        }
      ],
      "entityNotes": []
    }
  ],
  "currencyCode": "ILS"
}
GET/reports/sales-by-user

Revenue attributed to the user who issued each document.

Revenue is invoices and invoice-receipts less refunds, so a refund contributes a negative `amount`. Documents whose issuing user cannot be resolved are collected under a synthetic user with a negative `userId`. `POST /reports/sales-by-user/pdf` renders it. Needs the advanced-reports permission.

Query Parameters

NameTypeDescription
from
stringStart of the period (YYYY-MM-DD). Defaults to the current month.
to
stringEnd of the period (YYYY-MM-DD).
granularity
stringBucket size: "day", "week" or "month".
userIds
stringUser ids to limit the report to, as a JSON array.

Request

curl -X GET "https://api.glance.co.il/reports/sales-by-user" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "from": "2026-08-01",
  "to": "2026-08-31",
  "granularity": "month",
  "currencyCode": "ILS",
  "periods": [
    {
      "key": "2026-08",
      "label": "אוגוסט 2026"
    }
  ],
  "users": [
    {
      "userId": 12,
      "name": "מיכל",
      "email": "michal@example.co.il",
      "total": 88400,
      "count": 41,
      "byPeriod": {
        "2026-08": 88400
      },
      "documents": [
        {
          "amount": 11800,
          "customerName": "אלקבץ בע״מ",
          "periodKey": "2026-08"
        }
      ]
    }
  ],
  "totals": {
    "byPeriod": {
      "2026-08": 88400
    },
    "total": 88400,
    "count": 41
  }
}
GET/reports/withholding-tax

Tax withheld at source from suppliers in a period, and the balance not yet handed to the Tax Authority.

`ledgerBalance` is everything withheld and not yet transferred, whatever period was asked for — it is `null` for a company that has never withheld anything, since the liability card is created lazily. `rates` is an array because a supplier's rate can change mid-period. `POST /reports/withholding-tax/pdf` renders the period report; `POST /reports/withholding-tax/certificate` renders one supplier's certificate. Needs the advanced-reports permission.

Query Parameters

NameTypeDescription
from
stringStart of the period (YYYY-MM-DD). Defaults to the current month.
to
stringEnd of the period (YYYY-MM-DD).
vendorEntityId
numberLimit to a single supplier.

Request

curl -X GET "https://api.glance.co.il/reports/withholding-tax" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "from": "2026-08-01",
  "to": "2026-08-31",
  "vendors": [
    {
      "vendorEntityId": 8801,
      "vendorName": "ספקי הצפון בע״מ",
      "taxId": "514789632",
      "taxDeductionsFileNumber": "930012345",
      "certificateNumber": "2026/114",
      "rates": [
        5
      ],
      "grossAmount": 12500,
      "withholdingAmount": 625,
      "netAmount": 11875,
      "paymentsCount": 2,
      "payments": []
    }
  ],
  "totals": {
    "grossAmount": 12500,
    "withholdingAmount": 625,
    "netAmount": 11875,
    "paymentsCount": 2,
    "vendorsCount": 1
  },
  "ledgerBalance": 1830
}
GET/reports/payment-audit

Completeness check on the payment trail: documents carrying a cheque payment with no cheque record behind it.

`complete: true` with an empty list is the healthy answer. Anything listed is a document whose cheque detail never got written, and which will therefore not appear in cheque reports.

Request

curl -X GET "https://api.glance.co.il/reports/payment-audit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "success": true,
  "complete": true,
  "orphanCheckCount": 0,
  "orphanCheckDocuments": []
}
GET/reports/documents/saved

List saved documents-report definitions.

`POST /reports/documents/saved` creates one from `{ name, filters, includeProducts }` and returns `{ report }`; `PUT` and `DELETE /reports/documents/saved/:visibleId` update and remove it. Feed a saved definition's `filters` straight into `POST /reports/documents`.

Request

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

Response

Response
{
  "reports": [
    {
      "id": 14,
      "visibleId": "b1c2d3e4-f506-4718-9a2b-3c4d5e6f7081",
      "name": "לקוחות פתוחים",
      "filters": {
        "open": true,
        "type": [
          "INVOICE"
        ]
      },
      "includeProducts": false,
      "createdBy": 12
    }
  ]
}
POST/reports/uniform-data

Generate the Tax Authority uniform-structure export (מבנה אחיד / BKMV) for a year or a period.

This variant deliberately blanks `bkmvContent` and `iniContent` — the files themselves are large, and it is meant as a check that the export builds. `POST /reports/uniform-data/data` is the same call with the two file contents included, `/save` files them against the company, `/download` answers with the ZIP itself (`Content-Type: application/zip`, not JSON) and `/send-email` mails it to a `recipientEmail`. A failed build answers 500 with `details` and `warnings` naming what was wrong.

Body Parameters

NameTypeDescription
year
numberrequiredThe tax year, 2000–2100.
from
stringStart of the period, if narrower than the year.
to
stringEnd of the period.
mode
string"single-year" (the default) or "multi-year".
outputDrive
stringThe drive letter written into the INI file, as the Tax Authority software expects. Defaults to "C:".

Request

curl -X POST "https://api.glance.co.il/reports/uniform-data" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "year": 0,
  "from": "example_from",
  "to": "example_to",
  "mode": "example_mode",
  "outputDrive": "example_outputDrive"
}'

Response

Response
{
  "message": "Uniform Data Report generated successfully",
  "success": true,
  "bkmvContent": null,
  "iniContent": null,
  "recordCounts": {
    "A100": 1,
    "C100": 412,
    "D110": 980,
    "D120": 355
  }
}

Last updated