ac-co.ai docs

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.

ScopeWhat it allows
payroll:readEmployees, pay runs, P32-shaped liabilities, FPS / EPS / NVR filings and their status and receipts, payroll preparations.
payroll:prepareEverything in payroll:read, plus preparing an FPS or EPS.
cis:readCIS300 returns, subcontractor verification status, CIS300 / verification filings and their status, CIS preparations.
cis:prepareEverything in cis:read, plus preparing a CIS300 return or a CIS verification.
p11d:readStatus of P11D / P11D(b) filings, and P11D preparations.
p11d:prepareEverything 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 take limit (1-200, default 50) and offset, and answer { items, nextOffset }.
  • GET /payroll/liabilities totals 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 in notIncluded): check the payroll app's P32 report before paying.
  • GET /cis/returns and GET /cis/subcontractors (verification status, expiry and number; UTR and National Insurance numbers are never returned).
  • GET {group}/filings?filingType=..., GET {group}/filings/{id}, .../status, .../receipt for the filing tracker. filingType is required on /payroll/filings (fps, eps, nvr, fps_til, eyu) and /cis/filings (cis300, cis_verify). /p11d/filings is the P11D / P11D(b) (EXB) tracker. A filing of another group reads as 404.
  • 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.

On this page