Marriage Allowance 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 provides resources related to Marriage Allowance.
Marriage Allowance lets the lower earner of a couple transfer some of their Personal Allowance to their husband, wife or civil partner. If they are eligible this will then lower their tax bill.
In particular, this API can
- Retrieve an individual’s Marriage Allowance status
- Check their partner’s eligibility to be a recipient of Marriage Allowance (useful if the individual is considering applying for Marriage Allowance)
Switch to version 2.0
On 28 February 2020 version 1.0 will be switched off.
Version 2.0 will be released on 23 October 2019 within the Sandbox and Production environment.
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 Marriage Allowance Test Support API.
Endpoints
/marriage-allowance/sa/{utr}/status
Get Marriage Allowance status
GET
@*
- Copyright 2022 HM Revenue & Customs * *@
This resource determines whether an individual taxpayer has Marriage Allowance for the given tax year. If they have Marriage Allowance it will return their role in the relationship (either 'Transferor' or 'Recipient').
Path parameters
Name | Description |
---|---|
utr
string
required
|
The 10 digit self-assessment UTR for the individual.
For example: |
Query parameters
Name | Description |
---|---|
taxYear
string
required
|
The tax year for which the Marriage Allowance status is being retrieved, in the format YYYY-YY.
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.2.0+json
|
Authorization
required
|
An
OAuth 2.0 Bearer Token
with the read:marriage-allowance scope.
For example: Bearer bb7fed3fe10dd235a2ccda3d50fb
|
See also fraud prevention.
Responses
HTTP status 200 (OK)
{ "status" : "Recipient", "deceased": false }
Name | Description |
---|---|
status
string
required
|
The role of the taxpayer as recipient or transferor. Limited to the following possible values: Transferor
- The taxpayer has transferred personal allowance in the given tax year
Recipient
- The taxpayer has received personal allowance in the given tax year
None
- The taxpayer has not transferred or received personal allowance in the given tax year
|
deceased
boolean
required
|
Whether the taxpayer is deceased or not. |
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
Invalid UTR |
400 (Bad Request) |
SA_UTR_INVALID |
Invalid tax year |
400 (Bad Request) |
TAX_YEAR_INVALID |
Missing tax year |
400 (Bad Request) |
TAX_YEAR_INVALID |
User not authorised |
401 (Unauthorized) |
UNAUTHORIZED |
Unmatched recipient |
404 (Not Found) |
NOT_FOUND |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Close Section
/marriage-allowance/sa/{utr}/eligibility
Check Marriage Allowance eligibility
POST
@*
- Copyright 2022 HM Revenue & Customs * *@
This resource checks whether an individual taxpayer's partner is eligible to become a recipient of Marriage Allowance for the given tax year.
This resource should only be used when the individual is the lower earner and is considering becoming a transferor of Marriage Allowance. It should only be used to to check the eligibility of their own partner.
Path parameters
Name | Description |
---|---|
utr
string
required
|
The 10 digit self-assessment UTR for the individual.
For example: |
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.2.0+json
|
Content-Type
required
|
Specifies the format of the request body, which must be JSON. application/json
|
Authorization
required
|
An
OAuth 2.0 Bearer Token
with the read:marriage-allowance scope.
For example: Bearer bb7fed3fe10dd235a2ccda3d50fb
|
See also fraud prevention.
Request
{ "nino": "AA000003D", "firstname": "John", "surname": "Smith", "dateOfBirth": "1981-01-31", "taxYear": "2018-19" }
Name | Description |
---|---|
nino
string
required
|
National Insurance number
Must conform to the regular expression
For example: |
firstname
string
required
|
Partner’s (potential recipient’s) first name
Must conform to the regular expression
For example: |
surname
string
required
|
Partner’s (potential recipient’s) surname
Must conform to the regular expression
For example: |
dateOfBirth
string
required
|
Partner’s (potential recipient’s) date of birth in YYYY-MM-DD format
Must conform to the regular expression
For example: |
taxYear
string
required
|
The tax year for which the Marriage Allowance eligibility is being retrieved, in the format YYYY-YY
Must conform to the regular expression
For example: |
Responses
HTTP status 200 (OK)
{ "eligible" : true }
Name | Description |
---|---|
eligible
boolean
required
|
Whether the taxpayer's partner is eligible to become a recipient of Marriage Allowance. |
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
Invalid UTR |
400 (Bad Request) |
SA_UTR_INVALID |
Missing Nino |
400 (Bad Request) |
BAD_REQUEST |
Invalid NINO |
400 (Bad Request) |
NINO_INVALID |
Missing date of birth |
400 (Bad Request) |
BAD_REQUEST |
Invalid date of birth |
400 (Bad Request) |
DOB_INVALID |
Missing tax year |
400 (Bad Request) |
BAD_REQUEST |
Invalid tax year |
400 (Bad Request) |
TAX_YEAR_INVALID |
Missing first name |
400 (Bad Request) |
BAD_REQUEST |
Invalid first name |
400 (Bad Request) |
FIRST_NAME_INVALID |
Missing surname |
400 (Bad Request) |
BAD_REQUEST |
Invalid surname |
400 (Bad Request) |
SURNAME_VALID |
User not authorised |
401 (Unauthorized) |
UNAUTHORIZED |
Unmatched recipient |
404 (Not Found) |
NOT_FOUND |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Close Section