Payroll, CIS and P11D
Read employees, pay runs, P32 liabilities, CIS300 returns and filing status, and prepare a filing for a person to approve.
Three restricted groups, mounted at /api/rpc/payroll/..., /api/rpc/cis/... and /api/rpc/p11d/.... Everything is answered from records held in ac-co.ai; nothing here calls HMRC.
| Scope | What it allows |
|---|---|
payroll:read | Employees, pay runs, P32-shaped liabilities, FPS / EPS / NVR filings and their status and receipts, payroll preparations. |
payroll:prepare | Everything in payroll:read, plus preparing an FPS or EPS. |
cis:read | CIS300 returns, subcontractor verification status, CIS300 / verification filings and their status, CIS preparations. |
cis:prepare | Everything in cis:read, plus preparing a CIS300 return or a CIS verification. |
p11d:read | Status of P11D / P11D(b) filings, and P11D preparations. |
p11d:prepare | Everything in p11d:read, plus preparing the P11D and P11D(b) for a tax year. |
All six are restricted: granted after manual approval, never by a legacy "full access" key. They do not overlap with hmrc:read / hmrc:write, and holding one never grants another group.
Reads
GET /payroll/employees,/payroll/runs,/payroll/liabilities. National Insurance numbers are masked (******56C); bank details, contact details and dates of birth are never returned. Lists takelimit(1-200, default 50) andoffset, and answer{ items, nextOffset }.GET /payroll/liabilitiestotals PAYE, employee and employer NI and student loans per tax month against the HMRC payments recorded in ac-co.ai. Statutory recovery, CIS suffered, Apprenticeship Levy and Employment Allowance are not included (the response says so innotIncluded): check the payroll app's P32 report before paying.GET /cis/returnsandGET /cis/subcontractors(verification status, expiry and number; UTR and National Insurance numbers are never returned).GET {group}/filings?filingType=...,GET {group}/filings/{id},.../status,.../receiptfor the filing tracker.filingTypeis required on/payroll/filings(fps,eps,nvr,fps_til,eyu) and/cis/filings(cis300,cis_verify)./p11d/filingsis the P11D / P11D(b) (EXB) tracker. A filing of another group reads as404.- The per-employee P11D benefit figures are not available through the API.
Preparing a filing
POST /payroll/preparations (payroll:prepare), POST /cis/preparations (cis:prepare) and POST /p11d/preparations (p11d:prepare) build and validate the filing on the server, freeze a preview and a payload hash, and queue it for approval. They answer awaiting_approval and send nothing to HMRC.
A person then approves the preparation in the payroll app. There is deliberately no approve or send operation in these groups. Watch for the outcome with the submission.accepted / submission.rejected webhooks or GET .../filings/{id}/status.
payroll:prepare accepts filingType fps or eps; cis:prepare accepts cis300 or cis_verify; p11d:prepare accepts exb only and needs taxYear (for example 2026-27; add exb.tradingOrganisation when the year has entertainment). Anything else is a 400. For exb the server works the P11D and P11D(b) out from the payroll records and builds the message: the body carries no figure. HMRC's message has no amendment indicator, so one filing per employer and tax year is accepted; a preparation is refused while one is with HMRC or accepted.
HMRC data
What the restricted hmrc.* group returns, how payroll, CIS and P11D filings reach HMRC, and why HMRC MTD data (VAT, ITSA) is not available through the API.
Webhooks
Subscribe to lead.created, opportunity.stage_changed, form.submitted, submission.accepted and submission.rejected events, and verify delivery signatures.