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.

Different server. Every call in this journey goes to https://tax.linet.app — not app.linet.org.il/api, the host every other journey in these docs uses. Same Authorization: Bearer + login-company headers, just a different base URL.
מספר
הקצאה

Check whether a certificate is already stored

POST https://tax.linet.app/info Full reference →

Credentials are sent as headers (Authorization: Bearer <token> and login-company), not in the body. The body takes one required field:

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

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

A certificate already exists — you're done with this journey; go straight to step 3:

code: 200,
text: "OK",
body: {
  token_type: "Bearer",
  scope: "scope",
  expires_in: 14400,
  access_expire_date: "2024-04-16 19:35:43",
  refresh_expire_date: "2024-07-15 15:35:43"
  // … plus consented_on, refresh_token_expires_in, access_expire, refresh_expire
},
errorCode: 1000

No certificate yet — body.get_token is a login URL, valid for one hour. Redirect the company's user there:

code: 200,
text: "OK",
body: {
  get_token: "https://tax.linet.app/cert/get/<JWT>"  // valid for 1 hour
},
errorCode: 1000
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 redirects the user to callback_url you passed to /info (or / if you didn't pass one).

Test it

POST https://tax.linet.app/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 https://tax.linet.app/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.

Which documents get one. Linet requests an allocation number automatically for tax invoices (doctype 3), credit invoices (4) and invoice‑receipts (9) whose total before VAT, converted to shekels, is ₪5,000 or more — the threshold Linet currently applies. Smaller documents don't need one. Calling /doc on a document that doesn't need it isn't harmful. The Tax Authority lowers this threshold on a published schedule; Linet follows it, so don't hard‑code the number in your integration.