GET

Description

Retrieves a list of tax reductions or a single tax reduction.

URL structure

https://api.fortnox.se/3/taxreductions/{Id}

Method

GET

Version

3

Response

The tax reductions register can return a list of records or a single record. By specifying a Id in the URL, a single record will be returned. Not specifying a Id will return a list of records.

<?xml version="1.0" encoding="UTF-8"?>
<TaxReductions TotalResources="3" TotalPages="1" CurrentPage="1">
  <TaxReductionSubset url="https://api.fortnox.se/3/taxreductions/1">
    <ApprovedAmount></ApprovedAmount>
    <CustomerName>Stefan Andersson</CustomerName>
    <Id>1</Id>
    <ReferenceDocumentType>INVOICE</ReferenceDocumentType>
    <ReferenceNumber>8</ReferenceNumber>
    <SocialSecurityNumber>19810812-1172</SocialSecurityNumber>
  </TaxReductionSubset>

  [...]

  <TaxReductionSubset url="https://api.fortnox.se/3/taxreductions/3">
    <ApprovedAmount></ApprovedAmount>
    <CustomerName>Stefan Andersson</CustomerName>
    <Id>3</Id>
    <ReferenceDocumentType>INVOICE</ReferenceDocumentType>
    <ReferenceNumber>10</ReferenceNumber>
    <SocialSecurityNumber>19810812-1172</SocialSecurityNumber>
  </TaxReductionSubset>
</TaxReductions>
<?xml version="1.0" encoding="UTF-8"?>
<TaxReduction url="https://api.fortnox.se/3/taxreductions/1">
  <ApprovedAmount></ApprovedAmount>
  <AskedAmount>8062</AskedAmount>
  <BilledAmount>16125</BilledAmount>
  <CustomerName>Stefan Andersson</CustomerName>
  <Id>1</Id>
  <PropertyDesignation></PropertyDesignation>
  <ReferenceDocumentType>INVOICE</ReferenceDocumentType>
  <ReferenceNumber>8</ReferenceNumber>
  <RequestSent></RequestSent>
  <ResidenceAssociationOrganisationNumber></ResidenceAssociationOrganisationNumber>
  <SocialSecurityNumber>19810812-1172</SocialSecurityNumber>
  <TypeOfReduction>RUT</TypeOfReduction>
  <VoucherNumber></VoucherNumber>
  <VoucherSeries></VoucherSeries>
  <VoucherYear></VoucherYear>
</TaxReduction>
{
  "MetaInformation": {
    "@TotalResources": 3,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "TaxReductions": [
    {
      "@url": "https://api.fortnox.se/3/taxreductions/1",
      "ApprovedAmount": null,
      "CustomerName": "Stefan Andersson",
      "Id": 1,
      "ReferenceDocumentType": "INVOICE",
      "ReferenceNumber": 8,
      "SocialSecurityNumber": "19810812-1172"
    },

    [...]

    {
      "@url": "https://api.fortnox.se/3/taxreductions/3",
      "ApprovedAmount": null,
      "CustomerName": "Stefan Andersson",
      "Id": 3,
      "ReferenceDocumentType": "INVOICE",
      "ReferenceNumber": 10,
      "SocialSecurityNumber": "19810812-1172"
    }
  ]
}
{
  "TaxReduction": {
    "@url": "https://api.fortnox.se/3/taxreductions/1",
    "ApprovedAmount": null,
    "AskedAmount": 8062,
    "BilledAmount": 16125,
    "CustomerName": "Stefan Andersson",
    "Id": 1,
    "PropertyDesignation": null,
    "ReferenceDocumentType": "INVOICE",
    "ReferenceNumber": 8,
    "RequestSent": null,
    "ResidenceAssociationOrganisationNumber": null,
    "SocialSecurityNumber": "19810812-1172",
    "TypeOfReduction": "RUT",
    "VoucherNumber": null,
    "VoucherSeries": null,
    "VoucherYear": null
  }
}

POST

Description

Creates a tax reduction.

URL structure

https://api.fortnox.se/3/taxreductions

Method

POST

Version

3

Request

The request body should contain a structure of a tax reduction, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TaxReduction>
  <AskedAmount>2000</AskedAmount>
  <CustomerName>Stefan Andersson</CustomerName>
  <ReferenceDocumentType>INVOICE</ReferenceDocumentType>
  <ReferenceNumber>10</ReferenceNumber>
  <SocialSecurityNumber>810812-1172</SocialSecurityNumber>
</TaxReduction>
{
  "TaxReduction": {
    "AskedAmount": 2000,
    "CustomerName": "Stefan Andersson",
    "ReferenceDocumentType": "INVOICE",
    "ReferenceNumber": 10,
    "SocialSecurityNumber": "810812-1172"
  }
}

Response

The response should contain the created tax reduction, in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TaxReduction url="https://api.fortnox.se/3/taxreductions/10">
  <ApprovedAmount></ApprovedAmount>
  <AskedAmount>2000</AskedAmount>
  <BilledAmount>8368</BilledAmount>
  <CustomerName>Stefan Andersson</CustomerName>
  <Id>10</Id>
  <PropertyDesignation></PropertyDesignation>
  <ReferenceDocumentType>INVOICE</ReferenceDocumentType>
  <ReferenceNumber>10</ReferenceNumber>
  <RequestSent></RequestSent>
  <ResidenceAssociationOrganisationNumber></ResidenceAssociationOrganisationNumber>
  <SocialSecurityNumber>19810812-1172</SocialSecurityNumber>
  <TypeOfReduction>RUT</TypeOfReduction>
  <VoucherNumber></VoucherNumber>
  <VoucherSeries></VoucherSeries>
  <VoucherYear></VoucherYear>
</TaxReduction>
{
  "TaxReduction": {
    "@url": "https://api.fortnox.se/3/taxreductions/10",
    "ApprovedAmount": null,
    "AskedAmount": 2000,
    "BilledAmount": 8368,
    "CustomerName": "Stefan",
    "Id": 10,
    "PropertyDesignation": null,
    "ReferenceDocumentType": "INVOICE",
    "ReferenceNumber": 10,
    "RequestSent": null,
    "ResidenceAssociationOrganisationNumber": null,
    "SocialSecurityNumber": "19810812-1172",
    "TypeOfReduction": "RUT",
    "VoucherNumber": null,
    "VoucherSeries": null,
    "VoucherYear": null
  }
}

PUT

Description

Updates a tax reduction.

URL structure

https://api.fortnox.se/3/taxreductions/{Id}

Method

PUT

Version

3

Request

The request body should contain a structure of a tax reduction, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TaxReduction>
  <AskedAmount>1500</AskedAmount>
</TaxReduction>
{
  "TaxReduction": {
    "AskedAmount": 1500
  }
}

Response

The response should contain the updated tax reduction in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<TaxReduction url="https://api.fortnox.se/3/taxreductions/10">
  <ApprovedAmount></ApprovedAmount>
  <AskedAmount>1500</AskedAmount>
  <BilledAmount>8368</BilledAmount>
  <CustomerName>Stefan Andersson</CustomerName>
  <Id>11</Id>
  <PropertyDesignation></PropertyDesignation>
  <ReferenceDocumentType>INVOICE</ReferenceDocumentType>
  <ReferenceNumber>10</ReferenceNumber>
  <RequestSent></RequestSent>
  <ResidenceAssociationOrganisationNumber></ResidenceAssociationOrganisationNumber>
  <SocialSecurityNumber>19860327-7859</SocialSecurityNumber>
  <TypeOfReduction>RUT</TypeOfReduction>
  <VoucherNumber></VoucherNumber>
  <VoucherSeries></VoucherSeries>
  <VoucherYear></VoucherYear>
</TaxReduction>
{
  "TaxReduction": {
    "@url": "https://api.fortnox.se/3/taxreductions/10",
    "ApprovedAmount": null,
    "AskedAmount": 1500,
    "BilledAmount": 8368,
    "CustomerName": "Stefan Andersson",
    "Id": 11,
    "PropertyDesignation": "",
    "ReferenceDocumentType": "INVOICE",
    "ReferenceNumber": "10",
    "RequestSent": null,
    "ResidenceAssociationOrganisationNumber": "",
    "SocialSecurityNumber": "19860327-7859",
    "TypeOfReduction": "RUT",
    "VoucherNumber": null,
    "VoucherSeries": null,
    "VoucherYear": null
  }
}

DELETE

Description

Removes a tax reduction.

URL structure

https://api.fortnox.se/3/taxreductions/{Id}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

The response body should be empty.

Filters

Filter name Description
invoices Retrieves all tax reductions with ReferenceDocumentType “INVOICE”
orders Retrieves all tax reductions with ReferenceDocumentType “ORDER”
offers Retrieves all tax reductions with ReferenceDocumentType “OFFER”

For information about how to use filters, please read this article.

Fields

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
ApprovedAmount Apporoved amount Float R
AskedAmount Asked amount Float Yes R/W
BilledAmount Billed amount Float R
CustomerName Name of the customer String Yes Yes R/W
Id Id String Yes R
PropertyDesignation Property designation 26 chars String R/W
ReferenceDocumentType Document type OFFER / ORDER / INVOICE String Yes R/W
ReferenceNumber Reference number Integer Yes Yes R/W
RequestSent Is request sent Boolean R
ResidenceAssociationOrganisationNumber String R/W
SocialSecurityNumber Social security number String Yes R/W
TypeOfReduction Type of reduction ROT / RUT String R/W
VoucherNumber Voucher number String R
VoucherSeries Voucher series String R
VoucherYear Voucher year String R

* Only writable during POST.