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

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 submitted against Self-employment, Self-employment Class 4, UK Furnished Holiday Let (FHL) property, UK other (Non-FHL) property, Foreign property FHL in the European Economic Area (EEA) and Foreign property for the tax year prior to joining MTD
  • 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

This endpoint allows a developer to retrieve a list of all brought forward losses that have incurred before joining MTD. A National Insurance number is required.

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
  • foreign-property-fhl-eea
  • foreign-property

businessId
string
optional

The 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.2.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 is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported, 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 format of the supplied Type of loss is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the supplied Business ID is not valid.

400 (Bad Request)

FORMAT_BUSINESS_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

Matching resource not 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

Simulates a list containing 4 losses.

SELF_EMPLOYMENT

Simulates a list containing two self-employment losses.

UK_PROPERTY_FHL

Simulates a list containing a single UK FHL property loss.

UK_PROPERTY_NON_FHL

Simulates a list containing a single UK Non-FHL property loss.

FOREIGN_PROPERTY

Simulates a list containing a single Foreign Property Loss

FOREIGN_PROPERTY_FHL_EEA

Simulates a list containing a single Foreign-Property-FHL-EEA 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

This endpoint allows the developer to create a new brought forward loss which can be submitted against self-employment, self-employment class 4, UK Furnished Holiday Let (FHL) property, UK other (Non-FHL) property, foreign property FHL in the European Economic Area (EEA) and foreign 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.2.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 example

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

Scenario: UK Property example

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

Scenario: Foreign Property example

{
  "typeOfLoss": "foreign-property",
  "businessId": "XGIS00000001319",
  "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
foreign-property-fhl-eea
foreign-property
businessId
string
optional

A unique identifier for the business. Must be supplied for any Self-employment or Foreign Property typeOfLoss. Must not be supplied for either UK Property typeOfLoss.

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 the type of loss, specified. 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 is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported, 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 supplied Type of loss is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the supplied Business ID is not valid.

400 (Bad Request)

FORMAT_BUSINESS_ID

The format of the supplied Loss amount field is not valid.

400 (Bad Request)

FORMAT_LOSS_AMOUNT

A Business ID must be supplied for a self-employment or a foreign property business type.

400 (Bad Request)

RULE_BUSINESS_ID

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

Matching resource not 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

This endpoint allows the developer to retrieve an existing brought forward loss amount. A National Insurance number and Loss ID are required.

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.2.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",
  "businessId": "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"
    }
  ]
}

Foreign property FHL EEA property loss

{
  "taxYear": "2019-20",
  "typeOfLoss": "foreign-property-fhl-eea",
  "businessId": "XAIS12345678910",
  "lossAmount": 100.00,
  "lastModified": "2020-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
foreign-property-fhl-eea
foreign-property
businessId
string
optional

An identifier for the business, unique to the customer.

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

For example: XAIS12345678910

lossAmount
number
required

Brought forward loss amount related to the type of loss, specified. 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 supplied 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

Matching resource not 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

Simulates a success response with a self-employment loss.

SELF_EMPLOYMENT

Simulates a 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.

FOREIGN_PROPERTY

Simulates a success response with a Foreign property loss.

FOREIGN_PROPERTY_FHL_EEA_LOSS

Simulates a success response with a Foreign property FHL EEA 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

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

Matching resource not 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

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

This endpoint allows the developer to update an existing brought forward loss amount. A National Insurance number and Loss ID are required.

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.2.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 a 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",
  "businessId": "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"
    }
  ]
}

UK Foreign property loss

{
  "taxYear": "2018-19",
  "businessId": "XGIS00000001319",
  "typeOfLoss": "foreign-property",
  "lossAmount": 12345.67,
  "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
foreign-property
foreign-property-fhl-eea
businessId
string
optional

An identifier for the business, unique to the customer.

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

For example: XAIS12345678910

lossAmount
number
required

Brought Forward Loss amount related to the type of loss, specified. 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 supplied Loss ID is not valid.

400 (Bad Request)

FORMAT_LOSS_ID

The format of the supplied Loss amount field 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

Matching resource not 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.

Simulates a success response with a self-employment National Insurance Class 4
Header Value (Gov-Test-Scenario) Scenario

N/A - DEFAULT

Simulates a success response with a self-employment loss.

SELF_EMPLOYMENT

Simulates a 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 scenario with UK Non-FHL property loss.

FOREIGN_PROPERTY

Simulates a success response with a Foreign property loss.

FOREIGN_PROPERTY_FHL_EEA

Simulates a success response with a Foreign property FHL EEA loss.

NOT_FOUND

Simulates a scenario where no data is 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

This endpoint allows a developer to retrieve existing loss claims information. A National Insurance number is required.

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
  • foreign-property

businessId
string
optional

The 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.2.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

An array of loss claim objects. An empty array is not returned, if no loss claims exist for the supplied NINO, a MATCHING_RESOURCE_NOT_FOUND error is returned.

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. A self employment or a foreign property loss claim can only be of type carry-forward or carry-sideways.

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 is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported, 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 Business ID must be supplied for a self-employment or a foreign property business type.

400 (Bad Request)

RULE_BUSINESS_ID

The format of the supplied Type of loss is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the supplied Business ID is not valid.

400 (Bad Request)

FORMAT_BUSINESS_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

Matching resource not 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

Simulates a list containing 4 loss claims.

SELF_EMPLOYMENT

Simulates a list containing 2 self-employment loss claims.

UK_PROPERTY_NON_FHL

Simulates a list containing 2 uk-property-non-fhl loss claims.

FOREIGN_PROPERTY

Simulates a list containing 2 foreign-property loss claims.

CARRY_SIDEWAYS

Simulates a list containing 2 carry-sideways loss claims.

NOT_FOUND

Simulates the scenario where no data is found.


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

Create a Loss Claim
POST

This endpoint allows a developer 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. A National Insurance number is required.

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.2.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",
    "businessId": "XGIS00000001319",
    "typeOfClaim": "carry-forward",
    "taxYear": "2019-20"
}

Scenario: UK Non-FHL Property claim

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

Scenario: Foreign Property claim

{
    "typeOfLoss": "foreign-property",
    "businessId": "X2IS12356589871",
    "typeOfClaim": "carry-forward",
    "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
foreign-property
businessId
string
optional

The unique identifier of the income source the claim relates to. Must be supplied for self-employment or foreign-property typeOfLoss. Must not be supplied for uk-property-non-fhl typeOfLoss.

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

ID reference to the newly created 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 supplied Type of loss is not valid.

400 (Bad Request)

FORMAT_TYPE_OF_LOSS

The format of the supplied Business ID is not valid.

400 (Bad Request)

FORMAT_BUSINESS_ID

A Business ID must be supplied for a self-employment or a foreign property business type.

400 (Bad Request)

RULE_BUSINESS_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 is not valid.

400 (Bad Request)

FORMAT_TAX_YEAR

The specified tax year is not supported, 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 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

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

403 (Forbidden)

RULE_NO_ACCOUNTING_PERIOD

Matching resource not 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

Simulates a 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 loss claim has been made too soon

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

This endpoint allows a developer to retrieve the detail of an existing loss claim. A National Insurance number and Claim ID is required.

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.2.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",
    "businessId": "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"
        }
    ]
}

Foreign property claim

{
    "typeOfLoss":"foreign-property",
    "businessId": "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"
        }
    ]
}

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
foreign-property
businessId
string
optional

The unique identifier of the income source the claim relates to. Must be provided for self-employment and foreign-property businesses.

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
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: 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

Matching resource not 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

Simulates the successful retrieval of self-employment loss claim with carry-forward.

SE_FORWARD

Simulates the successful retrieval of self-employment loss claim with carry-forward.

SE_SIDEWAYS

Simulates the successful retrieval of self-employment loss claim with carry-sideways.

FP_FORWARD

Simulates the successful retrieval of foreign-property loss claim with carry-forward.

FP_SIDEWAYS

Simulates the successful retrieval of foreign-property loss claim with carry-sideways.

NONFHL_FORWARD

Simulates the successful retrieval of UK Non-FHL property loss claim with carry-forward.

NONFHL_SIDEWAYS

Simulates the successful retrieval of UK Non-FHL property loss claim with carry-sideways.

NONFHL_SIDEWAYS_FHL

Simulates the successful retrieval of UK Non-FHL property loss claim with carry-sideways-fhl.

NONFHL_FORWARD_TO_SIDEWAYS

Simulates the 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

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

This endpoint allows a developer to change the type of claim for an existing loss claim. A National Insurance Number and Claim ID are required.

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.2.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" 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

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",
    "businessId": "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"
        }
    ]
}

Foreign-property claim

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

Response table
Name Description
taxYear
string
required

The tax year the data applies to, for example 2019 to 2020. The start year and end year must not span two tax years. Gaps are not allowed, for example 2018 to 2020 is not valid. The minimum tax year is 2019 to 2020.

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
businessId
string
optional

The unique identifier of the income source the claim relates to. Must be provided for self-employment and foreign-property businesses.

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

typeOfLoss
string
required

The type of business the loss applies to.

Limited to the following possible values:

self-employment
uk-property-non-fhl
foreign-property
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

Matching resource not 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

Simulates a success scenario.

SE_FORWARD

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

SE_SIDEWAYS

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

NONFHL_FORWARD

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

NONFHL_SIDEWAYS

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

NONFHL_SIDEWAYS_FHL

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

NONFHL_FORWARD_TO_SIDEWAYS

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

FP_FORWARD

Simulates a success scenario for foreign-property loss claim with carry-forward.

FP_SIDEWAYS

Simulates a success scenario for foreign-property loss claim with 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

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.2.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 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, 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