List all expenses

URL

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

Method

GET

Description

Retrieve expense codes.

Response

{
  "MetaInformation": {
    "@TotalResources": 2,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "Expenses": [
    {
      "@url": "https://api.fortnox.se/3/expenses/taxi",
      "Code": "taxi",
      "Text": "Taxiresor",
      "Account": 1011
    },
    {
      "@url": "https://api.fortnox.se/3/expenses/buss",
      "Code": "buss",
      "Text": "Bussresor",
      "Account": 1011
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<Expenses TotalResources="2" TotalPages="1" CurrentPage="1">
    <ExpenseSubset url="https://api.fortnox.se/3/expenses/taxi">
        <Code>taxi</Code>
        <Text>Taxiresor</Text>
        <Account>1011</Account>
    </ExpenseSubset>
    <ExpenseSubset url="https://api.fortnox.se/3/expenses/buss">
        <Code>buss</Code>
        <Text>Bussresor</Text>
        <Account>1011</Account>
    </ExpenseSubset>
</Expenses>

Retrieve an expense

URL

https://api.fortnox.se/3/expenses/{ExpenseCode}

Method

GET

Description

Retrieves expense information for specified expense.

Response

{
  "Expense": {
    "Code": "taxi",
    "Text": "Taxiresor",
    "Account": 1011
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<Expense>
    <Code>taxi</Code>
    <Text>Taxiresor</Text>
    <Account>1011</Account>
</Expense>

Create an expense

URL

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

Method

POST

Description

Creates an expense.

Response

{  
   "Expense":{  
      "Code":"UT3",
      "Text":"Utlagga 1 för material",
      "Account":2018
   }
}
<?xml version="1.0" encoding="UTF-8" ?>
<Expense>
    <Code>UT3</Code>
    <Text>Utlagga 1 för material</Text>
    <Account>2018</Account>
</Expense>

Properties

Field Type Description
Code String (6) Unique expense code
Text String (40) Description of expense
Account Integer Account number