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.
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:
body has
token_type, scope,
access_expire_date, refresh_expire_date.
You're done with this journey; go straight to step 3.body.get_token
is a login URL, valid for one hour:
https://tax.linet.app/cert/get/<JWT>.
Redirect the company's user there.Redirect the browser to the get_token URL from step 1.
From there it's all handled for you:
callback_url you
passed to /info (or / if you didn't
pass one).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.
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.
/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.