List all attendance transactions

URL

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

Method

GET

Description

List all attendance transactions for all employees. Supports query-string parameters employeeid and date for fitlering the result

Response

{
  "MetaInformation": {
    "@TotalResources": 2,
    "@TotalPages": 1,
    "@CurrentPage": 1
  },
  "AttendanceTransactions": [
    {
      "@url": "https://api.fortnox.se/3/attendancetransactions/9978/2016-12-06/ARB",
      "EmployeeId": "9978",
      "CauseCode": "ARB",
      "Date": "2016-12-06",
      "Hours": "2"
    },
    {
      "@url": "https://api.fortnox.se/3/attendancetransactions/9978/2016-12-07/TID",
      "EmployeeId": "9978",
      "CauseCode": "TID",
      "Date": "2016-12-07",
      "Hours": "5"
    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<AttendanceTransactions TotalResources="2" TotalPages="1" CurrentPage="1">
    <AttendanceTransactionSubset url="https://api.fortnox.se/3/attendancetransactions/9978/2016-12-06/ARB">
        <EmployeeId>9978</EmployeeId>
        <CauseCode>ARB</CauseCode>
        <Date>2016-12-06</Date>
        <Hours>2</Hours>
    </AttendanceTransactionSubset>
    <AttendanceTransactionSubset url="https://api.fortnox.se/3/attendancetransactions/9978/2016-12-07/TID">
        <EmployeeId>9978</EmployeeId>
        <CauseCode>TID</CauseCode>
        <Date>2016-12-07</Date>
        <Hours>5</Hours>
    </AttendanceTransactionSubset>
</AttendanceTransactions>

Retrieve an attendance transaction

URL

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

Method

GET

Description

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

Response

{
  "AttendanceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "TID",
    "Date": "2016-12-06",
    "Hours": "2"
  }
}
{
  "AttendanceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "TID",
    "Date": "2016-12-06",
    "Hours": "2"
  }
}

Create an attendance transaction

URL

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

Method

POST

Description

Creates a new attendance transaction for an employee.

Usable “CauseCode”s:

ARB – Timlön
BE2 – Beredskapstid 2
BER or BE1 – Beredskapstid (BE1 is used in PAXml)
FLX – Flextid +/-
HLG – Helglön
JO2 or JR2 – Jourtid 2 (JR2 is used in PAXml)
JOR or JR1 – Jourtid (JR1 is used in PAXml)
MER – Mertid
OB1 – OB-ersättning 1
OB2 – OB-ersättning 2
OB3 – OB-ersättning 3
OB4 – OB-ersättning 4
OB5 – OB-ersättning 5
OK0 or NV9 – Extratid – Komptid (NV9 is used in PAXml)
OK1 or ÖK1 – Övertid 1 – Komptid (ÖK1 is used in PAXml)
OK2 or ÖK2 – Övertid 2 – Komptid (ÖK2 is used in PAXml)
OK3 or ÖK3 – Övertid 3 – Komptid (ÖK3 is used in PAXml)
OK4 or ÖK4 – Övertid 4 – Komptid (ÖK4 is used in PAXml)
OK5 or ÖK5 – Övertid 5 – Komptid (ÖK5 is used in PAXml)
OT1 or ÖT1 – Övertid 1 – Betalning (ÖT1 is used in PAXml)
OT2 or ÖT2 – Övertid 2 – Betalning (ÖT2 is used in PAXml)
OT3 or ÖT3 – Övertid 3 – Betalning (ÖT3 is used in PAXml)
OT4 or ÖT4 – Övertid 4 – Betalning (ÖT4 is used in PAXml)
OT5 or ÖT5 – Övertid 5 – Betalning (ÖT5 is used in PAXml)
RES or RE1 – Restid (RE1 is used in PAXml)
TID – Arbetstid

Request

{
  "AttendanceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "TID",
    "Date": "2016-12-08",
    "Hours": 2
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AttendanceTransaction>
    <EmployeeId>9978</EmployeeId>
    <CauseCode>TID</CauseCode>
    <Date>2016-12-08</Date>
    <Hours>2</Hours>
</AttendanceTransaction>

Response

{
  "AttendanceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "TID",
    "Date": "2016-12-08",
    "Hours": 2
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AttendanceTransaction>
    <EmployeeId>9978</EmployeeId>
    <CauseCode>TID</CauseCode>
    <Date>2016-12-08</Date>
    <Hours>2</Hours>
</AttendanceTransaction>

Update an attendance transaction

URL

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

Method

PUT

Description

Updates an attendance transaction.

Usable “CauseCode”s:

ARB – Timlön
BE2 – Beredskapstid 2
BER or BE1 – Beredskapstid (BE1 is used in PAXml)
FLX – Flextid +/-
HLG – Helglön
JO2 or JR2 – Jourtid 2 (JR2 is used in PAXml)
JOR or JR1 – Jourtid (JR1 is used in PAXml)
MER – Mertid
OB1 – OB-ersättning 1
OB2 – OB-ersättning 2
OB3 – OB-ersättning 3
OB4 – OB-ersättning 4
OB5 – OB-ersättning 5
OK0 or NV9 – Extratid – Komptid (NV9 is used in PAXml)
OK1 or ÖK1 – Övertid 1 – Komptid (ÖK1 is used in PAXml)
OK2 or ÖK2 – Övertid 2 – Komptid (ÖK2 is used in PAXml)
OK3 or ÖK3 – Övertid 3 – Komptid (ÖK3 is used in PAXml)
OK4 or ÖK4 – Övertid 4 – Komptid (ÖK4 is used in PAXml)
OK5 or ÖK5 – Övertid 5 – Komptid (ÖK5 is used in PAXml)
OT1 or ÖT1 – Övertid 1 – Betalning (ÖT1 is used in PAXml)
OT2 or ÖT2 – Övertid 2 – Betalning (ÖT2 is used in PAXml)
OT3 or ÖT3 – Övertid 3 – Betalning (ÖT3 is used in PAXml)
OT4 or ÖT4 – Övertid 4 – Betalning (ÖT4 is used in PAXml)
OT5 or ÖT5 – Övertid 5 – Betalning (ÖT5 is used in PAXml)
RES or RE1 – Restid (RE1 is used in PAXml)
TID – Arbetstid

Request

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

Response

{
  "AttendanceTransaction": {
    "EmployeeId": "9978",
    "CauseCode": "TID",
    "Date": "2016-12-08",
    "Hours": 8
  }
}
<?xml version="1.0" encoding="UTF-8"?>
<AttendanceTransaction>
    <EmployeeId>9978</EmployeeId>
    <CauseCode>TID</CauseCode>
    <Date>2016-12-08</Date>
    <Hours>8</Hours>
</AttendanceTransaction>

 

Delete an attendance transaction

URL

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

Method

DELETE

Description

Removes an attendance 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
Hours Float RW Amount of hours