GET

Note that Inbox has five static folders in the root directory. Inbox_s, Inbox_v, Inbox_d, Inbox_a and Inbox b, these are the folders for Supplier Invoices, Vouchers, Daily Takings, Asset register and Bank files.

Description

Retrieves a list of files and folders or a single file or folder.

URL structure

https://api.fortnox.se/3/inbox/{id}

https://api.fortnox.se/3/inbox?path={directory}

Method

GET

Version

3

Response

The archive register can return a list of files and folders or a single file/folder. By specifying a path or an Id in the URL, a single folder will be returned. If your path or Id points to a file, the content will be a returned as a filestream. If no path or Id is provided a list of the root will be returned.

<?xml version="1.0" encoding="UTF-8"?>
<Folder url="https://api.fortnox.se/3/inbox/root">
  <Email>inbox.501558@alfa.arkivplats.se</Email>
  <Files>
    <File url="https://api.fortnox.se/3/inbox/6f8dd939-4e51-416f-aaea-5544f36eefff">
      <Comments></Comments>
      <Id>6f8dd939-4e51-416f-aaea-5544f36eefff</Id>
      <Name>avtal.png</Name>
      <Path>inbox</Path>
      <Size>64222</Size>
    </File>
    <File url="https://api.fortnox.se/3/inbox/f15ad552-95bb-473b-b7ee-66c77385395d">
      <Comments></Comments>
      <Id>f15ad552-95bb-473b-b7ee-66c77385395d</Id>
      <Name>fakt1-sida2.png</Name>
      <Path>inbox</Path>
      <Size>157</Size>
    </File>
  </Files>
  <Folders>
    <Folder url="https://api.fortnox.se/3/inbox/inbox_s">
      <Id>inbox_s</Id>
      <Name>Leverantörsfakturor</Name>
    </Folder>
    <Folder url="https://api.fortnox.se/3/inbox/inbox_v">
      <Id>inbox_v</Id>
      <Name>Verifikationer</Name>
    </Folder>
  </Folders>
  <Id>root</Id>
  <Name>Inbox</Name>
</Folder>
<?xml version="1.0" encoding="UTF-8"?>
<Folder url="https://api.fortnox.se/3/inbox/inbox_s">
  <Email>inbox.lev.501558@alfa.arkivplats.se</Email>
  <Files>
    <File url="https://api.fortnox.se/3/inbox/70309094-9176-45b8-9eb7-881cca53b266">
      <Comments></Comments>
      <Id>70309094-9176-45b8-9eb7-881cca53b266</Id>
      <Name>fakt1.jpg</Name>
      <Path>inbox_s</Path>
      <Size>90914</Size>
    </File>

    [...]

    <File url="https://api.fortnox.se/3/inbox/fd954b0a-1d66-433e-b420-560878b03895">
      <Comments></Comments>
      <Id>fd954b0a-1d66-433e-b420-560878b03895</Id>
      <Name>avtal.png</Name>
      <Path>inbox_s</Path>
      <Size>64222</Size>
    </File>
  </Files>
  <Folders/>
  <Id>inbox_s</Id>
  <Name>Leverantörsfakturor</Name>
</Folder>
{
  "Folder": {
    "@url": "https://api.fortnox.se/3/inbox/root",
    "Email": "inbox.501558@alfa.arkivplats.se",
    "Files": [
      {
        "@url": "https://api.fortnox.se/3/inbox/6f8dd939-4e51-416f-aaea-5544f36eefff",
        "Comments": null,
        "Id": "6f8dd939-4e51-416f-aaea-5544f36eefff",
        "Name": "avtal.png",
        "Path": "inbox",
        "Size": 64222
      },
      {
        "@url": "https://api.fortnox.se/3/inbox/f15ad552-95bb-473b-b7ee-66c77385395d",
        "Comments": null,
        "Id": "f15ad552-95bb-473b-b7ee-66c77385395d",
        "Name": "fakt1-sida2.png",
        "Path": "inbox",
        "Size": 157
      }
    ],
    "Folders": [
      {
        "@url": "https://api.fortnox.se/3/inbox/inbox_s",
        "Id": "inbox_s",
        "Name": "Leverantörsfakturor"
      },
      {
        "@url": "https://api.fortnox.se/3/inbox/inbox_v",
        "Id": "inbox_v",
        "Name": "Verifikationer"
      }
    ],
    "Id": "root",
    "Name": "Inbox"
  }
}
{
  "Folder": {
    "@url": "https://api.fortnox.se/3/inbox/inbox_s",
    "Email": "inbox.lev.501558@alfa.arkivplats.se",
    "Files": [
      {
        "@url": "https://api.fortnox.se/3/inbox/70309094-9176-45b8-9eb7-881cca53b266",
        "Comments": null,
        "Id": "70309094-9176-45b8-9eb7-881cca53b266",
        "Name": "fakt1.jpg",
        "Path": "inbox_s",
        "Size": 90914
      },

[…]

{
“@url”: “https://api.fortnox.se/3/inbox/fd954b0a-1d66-433e-b420-560878b03895”,
“Comments”: null,
“Id”: “fd954b0a-1d66-433e-b420-560878b03895”,
“Name”: “avtal.png”,
“Path”: “inbox_s”,
“Size”: 64222
}
],
“Folders”: [],
“Id”: “inbox_s”,
“Name”: “Leverantörsfakturor”
}
}

POST – Files

If not directory or FolderId is provided, the file will be uploaded to the root directory.

Description

Upload a file to a specific subdirectory.

URL structure

https://api.fortnox.se/3/inbox?folderid={Id}

https://api.fortnox.se/3/inbox?path={directory}

Method

POST

Version

3

Request

The request body should contain the contents of the file.

Response

<?xml version="1.0" encoding="UTF-8"?>
<File url="https://api.fortnox.se/3/inbox/0df13d88-0686-49c8-987d-b9e384dedd7a">
  <Comments></Comments>
  <Id>0df13d88-0686-49c8-987d-b9e384dedd7a</Id>
  <Name>voucher1.png</Name>
  <Path>root</Path>
  <Size>157</Size>
</File>
{
  "File": {
    "@url": "https://api.fortnox.se/3/inbox/0df13d88-0686-49c8-987d-b9e384dedd7a",
    "Comments": null,
    "Id": "0df13d88-0686-49c8-987d-b9e384dedd7a",
    "Name": "voucher1.png",
    "Path": "root",
    "Size": 157
  }
}

DELETE

Please note that removing a folder will also resulting in removal of all the contents within!

Description

Removes a file or folder.

URL structure

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

https://api.fortnox.se/3/inbox?path={directory}

Method

DELETE

Version

3

Request

The request body should be empty.

Response

The response body should be empty.

Fields

File

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
Comments Comments String R
Id Id of the file String R
Name Name of the file String R
Path Path to the file String Yes R
Size Size(in bytes) of the file String R

Folders

Field Description Limits Type Searchable Sortable Required R/W
Url Direct URL to the record String R
Email Unique email for the folder String Yes R
Files List of files
Folders List of folders
Id Id of the folder String Yes R
Name Name of the folder String Yes Yes R/W