Companies
Resolve FIRS TIN
Kick off FIRS TIN resolution for a claimed company.
POST
Queues a background job that resolves the company’s FIRS TIN. The endpoint marks
firsTinPending as true, enqueues the job, and returns its ID immediately — the resolved TIN is written back to the company record asynchronously, so poll GET /v1/dashboard/my-companies?id={companyId} for completion.
Body
The company must be owned by the caller.
Behaviour
- The company must have an
rcNumberon file; otherwise the request is rejected. - If a job is genuinely in flight (
vouchmarkTools.tin.firs.pending === true), the request is rejected. - If
firsTinPendingis stale (the worker crashed without clearing it), the endpoint logs the reset and re-queues automatically. - If the queue rejects the job,
firsTinPendingis rolled back tofalseand a500is returned.
Errors
Every error response is shaped{ "success": false, "message": "..." }. The 500 queue-failure case also includes an error field with the underlying message.
| Status | message |
|---|---|
| 400 | Company ID is required |
| 400 | Company RC number is required for TIN verification |
| 400 | TIN verification is already in progress. Please wait for completion. |
| 404 | Company not found or you don't have permission to update it |
| 404 | Company not found or you don't have permission to access it |
| 500 | Failed to initiate TIN verification. Please try again. |
