GET

Description

Retrieves a list of voucher series or a single voucher series.

URL structure

https://api.fortnox.se/3/voucherseries/{Code}

Method

GET

Version

3

Response

The voucher series register can return a list of records or a single record. By specifying a Code in the URL, a single record will be returned. Not specifying a Code will return a list of records.

<?xml version="1.0" encoding="UTF-8"?>
<VoucherSeriesCollection TotalResources="12" TotalPages="1" CurrentPage="1">
  <VoucherSeriesSubset url="https://api.fortnox.se/3/voucherseries/A">
    <Code>A</Code>
    <Description>Redovisning</Description>
    <Manual>true</Manual>
    <Year>1</Year>
  </VoucherSeriesSubset>

  [...]

  <VoucherSeriesSubset url="https://api.fortnox.se/3/voucherseries/L">
    <Code>L</Code>
    <Description>Kontantfaktura</Description>
    <Manual>false</Manual>
    <Year>1</Year>
  </VoucherSeriesSubset>
</VoucherSeriesCollection>
<?xml version="1.0" encoding="UTF-8"?>
<VoucherSeries url="https://api.fortnox.se/3/voucherseries/A">
  <Code>A</Code>
  <Description>Redovisning</Description>
  <Manual>true</Manual>
  <NextVoucherNumber>1</NextVoucherNumber>
  <Year>1</Year>
</VoucherSeries>
{
  "MetaInformation": {
    "@TotalResources": 12,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "VoucherSeriesCollection": [
    {
      "@url": "https://api.fortnox.se/3/voucherseries/A",
      "Code": "A",
      "Description": "Redovisning",
      "Manual": true,
      "Year": 1
    },

    [...]

    {
      "@url": "https://api.fortnox.se/3/voucherseries/L",
      "Code": "L",
      "Description": "Kontantfaktura",
      "Manual": false,
      "Year": 1
    }
  ]
}
{
  "VoucherSeries": {
    "@url": "https://api.fortnox.se/3/voucherseries/A",
    "Code": "A",
    "Description": "Redovisning",
    "Manual": true,
    "NextVoucherNumber": 1,
    "Year": 1
  }
}

POST

Description

Creates a voucher series.

URL structure

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

Method

POST

Version

3

Request

The request body should contain a structure of a voucher series, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<VoucherSeries>
  <Code>X</Code>
  <Description>Övriga verifikationer</Description>
</VoucherSeries>
{
  "VoucherSeries": {
    "Code": "X",
    "Description": "Övriga verifikationer"
  }
}

Response

The response should contain the created voucher series in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<VoucherSeries url="https://api.fortnox.se/3/voucherseries/X">
  <Code>X</Code>
  <Description>Övriga verifikationer</Description>
  <Manual>false</Manual>
  <NextVoucherNumber>1</NextVoucherNumber>
  <Year>1</Year>
</VoucherSeries>
{
  "VoucherSeries": {
    "@url": "https://api.fortnox.se/3/voucherseries/X",
    "Code": "X",
    "Description": "Övriga verifikationer",
    "Manual": false,
    "NextVoucherNumber": 1,
    "Year": 1
  }
}

PUT

Description

Updates a voucher series.

URL structure

https://api.fortnox.se/3/voucherseries/{Code}

Method

PUT

Version

3

Request

The request body should contain a structure of a voucher series, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<VoucherSeries>
  <Manual>false</Manual>
</VoucherSeries>
{
  "VoucherSeries": {
    "Manual": true
  }
}

Response

The response should contain the updated voucher series in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<VoucherSeries url="https://api.fortnox.se/3/voucherseries/X">
  <Code>X</Code>
  <Description>Övriga verifikationer</Description>
  <Manual>false</Manual>
  <NextVoucherNumber>1</NextVoucherNumber>
  <Year>1</Year>
</VoucherSeries>
{
  "VoucherSeries": {
    "@url": "https://api.fortnox.se/3/voucherseries/X",
    "Code": "X",
    "Description": "Övriga verifikationer",
    "Manual": true,
    "NextVoucherNumber": 1,
    "Year": 1
  }
}

Fields

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
Code The code of the voucher series String Yes Yes R/W*
Description Description of the voucher series String R/W
Manual If manual Boolean R/W
NextVoucherNumber Next number in the series Integer R
Year Id of the financial year Integer R

* Only writable during POST.