CIS Deductions (MTD) 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
Under the Construction Industry Scheme (CIS), contractors deduct money from a subcontractor’s payments and pass it to HM Revenue and Customs (HMRC). The deductions count as advance payments towards the subcontractor’s tax and National Insurance.
This API allows the developer to:
- retrieve details of the data the contractor has submitted to HMRC
- retrieve a list of CIS deductions
- create CIS deductions
- remove CIS deductions
- override previous CIS deductions (after the tax year has ended)
For information on how to connect to this API see the Income Tax MTD end-to-end service guide.
Send fraud prevention data
HMRC monitors transactions to help protect your customers' confidential data from criminals and fraudsters.
Check the data you need to send. You can also use the Test API during initial development and as part of your quality assurance checks.
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.
Single errors will be returned in the following format:
{
"code": "FORMAT_FIELD_NAME",
"message": "The provided FieldName is invalid"
}
Where possible, multiple errors will be returned with INVALID_REQUEST
in the following format:
{
"code": "INVALID_REQUEST",
"message": "Invalid request",
"errors": [
{
"code": "RULE_FIELD_NAME",
"message": "The provided FieldName is not allowed"
},
{
"code": "FORMAT_FIELD_NAME",
"message": "The provided FieldName is invalid"
}
]
}
Changelog
You can find the changelog in the income-tax-mtd-changelog GitHub wiki.
Support
- Raise non-technical or platform-related issues with the Software Development Support Team (SDST).
- Raise technical issues on the income-tax-mtd-changelog GitHub page.
Testing
You can use the sandbox environment to test this API. You can use the Create Test User API or it's frontend service to create test users.
It may not be possible to test all scenarios in the sandbox. You can test some scenarios by passing the Gov-Test-Scenario header. Documentation for each endpoint includes a Test data section, which explains the scenarios that you can simulate using the Gov-Test-Scenario header.
If you have a specific testing need that is not supported in the sandbox, contact our support team.
Some APIs may be marked [test only]. This means that they are not available for use in production and may change.
Endpoints
/individuals/deductions/cis/{nino}/current-position
Retrieve CIS Deductions for Subcontractor
GET
This endpoint allows a developer to retrieve a customer's latest CIS deductions data and whether it was submitted by a contractor or user. A National Insurance number and submission ID must be provided.
Path parameters
Name | Description |
---|---|
nino
string
required
|
National Insurance number in the format AA999999A.
For example: |
Query parameters
Name | Description |
---|---|
fromDate
string
required
|
CIS tax year start date.
For example: |
toDate
string
required
|
CIS tax year end date.
For example: |
source
string
optional
|
The source of amended data. Defaults to
|
Request headers
Name | Description |
---|---|
Accept
required
|
Specifies the response format and the version of the API to be used. application/vnd.hmrc.1.0+json
|
Gov-Test-Scenario
optional
|
Only in sandbox environment. See Test Data table for all header values. -
|
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:self-assessment scope.
For example: Bearer bb7fed3fe10dd235a2ccda3d50fb
|
See also fraud prevention.
Responses
HTTP status 200 (OK)
Response headers
Name | Description |
---|---|
X-CorrelationId
required
|
Unique ID for operation tracking c75f40a6-a3df-4429-a697-471eeec46435
|
See also fraud prevention.
{ "totalDeductionAmount": 12345.56, "totalCostOfMaterials": 234234.33, "totalGrossAmountPaid": 2342424.56, "cisDeductions" : [ { "fromDate": "2020-04-06", "toDate": "2021-04-05", "contractorName": "contractor Name", "employerRef": "123/AA12345", "totalDeductionAmount": 3543.55, "totalCostOfMaterials": 6644.67, "totalGrossAmountPaid": 3424.12, "periodData": [ { "deductionFromDate": "2020-04-06", "deductionToDate": "2020-05-05", "deductionAmount": 4654.78, "costOfMaterials": 4564.89, "grossAmountPaid": 7878.67, "submissionDate": "2020-05-11T16:38:57Z", "submissionId": "4557ecb5-fd32-48cc-81f5-e6acd1099f3c", "source": "customer" }, { "deductionFromDate": "2020-05-06", "deductionToDate": "2020-06-05", "deductionAmount": 355.00, "costOfMaterials": 35.00, "grossAmountPaid": 1457.00, "submissionDate": "2020-05-11T16:38:57Z", "source": "contractor" } ], "links":[ { "href":"individuals/deductions/cis/TC663795B/amendments/4557ecb5-fd32-48cc-81f5-e6acd1099f3c", "rel":"delete-cis-deductions-for-subcontractor", "method":"DELETE" }, { "href":"individuals/deductions/cis/TC663795B/amendments/4557ecb5-fd32-48cc-81f5-e6acd1099f3c", "rel":"amend-cis-deductions-for-subcontractor", "method":"PUT" } ] }, { "fromDate": "2020-04-06", "toDate": "2021-04-05", "contractorName": "Soylent Solutions", "employerRef": "123/TW44355", "totalDeductionAmount": 3543.55, "totalCostOfMaterials": 6644.67, "totalGrossAmountPaid": 3424.12, "periodData": [ { "deductionFromDate": "2020-07-06", "deductionToDate": "2020-08-05", "deductionAmount": 60.00, "costOfMaterials": 35.00, "grossAmountPaid": 1457.00, "submissionDate": "2020-05-11T16:38:57Z", "source": "contractor" }, { "deductionFromDate": "2020-09-06", "deductionToDate": "2020-10-05", "deductionAmount": 60.00, "costOfMaterials": 35.00, "grossAmountPaid": 1457.00, "submissionDate": "2020-05-11T16:38:57Z", "source": "contractor" } ] } ], "links":[ { "href": "individuals/deductions/cis/TC663795B/current-position?fromDate=2020-04-06&toDate=2021-04-05&source=all", "rel": "self", "method": "GET" }, { "href":"individuals/deductions/cis/TC663795B/amendments", "rel":"create-cis-deductions-for-subcontractor", "method":"POST" } ] }
Name | Description |
---|---|
totalDeductionAmount
number
optional
|
The total amount of tax deducted by CIS contractors. The value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
totalCostOfMaterials
number
optional
|
The total cost of materials incurred under CIS by the subcontractor across all of the CIS contractors that they worked for. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
totalGrossAmountPaid
number
optional
|
The total gross amount paid by CIS contractors. The value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
cisDeductions
array
required
|
List of the components that make up the overall deductions. |
fromDate
string
required
|
CIS start date of a tax year.
For example: |
toDate
string
required
|
CIS end date of a tax year.
For example: |
contractorName
string
optional
|
The name of the contractor the subcontractor worked for. |
employerRef
string
required
|
A unique identifier, the contractor reference number.
Must conform to the regular expression
For example: |
totalDeductionAmount
number
optional
|
The total amount of tax deducted by a CIS contractor. The value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
totalCostOfMaterials
number
optional
|
The total cost of materials incurred under CIS by the subcontractor. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
totalGrossAmountPaid
number
optional
|
The total gross amount paid by a CIS contractor. The value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
periodData
array
required
|
List of the components that make up the overall deductions. |
deductionFromDate
string
required
|
The From date when the deduction was made within the CIS tax year period.
For example: |
deductionToDate
string
required
|
The To date when the deduction was made within the CIS tax year period.
For example: |
deductionAmount
number
optional
|
The amount of tax deducted by the contractor. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
costOfMaterials
number
optional
|
The cost of materials incurred under CIS. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
grossAmountPaid
number
optional
|
The gross amount paid under CIS. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
submissionDate
string
required
|
The date the deduction was submitted.
For example: |
submissionId
string
optional
|
The unique identifier for the submission.
For example: |
source
string
required
|
The source of the data.
For example: |
links
array
optional
|
A list of endpoint links that indicate possible actions related to the current resource |
href
string
required
|
The relative url of the endpoint
For example: |
rel
string
required
|
A label for the endpoint, which describes how it is related to the current resource. The rel will be self where the action is retrieval of the same resource
For example: |
method
string
required
|
The HTTP method type for the endpoint
For example: |
links
array
required
|
A list of endpoint links that indicate possible actions related to the current resource |
href
string
required
|
The relative url of the endpoint
For example: |
rel
string
required
|
A label for the endpoint, which describes how it is related to the current resource. The rel will be self where the action is retrieval of the same resource
For example: |
method
string
required
|
The HTTP method type for the endpoint
For example: |
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
The format of the supplied NINO field is not valid. |
400 (Bad Request) |
FORMAT_NINO |
The specified date range is invalid |
400 (Bad Request) |
RULE_DATE_RANGE_INVALID |
The specified date range is outside the allowable tax years (the current tax year minus four years). |
400 (Bad Request) |
RULE_DATE_RANGE_OUT_OF_DATE |
The From date is not a valid format. |
400 (Bad Request) |
FORMAT_FROM_DATE |
The From date parameter is missing. |
400 (Bad Request) |
MISSING_FROM_DATE |
The To date is not a valid format. |
400 (Bad Request) |
FORMAT_TO_DATE |
The To date parameter is missing. |
400 (Bad Request) |
MISSING_TO_DATE |
The source of data should be one of these All (Blended view), Customer or Contractor. |
400 (Bad Request) |
RULE_SOURCE_INVALID |
The remote endpoint has indicated that no data can be found for the given period. |
404 (Not Found) |
MATCHING_RESOURCE_NOT_FOUND |
The client or agent is not authorised. This is because: the client is not subscribed to MTD, the agent is not subscribed to Agent Services, or the client has not authorised the agent to act on their behalf. |
403 (Forbidden) |
CLIENT_OR_AGENT_NOT_AUTHORISED |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Test data
Scenario simulations using Gov-Test-Scenario headers is only available in the sandbox environment.
Header Value (Gov-Test-Scenario) | Scenario |
---|---|
N/A - DEFAULT |
Simulate success response with customer and contractor deductions. |
N/A - DEFAULT |
Simulate success response with customer and contractor deductions. |
N/A - DEFAULT |
Simulate success response with contractor deductions. |
N/A - DEFAULT |
Simulate success response with customer deductions. |
DATE_RANGE_OUT_OF_DATE |
Simulate error when retrieving data which is outside the allowable tax years. |
NOT_FOUND |
Simulate the scenario where no data is found. |
Close Section
/individuals/deductions/cis/{nino}/amendments
Create CIS Deductions for Subcontractor
POST
This endpoint allows a developer to create a customer’s CIS deductions that have been previously populated. A National Insurance number must be provided.
Path parameters
Name | Description |
---|---|
nino
string
required
|
National Insurance number in the format AA999999A.
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.0+json
|
Gov-Test-Scenario
optional
|
Only in sandbox environment. See Test Data table for all header values. -
|
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 write:self-assessment scope.
For example: Bearer bb7fed3fe10dd235a2ccda3d50fb
|
See also fraud prevention.
Request
Scenario: Create CIS request
{ "fromDate": "2020-04-06", "toDate": "2021-04-05", "contractorName": "ContractorA", "employerRef": "123/AB56797", "periodData": [ { "deductionAmount": 355.00, "deductionFromDate": "2020-06-06", "deductionToDate": "2020-07-05", "costOfMaterials": 35.00, "grossAmountPaid": 1457.00 } ] }
Name | Description |
---|---|
fromDate
string
required
|
CIS tax year start date. The minimum tax year is 2020-21. The minimum tax year in Sandbox is 2019-20.
For example: |
toDate
string
required
|
CIS tax year end date. The minimum tax year is 2020-21. The minimum tax year in Sandbox is 2019-20.
For example: |
contractorName
string
required
|
The name of the contractor the subcontractor worked for. |
employerRef
string
required
|
A unique identifier, the contractor reference number.
Must conform to the regular expression
For example: |
periodData
array
required
|
List of items that make up the overall deductions. At least one item is required. |
deductionAmount
number
required
|
The amount of tax deducted by the contractor. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
deductionFromDate
string
required
|
The From date when the deduction was made within the CIS tax year period.
For example: |
deductionToDate
string
required
|
The To date when the deduction was made within the CIS tax year period.
For example: |
costOfMaterials
number
optional
|
The cost of materials incurred under CIS. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
grossAmountPaid
number
optional
|
The gross amount paid under CIS. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
Responses
HTTP status 200 (OK)
Response headers
Name | Description |
---|---|
X-CorrelationId
required
|
Unique ID for operation tracking c75f40a6-a3df-4429-a697-471eeec46435
|
See also fraud prevention.
{ "submissionId": "db854aaa-65dc-488c-9120-e63fea14b9f1", "links": [ { "href": "/individuals/deductions/cis/TC663795B/current-position?fromDate=2020-04-06&toDate=2021-04-05", "rel": "retrieve-cis-deductions-for-subcontractor", "method": "GET" } ] }
Name | Description |
---|---|
submissionId
string
required
|
A unique identifier for the customer provided CIS deduction amendment.
Must conform to the regular expression
For example: |
links
array
optional
|
A list of endpoint links that indicate possible actions related to the current resource |
href
string
required
|
The relative url of the endpoint
For example: |
rel
string
required
|
A label for the endpoint, which describes how it is related to the current resource. The rel will be self where the action is retrieval of the same resource
For example: |
method
string
required
|
The HTTP method type for the endpoint
For example: |
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
The format of the supplied NINO field is not valid. |
400 (Bad Request) |
FORMAT_NINO |
An empty or non-matching body was submitted. |
400 (Bad Request) |
RULE_INCORRECT_OR_EMPTY_BODY_SUBMITTED |
The deductions From date is not a valid date format. |
400 (Bad Request) |
FORMAT_DEDUCTIONS_FROM_DATE |
The deductions To date is not a valid date format. |
400 (Bad Request) |
FORMAT_DEDUCTIONS_TO_DATE |
The format of the Employer Reference number is invalid. |
400 (Bad Request) |
FORMAT_EMPLOYER_REFERENCE |
The From date is not a valid format. |
400 (Bad Request) |
FORMAT_FROM_DATE |
The To date is not a valid format. |
400 (Bad Request) |
FORMAT_TO_DATE |
The deductions amount should be a positive number less than 99999999999.99 up to 2 decimal places. |
400 (Bad Request) |
RULE_DEDUCTIONS_AMOUNT |
The cost of materials should be a positive number less than 99999999999.99 up to 2 decimal places. |
400 (Bad Request) |
RULE_COST_OF_MATERIALS |
The gross amount should be a positive number less than 99999999999.99 up to 2 decimal places. |
400 (Bad Request) |
RULE_GROSS_AMOUNT_PAID |
The specified date range is invalid |
400 (Bad Request) |
RULE_DATE_RANGE_INVALID |
The deductions periods do not align with the tax year supplied. |
400 (Bad Request) |
RULE_UNALIGNED_DEDUCTIONS_PERIOD |
The specified tax year is not supported. Either the tax year specified is before the minimum tax year value, or it is after the maximum tax year value. |
400 (Bad Request) |
RULE_TAX_YEAR_NOT_SUPPORTED |
The deductions period does not align from the 6th of one month to the 5th of the following month. |
400 (Bad Request) |
RULE_DEDUCTIONS_DATE_RANGE_INVALID |
The submission has been made before the tax year has ended. |
400 (Bad Request) |
RULE_TAX_YEAR_NOT_ENDED |
CIS deductions already exists for this tax year. |
400 (Bad Request) |
RULE_DUPLICATE_SUBMISSION |
More than one deduction period has been supplied for the same month or period. |
400 (Bad Request) |
RULE_DUPLICATE_PERIOD |
The client or agent is not authorised. This is because: the client is not subscribed to MTD, the agent is not subscribed to Agent Services, or the client has not authorised the agent to act on their behalf. |
403 (Forbidden) |
CLIENT_OR_AGENT_NOT_AUTHORISED |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Test data
Scenario simulations using Gov-Test-Scenario headers is only available in the sandbox environment.
Header Value (Gov-Test-Scenario) | Scenario |
---|---|
N/A - DEFAULT |
Simulate success response. |
DEDUCTIONS_DATE_RANGE_INVALID |
Simulate the scenario where the deductions period does not align from the 6th of one month to the 5th of the following month. |
UNALIGNED_DEDUCTIONS_PERIOD |
Simulate the scenario where the deductions periods do not align with the tax year supplied. |
TAX_YEAR_NOT_ENDED |
Simulate the scenario where the submission is for tax year that has not ended. |
DUPLICATE_SUBMISSION |
Simulate the scenario where CIS deductions already exists for this tax year. |
DUPLICATE_PERIOD |
Simulate the scenario where CIS deductions already exists for this period. |
Close Section
/individuals/deductions/cis/{nino}/amendments/{submissionId}
Amend CIS Deductions for Subcontractor
PUT
This endpoint allows a developer to amend a customer’s CIS deductions data that has been previously populated. A National Insurance number and submission ID must be provided.
Path parameters
Name | Description |
---|---|
nino
string
required
|
National Insurance number in the format AA999999A.
For example: |
submissionId
string
required
|
A unique identifier for the customer provided CIS deduction amendment.
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.0+json
|
Gov-Test-Scenario
optional
|
Only in sandbox environment. See Test Data table for all header values. -
|
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 write:self-assessment scope.
For example: Bearer bb7fed3fe10dd235a2ccda3d50fb
|
See also fraud prevention.
Request
Scenario: Amend CIS request
{ "periodData": [ { "deductionAmount": 355.00, "deductionFromDate": "2020-06-06", "deductionToDate": "2020-07-05", "costOfMaterials": 35.00, "grossAmountPaid": 1457.00 }, { "deductionAmount": 355.00, "deductionFromDate": "2020-07-06", "deductionToDate": "2020-08-05", "costOfMaterials": 35.00, "grossAmountPaid": 1457.00 } ] }
Name | Description |
---|---|
periodData
array
required
|
List of items that make up the overall deductions. At least one item is required. |
deductionAmount
number
required
|
The amount of tax deducted by the contractor. The value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
deductionFromDate
string
required
|
The From date when the deduction was made within the CIS tax year period.
For example: |
deductionToDate
string
required
|
The To date when the deduction was made within the CIS tax year period.
For example: |
costOfMaterials
number
optional
|
The cost of materials incurred under CIS. This value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
grossAmountPaid
number
optional
|
The gross amount paid under CIS. The value must be between 0 and 99999999999.99 up to 2 decimal places.
For example: |
Responses
HTTP status 204 (No Content)
Response headers
Name | Description |
---|---|
X-CorrelationId
required
|
Unique ID for operation tracking c75f40a6-a3df-4429-a697-471eeec46435
|
See also fraud prevention.
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
The format of the supplied NINO field is not valid. |
400 (Bad Request) |
FORMAT_NINO |
An empty or non-matching body was submitted. |
400 (Bad Request) |
RULE_INCORRECT_OR_EMPTY_BODY_SUBMITTED |
The deductions From date is not a valid date format. |
400 (Bad Request) |
FORMAT_DEDUCTIONS_FROM_DATE |
The deductions To date is not a valid date format. |
400 (Bad Request) |
FORMAT_DEDUCTIONS_TO_DATE |
The deductions amount should be a positive number less than 99999999999.99 up to 2 decimal places. |
400 (Bad Request) |
RULE_DEDUCTIONS_AMOUNT |
The cost of materials should be a positive number less than 99999999999.99 up to 2 decimal places. |
400 (Bad Request) |
RULE_COST_OF_MATERIALS |
The gross amount should be a positive number less than 99999999999.99 up to 2 decimal places. |
400 (Bad Request) |
RULE_GROSS_AMOUNT_PAID |
The deductions period does not align from the 6th of one month to the 5th of the following month. |
400 (Bad Request) |
RULE_DEDUCTIONS_DATE_RANGE_INVALID |
The format of the submission ID is not valid. |
400 (Bad Request) |
FORMAT_SUBMISSION_ID |
The deductions periods do not align with the tax year supplied. |
400 (Bad Request) |
RULE_UNALIGNED_DEDUCTIONS_PERIOD |
More than one deduction period has been supplied for the same month or period. |
400 (Bad Request) |
RULE_DUPLICATE_PERIOD |
The remote endpoint has indicated that no data can be found for the given period. |
404 (Not Found) |
MATCHING_RESOURCE_NOT_FOUND |
The client or agent is not authorised. This is because: the client is not subscribed to MTD, the agent is not subscribed to Agent Services, or the client has not authorised the agent to act on their behalf. |
403 (Forbidden) |
CLIENT_OR_AGENT_NOT_AUTHORISED |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Test data
Scenario simulations using Gov-Test-Scenario headers is only available in the sandbox environment.
Header Value (Gov-Test-Scenario) | Scenario |
---|---|
N/A - DEFAULT |
Simulate success response. |
DEDUCTIONS_DATE_RANGE_INVALID |
Simulate the scenario where the deductions period does not align from the 6th of one month to the 5th of the following month. |
UNALIGNED_DEDUCTIONS_PERIOD |
Simulate the scenario where the deductions periods do not align with the tax year supplied. |
DUPLICATE_PERIOD |
Simulate the scenario where CIS deductions already exists for this period. |
NOT_FOUND |
Simulate the scenario where the CIS deduction was not found. |
TAX_YEAR_NOT_SUPPORTED |
Simulates the scenario where the tax year is not supported. |
Close Section
/individuals/deductions/cis/{nino}/amendments/{submissionId}
Delete CIS Deductions for Subcontractor
DELETE
This endpoint allows a developer to remove a customer’s CIS deductions data that has been previously populated. A National Insurance number and submission ID must be provided.
Path parameters
Name | Description |
---|---|
nino
string
required
|
National Insurance number in the format AA999999A.
For example: |
submissionId
string
required
|
A unique identifier for the customer provided CIS deduction amendment.
For example: |
Query parameters
Name | Description |
---|---|
taxYear
string
optional
|
The tax year to which the data applies in the format YYYY-YY. The start year and end year must not span two tax years. The parameter value must be at least 2023-24. No gaps are allowed, for example, 2023-25 is not valid.
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.0+json
|
Gov-Test-Scenario
optional
|
Only in sandbox environment. See Test Data table for all header values. -
|
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 write:self-assessment scope.
For example: Bearer bb7fed3fe10dd235a2ccda3d50fb
|
See also fraud prevention.
Responses
HTTP status 204 (No Content)
Response headers
Name | Description |
---|---|
X-CorrelationId
required
|
Unique ID for operation tracking a1e8057e-fbbc-47a8-a8b4-78d9f015c253
|
See also fraud prevention.
Error scenarios
Scenario | HTTP status | Code |
---|---|---|
The format of the supplied NINO field is not valid. |
400 (Bad Request) |
FORMAT_NINO |
The format of the submission ID is not valid. |
400 (Bad Request) |
FORMAT_SUBMISSION_ID |
The specified tax year is not supported. Either the tax year specified is before the minimum tax year value, or it is after the maximum tax year value. |
400 (Bad Request) |
RULE_TAX_YEAR_NOT_SUPPORTED |
A tax year before 2023-24 was supplied. A request with a tax year parameter is only valid for tax years 2023-24 or later. |
400 (Bad Request) |
INVALID_TAX_YEAR_PARAMETER |
The client or agent is not authorised. This is because: the client is not subscribed to MTD, the agent is not subscribed to Agent Services, or the client has not authorised the agent to act on their behalf. |
403 (Forbidden) |
CLIENT_OR_AGENT_NOT_AUTHORISED |
The remote endpoint has indicated that no data can be found for the given period. |
404 (Not Found) |
MATCHING_RESOURCE_NOT_FOUND |
For error scenarios that are common across all APIs, and for error formats, see our reference guide.
Test data
Scenario simulations using Gov-Test-Scenario headers is only available in the sandbox environment.
Header Value (Gov-Test-Scenario) | Scenario |
---|---|
N/A - DEFAULT |
Simulate successfully deleting CIS deductions. |
NOT_FOUND |
Simulate the scenario where the CIS deduction was not found. |
Close Section