GET

Description

Retrieves a list of supplier invoice accruals or a single supplier invoice accrual.

URL structure

https://api.fortnox.se/3/supplierinvoiceaccruals/{SupplierInvoiceNumber}

Method

GET

Version

3

Response

The supplier invoice accruals register can return a list of records or a single record. By specifying a SupplierInvoiceNumber in the URL, a single record will be returned. Not specifying a SupplierInvoiceNumber will return a list of records.

<?xml version="1.0" encoding="UTF-8"?>
<SupplierInvoiceAccruals TotalResources="3" TotalPages="1" CurrentPage="1">
  <SupplierInvoiceAccrualSubset url="https://api.fortnox.se/3/supplierinvoiceaccruals/3">
    <Description>Periodisering av leverantörsfaktura 3</Description>
    <SupplierInvoiceNumber>3</SupplierInvoiceNumber>
    <Period>MONTHLY</Period>
  </SupplierInvoiceAccrualSubset>

  [...]

  <SupplierInvoiceAccrualSubset url="https://api.fortnox.se/3/supplierinvoiceaccruals/4">
    <Description>Periodisering av leverantörsfaktura 4</Description>
    <SupplierInvoiceNumber>4</SupplierInvoiceNumber>
    <Period>MONTHLY</Period>
  </SupplierInvoiceAccrualSubset>
</SupplierInvoiceAccruals>
<?xml version="1.0" encoding="UTF-8"?>
<SupplierInvoiceAccrual url="https://api.fortnox.se/3/supplierinvoiceaccruals/4">
  <AccrualAccount>1790</AccrualAccount>
  <CostAccount>5820</CostAccount>
  <Description>Periodisering av leverantörsfaktura 4</Description>
  <EndDate>2014-07-01</EndDate>
  <SupplierInvoiceNumber>4</SupplierInvoiceNumber>
  <Period>MONTHLY</Period>
  <SupplierInvoiceAccrualRows>
    <SupplierInvoiceAccrualRow>
      <Account>1790</Account>
      <CostCenter></CostCenter>
      <Credit>6666.67</Credit>
      <Debit>0</Debit>
      <Project>0</Project>
      <TransactionInformation></TransactionInformation>
    </SupplierInvoiceAccrualRow>
    <SupplierInvoiceAccrualRow>
      <Account>5820</Account>
      <CostCenter></CostCenter>
      <Credit>0</Credit>
      <Debit>6666.67</Debit>
      <Project>0</Project>
      <TransactionInformation></TransactionInformation>
    </SupplierInvoiceAccrualRow>
  </SupplierInvoiceAccrualRows>
  <StartDate>2014-04-01</StartDate>
  <Times>3</Times>
  <Total>20000</Total>
  <VATIncluded>false</VATIncluded>
</SupplierInvoiceAccrual>
{
  "MetaInformation": {
    "@TotalResources": 3,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "SupplierInvoiceAccruals": [
    {
      "@url": "https://api.fortnox.se/3/supplierinvoiceaccruals/3",
      "Description": "Periodisering av leverantörsfaktura 3",
      "SupplierInvoiceNumber": 3,
      "Period": "MONTHLY"
    },

    [...]

    {
      "@url": "https://api.fortnox.se/3/supplierinvoiceaccruals/4",
      "Description": "Periodisering av leverantörsfaktura 4",
      "SupplierInvoiceNumber": 4,
      "Period": "MONTHLY"
    }
  ]
}
{
  "SupplierInvoiceAccrual": {
    "@url": "https://api.fortnox.se/3/supplierinvoiceaccruals/4",
    "AccrualAccount": 1790,
    "CostAccount": 5820,
    "Description": "Periodisering av leverantörsfaktura 4",
    "EndDate": "2014-07-01",
    "SupplierInvoiceNumber": 4,
    "Period": "MONTHLY",
    "SupplierInvoiceAccrualRows": [
      {
        "Account": 1790,
        "CostCenter": "",
        "Credit": 6666.67,
        "Debit": 0,
        "Project": "",
        "TransactionInformation": ""
      },
      {
        "Account": 5820,
        "CostCenter": "",
        "Credit": 0,
        "Debit": 6666.67,
        "Project": "",
        "TransactionInformation": ""
      }
    ],
    "StartDate": "2014-04-01",
    "Times": 3,
    "Total": 20000,
    "VATIncluded": false
  }
}

POST

Description

Creates a supplier invoice accrual.

URL structure

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

Method

POST

Version

3

Request

The request body should contain a structure of a supplier invoice accrual, either in JSON or XML.

<SupplierInvoiceAccrual>
  <AccrualAccount>1790</AccrualAccount>
  <CostAccount>5820</CostAccount>
  <Description>Periodisering av leverantörsfaktura 4</Description>
  <EndDate>2014-07-01</EndDate>
  <SupplierInvoiceNumber>4</SupplierInvoiceNumber>
  <Period>MONTHLY</Period>
  <SupplierInvoiceAccrualRows>
    <SupplierInvoiceAccrualRow>
      <Account>1790</Account>
      <Credit>6666.67</Credit>
      <Debit>0</Debit>
    </SupplierInvoiceAccrualRow>
    <SupplierInvoiceAccrualRow>
      <Account>5820</Account>
      <Credit>0</Credit>
      <Debit>6666.67</Debit>
    </SupplierInvoiceAccrualRow>
  </SupplierInvoiceAccrualRows>
  <StartDate>2014-04-01</StartDate>
  <Total>20000</Total>
</SupplierInvoiceAccrual>
{
  "SupplierInvoiceAccrual": {
    "AccrualAccount": 1790,
    "CostAccount": 5820,
    "Description": "Periodisering av leverantörsfaktura 4",
    "EndDate": "2014-07-01",
    "SupplierInvoiceNumber": 4,
    "Period": "MONTHLY",
    "SupplierInvoiceAccrualRows": [
      {
        "Account": 1790,
        "Credit": 6666.67,
        "Debit": 0
      },
      {
        "Account": 5820,
        "Credit": 0,
        "Debit": 6666.67
      }
    ],
    "StartDate": "2014-04-01",
    "Total": 20000
  }
}

Response

The response should contain the created supplier invoice accrual in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<SupplierInvoiceAccrual url="https://api.fortnox.se/3/supplierinvoiceaccruals/4">
  <AccrualAccount>1790</AccrualAccount>
  <CostAccount>5820</CostAccount>
  <Description>Periodisering av leverantörsfaktura 4</Description>
  <EndDate>2014-07-01</EndDate>
  <SupplierInvoiceNumber>4</SupplierInvoiceNumber>
  <Period>MONTHLY</Period>
  <SupplierInvoiceAccrualRows>
    <SupplierInvoiceAccrualRow>
      <Account>1790</Account>
      <CostCenter></CostCenter>
      <Credit>6666.67</Credit>
      <Debit>0</Debit>
      <Project>0</Project>
      <TransactionInformation></TransactionInformation>
    </SupplierInvoiceAccrualRow>
    <SupplierInvoiceAccrualRow>
      <Account>5820</Account>
      <CostCenter></CostCenter>
      <Credit>0</Credit>
      <Debit>6666.67</Debit>
      <Project>0</Project>
      <TransactionInformation></TransactionInformation>
    </SupplierInvoiceAccrualRow>
  </SupplierInvoiceAccrualRows>
  <StartDate>2014-04-01</StartDate>
  <Times>3</Times>
  <Total>20000</Total>
  <VATIncluded>false</VATIncluded>
</SupplierInvoiceAccrual>
{
  "SupplierInvoiceAccrual": {
    "@url": "https://api.fortnox.se/3/supplierinvoiceaccruals/4",
    "AccrualAccount": 1790,
    "CostAccount": 5820,
    "Description": "Periodisering av leverantörsfaktura 4",
    "EndDate": "2014-07-01",
    "SupplierInvoiceNumber": "4",
    "Period": "MONTHLY",
    "SupplierInvoiceAccrualRows": [
      {
        "Account": 1790,
        "CostCenter": "",
        "Credit": 6666.67,
        "Debit": 0,
        "Project": "",
        "TransactionInformation": ""
      },
      {
        "Account": 5820,
        "CostCenter": "",
        "Credit": 0,
        "Debit": 6666.67,
        "Project": "",
        "TransactionInformation": ""
      }
    ],
    "StartDate": "2014-04-01",
    "Times": 3,
    "Total": 20000,
    "VATIncluded": false
  }
}

PUT

Description

Updates a supplier invoice accrual.

URL structure

https://api.fortnox.se/3/supplierinvoiceaccruals/{SupplierInvoiceNumber}

Method

PUT

Version

3

Request

The request body should contain a structure of a supplier invoice accrual, either in JSON or XML.

<SupplierInvoiceAccrual>
  <AccrualAccount>1790</AccrualAccount>
  <CostAccount>5800</CostAccount>
  <EndDate>2014-07-01</EndDate>
  <SupplierInvoiceNumber>4</SupplierInvoiceNumber>
  <Period>MONTHLY</Period>
  <SupplierInvoiceAccrualRows>
    <SupplierInvoiceAccrualRow>
      <Account>1790</Account>
      <Credit>6666.67</Credit>
      <Debit>0</Debit>
    </SupplierInvoiceAccrualRow>
    <SupplierInvoiceAccrualRow>
      <Account>5800</Account>
      <Credit>0</Credit>
      <Debit>6666.67</Debit>
    </SupplierInvoiceAccrualRow>
  </SupplierInvoiceAccrualRows>
  <StartDate>2014-04-01</StartDate>
  <Total>20000</Total>
</SupplierInvoiceAccrual>
{
  "SupplierInvoiceAccrual": {
    "AccrualAccount": 1790,
    "CostAccount": 5800,
    "EndDate": "2014-07-01",
    "SupplierInvoiceNumber": 4,
    "Period": "MONTHLY",
    "SupplierInvoiceAccrualRows": [
      {
        "Account": 1790,
        "Credit": 6666.67,
        "Debit": 0
      },
      {
        "Account": 5800,
        "Credit": 0,
        "Debit": 6666.67
      }
    ],
    "StartDate": "2014-04-01",
    "Total": 20000
  }
}

Response

The response should contain the updated supplier invoice accrual in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<SupplierInvoiceAccrual url="https://api.fortnox.se/3/supplierinvoiceaccruals/4">
  <AccrualAccount>1790</AccrualAccount>
  <CostAccount>5800</CostAccount>
  <Description>Periodisering av leverantörsfaktura 4</Description>
  <EndDate>2014-07-01</EndDate>
  <SupplierInvoiceNumber>4</SupplierInvoiceNumber>
  <Period>MONTHLY</Period>
  <SupplierInvoiceAccrualRows>
    <SupplierInvoiceAccrualRow>
      <Account>1790</Account>
      <CostCenter></CostCenter>
      <Credit>6666.67</Credit>
      <Debit>0</Debit>
      <Project>0</Project>
      <TransactionInformation></TransactionInformation>
    </SupplierInvoiceAccrualRow>
    <SupplierInvoiceAccrualRow>
      <Account>5800</Account>
      <CostCenter></CostCenter>
      <Credit>0</Credit>
      <Debit>6666.67</Debit>
      <Project>0</Project>
      <TransactionInformation></TransactionInformation>
    </SupplierInvoiceAccrualRow>
  </SupplierInvoiceAccrualRows>
  <StartDate>2014-04-01</StartDate>
  <Times>3</Times>
  <Total>20000</Total>
  <VATIncluded>false</VATIncluded>
</SupplierInvoiceAccrual>
{
  "SupplierInvoiceAccrual": {
    "@url": "https://api.fortnox.se/3/supplierinvoiceaccruals/4",
    "AccrualAccount": 1790,
    "CostAccount": 5800,
    "Description": "Periodisering av leverantörsfaktura 4",
    "EndDate": "2014-07-01",
    "SupplierInvoiceNumber": 4,
    "Period": "MONTHLY",
    "SupplierInvoiceAccrualRows": [
      {
        "Account": 1790,
        "CostCenter": "",
        "Credit": 6666.67,
        "Debit": 0,
        "Project": "",
        "TransactionInformation": ""
      },
      {
        "Account": 5800,
        "CostCenter": "",
        "Credit": 0,
        "Debit": 6666.67,
        "Project": "",
        "TransactionInformation": ""
      }
    ],
    "StartDate": "2014-04-01",
    "Times": 3,
    "Total": 20000,
    "VATIncluded": false
  }
}

DELETE

Description

Removes a supplier invoice accrual.

URL structure

https://api.fortnox.se/3/supplierinvoiceaccruals/{SupplierInvoiceNumber}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

The response body should be empty.

Fields

Supplier Invoice Accrual

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
AccrualAccount Account for the accrual 4 digits Integer Yes R/W
CostAccount Account for the cost 4 digits Integer Yes R/W
Description Description of the accrual String Yes R/W
EndDate End date Date Yes R/W
SupplierInvoiceNumber Number of the supplier invoice Integer Yes R/W
Period Type of period MONTHLY / BIMONTHLY / QUARTERLY / SEMIANNUALLY / ANNUALLY / {X}_MONTHS String Yes R/W
SupplierInvoiceAccrualRows Yes
StartDate Start date Date Yes R/W
Times Total times of accruals Integer R
Total Total of the accrual Float Yes R/W
VATIncluded Is VAT included Boolean R/W

Supplier Invoice Accrual Rows

Field Description Limits Type Searchable Sortable Required R/W
Account Account number 4 digits Integer Yes R/W
CostCenter Cost Center Code String R/W
Credit Credit Float Yes R/W
Debit Debit Float Yes R/W
Project Project number String R/W
TransactionInformation Transaction information String R/W

* Only writable during POST.