v1
latestOpenAPI 3.0.32026-07-131211345.4 KBCoding Out Status
Opt In to Coding Out
This endpoint enables a specified customer (identified by a National Insurance number) and tax year to opt in to coding out.
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 NINO is valid but is not registered with ITSD as a business partner. |
| ITSA_CONTRACT_OBJECT_NOT_EXIST | Simulates a scenario where the NINO is valid and is registered with ITSD as a business partner, but the ITSA contract object does not exist for the NINO. |
| ALREADY_OPTED_IN | Simulates a scenario where the customer cannot be opted in because they are already opted in. |
| STATEFUL | Performs a stateful Opt In to Coding Out. |
post/accounts/self-assessment/{nino}/{taxYear}/collection/tax-code/coding-out/opt-in
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(No Content)