Linking
When the tax ID already exists on fatoora.tn, you do not open a second account. You send a request. The owner accepts, rejects, or later stops the link, on the Link tab of their organization, with a code sent by email.
The partner does not call the code email, the owner login, or the confirmation. Those steps exist only in the owner's account.
Send a request
POST /api/partner/link-requests
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{ "sourceOrganizationId": "EXISTING_ACCOUNT_UUID" }
The request is created with status pending.
List and filter
GET /api/partner/link-requests
GET /api/partner/link-requests?status=pending
status | Meaning |
|---|---|
pending | In progress. Also includes otp_sent. |
expired | No answer for more than 7 days. This is computed, not a stored value. |
cancelled | Cancelled by the partner. |
rejected | Rejected by the owner. |
approved | Accepted. The company appears in the list. |
revoked | Link stopped by the owner. |
Without status, every request is returned.
Cancel an open request
POST /api/partner/link-requests/{id}/cancel
Only while the request is still open and not expired. An expired, rejected, or already accepted request cannot be cancelled (REQUEST_EXPIRED).
On the owner side
On Organization → Link, the owner:
- accepts — a code is emailed, and they confirm it on the same tab;
- rejects;
- once linked, stops the link — again with an email code.
After acceptance, the company is managed like the others: seal, TTN, then invoicing through Partner API.