L Linet Developers
Home / Journeys / Tax Authority Allocation Number tax certification
Journey 04 · Tax Authority

Authorize once, stamp documents after

Israel's Tax Authority (רשות המסים) issues an allocation number ("מספר הקצאה") for qualifying invoices over the reporting threshold — the "Tax Authority Allocation Number" system. Three calls and one browser redirect cover it: check status, send the user to authorize, test it, then use it per document.

מספר
הקצאה

Check whether a certificate is already stored

POST /info Full reference →

Credentials are sent as headers (login-id, login-hash, login-company), not in the body. The body is optional — it only takes one field:

callback_url: "https://a.com/profile"  // optional — where to send the browser once authorization finishes

Two possible shapes come back, and the difference is what you branch on:

  • A certificate existsbody has token_type, scope, access_expire_date, refresh_expire_date. You're done with this journey; go straight to step 3.
  • No certificate yetbody.get_token is a login URL, valid for one hour: https://tax.linet.app/cert/get/<JWT>. Redirect the company's user there.
This has to be a real person: the Tax Authority's OAuth screen asks the company's authorized signatory to log in and consent. There's no service‑account path around it.

Send the user to authorize — no API call here

Redirect the browser to the get_token URL from step 1. From there it's all handled for you:

  • the URL sends the user to the Tax Authority's OAuth consent screen;
  • once they approve, the tax portal redierct the user to callback_url you passed to /info (or / if you didn't pass one).

Test it

POST /test Full reference →

No request body — credentials are sent as headers.

Pings the Tax Authority with the stored certificate and returns their health status. Optional, but cheap insurance to run right after storing a new certificate, or before kicking off a batch of /doc calls after a long gap. A non-200 status usually means the certificate expired or was revoked — repeat step 1.

Get an allocation number for a document

You usually don't need to call this yourself. Once a valid certificate is stored, Linet automatically requests the allocation number the moment a qualifying document is created via document create — it happens inline in the same request, before the response comes back. POST /doc below is for the cases that fall outside that: no certificate was stored yet when the document was created, the automatic call failed, or you want to retry/backfill a document issued earlier.

POST /doc Full reference →

Pass the Linet document's id — the same id a document create call returned, or one you found via /newsearch/docs:

id: 1234

The response's body is the confirmation/allocation number as a string:

code: 200,
text: "OK",
body: "20240416124737939107020892",
errorCode: 0

Linet also saves that number onto the document itself, so it shows up on the printed/PDF invoice and doesn't need to be tracked separately on your side. Calling /doc again for the same document is idempotent — it returns the already-stored number instead of requesting a new one.

Only documents over the Tax Authority's reporting threshold need this — smaller invoices don't require an allocation number at all. Calling /doc on one that doesn't need it isn't harmful, but check the threshold for the current tax year before wiring this into every document you issue.