Individual Tax API
Date | Amount |
---|---|
Version and status | |
Available in Sandbox | Yes |
Sandbox base URL | https://test-api.service.hmrc.gov.uk |
Available in Production | Yes |
Production base URL | https://api.service.hmrc.gov.uk |
Overview
This API is one of a number of APIs that provide information that HMRC knows about an individual's tax affairs.
This API in particular provides the following information about an individual's tax record for a given year:
- tax deducted from annual gross income for a given employment and tax year
- tax deducted from pensions (other than state pension) and/or retirement annuities
- tax deducted from Incapacity Benefit
- tax refunded, or set off, within this tax year. For example; a repayment of CIS deductions (if you work in the construction industry), PAYE tax or tax paid on savings income. It may also be an amount that HMRC has reallocated to an existing debt.
The primary intended use for this information is to pre-populate an individual's Self Assessment tax return.
Data availability
Data is only available for taxpayers who are registered for Self Assessment.
Also, data is only available once PAYE reconciliation has completed. This is the process that determines whether the individual has paid the right amount of tax and, for PAYE-only taxpayers, results in a P800 in the event of overpayment or underpayment.
Reconciliation starts on or around 6th June and runs for around one million individuals per working night. It has usually completed by the end of November. Unfortunately it is not possible to know when reconciliation will be complete for a specific individual.
If we are expecting a P11D, reconciliation will not start for that individual until we have received and processed the P11D. If we receive a P11D unexpectedly, we will re-run the reconciliation.
Data is no longer available once we have received and processed the corresponding Self Assessment return.
Data quality
The data from this API is based on information we receive from employers and pension providers.
Note that:
- Pension providers sometimes don't tell us that income has come from a pension. In these cases, the API reports the income source as an employment.
- If the individual received a State Pension lump sum in the given tax year, this API will report it as an employment
with a specific PAYE reference of
267/LS500
.
Versioning
When an API changes in a way that is backwards-incompatible, we increase the version number of the API. See our reference guide for more on versioning.
Errors
We use standard HTTP status codes to show whether an API request succeeded or not. They are usually in the range:
- 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action
- 400 to 499 if it failed because of a client error by your application
- 500 to 599 if it failed because of an error on our server
Errors specific to each API are shown in the Endpoints section, under Response. See our reference guide for more on errors.
Testing
You can use the sandbox environment to test this API.
It supports stateful behaviour. You can set up test data for this API using the Individual PAYE Test Support API.
Endpoints
/individual-tax/sa/{utr}/annual-summary/{taxYear}
Get tax summary
GET
Fetches an individual’s annual tax summary for the given tax year.
Path parameters
Name | Description |
---|---|
utr
string
required
|
The 10 digit self-assessment UTR for the individual.
For example: |
taxYear
string
required
|
The tax year for the tax being retrieved. Tax year in the format
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.1.1+json
|
Authorization
required
|
An
OAuth 2.0 Bearer Token
with the read:individual-tax scope.
For example: Bearer bb7fed3fe10dd235a2ccda3d50fb
|
See also fraud prevention.
Responses
HTTP status 200 (OK)
{ "pensionsAnnuitiesAndOtherStateBenefits" : { "otherPensionsAndRetirementAnnuities": 36.50, "incapacityBenefit": 980.45 }, "refunds" : { "taxRefundedOrSetOff": 325.00 }, "employments" : [ { "employerPayeReference": "123/AB456", "taxTakenOffPay": 890.35 }, { "employerPayeReference": "456/AB456", "taxTakenOffPay": 224.99 } ] }
Name | Description |
---|---|
pensionsAnnuitiesAndOtherStateBenefits
object
required
|
Tax deducted from pensions, annuities and other state benefits |
otherPensionsAndRetirementAnnuities
number
optional
|
The amount of tax deducted from pensions (other than State Pension), retirement annuities and taxable trivial payments.
For example: |
incapacityBenefit
number
optional
|
The amount of tax deducted from Incapacity Benefit.
For example: |
refunds
object
required
|
|
taxRefundedOrSetOff
number
optional
|
The amount of Income Tax refunded or set off by HMRC or Jobcentre Plus.
For example: |
employments
array
required
|
An unordered list of zero or more employments for which the taxpayer had tax deducted in the given tax year. |
employerPayeReference
string
required
|
The employer’s PAYE reference. A value of 267/LS500 indicates a State Pension lump sum.
For example: |
taxTakenOffPay
number
required
|
The amount of UK tax deducted from pay under this employment (or State Pension lump sum).
For example: |
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
Invalid UTR |
400 (Bad Request) |
SA_UTR_INVALID |
Invalid tax year |
400 (Bad Request) |
TAX_YEAR_INVALID |
User not authorised to access data for given UTR |
401 (Unauthorized) |
UNAUTHORIZED |
Data not available for given UTR and tax year (see the data availability section for more details) |
404 (Not Found) |
NOT_FOUND |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Close Section