Skip to content
Developer home

Additional features coming with end of Brexit transitional period to the Accounting API

  Less than to read

Additional API features to support Brexit changes

To ensure the correct rules are applied when integrating with the API, we will need to identify where a UK business is located in Northern Ireland and where a business operating out of an EU country has a contact in the UK located in Northern Ireland.

To identify a business in Northern Ireland, Sage Accounting uses the business post code to identify a UK business located in Northern Ireland. This means that it is especially important that the correct postal code is used for Northern Irish businesses.

To identify a contact in Northern Ireland Sage Accounting uses the contacts main address post code to identify a UK contact is located in Northern Ireland. Again, this means that it is especially important that the correct postal code is used for Northern Irish customers and suppliers.

Users need to be aware of the implications of setting the correct Post Code to ensure the correct tax treatment is applied and also changing a post code from/to a Northern Ireland post code.

ni_based flag for businesses and contacts

To determine if a business is located in Northern Ireland:

Perform a GET request on the business endpoint passing the business id and read the ni_based attribute

e.g. GET /businesses/<business-id>

{
  "created_at": "2020-11-13T11:42:37Z",
  "updated_at": "2020-11-13T11:42:37Z",
  "displayed_as": "string",
  "id": "string",
  "name": "string",
  ...
  "ni_based": true,
  ...
}
To determine if a single contact is located in Northern Ireland:

Perform a GET request on the contact endpoint, passing the ID of the contact in question and the attribute ni_based as a query parameter

e.g. GET /contacts/<contact-id>?attributes=ni_based

{
  "id": "string",
  "displayed_as": "string",
  "$path": "string",
  "created_at": "2020-11-13T11:43:49Z",
  "updated_at": "2020-11-13T11:43:49Z",
  ...
  "ni_based": true,
  ...
}
To return the ni_based attribute for all contacts

Perform an index using a GET request on the contacts endpoint, passing attributes=ni_based as a query parameter

e.g. GET /contacts?attributes=ni_based

{
  "$total": 57,
  "$page": 1,
  "$next": "/contacts?page=2&items_per_page=20&attributes=ni_based",
  "$back": null,
  "$itemsPerPage": 20,
  "$items": [
    {
      "id": "3ada9ecabcdb11e695ab0ed51759bcc7",
      "displayed_as": "test",
      "$path": "/contacts/3ada9eca94ab11e695ab0ed51759bcc7",
      "ni_based": false
    },
    {
      "id": "1e486134aaaf11eabcdb0ed51759bcc7",
      "displayed_as": "new vend",
      "$path": "/contacts/1e486134aaaf11e695ab0ed51759bcc7",
      "ni_based": false
    },
    ...
}

Contact Tax treatments

The tax_treatments attribute explains which tax treatment should be applied for a contact. From January an additional parameter will be available to pass when performing a GET request on a contact record; context_date. This date will be the transaction date you need to return the tax_treatment for.

The parameter context_date allows you to return the correct tax treatment for a contact on a particular date, as it is possible that contact’s tax_treatment will change pre and post Brexit depending on where they are located along with the business’ location.

To obtain the correct tax treatment for a contact

Perform a GET request on the contact endpoint, passing the ID of the contact in question and pass the context_date for the transaction.

e.g. GET /contacts/<contact-id>?context_date=2021-01-01

{
  "id": "string",
  "displayed_as": "string",
  "$path": "string",
  "created_at": "2020-11-13T11:41:37Z",
  "updated_at": "2020-11-13T11:41:37Z",
  ...
  “tax_treatment”:
    {
      “home_tax”: true,
      “eu_tax_registered”: false,
      “eu_not_tax_registered”: false,
      “rest_of_world_tax”: false,
      “is_importer”: false
    },
    ...
}

We will provide more detail on additional changes in the coming weeks

Back to main article