List all absence transactions

URL

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

Method

GET

Description

Lists all absence transactions for all emploeyes. Supports query-string parameters employeeid and date for filtering the result

Response

{
  "MetaInformation": {
    "@TotalResources": 2,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "AbsenceTransactions": [
    {
      "@url": "https://api.fortnox.se/3/absencetransactions/9978/2016-12-06/SJK",
      "EmployeeId": "9978",
      "CauseCode": "SJK",
      "Date": "2016-12-06",
      "Extent": "100",
      "Hours": "0",
      "HolidayEntitling": true
    },
    {
      "@url": "https://api.fortnox.se/3/absencetransactions/9978/2016-12-07/TJL",
      "EmployeeId": "9978",
      "CauseCode": "TJL",
      "Date": "2016-12-07",
      "Extent": "0",
      "Hours": "5",
      "HolidayEntitling": false
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<AbsenceTransactions TotalResources="2" TotalPages="1" CurrentPage="1">
    <AbsenceTransactionSubset url="https://api.fortnox.se/3/absencetransactions/9978/2016-12-06/SJK">
        <EmployeeId>9978</EmployeeId>
        <CauseCode>SJK</CauseCode>
        <Date>2016-12-06</Date>
        <Extent>100</Extent>
        <Hours>0</Hours>
        <HolidayEntitling>true</HolidayEntitling>
    </AbsenceTransactionSubset>
    <AbsenceTransactionSubset url="https://api.fortnox.se/3/absencetransactions/9978/2016-12-07/ARB">
        <EmployeeId>9978</EmployeeId>
        <CauseCode>ARB</CauseCode>
        <Date>2016-12-07</Date>
        <Extent>0</Extent>
        <Hours>5</Hours>
        <HolidayEntitling>false</HolidayEntitling>
    </AbsenceTransactionSubset>
</AbsenceTransactions>

Retrieve an absence transaction

URL

https://api.fortnox.se/3/absencetransactions/{EmployeeId}/{Date}/{CauseCode}

Method

GET

Description

Retrieves a single absence transaction for an employee on a specific date and cause code

Response

{
  "AbsenceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "SJK",
    "Date": "2016-12-06",
    "Extent": "100",
    "Hours": "0",
    "HolidayEntitling": true
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AbsenceTransaction>
    <EmployeeId>9978</EmployeeId>
    <CauseCode>SJK</CauseCode>
    <Date>2016-12-06</Date>
    <Extent>100</Extent>
    <Hours>0</Hours>
    <HolidayEntitling>true</HolidayEntitling>
</AbsenceTransaction>

Create an absence transaction

URL

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

Method

POST

Description

Creates a new absence transaction for an employee.

Usable “CauseCode”s:

ASK – Arbetsskada
FPE – Föräldraledig
FRA or FR1 – Frånvaro övrigt (FR1 is used in PAXml)
HAV – Graviditetspenning
KOM – Kompledig
MIL – Militärtjänst (max 60 dagar)
NAR or NÄR – Närståendevård (NÄR is used in PAXml)
OS1 – Sjuk-OB 1
OS2 – Sjuk-OB 2
OS3 – Sjuk-OB 3
OS4 – Sjuk-OB 4
OS5 – Sjuk-OB 5
PAP – Pappadagar
PEM – Permission
PER – Permitterad
SEM – Semester
SJK – Sjukfrånvaro
SMB – Smittbärare
SVE – Svenska för invandrare
TJL – Tjänstledig
UTB or FAC – Facklig utbildning (FAC is used in PAXml)
VAB – Vård av barn

Request

{
  "AbsenceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "SJK",
    "Date": "2016-12-08",
    "Extent": "100"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AbsenceTransaction>
    <EmployeeId>9978</EmployeeId>
    <CauseCode>SJK</CauseCode>
    <Date>2016-12-08</Date>
    <Extent>100</Extent>
</AbsenceTransaction>

Response

{
  "AbsenceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "SJK",
    "Date": "2016-12-08",
    "Extent": 100,
    "Hours": "0",
    "HolidayEntitling": true
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AbsenceTransaction>
    <EmployeeId>9978</EmployeeId>
    <CauseCode>SJK</CauseCode>
    <Date>2016-12-08</Date>
    <Extent>100</Extent>
    <Hours>0</Hours>
    <HolidayEntitling>true</HolidayEntitling>
</AbsenceTransaction>

Update an absence transaction

URL

https://api.fortnox.se/3/absencetransactions/{EmployeeId}/{Date}/{CauseCode}

Method

PUT

Description

Updates an absence transaction.

Usable “CauseCode”s:

ASK – Arbetsskada
FPE – Föräldraledig
FRA or FR1- Frånvaro övrigt (FR1 is used in PAXml)
HAV – Graviditetspenning
KOM – Kompledig
MIL – Militärtjänst (max 60 dagar)
NAR or NÄR – Närståendevård (NÄR is used in PAXml)
OS1 – Sjuk-OB 1
OS2 – Sjuk-OB 2
OS3 – Sjuk-OB 3
OS4 – Sjuk-OB 4
OS5 – Sjuk-OB 5
PAP – Pappadagar
PEM – Permission
PER – Permitterad
SEM – Semester
SJK – Sjukfrånvaro
SMB – Smittbärare
SVE – Svenska för invandrare
TJL – Tjänstledig
UTB or FAC – Facklig utbildning (FAC is used in PAXml)
VAB – Vård av barn

Request

{
  "AbsenceTransaction": {
    "Hours": "8"
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AbsenceTransaction>
    <Hours>8</Hours>
</AbsenceTransaction>

Response

{
  "AbsenceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "SJK",
    "Date": "2016-12-08",
    "Extent": 0,
    "Hours": "8",
    "HolidayEntitling": true
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AbsenceTransaction>
    <EmployeeId>9978</EmployeeId>
    <CauseCode>SJK</CauseCode>
    <Date>2016-12-08</Date>
    <Extent>0</Extent>
    <Hours>8</Hours>
    <HolidayEntitling>true</HolidayEntitling>
</AbsenceTransaction>

Delete an absence transaction

URL

https://api.fortnox.se/3/absencetransactions/{EmployeeId}/{Date}/{CauseCode}

Method

DELETE

Description

Removes an absence transaction for an employee on a specific date

Properties

Field Type Access Description
EmployeeId  String (15) RW Unique employee-id
CauseCode String (3) RW Cause code
Date Date RW Date
Extent Float RW Extent in %
Hours Float RW Amount of hours
HolidayEntitling Boolean RW Determiens whether or not the registrations is holiday entitling