GET
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> <ArchiveFileId>4ad4661g-66a4-4c1c-9df5-82ae1b32a3a6</ArchiveFileId> <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> <ArchiveFileId>835d447d-f7c6-4bd0-81a7-8a4bbb148b80</ArchiveFileId> <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> <ArchiveFileId>4ad4661g-52c2-4c1c-9df5-82ae1b32a3a6</ArchiveFileId> <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> <ArchiveFileId>835d447d-f7c6-4bd0-81a7-8a4bbb148b80</ArchiveFileId> <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", "ArchiveFileId": "4ad4661g-52c2-4c1c-9df5-82ae1b32a3a6", "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", "ArchiveFileId": "835d447d-f7c6-4bd0-81a7-8a4bbb148b80", "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", "ArchiveFileId": "4ad4661g-52c2-4c1c-9df5-82ae1b32a3a6", "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”,
“ArchiveFileId”: “835d447d-f7c6-4bd0-81a7-8a4bbb148b80”,
“Name”: “avtal.png”,
“Path”: “inbox_s”,
“Size”: 64222
}
],
“Folders”: [],
“Id”: “inbox_s”,
“Name”: “Leverantörsfakturor”
}
}
POST – Files
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
curl -F 'file=@/home/user/Documents/Invoice_Attachments_File.pdf' https://api.fortnox.se/3/inbox\?path\=inbox_kf \ -H "Access-Token: ec3ac4a1-c517-4990-821e-26ed6295f696" \ -H "Client-Secret: k8GGA0UEcN"
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> <ArchiveFileId>4ad4661g-52c2-4c1c-9df5-82ae1b32a3a6</ArchiveFileId> <Name>Invoice_Attachmenta_File.pdf</Name> <Path>inbox_kf</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", "ArchiveFileId": "4ad4661g-52c2-4c1c-9df5-82ae1b32a3a6", "Name": "Invoice_Attachmenta_File.pdf", "Path": "inbox_kf", "Size": 157 } }
DELETE
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 |
ArchiveId | Archive Id of the file | Strin | – | – | – | 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 |
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 |