v1

latestOpenAPI 3.0.32026-07-131211345.4 KB
Coding 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 - DEFAULTSimulates a successful response with latest values.
BUSINESS_PARTNER_NOT_EXISTSimulates a scenario where the business partner does not exist.
ITSA_CONTRACT_OBJECT_NOT_EXISTSimulates a scenario where the ITSA contract object does not exist.
STATEFULPerforms 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

processingDatestring date-time required

The date and time that the request was processed in the system.

ninostring required

National Insurance number, in the format AA999999A.

taxYearstring required

The tax year the data applies to, for example 2021-22. The start year and end year must not span two tax years. The minimum tax year is 2021-22. No gaps are allowed, for example, 2020-22 is not valid. (The minimum tax year in Sandbox is 2019-20.).

optOutIndicatorboolean required

Indicates the coding out status of the tax year.

  • true: Customer opted out of coding out for the tax year
  • false: Customer opted in to coding out for the tax year

Example response

{
  "nino": "AA999999A",
  "taxYear": "2021-22"
}