ac-co.ai docs
API Referencehmrc

Submit

POST
/hmrc/payrollFiling/submit

RESTRICTED: requires the hmrc:read scope (hmrc:write for state-changing operations), granted after manual approval. Self Assessment operations are answered from records held in ac-co.ai and make no call to HMRC.

Requires hmrc:write. Sends an approved preparation. idempotencyKey (8-128 chars) is REQUIRED; the same key replays the same filing and never sends a second one. credentials (Government Gateway userId/password, Basic PAYE Tools only) are used for this one call and are never stored, logged or echoed. An ambiguous transport failure answers 502 with outcomeUncertain: true: do NOT resend except with the same idempotencyKey. Typed errors keep the contract's status and code.

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/hmrc/payrollFiling/submit" \  -H "Content-Type: application/json" \  -d '{    "body": {      "preparationId": "78a1fbc3-56d1-4ef3-a425-e2e76d2b99bc",      "idempotencyKey": "stringst"    }  }'
{  "filingId": "79ada8ef-98e4-495b-8d26-4e319d7aff7f",  "status": "prepared",  "replayed": true,  "message": "string"}