v1
latestOpenAPI 3.0.32026-07-131211345.4 KBCoding Out Status
Retrieve Coding Out Status
This endpoint enables you to retrieve opt-out of coding out status for a specified customer (identified by a National Insurance number) and tax year.
Test data
Scenario simulation using Gov-Test-Scenario headers is only available in the sandbox environment.
| Header Value (Gov-Test-Scenario) | Scenario |
|---|---|
| N/A - DEFAULT | Simulates a successful response with latest values. |
| BUSINESS_PARTNER_NOT_EXIST | Simulates a scenario where the business partner does not exist. |
| ITSA_CONTRACT_OBJECT_NOT_EXIST | Simulates a scenario where the ITSA contract object does not exist. |
| STATEFUL | Performs a stateful Retrieve Coding Out Status. |
get/accounts/self-assessment/{nino}/{taxYear}/collection/tax-code/coding-out/status
Path parameters
ninostring required
Example:TC663795B
National Insurance number, in the format AA999999A.
taxYearstring required
Example:2021-22
The tax year the data applies to, for example, 2021-22. The start year and end year must not span two tax years. No gaps are allowed, for example, 2020-22 is not valid.
Headers
Accept'application/vnd.hmrc.4.0+json' required
Specifies the response format and the version of the API to be used.
Authorizationstring required
Example:Bearer bb7fed3fe10dd235a2ccda3d50fb
An OAuth 2.0 Bearer Token with the read:self-assessment scope.
Gov-Test-Scenariostring
Example:-
Only in sandbox environment. See Test Data table for all header values.
Response
Success
Example response
{
"nino": "AA999999A",
"taxYear": "2021-22"
}