GET – Retrieve a list of all predefined accounts

Description

Retrieve a list of all predefined accounts.

URL structure

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

Method

GET

Version

3

Response

Retrieves all predefined accounts.

<?xml version="1.0" encoding="UTF-8"?>
<PreDefinedAccounts TotalResources="33" TotalPages="1" CurrentPage="1">
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/PG">
        <Account>1920</Account>
        <Name>PG</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/BG">
        <Account>1930</Account>
        <Name>BG</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CUSTCLAIM">
        <Account>1510</Account>
        <Name>CUSTCLAIM</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/WCARD">
        <Account>1580</Account>
        <Name>WCARD</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/INVAT">
        <Account>2641</Account>
        <Name>INVAT</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/SUPDEBT">
        <Account>2440</Account>
        <Name>SUPDEBT</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/OUTVAT_MP1">
        <Account>2611</Account>
        <Name>OUTVAT_MP1</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/OUTVAT_MP2">
        <Account>2621</Account>
        <Name>OUTVAT_MP2</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/OUTVAT_MP3">
        <Account>2631</Account>
        <Name>OUTVAT_MP3</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CURRENCYWIN">
        <Account>3960</Account>
        <Name>CURRENCYWIN</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CURRENCYLOSS">
        <Account>7960</Account>
        <Name>CURRENCYLOSS</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/ADMFEE">
        <Account>3540</Account>
        <Name>ADMFEE</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/FREIGHT">
        <Account>3520</Account>
        <Name>FREIGHT</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/SUPFREIGHT">
        <Account>5710</Account>
        <Name>SUPFREIGHT</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/INTEREST">
        <Account>8313</Account>
        <Name>INTEREST</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/ROUNDOFF">
        <Account>3740</Account>
        <Name>ROUNDOFF</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CARDFEE">
        <Account>6040</Account>
        <Name>CARDFEE</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CASHDISCOUNTIN">
        <Account>4730</Account>
        <Name>CASHDISCOUNTIN</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CASHDISCOUNTOUT">
        <Account>3730</Account>
        <Name>CASHDISCOUNTOUT</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/DEMAND">
        <Account>3540</Account>
        <Name>DEMAND</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/ACCRINVOICE">
        <Account>2990</Account>
        <Name>ACCRINVOICE</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/ACCRINCOME">
        <Account>3990</Account>
        <Name>ACCRINCOME</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/SALES">
        <Account>3001</Account>
        <Name>SALES</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/SALESEUREV">
        <Account>3231</Account>
        <Name>SALESEUREV</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/ACCRSINVOICE">
        <Account>1790</Account>
        <Name>ACCRSINVOICE</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CASH">
        <Account>1910</Account>
        <Name>CASH</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CASHBYCARD">
        <Account>1930</Account>
        <Name>CASHBYCARD</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/PRODUCT_DEB">
        <Account>2645</Account>
        <Name>PRODUCT_DEB</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/PRODUCT_CRE">
        <Account>2615</Account>
        <Name>PRODUCT_CRE</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/SERVICE_DEB">
        <Account>2645</Account>
        <Name>SERVICE_DEB</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/SERVICE_CRE">
        <Account>2614</Account>
        <Name>SERVICE_CRE</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/CONSTRUCTION_DEB">
        <Account>2647</Account>
        <Name>CONSTRUCTION_DEB</Name>
    </PreDefinedAccountSubset>
    <PreDefinedAccountSubset url="https://api.fortnox.se/3/predefinedaccounts/AG">
        <Account>1930</Account>
        <Name>AG</Name>
    </PreDefinedAccountSubset>
</PreDefinedAccounts>
{
    "MetaInformation": {
        "@TotalResources": 33,
        "@TotalPages": 1,
        "@CurrentPage": 1
    },
    "PreDefinedAccounts": [
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/PG",
            "Account": 1920,
            "Name": "PG"
        },
        {
            @url": "https://api.fortnox.se/3/predefinedaccounts/BG",
            "Account": 1930,
            "Name": "BG"
        },
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/CUSTCLAIM",
            "Account": 1510,
            "Name": "CUSTCLAIM"
        },
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/WCARD",
            "Account": 1580,
            "Name": "WCARD"
        },
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/INVAT",
            "Account": 2641,
            "Name": "INVAT"
        },
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/SUPDEBT",
            "Account": 2440,
            "Name": "SUPDEBT"
        },
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/OUTVAT_MP1",
            "Account": 2611,
            "Name": "OUTVAT_MP1"
        },
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/OUTVAT_MP2",
            "Account": 2621,
            "Name": "OUTVAT_MP2"
        },
        {
            "@url": "https://api.fortnox.se/3/predefinedaccounts/OUTVAT_MP3",
            "Account": 2631,
            "Name": "OUTVAT_MP3"
        }
    ]
}

GET – Retrieve information for a specific account type

Description

Retrieve information for a specific account type.

URL structure

https://api.fortnox.se/3/predefinedaccounts/{name} (upper case letters on {name})

Method

GET

Version

3

Response

Retrieves account for the requested account type.

<?xml version="1.0" encoding="UTF-8"?>
<PreDefinedAccount url="https://api.fortnox.se/3/predefinedaccounts/BG">
    <Account>1930</Account>
    <Name>BG</Name>
</PreDefinedAccount>
{
    "PreDefinedAccount": {
        "@url": "https://api.fortnox.se/3/predefinedaccounts/BG",
        "Account": 1930,
        "Name": "BG"
    }
}

PUT – Update existing account type with a predefined account

Description

Update existing account type with a predefined account.

URL structure

https://api.fortnox.se/3/predefinedaccounts/{name} (upper case letters on {name})

Method

PUT

Version

3

Request

The request body should contain a structure of an PreDefinedAccount, either in JSON or XML.

<?xml version="1.0" encoding="UTF-8"?>
<PreDefinedAccount>
    <Account>1930</Account>
</PreDefinedAccount>
{
    "PreDefinedAccount": {
        "Account": 1930
    }
}

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<PreDefinedAccount url="https://api.fortnox.se/3/predefinedaccounts/BG">
    <Account>1930</Account>
    <Name>BG</Name>
</PreDefinedAccount>
{
    "PreDefinedAccount": {
        "@url": "https://api.fortnox.se/3/predefinedaccounts/BG",
        "Account": 1930,
        "Name": "BG"
    }
}

Fields

Predefined Voucher Series

Field Description Limits Type Searchable Sortable Required R/W
Url Direct url to the record. String R
Name Name of account type String R
Account Predefined account 4 numbers Integer R/W