GET

Description

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

Method

GET

Version

3

Response

The asset register can return a list of assets or a single asset. By specifying a FileId in the URL, a single asset will be returned. Not specifying a FileId will return a list of records.

<?xml version="1.0" encoding="UTF-8"?>
<AssetFileConnections TotalResources="0" TotalPages="0" CurrentPage="1">
 <AssetFileConnectionSubset url="https://api.fortnox.se/3/assetfileconnections/c77ba317-44c0-44cb-acdc-17eddd0f1c">
 <FileId>c77ba317-44c0-44cb-acdc-17eedddd0f1c</FileId>
 <Name>filename.jpg</Name>
 <AssetId>1</AssetId>
 </AssetFileConnectionSubset>
</AssetFileConnections>
<?xml version="1.0" encoding="UTF-8"?>
<AssetFileConnection url="https://api.fortnox.se/3/assetfileconnections/c77ba317-44c0-44cb-acdc-17eedddd0f1c">
 <FileId>c77ba317-44c0-44cb-acdc-17eedddd0f1c</FileId>
 <Name>filename.jpg</Name>
 <AssetId>1</AssetId>
</AssetFileConnection>
{
 "MetaInformation": {
 "@TotalResources": 0,
 "@TotalPages": 0,
 "@CurrentPage": 1
 },
 "AssetFileConnections": [
 {
 "@url": "https://api.fortnox.se/3/assetfileconnections/c77ba317-44c0-44cb-acdc-17eedddd0f1c",
 "FileId": "c77ba317-44c0-44cb-acdc-17eedddd0f1c",
 "Name": "filename.jpg",
 "AssetId": "1"
 }
 ]
}
{
 "AssetFileConnection": {
 "@url": "https://api.fortnox.se/3/assetfileconnections/c77ba317-44c0-44cb-acdc-17eedddd0f1c",
 "FileId": "c77ba317-44c0-44cb-acdc-17eedddd0f1c",
 "Name": "filename.jpg",
 "AssetId": "1"
 }
}

POST

Description

Creates an asset file connection.

Method

POST

Version

3

REQUEST

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

<?xml version="1.0" encoding="UTF-8"?>
<AssetFileConnection>
 <FileId>12158ab8-391f-4a03-8a49-e923dd5b7364</FileId>
 <AssetId>1</AssetId>
</AssetFileConnection>
{
 "AssetFileConnection": {
 "FileId": "c77ba317-44c0-44cb-acdc-17eedddd0f1c",
 "AssetId": "1"
 }
}

RESPONSE

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

<?xml version="1.0" encoding="UTF-8"?>
<AssetFileConnection url="https://api.fortnox.se/3/assetfileconnections/2c10af40-57b3-4e52-8957-9616dd74261b">
 <FileId>2c10af40-57b3-4e52-8957-9616dd74261b</FileId>
 <Name>uploaded_file_name.jpg</Name>
 <AssetId>1</AssetId>
</AssetFileConnection>
{
 "AssetFileConnection": {
 "@url": "https://api.fortnox.se/3/assetfileconnections/2c10af40-57b3-4e52-8957-9616dd74261b",
 "FileId": "2c10af40-57b3-4e52-8957-9616dd74261b",
 "Name": "uploaded_file_name.png",
 "AssetId": "1"
 }
}

DELETE

Description

Removes an asset file connection.

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

Id

Id of the file

String  –  –  Y

R/W

Name

Name of the file

String  –

R

AssetId

Asset number

String  Y  – Y

R/W