ac-co.ai docs
API Referencep11d

Prepare a P11D / P11D(b) filing for approval

POST
/p11d/preparations

RESTRICTED: requires a payroll:, cis: or p11d:read scope, granted after manual approval. Reads come from records held in ac-co.ai; nothing here calls HMRC. Preparing a filing never sends or approves it: a person approves in the payroll app.

Requires p11d:prepare. Prepares the P11D and P11D(b) for taxYear (and exb.tradingOrganisation when the year has entertainment): the server works the year out from the payroll records, builds and validates the message and queues it for a person to approve in the payroll app. Sends nothing to HMRC and cannot approve or send. HMRC's message has no amendment indicator, so one filing per employer and tax year is accepted.

AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/p11d/preparations" \  -H "Content-Type: application/json" \  -d '{    "filingType": "exb",    "legalEntityId": "41192155-f2be-4dd0-9ea4-e32ad94824f7",    "taxYear": "string"  }'
{  "preparationId": "78a1fbc3-56d1-4ef3-a425-e2e76d2b99bc",  "filingType": "fps",  "legalEntityId": "41192155-f2be-4dd0-9ea4-e32ad94824f7",  "engine": "govtalk",  "environment": "test",  "status": "prepared",  "statusReason": "string",  "approvalRequestId": "62a09f2a-7fb7-4e24-a2af-6c58e85c4c08",  "payloadHash": "string",  "preview": {    "property1": null,    "property2": null  },  "validation": {    "property1": null,    "property2": null  },  "warnings": [    "string"  ],  "coveredRunIds": [    "13d94350-ef80-4b0d-aeb7-60aa5ed34bfb"  ],  "coveredSubmissionIds": [    -9007199254740991  ],  "preparedAt": "string",  "expiresAt": "string",  "approvedAt": "string"}