Businesses

A platform — a SaaS running Glance underneath — opens a business per customer. Each business has its own Israeli business id, API keys, Tax Authority connection and document numbering; the developer account's tier covers a number of them and pays for all of them in one monthly charge. These routes are for the developer account only: called with a business's own key or session they answer 403 `API_PLATFORM_ONLY`.

Use cases: Onboard a customer from your own signup flow, carry over its numbering from the software it used before, hand its owner the Tax Authority connect link, and show per-customer activity in your admin. See the Onboard a Business guide for the whole flow.
GET/platform/businesses

Every business of the account — the developer account itself first — with its documents in one month and its Tax Authority connection.

`usage.documents` counts the tax documents issued in the month (invoices, invoice-receipts, receipts and credit notes) — for your own reporting; documents are not billed. What is billed is the number of connected businesses, on GET /platform/account. `fairUseDocuments` is the fair use per business per month (10,000 at launch) and `overFairUse` is true when the business issued more than that: it is flagged, never blocked or charged, and Glance gets in touch to agree a price for such volume. `closesAt` is set once a business has been closed and is the moment it stops counting. `taxAuthority.connected` is false until the owner completes the connect link, and `expiresAt` is when the Tax Authority authorization runs out.

Query Parameters

NameTypeDescription
month
stringThe month to report documents for, as `YYYY-MM`. Defaults to the current month; any other format is ignored and the current month is used.

Request

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

Response

Response
{
  "month": "2026-11",
  "businesses": [
    {
      "id": "3f0b6c1d-8e2a-4c5b-9d7e-1a2b3c4d5e6f",
      "name": "Acme Software בע״מ",
      "taxId": "516000001",
      "isPlatform": true,
      "active": true,
      "closesAt": null,
      "usage": {
        "month": "2026-11",
        "documents": 4,
        "fairUseDocuments": 10000,
        "overFairUse": false
      },
      "taxAuthority": {
        "connected": true,
        "expiresAt": "2027-01-20T08:00:00.000Z"
      }
    },
    {
      "id": "7c1e2a90-4b6d-4f1e-9a3b-2d5f8e0c1a77",
      "name": "סטודיו לוטם",
      "taxId": "514000003",
      "isPlatform": false,
      "active": true,
      "closesAt": null,
      "usage": {
        "month": "2026-11",
        "documents": 132,
        "fairUseDocuments": 10000,
        "overFairUse": false
      },
      "taxAuthority": {
        "connected": true,
        "expiresAt": "2027-02-03T10:15:00.000Z"
      }
    }
  ]
}
POST/platform/businesses

Open a business under the developer account. Returns the business, its first API key — shown once — the result of any starting numbers you set, and a Tax Authority connect link for its owner.

Answers 201. Store `apiKey` now: it is never returned again (GET /platform/businesses/:id shows only its last four characters). The key is an editor key of the new business that may also manage the business's own webhooks; use it for everything you do for that customer. `numbering` is `{}` when no `startingNumbers` were sent. Send `taxAuthorityConnect.url` to the business owner — it is valid for 7 days. The business counts as connected from this month on. During the 14-day trial an account without a card can open up to three businesses; past that, or after the trial, the request answers 402 `API_BILLING_METHOD_REQUIRED` until a payment method is added. A `taxId` already on Glance answers 409 `COMPANY_EXISTS`, and a body that fails validation — an invalid business id, an unknown `type`, a malformed `startingNumbers` — 400 `INVALID_FIELD`.

Body Parameters

NameTypeDescription
name
stringrequiredThe business's name as it appears on its documents, 1-255 characters.
taxId
stringrequiredThe Israeli business id (ח.פ. / ע.מ. / ת.ז.). Must pass the check-digit test, and must not already belong to a business on Glance.
type
stringrequired"MURSHE" (licensed dealer), "COMPANY" or "PATOOR" (exempt dealer).
email
stringThe business's email. Defaults to the developer account's email.
taxAmount
numberVAT rate as a fraction, 0-1. Defaults to 0.18.
keyName
stringName of the first API key, 1-100 characters. Defaults to "Production".
startingNumbers
objectWhere each tax document type's numbering starts — for a business moving from other software that must continue its sequence. Keys: `invoice`, `invoiceReceipt`, `receipt`, `refund` (credit note); any other key is rejected. Each value is either a positive integer (the starting number) or an object:
start
numberrequiredThe number the next document of this type gets. A positive integer.
prefix
stringPrinted before the number, e.g. "R-". Up to 20 characters.
paddingLength
numberPad the number with leading zeros to this many digits, 0-12.

Request

curl -X POST "https://api.glance.co.il/platform/businesses" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example_name",
  "taxId": "example_taxId",
  "type": "example_type",
  "email": "example_email",
  "taxAmount": 0,
  "keyName": "example_keyName",
  "startingNumbers": {}
}'

Response

Response
{
  "business": {
    "id": "7c1e2a90-4b6d-4f1e-9a3b-2d5f8e0c1a77",
    "name": "סטודיו לוטם",
    "taxId": "514000003"
  },
  "apiKey": "gk_live_9b2f4c7e1a3d5f8b0c2e4a6d8f1b3c5e7a9d2f4b6c8e0a1c3e5f7b9d1a3c5e7f",
  "numbering": {
    "invoice": {
      "status": "set",
      "start": 1001
    },
    "receipt": {
      "status": "set",
      "start": 500
    }
  },
  "taxAuthorityConnect": {
    "url": "https://app.glance.co.il/connect/tax-authority?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
    "expiresAt": "2026-11-14T09:30:00.000Z"
  }
}
GET/platform/businesses/:id

One business with its documents in a month, its Tax Authority connection and its API keys.

`apiKeys[].id` is what DELETE /platform/businesses/:id/keys/:keyId takes. An id that is not one of your businesses answers 404 `API_BUSINESS_NOT_FOUND`.

Path Parameters

NameTypeDescription
id
stringrequiredThe business's `id` (a UUID) as POST /platform/businesses and GET /platform/businesses return it.

Query Parameters

NameTypeDescription
month
stringThe month to report documents for, as `YYYY-MM`. Defaults to the current month.

Request

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

Response

Response
{
  "business": {
    "id": "7c1e2a90-4b6d-4f1e-9a3b-2d5f8e0c1a77",
    "name": "סטודיו לוטם",
    "taxId": "514000003",
    "isPlatform": false,
    "active": true,
    "closesAt": null,
    "usage": {
      "month": "2026-11",
      "documents": 132,
      "fairUseDocuments": 10000,
      "overFairUse": false
    },
    "taxAuthority": {
      "connected": true,
      "expiresAt": "2027-02-03T10:15:00.000Z"
    }
  },
  "apiKeys": [
    {
      "id": 913,
      "name": "Production",
      "createdAt": "2026-11-02T09:30:00.000Z",
      "lastUsed": "2026-11-07T07:12:44.000Z",
      "last4": "5e7f"
    }
  ]
}
PUT/platform/businesses/:id/numbering

Set where a business's numbering starts, per tax document type — typically right after opening it, when the customer moves from other software and must continue its sequence.

Numbering must stay continuous, so a type can only be set before its first document of the year. `numbering` reports every type you sent: `set` when the new start took effect, `locked` when the business already issued that type this year and the request was ignored for it. The business can do the same with its own key through POST /counters/create.

Path Parameters

NameTypeDescription
id
stringrequiredThe business's `id` (a UUID) as POST /platform/businesses and GET /platform/businesses return it.

Body Parameters

NameTypeDescription
startingNumbers
objectrequiredWhere each tax document type's numbering starts — for a business moving from other software that must continue its sequence. Keys: `invoice`, `invoiceReceipt`, `receipt`, `refund` (credit note); any other key is rejected. Each value is either a positive integer (the starting number) or an object:
start
numberrequiredThe number the next document of this type gets. A positive integer.
prefix
stringPrinted before the number, e.g. "R-". Up to 20 characters.
paddingLength
numberPad the number with leading zeros to this many digits, 0-12.

Request

curl -X PUT "https://api.glance.co.il/platform/businesses/:id/numbering" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "startingNumbers": {}
}'

Response

Response
{
  "success": true,
  "numbering": {
    "invoice": {
      "status": "set",
      "start": 1001
    },
    "receipt": {
      "status": "locked",
      "start": 500
    }
  }
}
POST/platform/businesses/:id/keys

Issue another API key for a business — to rotate a key, or to give a second service its own.

Answers 201. Like the first key, `apiKey` is shown only here. To rotate: issue a new key, deploy it, then delete the old one.

Path Parameters

NameTypeDescription
id
stringrequiredThe business's `id` (a UUID) as POST /platform/businesses and GET /platform/businesses return it.

Body Parameters

NameTypeDescription
name
stringA name for the key, up to 100 characters. Defaults to "API key".

Request

curl -X POST "https://api.glance.co.il/platform/businesses/:id/keys" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "example_name"
}'

Response

Response
{
  "id": 914,
  "apiKey": "gk_live_0d3f5a7c9e1b3d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c5e7b9d1f3a5c7e9b1d3f"
}
DELETE/platform/businesses/:id/keys/:keyId

Revoke one API key of a business. It stops working immediately.

A key that does not belong to this business answers 404 `API_BUSINESS_NOT_FOUND`.

Path Parameters

NameTypeDescription
id
stringrequiredThe business's `id` (a UUID) as POST /platform/businesses and GET /platform/businesses return it.
keyId
numberrequiredThe key's `id` from GET /platform/businesses/:id.

Request

curl -X DELETE "https://api.glance.co.il/platform/businesses/:id/keys/:keyId" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "success": true
}
DELETE/platform/businesses/:id

Close a business: its API keys stop working now. It still counts as connected for the current month, and not for the next.

The business's documents are kept, as Israeli record-keeping law requires. The developer account itself cannot be closed here — that id answers 404 `API_BUSINESS_NOT_FOUND`.

Path Parameters

NameTypeDescription
id
stringrequiredThe business's `id` (a UUID) as POST /platform/businesses and GET /platform/businesses return it.

Request

curl -X DELETE "https://api.glance.co.il/platform/businesses/:id" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Response

Response
{
  "success": true
}

Last updated