tamigo offers the attendance services, which allow you to register check-in and check-out times for employees directly in tamigo from a third-party system (e.g. Point-of-Sale (POS) system).

The attendance services require you to set up keys in tamigo for the departments and employees who will use the services.

To set up these keys, you:

  • Log in to tamigo as a Planner or Administrator
  • Go to Configuration -> Departments, to set the Department ID
  • Go to Configuration -> POS Keys, to set the corresponding keys for the employees

a) Opening Hours

tamigo offers a way to get a list of opening hours.

Request (JSON)

GET /OpeningHours/2018-01-01/2018-01-02/?securityToken=<sessionToken> HTTP/1.1
Content-Type: application/json
[

Response (JSON)

HTTP/1.1 200 OK
     {
        "DepartmentName": "Shop A",
        "NormalOpeningHours": [],
       "SpecialOpeningHours": [],
        "StoreId": null
    },
    {
        "DepartmentName": "Shop A",
        "NormalOpeningHours": [],
        "SpecialOpeningHours": [],
       "StoreId": null
]

 

b) Check-In 

Use the check-in service to register an employee who has arrived at work. tamigo will register the check-in at the time you send and match it to the employee and department. If time rounding rules have been applied, the service returns the rounded time.

When using optional parameter ActivityName, the employee will be checked in to the current shift, and the check-out time will not be registered in worked hours.

For a complete example of usage, see the Batch Update section. 

Parameter
Format
Example
departmentKey
text
A123, 1234567, abcdefg
employeeKey
text
A123, 1234567, abcdefg
checkInTime
yyyy-MM-ddThh:mm:ss
2011-09-02T12:37:00
sessionToken
as returned by login
766c9732-e2d1-46d1-ae3e-a74c560bb8e6
activityName (optional)
text
Lunch, SmallBreak, (activity name)

 

Request (JSON)

POST /attendance/checkin/?token=<sessionToken> HTTP/1.1
Content-Type: application/json

{
"DepartmentKey":"<departmentKey>",
"EmployeeKey":"<employeeKey>",
"CheckInTime":"<checkInTime>",
"ActivityName":"<activityName>"
}

 

Response (JSON)

HTTP/1.1 200 OK
<actual checkin date time>


d) Batch Update

The batch update service is similar to the check-in and check-out services, only that it gets a multiple array of check-in and -out times, in chronological order. This import can also be used for multiple employees at the same time. The method will return the same array as was sent, only that the CheckInTime and CheckOutTime will be adjusted to actual time registered.

For example, the below check-in and -out times will be registered in the system:

Shifts visible only on check-out:

  • 09:00-10:15
  • 10:15-10:33 SmallBreak
  • 10:33-12:03
  • 12:03-12:44 Lunch
  • 12:44-17:02

Shifts visible in the Timesheet:

  • 09:00-10:15
  • 10:33-12:03
  • 12:44-17:02

 

Request (JSON)

POST /attendance/?token=<sessionToken> HTTP/1.1
Content-Type: application/json

[
{"DepartmentKey":"<departmentKey>","EmployeeKey":"<employeeKey>","CheckInTime":"2017-04-07T09:00:11"},
{"DepartmentKey":"<departmentKey>","EmployeeKey":"<employeeKey>","CheckInTime":"2017-04-07T10:15:11", "ActivityName":"SmallBreak"},
{"DepartmentKey":"<departmentKey>","EmployeeKey":"<employeeKey>","CheckOutTime":"2017-04-07T10:33:11", "ActivityName":"SmallBreak"},
{"DepartmentKey":"<departmentKey>","EmployeeKey":"<employeeKey>","CheckInTime":"2017-04-07T12:03:11", "ActivityName":"Lunch"},
{"DepartmentKey":"<departmentKey>","EmployeeKey":"<employeeKey>","CheckOutTime":"2017-04-07T12:44:11", "ActivityName":"Lunch"},
{"DepartmentKey":"<departmentKey>","EmployeeKey":"<employeeKey>","CheckOutTime":"2017-04-07T17:02:11"}
]

 

Response (JSON)

HTTP/1.1 200 OK

e) Export Absence

Use this service to export absence from one or more departments.

Use the following parameters:

StartDate: Date formatted as MM-DD-YYYY.

EndDate: Date formatted as MM-DD-YYYY.

DepartmentId: Optional. If you do not use it, the result returned is for all departments.

Request (JSON)

GET 
/Leave/ByDate/startDate=<startDate>&endDate=<endDate>&departmentId=<departmentId>securityToken=<sessionToken>
HTTP/1.1
Content-Type application/json

 

Response (JSON)

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

[{"AbsenceType":"Vacation",
"Date":"\/Date(1324854000000+0100)\/",
"Name":"John Doe",
"WageSystemKey":"00044"},
...
{"AbsenceType":"Vacation",
"Date":"\/Date(1324940400000+0100)\/",
"Name":" John Doe ",
"WageSystemKey":"00044"}]

 

f) Import Revenue

Use this service to import the daily revenue.

Use the following parameters:

ApplicationName: Same name as used when logging in

Key: Same key as used when logging in (l)

Content: A CSV file formatted as DepartmentId, date (YYYY-MM-DD), revenue.

Format: Use Standard

DateTimeReceived: The time you send the request at

Type: NULL

 

Request (JSON)

POST /Revenues/?securityToken=<sessionToken> HTTP/1.1
Content-Type application/json

 {
"ApplicationName": "<ApplicationName>",
"Key": "<ApplicationKey>”,
"Content": [
"100,2011-01-01,1000",
"100,2011-01-02,1200"
],
"Format": "Standard",
"DateTimeReceived": "\/Date(1327996809388+0100)\/",
"Type": null
}

  

Response (JSON)

HTTP/1.1 200 OK

 

g) Import Revenue Over Day/Footfall

Use this service to import the revenue over the day compared to footfall.

Use the following parameters:

ApplicationName: Same name as used when logging in

Key: Same key as used when logging in

Content: A CSV file formatted as amount;amountType;startDateTime;endDateTime;posId;statusType;employeePosKey

Format: Use Standard

DateTimeReceived: the time you send the request at

Type: NULL

Amount: The number of either revenue or footfall

Amounttype: 1 = Revenue, 2 = Footfall (customers)

StartDateTime: Start of data to import (should be whole quarters, ie start and end 01-01-2014 13:00 to 01-01-2014 13:15)

EndDateTime: End of data to import

posId: Department ID

statusType: 1 = Actual, 2 = forecast

employeePosKey: Should only be filled for employee-specific revenue

 

Request (JSON)

POST /Revenues/UploadRevenueOverDay?securityToken=<sessionToken> HTTP/1.1
Content-Type application/json

"ApplicationName": "<ApplicationName>",
"Key": "<ApplicationKey>”,
"Content": [
 "12;2;2014-01-01 13:00;201-01-01 13:15;999;1;NULL",
 "6;2;2014-01-01 13:15;201-01-01 13:30;999;1;NULL",
 ],
"Format": "Standard",
"DateTimeReceived": "\/Date(1327996809388+0100)\/",
"Type": null
}

 

Response (JSON)

HTTP/1.1 200 OK

 

h) Import Transactions 

Use this service to import the daily revenue, including related transactions.

Use the following parameters:

DepartmentKey: ID of the department

EmployeePosKey: NULL

Time: Time of the transaction

Amount: Total amount of lines in the array

Lines: Array using the following parameters:

Count: Number of items

Price: Item price

ProductKey: Product key of product

ProductName: Name of product

 

Request (JSON)

POST /Revenues/UploadTransactions?securityToken=<sessionToken> HTTP/1.1
Content-Type application/json
[
 {
   "DepartmentKey": "100",
   "EmployeePosKey": null,
   "Time": "\/Date(1412589803535+0200)\/",
   "Amount": 1000.5,
   "Lines": [
      {
        "ProductKey": "Some-product-key",
        "ProductName": "Some-product-name",
        "Count": 2,
        "Price": 500.25
      }
    ]
  }
]

 

Response (JSON)

HTTP/1.1 200 OK