GET

Description

Retrieves a list of voucher file connections or a single voucher file connection.

URL structure

https://api.fortnox.se/3/voucherfileconnections/{FileId}

Method

GET

Version

3

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<VoucherFileConnections TotalResources="3" TotalPages="1" CurrentPage="1">
  <VoucherFileConnectionSubset url="https://api.fortnox.se/3/voucherfileconnections/951209e2-211d-4dfc-9d4c-5c426122dc46">
    <FileId>951209e2-211d-4dfc-9d4c-5c426122dc46</FileId>
    <VoucherDescription>Kundbet Stefan Andersson (1)</VoucherDescription>
    <VoucherNumber>1</VoucherNumber>
    <VoucherSeries>C</VoucherSeries>
    <VoucherYear>1</VoucherYear>
  </VoucherFileConnectionSubset>

  [...]

  <VoucherFileConnectionSubset url="https://api.fortnox.se/3/voucherfileconnections/12158ab8-391f-4a03-8a49-e923dd5b7364">
    <FileId>12158ab8-391f-4a03-8a49-e923dd5b7364</FileId>
    <VoucherDescription>Levfakt Telefoniföretaget AB (1)</VoucherDescription>
    <VoucherNumber>1</VoucherNumber>
    <VoucherSeries>D</VoucherSeries>
    <VoucherYear>1</VoucherYear>
  </VoucherFileConnectionSubset>
</VoucherFileConnections>
<?xml version="1.0" encoding="UTF-8"?>
<VoucherFileConnection url="https://api.fortnox.se/3/voucherfileconnections/951209e2-211d-4dfc-9d4c-5c426122dc46">
  <FileId>951209e2-211d-4dfc-9d4c-5c426122dc46</FileId>
  <VoucherDescription>Kundbet Stefan Andersson (1)</VoucherDescription>
  <VoucherNumber>1</VoucherNumber>
  <VoucherSeries>C</VoucherSeries>
  <VoucherYear>1</VoucherYear>
</VoucherFileConnection>
{
  "MetaInformation": {
    "@TotalResources": 3,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "VoucherFileConnections": [
    {
      "@url": "https://api.fortnox.se/3/voucherfileconnections/951209e2-211d-4dfc-9d4c-5c426122dc46",
      "FileId": "951209e2-211d-4dfc-9d4c-5c426122dc46",
      "VoucherDescription": "Kundbet Stefan Andersson (1)",
      "VoucherNumber": "1",
      "VoucherSeries": "C",
      "VoucherYear": 1
    },

    [...]

    {
      "@url": "https://api.fortnox.se/3/voucherfileconnections/12158ab8-391f-4a03-8a49-e923dd5b7364",
      "FileId": "12158ab8-391f-4a03-8a49-e923dd5b7364",
      "VoucherDescription": "Levfakt Telefoniföretaget AB (1)",
      "VoucherNumber": "1",
      "VoucherSeries": "D",
      "VoucherYear": 1
    }
  ]
}
{
  "VoucherFileConnection": {
    "@url": "https://api.fortnox.se/3/voucherfileconnections/951209e2-211d-4dfc-9d4c-5c426122dc46",
    "FileId": "951209e2-211d-4dfc-9d4c-5c426122dc46",
    "VoucherDescription": "Kundbet Stefan Andersson (1)",
    "VoucherNumber": "1",
    "VoucherSeries": "C",
    "VoucherYear": 1
  }
}

POST

Description

Creates an voucher file connection.

URL structure

https://api.fortnox.se/3/voucherfileconnections?financialyeardate=

Method

POST

Version

3

Request

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

<?xml version="1.0" encoding="UTF-8"?>
<VoucherFileConnection>
  <FileId>951209e2-211d-4dfc-9d4c-5c426122dc46</FileId>
  <VoucherNumber>1</VoucherNumber>
  <VoucherSeries>C</VoucherSeries>
</VoucherFileConnection>
{
  "VoucherFileConnection": {
    "FileId": "951209e2-211d-4dfc-9d4c-5c426122dc46",
    "VoucherNumber": 1,
    "VoucherSeries": "C"
  }
}

Response

The response should contain the created vocuher file connection, in either JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<VoucherFileConnection url="https://api.fortnox.se/3/voucherfileconnections/951209e2-211d-4dfc-9d4c-5c426122dc46">
  <FileId>951209e2-211d-4dfc-9d4c-5c426122dc46</FileId>
  <VoucherDescription>Kundbet Stefan Andersson (1)</VoucherDescription>
  <VoucherNumber>1</VoucherNumber>
  <VoucherSeries>C</VoucherSeries>
  <VoucherYear>1</VoucherYear>
</VoucherFileConnection>
{
  "VoucherFileConnection": {
    "@url": "https://api.fortnox.se/3/voucherfileconnections/951209e2-211d-4dfc-9d4c-5c426122dc46",
    "FileId": "951209e2-211d-4dfc-9d4c-5c426122dc46",
    "VoucherDescription": "Kundbet Stefan Andersson (1)",
    "VoucherNumber": "1",
    "VoucherSeries": "C",
    "VoucherYear": 1
  }
}

DELETE

Description

Removes an voucher file connection.

URL structure

https://api.fortnox.se/3/voucherfileconnections/{FileId}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

The response body should be empty.

Fields

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
FileId Id of the file String Yes R/W
VoucherDescription Description of the voucher String Yes R
VoucherNumber Voucher number String Yes Yes R/W
VoucherSeries Voucher series String Yes Yes R/W
VoucherYear Voucher year String R