This version is in beta - expect some breaking changes.

Individual Losses (MTD) API

Dates and amounts
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

From 30 November 2021 v1.0 will no longer be available.

This API allows taxpayers to provide financial data for their Brought Forward Losses and Loss Claims.

For Brought forward losses a developer can:

  • provide a list of brought forward losses
  • create a new brought forward loss
  • show a single brought forward loss
  • delete an existing brought forward loss
  • update an existing brought forward loss

For Loss claims a developer can:

  • provide a list of loss claims
  • create a loss claim against an income source for a specific tax year
  • show the detail of an existing loss claim
  • delete a previously entered loss claim
  • update a previously entered loss claim

For information on how to connect to this API see the Income Tax MTD end-to-end service guide.

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

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.

Skip to main content

Endpoints

Brought Forward Losses

These resources allow software packages to provide a taxpayers' financial data for their brought forward losses. Here the developer can:

  • provide a list of brought forward losses
  • create a new brought forward loss to submit against Self-employment, Self-employment class 4, UK FHL property and UK other (Non-FHL) property
  • show a single brought forward loss
  • delete an existing brought forward loss
  • update an existing brought forward loss

Brought Forward Losses resources

/individuals/losses/{nino}/brought-forward-losses

List Brought Forward Losses
GET

From 30 November 2021 v1.0 will no longer be available. This endpoint allows users to retrieve a list of all brought forward losses which they have incurred before joining MTD.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the read:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

Query parameters

Query parameters table
Name Description
taxYear
string
optional

The tax year the data applies to, for example, 2018-19. The start year and end year must not span two tax years. No gaps are allowed, for example, 2018-20 is not valid. The minimum tax year is 2018-19.

For example: 2018-19

typeOfLoss
string
optional

The type of business the loss applies to. Limited to the following possible values:

  • self-employment
  • uk-property-fhl
  • uk-property-non-fhl

selfEmploymentId
string
optional

Unique identifier of the income source the claim relates to. Must conform to the regular expression

  • ^X[A-Z0-9]{1}IS[0-9]{11}$

For example: XGIS00000001319

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the read:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 200 (OK)

{
  "losses": [
    {
      "id": "000000123456789",
      "links": [
        {
          "href": "/individuals/losses/TC663795B/brought-forward-losses/000000123456789",
          "rel": "self",
          "method": "GET"
        }
      ]
    },
    {
      "id": "000000123456790",
      "links": [
        {
          "href": "/individuals/losses/TC663795B/brought-forward-losses/000000123456790",
          "rel": "self",
          "method": "GET"
        }
      ]
    }
  ],
  "links": [
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses",
      "rel": "create-brought-forward-loss",
      "method": "POST"
    },
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses",
      "rel": "self",
      "method": "GET"
    }
  ]
}

Response table
Name Description
losses
array
required

Array of losses

id
string
required

The unique identifier of the loss

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: 000000123456789

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: /individuals/losses/{nino}/brought-forward-losses/{lossId}

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

Limited to the following possible values:

self
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
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: /individuals/losses/{nino}/brought-forward-losses

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

Limited to the following possible values:

self
create-brought-forward-loss
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
POST

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the supplied tax year field is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported. That is, the tax year specified is before the minimum tax year value.

400 (Bad Request)

RULE_TAX_YEAR_NOT_SUPPORTED

Tax year range invalid. A tax year range of one year is required.

400 (Bad Request)

RULE_TAX_YEAR_RANGE_INVALID

A self-employment ID can only be supplied for a self-employment business type.

400 (Bad Request)

RULE_SELF_EMPLOYMENT_ID

The format of the loss type is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the self-employment ID is not valid.

400 (Bad Request)

FORMAT_SELF_EMPLOYMENT_ID

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 NINO.

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 list containing 4 losses.

SELF_EMPLOYMENT

Simulate list containing two self-employment losses.

UK_PROPERTY_FHL

Simulate list containing single UK FHL property loss.

UK_PROPERTY_NON_FHL

Simulate list containing single UK Non-FHL property loss.

NOT_FOUND

Simulates the scenario where no data is found.


Close Section
/individuals/losses/{nino}/brought-forward-losses

Create a Brought Forward Loss
POST

From 30 November 2021 v1.0 will no longer be available. This endpoint allows users to create a new brought forward loss which can be submitted against Self-employment, Self-employment class 4, UK FHL property and UK other (Non-FHL) property for the tax year prior to joining MTD.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the write:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the write:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Request

Scenario: Self-employment Class 4 loss

{
  "typeOfLoss": "self-employment-class4",
  "selfEmploymentId": "XGIS00000001319",
  "lossAmount": 12345.67,
  "taxYear": "2018-19"
}

Scenario: UK FHL Property loss

{
  "typeOfLoss": "uk-property-fhl",
  "lossAmount": 12345.67,
  "taxYear": "2018-19"
}

Request table
Name Description
typeOfLoss
string
required

The type of business the loss applies to.

Limited to the following possible values:

self-employment
self-employment-class4
uk-property-fhl
uk-property-non-fhl
selfEmploymentId
string
optional

An identifier for the self-employment business, unique to the customer.

Must conform to the regular expression ^X[A-Z0-9]{1}IS[0-9]{11}$

For example: XGIS00000001319

lossAmount
number
required

Brought Forward Loss amount related to UK property or self-employment business. The value must be between 0 and 99999999999.99 up to 2 decimal places.

For example: 12345.67

taxYear
string
required

The tax year the data applies to, for example, 2018-19. The start year and end year must not span two tax years. No gaps are allowed, for example, 2018-20 is not valid. The minimum tax year is 2018-19.

For example: 2018-19

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 201 (Created)

{
  "id": "1234568790ABCDE",
  "links": [
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "self",
      "method": "GET"
    },
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "delete-brought-forward-loss",
      "method": "DELETE"
    },
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE/change-loss-amount",
      "rel": "amend-brought-forward-loss",
      "method": "POST"
    }
  ]
}

Response table
Name Description
id
string
required

The unique identifier of the loss

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: 1234568790ABCDE

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: /individuals/losses/{nino}/brought-forward-losses/{lossId}

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

Limited to the following possible values:

self
amend-brought-forward-loss
delete-brought-forward-loss
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
POST
DELETE

Error scenarios

Error scenarios table
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 format of the supplied tax year field is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported. That is, the tax year specified is before the minimum tax year value.

400 (Bad Request)

RULE_TAX_YEAR_NOT_SUPPORTED

Tax year range invalid. A tax year range of one year is required.

400 (Bad Request)

RULE_TAX_YEAR_RANGE_INVALID

A brought forward loss is entered before the end of the tax year in which it was generated.

400 (Bad Request)

RULE_TAX_YEAR_NOT_ENDED

The format of the loss type is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the self-employment ID is not valid.

400 (Bad Request)

FORMAT_SELF_EMPLOYMENT_ID

A self-employment ID can only be supplied for a self-employment business type.

400 (Bad Request)

RULE_SELF_EMPLOYMENT_ID

The format of the loss amount is not valid.

400 (Bad Request)

FORMAT_LOSS_AMOUNT

Amounts should be a positive number less than 99999999999.99 with up to 2 decimal places.

400 (Bad Request)

RULE_LOSS_AMOUNT

A brought forward loss already exists for this income source.

403 (Forbidden)

RULE_DUPLICATE_SUBMISSION

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 the given income source could not be found.

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 success scenario

DUPLICATE

Simulates the scenario where a brought forward loss already exists for this income source

NOT_FOUND

Simulates the scenario where no data can be found

TAX_YEAR_NOT_ENDED

Simulates the scenario where a tax year for the current year is supplied


Close Section
/individuals/losses/{nino}/brought-forward-losses/{lossId}

Retrieve a Brought Forward Loss
GET

From 30 November 2021 v1.0 will no longer be available. This endpoint allows a user to retrieve a single brought forward loss.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the read:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

lossId
string
required

A unique identifier for the brought forward loss.

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: 1234568790ABCDE

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the read:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 200 (OK)

Self-employment Class 4 loss

{
  "typeOfLoss": "self-employment-class4",
  "selfEmploymentId": "XGIS00000001319",
  "lossAmount": 12345.67,
  "taxYear": "2018-19",
  "lastModified": "2018-07-13T12:13:48.763Z",
  "links": [
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "self",
      "method": "GET"
    },
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "delete-brought-forward-loss",
      "method": "DELETE"
    },
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE/change-loss-amount",
      "rel": "amend-brought-forward-loss",
      "method": "POST"
    }
  ]
}

UK FHL property loss

{
  "typeOfLoss": "uk-property-fhl",
  "lossAmount": 12345.67,
  "taxYear": "2018-19",
  "lastModified": "2018-07-13T12:13:48.763Z",
  "links": [
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "self",
      "method": "GET"
    },
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "delete-brought-forward-loss",
      "method": "DELETE"
    },
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE/change-loss-amount",
      "rel": "amend-brought-forward-loss",
      "method": "POST"
    }
  ]
}

Response table
Name Description
typeOfLoss
string
required

The type of business the loss applies to.

Limited to the following possible values:

self-employment
self-employment-class4
uk-property-fhl
uk-property-non-fhl
selfEmploymentId
string
optional

An identifier for the self-employment business, unique to the customer.

Must conform to the regular expression ^X[A-Z0-9]{1}IS[0-9]{11}$

For example: XGIS00000001319

lossAmount
number
required

Brought forward loss amount related to UK property or self-employment business. The value must be between 0 and 99999999999.99 up to 2 decimal places.

For example: 12345.67

taxYear
string
required

The tax year the data applies to, for example, 2018-19. The start year and end year must not span two tax years. No gaps are allowed, for example, 2018-20 is not valid. The minimum tax year is 2018-19.

For example: 2018-19

lastModified
string
required

The timestamp when the entry was created or last modified.

Must conform to the regular expression ^2[0-9]{3}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{0,3}|)Z$

For example: 2018-07-13T12:13:48.763Z

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: /individuals/losses/{nino}/brought-forward-losses/{lossId}

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

Limited to the following possible values:

self
amend-brought-forward-loss
delete-brought-forward-loss
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
POST
DELETE

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the loss ID is not valid.

400 (Bad Request)

FORMAT_LOSS_ID

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 loss ID.

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

Simulates a success response with a self-employment loss.

SELF_EMPLOYMENT

Simulates the success response with a self-employment loss.

CLASS_4

Simulates a success response with a self-employment National Insurance Class 4 loss.

UK_PROPERTY_FHL

Simulates a success response with a UK FHL property loss.

UK_PROPERTY_NON_FHL

Simulates a success response with a UK Non-FHL property loss.

NOT_FOUND

Simulates a scenario where no data is found.


Close Section
/individuals/losses/{nino}/brought-forward-losses/{lossId}

Delete a Brought Forward Loss
DELETE

From 30 November 2021 v1.0 will no longer be available. This endpoint allows users to delete an existing brought forward loss. The user should be aware that where a loss has been used as part of a successful crystallisation activity, deletion will be blocked and an error code will be returned. In such a case, the user can amend the loss amount to zero. If the user wants to delete any details, they need to create a new account for that business.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the write:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

lossId
string
required

A unique identifier for the brought forward loss.

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: 1234568790ABCDE

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the write:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 204 (No Content)

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the loss ID is not valid.

400 (Bad Request)

FORMAT_LOSS_ID

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

An existing brought forward loss cannot be deleted after it has been crystallised. The requested resource is locked.

403 (Forbidden)

RULE_DELETE_AFTER_CRYSTALLISATION

The remote endpoint has indicated that no data can be found for the given loss ID.

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 success scenario

DELETE_AFTER_CRYSTALLISATION

Simulates the scenario where the requested resource is locked.

NOT_FOUND

Simulates the scenario where no data is found.


Close Section
/individuals/losses/{nino}/brought-forward-losses/{lossId}/change-loss-amount

Amend a Brought Forward Loss Amount
POST

From 30 November 2021 v1.0 will no longer be available. This endpoint allows users to update an existing brought forward loss amount which they have previously populated.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the write:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

lossId
string
required

A unique identifier for the brought forward loss.

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: 1234568790ABCDE

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the write:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Request

{
  "lossAmount": 12345.67
}

Request table
Name Description
lossAmount
number
required

Brought Forward Loss amount related to UK property or self-employment business. The value must be between 0 and 99999999999.99 up to 2 decimal places.

For example: 12345.67

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 200 (OK)

Self-employment Class 4 loss

{
  "typeOfLoss": "self-employment-class4",
  "selfEmploymentId": "XGIS00000001319",
  "lossAmount": 12345.67,
  "taxYear": "2018-19",
  "lastModified": "2018-07-13T12:13:48.763Z",
  "links": [
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "self",
      "method": "GET"
    }
  ]
}

UK FHL property loss

{
  "typeOfLoss": "uk-property-fhl",
  "lossAmount": 12345.67,
  "taxYear": "2018-19",
  "lastModified": "2018-07-13T12:13:48.763Z",
  "links": [
    {
      "href": "/individuals/losses/TC663795B/brought-forward-losses/1234568790ABCDE",
      "rel": "self",
      "method": "GET"
    }
  ]
}

Response table
Name Description
typeOfLoss
string
required

The type of business the loss applies to.

Limited to the following possible values:

self-employment
self-employment-class4
uk-property-fhl
uk-property-non-fhl
selfEmploymentId
string
optional

An identifier for the self-employment business, unique to the customer.

Must conform to the regular expression ^X[A-Z0-9]{1}IS[0-9]{11}$

For example: XGIS00000001319

lossAmount
number
required

Brought Forward Loss amount related to UK property or self-employment business. The value must be between 0 and 99999999999.99 up to 2 decimal places.

For example: 12345.67

taxYear
string
required

The tax year the data applies to, for example, 2018-19. The start year and end year must not span two tax years. No gaps are allowed, for example, 2018-20 is not valid. The minimum tax year is 2018-19.

For example: 2018-19

lastModified
string
required

The timestamp when the entry was created or last modified.

Must conform to the regular expression ^2[0-9]{3}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{0,3}|)Z$

For example: 2018-07-13T12:13:48.763Z

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: /individuals/losses/{nino}brought-forward-losses/{lossId}

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

Limited to the following possible values:

self
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the loss ID is not valid.

400 (Bad Request)

FORMAT_LOSS_ID

The format of the loss amount is not valid.

400 (Bad Request)

FORMAT_LOSS_AMOUNT

Amounts should be a positive number less than 99999999999.99 with up to 2 decimal places.

400 (Bad Request)

RULE_LOSS_AMOUNT

An empty or non-matching body was submitted.

400 (Bad Request)

RULE_INCORRECT_OR_EMPTY_BODY_SUBMITTED

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 loss amount supplied is the same as the existing stored loss amount.

403 (Forbidden)

RULE_NO_CHANGE

The remote endpoint has indicated that no data can be found for the given loss ID.

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 success scenario for self-employment

SELF_EMPLOYMENT

Simulate success scenario for self-employment

CLASS_4

Simulate success scenario for self-employment class 4

UK_PROPERTY_FHL

Simulate success scenario for a UK FHL property

UK_PROPERTY_NON_FHL

Simulate success scenario for UK Non-FHL property

NOT_FOUND

Simulates the scenario where the loss cannot be found

NO_CHANGE

Simulates the scenario where loss amount supplied is the same as the existing stored loss amount


Close Section

Loss Claims

These resources allow software packages to provide a taxpayers' financial data for their loss claims. Here the developer can:

  • Provide a list of loss claims
  • Create a Loss Claim against an income source for a specific tax year
  • Show the detail of an existing loss claim
  • Delete a previously entered loss claim
  • Update a previously entered loss claim

Loss Claims resources

/individuals/losses/{nino}/loss-claims

List Loss Claims
GET

From 30 November 2021 v1.0 will no longer be available. This endpoint allows the user to retrieve existing loss claims information.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the read:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

Query parameters

Query parameters table
Name Description
taxYear
string
optional

The tax year the data applies to, for example, 2019-20. The start year and end year must not span two tax years. No gaps are allowed, for example, 2019-21 is not valid. The minimum tax year is 2019-20.

For example: 2019-20

typeOfLoss
string
optional

The type of business the loss applies to. Limited to the following possible values:

  • self-employment
  • uk-property-non-fhl

selfEmploymentId
string
optional

Unique identifier of the income source the claim relates to. Must conform to the regular expression

  • ^X[A-Z0-9]{1}IS[0-9]{11}$

For example: XGIS00000001319

claimType
string
optional

[This query parameter is only available in Sandbox]

The type of loss claim. Limited to the following possible values:

  • carry-sideways

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the read:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 200 (OK)

{
    "claims" : [
        {
            "id": "1234568790ABCDE",
            "sequence": 1,
            "typeOfClaim": "carry-sideways",
            "links":[
                {
                    "href":"/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
                    "rel":"self",
                    "method":"GET"
                }
            ]
        },
        {
            "id": "1234568790ABCDF",
            "typeOfClaim": "carry-forward",
            "links":[
                {
                    "href":"/individuals/losses/TC663795B/loss-claims/1234568790ABCDF",
                    "rel":"self",
                    "method":"GET"
                }
            ]
        }
    ],
    "links":[
        {
            "href":"/individuals/losses/TC663795B/loss-claims",
            "rel":"self",
            "method":"GET"
        },
        {
            "href":"/individuals/losses/TC663795B/loss-claims",
            "rel":"create-loss-claim",
            "method":"POST"
        },
        {
            "href":"/individuals/losses/TC663795B/loss-claims/order",
            "rel":"amend-loss-claim-order",
            "method":"PUT"
        }
    ]
}

Response table
Name Description
claims
array
required

Array of loss claims

id
string
required

The unique identifier of the loss claim

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: A2Za0911235813z

sequence
integer
optional

[This field is only available in Sandbox] A number used to order a loss, the value must be between 1 and 99

For example: 12

typeOfClaim
string
required

The type of claim to be applied.

Limited to the following possible values:

carry-forward
carry-sideways
carry-sideways-fhl
carry-forward-to-carry-sideways
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: /individuals/losses/{nino}/loss-claims/{claimId}

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

Limited to the following possible values:

self
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
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: /individuals/losses/{nino}/loss-claims

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

Limited to the following possible values:

self
create-loss-claim
amend-loss-claim-order
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
POST
PUT

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the supplied tax year field is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported. That is, the tax year specified is before the minimum tax year value.

400 (Bad Request)

RULE_TAX_YEAR_NOT_SUPPORTED

Tax year range invalid. A tax year range of one year is required.

400 (Bad Request)

RULE_TAX_YEAR_RANGE_INVALID

A self-employment ID can only be supplied for a self-employment business type.

400 (Bad Request)

RULE_SELF_EMPLOYMENT_ID

The format of the loss type is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the self-employment ID is not valid.

400 (Bad Request)

FORMAT_SELF_EMPLOYMENT_ID

[This error is only available in Sandbox] The format of the supplied claim type is not valid

400 (Bad Request)

FORMAT_CLAIM_TYPE

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 NINO.

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 list containing 4 loss claims

SELF_EMPLOYMENT

Simulate list containing 2 self-employment loss claims

UK_PROPERTY_NON_FHL

Simulate list containing 2 uk-property-non-fhl loss claims

CARRY_SIDEWAYS

Simulate list containing 2 carry-sideways loss claims

NOT_FOUND

Simulate the scenario where no data is found


Close Section
/individuals/losses/{nino}/loss-claims

Create a Loss Claim
POST

From 30 November 2021 v1.0 will no longer be available. This endpoint allows a user to create a Loss Claim against an income source for a specific tax year. Claims cannot be made until after the End of Period Statement.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the write:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the write:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Request

Scenario: Self-employment claim

{
    "typeOfLoss":"self-employment",
    "selfEmploymentId": "XGIS00000001319",
    "typeOfClaim": "carry-forward",
    "taxYear": "2019-20"
}

Scenario: UK Non-FHL Property claim

{
    "typeOfLoss":"uk-property-non-fhl",
    "typeOfClaim": "carry-sideways",
    "taxYear": "2019-20"
}

Request table
Name Description
typeOfLoss
string
required

The type of business the loss applies to.

Limited to the following possible values:

self-employment
uk-property-non-fhl
selfEmploymentId
string
optional

An identifier for the self-employment business, unique to the customer.

Must conform to the regular expression ^X[A-Z0-9]{1}IS[0-9]{11}$

For example: XGIS00000001319

typeOfClaim
string
required

The type of claim to be applied. Permitted values for "self-employment": carry-forward, carry-sideways Permitted values for "uk-property-non-fhl" and "foreign-property": carry-sideways, carry-sideways-fhl, carry-forward-to-carry-sideways

Limited to the following possible values:

carry-forward
carry-sideways
carry-sideways-fhl
carry-forward-to-carry-sideways
taxYear
string
required

The tax year the data applies to, for example, 2019-20. The start year and end year must not span two tax years. No gaps are allowed, for example, 2019-21 is not valid. The minimum tax year is 2019-20.

For example: 2019-20

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 201 (Created)

{
    "id": "1234568790ABCDE",
    "links":[
        {
            "href":"/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel":"self",
            "method":"GET"
        },
        {
            "href":"/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel":"delete-loss-claim",
            "method":"DELETE"
        },
        {
            "href":"/individuals/losses/TC663795B/loss-claims/1234568790ABCDE/change-type-of-claim",
            "rel":"amend-loss-claim",
            "method":"POST"
        }
    ]
}

Response table
Name Description
id
string
required

The unique identifier of the loss claim

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: 1234568790ABCDE

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: /individuals/losses/{nino}/loss-claims/{claimId}

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

Limited to the following possible values:

self
amend-loss-claim
delete-loss-claim
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
POST
DELETE

Error scenarios

Error scenarios table
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 format of the loss type is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the self-employment ID is not valid.

400 (Bad Request)

FORMAT_SELF_EMPLOYMENT_ID

A self-employment ID can only be supplied for a self-employment business type.

400 (Bad Request)

RULE_SELF_EMPLOYMENT_ID

The format of the type of claim is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_CLAIM

The type of claim supplied is not valid.

400 (Bad Request)

RULE_TYPE_OF_CLAIM_INVALID

The format of the supplied tax year field is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported. That is, the tax year specified is before the minimum tax year value.

400 (Bad Request)

RULE_TAX_YEAR_NOT_SUPPORTED

Tax year range invalid. A tax year range of one year is required.

400 (Bad Request)

RULE_TAX_YEAR_RANGE_INVALID

The loss claim has been made too soon.

403 (Forbidden)

RULE_PERIOD_NOT_ENDED

The type of claim is the same as a previous submission.

403 (Forbidden)

RULE_DUPLICATE_SUBMISSION

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

There is no accounting period for the year of the claim.

403 (Forbidden)

RULE_NO_ACCOUNTING_PERIOD

The remote endpoint has indicated that the given income source could not be found.

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 success scenario

DUPLICATE

Simulates the scenario where a claim of the same type has already been made for this income source

NOT_FOUND

Simulates the scenario where the given income source could not be found

PERIOD_NOT_ENDED

Simulates the scenario where the remote endpoint has indicated that the relevant accounting period has not yet ended

NO_ACCOUNTING_PERIOD

Simulates the scenario where there is no accounting period for the year of the claim


Close Section
/individuals/losses/{nino}/loss-claims/{claimId}

Retrieve a Loss Claim
GET

From 30 November 2021 v1.0 will no longer be available. This endpoint allows the user to retrieve the detail of an existing loss claim.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the read:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

claimId
string
required

A unique identifier for the loss claim.

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: AAZZ0123456789a

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the read:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 200 (OK)

Self-employment claim

{
    "typeOfLoss":"self-employment",
    "selfEmploymentId": "XGIS00000001319",
    "typeOfClaim": "carry-forward",
    "taxYear": "2019-20",
    "lastModified" : "2020-07-11T12:13:48.763Z",
    "links": [
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel": "self",
            "method": "GET"
        },
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel": "delete-loss-claim",
            "method": "DELETE"
        },
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE/change-type-of-claim",
            "rel": "amend-loss-claim",
            "method": "POST"
        }
    ]
}

UK Non-FHL property claim

{
    "typeOfLoss":"uk-property-non-fhl",
    "typeOfClaim": "carry-sideways",
    "taxYear": "2019-20",
    "lastModified" : "2020-07-11T12:15:34.734Z",
    "links": [
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel": "self",
            "method": "GET"
        },
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel": "delete-loss-claim",
            "method": "DELETE"
        },
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE/change-type-of-claim",
            "rel": "amend-loss-claim",
            "method": "POST"
        }
    ]
}

Response table
Name Description
typeOfLoss
string
required

The type of business the loss applies to.

Limited to the following possible values:

self-employment
uk-property-non-fhl
selfEmploymentId
string
optional

An identifier for the self-employment business, unique to the customer.

Must conform to the regular expression ^X[A-Z0-9]{1}IS[0-9]{11}$

For example: XGIS00000001319

typeOfClaim
string
required

The type of claim to be applied. Permitted values for "self-employment": carry-forward, carry-sideways. Permitted values for "uk-property-non-fhl" and "foreign-property": carry-sideways, carry-sideways-fhl, carry-forward-to-carry-sideways

Limited to the following possible values:

carry-forward
carry-sideways
carry-sideways-fhl
carry-forward-to-carry-sideways
taxYear
string
required

The tax year the data applies to, for example, 2019 to 20. The start year and end year must not span two tax years. No gaps are allowed, for example, 2019 to 21 is not valid. The minimum tax year is 2019 to 20.

For example: 2019-20

lastModified
string
optional

The timestamp when the entry was created or last modified.

Must conform to the regular expression ^2[0-9]{3}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{0,3}|)Z$

For example: 2020-07-11T12:13:48.763Z

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: /individuals/losses/{nino}/loss-claims/{claimId}

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

Limited to the following possible values:

self
amend-loss-claim
delete-loss-claim
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
POST
DELETE

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the supplied claim ID is not valid.

400 (Bad Request)

FORMAT_CLAIM_ID

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 claim ID.

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 successful retrieval of self-employment loss claim with carry-forward

SE_FORWARD

Simulate successful retrieval of self-employment loss claim with carry-forward

SE_SIDEWAYS

Simulate successful retrieval of self-employment loss claim with carry-sideways

NONFHL_FORWARD

Simulate successful retrieval of UK Non-FHL property loss claim with carry-forward

NONFHL_SIDEWAYS

Simulate successful retrieval of UK Non-FHL property loss claim with carry-sideways

NONFHL_SIDEWAYS_FHL

Simulate successful retrieval of UK Non-FHL property loss claim with carry-sideways-fhl

NONFHL_FORWARD_TO_SIDEWAYS

Simulate successful retrieval of UK Non-FHL property loss claim with carry-forward-to-carry-sideways

NOT_FOUND

Simulates the scenario where no data is found.


Close Section
/individuals/losses/{nino}/loss-claims/{claimId}

Delete a Loss Claim
DELETE

From 30 November 2021 v1.0 will no longer be available. This endpoint allows the user to remove a previously entered loss claim.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the write:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

claimId
string
required

A unique identifier for the loss claim.

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: AAZZ0123456789a

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the write:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 204 (No Content)

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the supplied claim ID is not valid.

400 (Bad Request)

FORMAT_CLAIM_ID

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 claim ID.

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 success scenario

NOT_FOUND

Simulates the scenario where no data is found.


Close Section
/individuals/losses/{nino}/loss-claims/{claimId}/change-type-of-claim

Amend a Loss Claim
POST

From 30 November 2021 v1.0 will no longer be available. This endpoint allows the user to change the type of claim for an existing loss claim.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the write:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

claimId
string
required

A unique identifier for the loss claim.

Must conform to the regular expression ^[A-Za-z0-9]{15}$

For example: AAZZ0123456789a

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the write:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Request

{
  "typeOfClaim": "carry-forward"
}

Request table
Name Description
typeOfClaim
string
required

The type of claim to be applied. Permitted values for "self-employment": carry-forward, carry-sideways. Permitted values for "uk-property-non-fhl": carry-sideways, carry-sideways-fhl, carry-forward-to-carry-sideways.

Limited to the following possible values:

carry-forward
carry-sideways
carry-sideways-fhl
carry-forward-to-carry-sideways

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 200 (OK)

Self-employment claim

{
    "typeOfLoss":"self-employment",
    "selfEmploymentId": "XGIS00000001319",
    "typeOfClaim": "carry-forward",
    "taxYear": "2019-20",
    "lastModified" : "2020-07-11T12:13:48.763Z",
    "links": [
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel": "self",
            "method": "GET"
        }
    ]
}

UK Non-FHL property claim

{
    "typeOfLoss":"uk-property-non-fhl",
    "typeOfClaim": "carry-sideways",
    "taxYear": "2019-20",
    "lastModified" : "2020-07-11T12:15:34.734Z",
    "links": [
        {
            "href": "/individuals/losses/TC663795B/loss-claims/1234568790ABCDE",
            "rel": "self",
            "method": "GET"
        }
    ]
}

Response table
Name Description
typeOfLoss
string
required

The type of business the loss applies to.

Limited to the following possible values:

self-employment
uk-property-non-fhl
selfEmploymentId
string
optional

An identifier for the self-employment business, unique to the customer.

Must conform to the regular expression ^X[A-Z0-9]{1}IS[0-9]{11}$

typeOfClaim
string
required

The type of claim to be applied. Permitted values for "self-employment": carry-forward, carry-sideways. Permitted values for "uk-property-non-fhl": carry-sideways, carry-sideways-fhl, carry-forward-to-carry-sideways.

Limited to the following possible values:

carry-forward
carry-sideways
carry-sideways-fhl
carry-forward-to-carry-sideways
taxYear
string
required

The tax year the data applies to, for example, 2019-20. The tax year must not span more than one year for example, 2017-19 is not valid. The minimum tax year is 2019-20.

lastModified
string
required

The timestamp when the entry was created or last modified.

Must conform to the regular expression ^2[0-9]{3}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{0,3}|)Z$

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: /individuals/losses/{nino}/loss-claims/{claimId}

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.

Limited to the following possible values:

self
method
string
required

The HTTP method type for the endpoint.

Limited to the following possible values:

GET

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the supplied claim ID is not valid.

400 (Bad Request)

FORMAT_CLAIM_ID

The format of the type of claim is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_CLAIM

An empty or non-matching body was submitted.

400 (Bad Request)

RULE_INCORRECT_OR_EMPTY_BODY_SUBMITTED

The remote endpoint has indicated that the requested type of claim is already active.

403 (Forbidden)

RULE_ALREADY_EXISTS

The type of claim supplied is not valid.

403 (Forbidden)

RULE_TYPE_OF_CLAIM_INVALID

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 claim ID.

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 success scenario.

SE_FORWARD

Simulate success scenario for self-employment loss claim with carry-forward.

SE_SIDEWAYS

Simulate success scenario for self-employment loss claim with carry-sideways.

NONFHL_FORWARD

Simulate success scenario for UK Non-FHL property loss claim with carry-forward.

NONFHL_SIDEWAYS

Simulate success scenario for UK Non-FHL property loss claim with carry-sideways.

NONFHL_SIDEWAYS_FHL

Simulate success scenario for UK Non-FHL property loss claim with carry-sideways-fhl.

NONFHL_FORWARD_TO_SIDEWAYS

Simulate success scenario for UK Non-FHL property loss claim with carry-forward-to-carry-sideways.

NOT_FOUND

Simulates the scenario where no data is found.

ALREADY_EXISTS

Simulates the scenario where the back end detects that the requested type of claim is already active.

INVALID_CLAIM_TYPE

Simulates the scenario where the type of claim selected is not valid for the type of loss.


Close Section
/individuals/losses/{nino}/loss-claims/order

Amend Loss Claims Order
PUT

From 30 November 2021 v1.0 will no longer be available. This endpoint allows the developer to change the sequence in which certain losses are used.

Authorisation

This endpoint is user-restricted and requires an Authorization header containing an OAuth 2.0 Bearer Token with the write:self-assessment scope.

Path parameters

Path parameters table
Name Description
nino
string
required

National Insurance number, in the format AA999999A.

For example: TC663795B

Query parameters

Query parameters table
Name Description
taxYear
string
optional

The tax year the data applies to, for example, 2019-20. The start year and end year must not span two tax years. No gaps are allowed, for example, 2019-21 is not valid. The minimum tax year is 2019-20.

For example: 2019-20

Request headers

Request headers Table
Name Description
Accept
required

Specifies the response format and the version of the API to be used.

For example: application/vnd.hmrc.1.0+json
Content-Type
required

Specifies the format of the request body, which must be JSON.

For example: application/json
Gov-Test-Scenario
optional

Only in sandbox environment. See Test Data table for all header values.

For example: -
Authorization
required
An OAuth 2.0 Bearer Token with the write:self-assessment scope.

For example: Bearer bb7fed3fe10dd235a2ccda3d50fb

See also fraud prevention.

Request

{
  "claimType": "carry-sideways",
  "listOfLossClaims": [
    {
      "id": "1234567890ABCDE",
      "sequence":2
    },
    {
      "id": "1234567890ABDE0",
      "sequence":3
    },
    {
      "id": "1234567890ABEF1",
      "sequence":1
    }
  ]
}

Request table
Name Description
claimType
string
required

The type of loss claims whose order is to be amended.

Limited to the following possible values:

carry-sideways
listOfLossClaims
array
required

A list of the claims to be amended - all of the claims for a given type and tax year must be included in the submission.

id
string
required

The unique identifier for the loss claim must conform to the regular expression: ^[A-Za-z0-9]{15}$

For example: 1234568790ABCDE

sequence
integer
required

The order number in which this loss claim is to be used it must be an integer from the range 1 to 99. The sequence can have no gaps and must begin with 1.

For example: 1

Response headers

Response headers Table
Name Description
X-CorrelationId
required

Unique ID for operation tracking
String, 36 characters.

For example: c75f40a6-a3df-4429-a697-471eeec46435

See also fraud prevention.

Response

HTTP status: 200 (OK)

{
  "links":[
    {
      "href":"/individuals/losses/TC663795B/loss-claims",
      "rel":"self",
      "method":"GET"
    },
    {
      "href":"/individuals/losses/TC663795B/loss-claims/order",
      "rel":"amend-loss-claim-order",
      "method":"PUT"
    }
  ]
}

Response table
Name Description
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: /individuals/losses/{nino}/loss-claims

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

Limited to the following possible values:

self
amend-loss-claim-order
method
string
required

The HTTP method type for the endpoint

Limited to the following possible values:

GET
PUT

Error scenarios

Error scenarios table
Scenario HTTP status Code

The format of the supplied NINO field is not valid.

400 (Bad Request)

FORMAT_NINO

The format of the supplied tax year field is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The format of the supplied claim ID is not valid.

400 (Bad Request)

FORMAT_CLAIM_ID

The format of the supplied claim type is not valid

400 (Bad Request)

FORMAT_CLAIM_TYPE

The format of the supplied sequence number is not valid.

400 (Bad Request)

FORMAT_SEQUENCE

The sequence does not begin with 1.

400 (Bad Request)

RULE_INVALID_SEQUENCE_START

The sequence is not continuous.

400 (Bad Request)

RULE_SEQUENCE_ORDER_BROKEN

Not all of the loss claims of this type for this tax year were included in the submission.

400 (Bad Request)

RULE_LOSS_CLAIMS_MISSING

An empty or non-matching body was submitted.

400 (Bad Request)

RULE_INCORRECT_OR_EMPTY_BODY_SUBMITTED

The specified tax year is not supported. That is, the tax year specified is before the minimum tax year value.

400 (Bad Request)

RULE_TAX_YEAR_NOT_SUPPORTED

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 claim ID.

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 list containing 1 loss claim

LOSS_CLAIMS_MISSING

Simulate the scenario where one or more loss claim is missing

NOT_FOUND

Simulate the scenario where no data is found


Close Section

Skip to main content