Partner API — Overview
Partner API is for ERPs, accounting firms and platforms that want to submit, sign and track TEIF invoices on behalf of their clients, through a server-to-server API.
This category targets technical integrators (developers). If you're a client organization looking to authorize a partner, see the Partenaires → Demander une autorisation partenaire category instead.
The parties involved
- You (the Partner Application) — your ERP or platform, authenticated via OAuth2.
- Fatoora — the single point of trust; the partner and the client never exchange data or credentials directly.
- The Client Organization — owns their Fatoora account, their signing configuration and their invoice records. They authorize (and can revoke) access at any time, and keep read access to everything you submit on their behalf.
- TTN (Tunisia Trade Net) — the Tunisian tax authority. Only Fatoora talks to TTN.
Key principles
- Each client organization must explicitly authorize your application, confirmed by an OTP code emailed to them — no shared login or impersonation.
- The client can revoke your authorization at any time.
- Signing follows the client's own configuration (manual, automatic SEAL, or DigiGO) — your application never handles the client's signing credentials, and cannot submit directly to TTN on their behalf; it only triggers the client-configured flow.
- Invoices submitted through the API stay visible to the client but cannot be edited from their UI — the API is the system of record for those documents.
Authorization workflow
The flow is client-initiated, not partner-initiated:
| Step | Actor | Action |
|---|---|---|
| 1 | Client | Creates a Fatoora account |
| 2 | Client → Fatoora | Browses the partner catalog and requests authorization (choosing scopes) |
| 3 | Client → Fatoora | Confirms with an OTP code emailed by Fatoora |
| 4 | Partner → Fatoora | Lists its authorized clients — the organization now appears in that list |
| 5 | Partner → Fatoora | Submits an invoice on behalf of the client |
| 6 | Partner → Fatoora | Requests the invoice to be signed |
| 7 | Partner → Fatoora | Fetches the signed invoice artifacts (XML/PDF) |
| 8 | Client → Fatoora | Views the invoice from their own dashboard |
The primary path is client-initiated (they find you in the partner catalog). An alternative path exists where the partner requests access first — but in both cases, it's always the client who approves by OTP, never the partner "accepting" anything.
Onboarding — your credentials
Subscribing to a Partner API plan (partner-starter, partner-business or partner-max) immediately provisions:
clientId— a public application identifier.- Client secret — shown once, at generation or regeneration time.
Manage your credentials from Fatoora dashboard → Partner → Credentials. There is no separate sandbox base URL: production (https://business.fatoora.tn) is used for all environments — see also the Integration → Sandbox Environment category for a generic testing environment.
Your account stays pending_verification until reviewed by the Fatoora team. This doesn't block API calls, but keeps you out of the public partner catalog until you're active.
Next step
Once at least one client has authorized you, move on to Authentication to get your first tokens.