TimeMapAPI


Click here for a complete list of operations.

createWorkFunction

Always use Test server for test and development. All usage restrictions on test is 200 requests. Url: https://testservice.timemap.dk/timemapapi.asmx
Description:Create or update a Work Function
Note, Fair usage limit: 2 request per employee/workfunction per hour.
Parameters:
  • apikey (string): Mandatory. The apikey is specified in the Company settings. Please see menu Settings->Company
  • apipwd (string): Mandatory. The api password must be specified in the Company settings. Please see menu Settings->Company
  • username (string): Mandatory. Specify the username/email of the user/developer calling this method. The user must exists in the EmployeeList.
  • employeeid (int): Optional. Internal TimeMap employeeid of the employee to get data for.
  • salaryno (string): Optional. Employee Salary/Payroll No of the employee to get data for.
  • departmentno (string): Optional. Department number of the department to get data for.
  • departmentid (int): Optional. Internal TimeMap departmentid of the department to get data for.
  • employeeworkfunctionid (int): Optional. Internal TimeMap employeeworkfunctionid of the workfunction to update - do not specify when creating new workfunctions.
  • note (string): Mandatory. The workfunction description.
  • color (string): Optional. Color for the workfunction. Hex colors sould be used (https://www.w3schools.com/htmL/html_colors_hex.asp).
  • projectno (string): Optional. Projectno to attach the workfunction to.
  • projectid (int): Optional. Projectid to attach the workfunction to.
  • starttime (datetime): Mandatory. Start of the workfunction (Format: yyyy.MM.dd)
  • endtime (datetime): Optional. End of the workfunction (if not specified workfunction will last 1 day. Format: yyyy.MM.dd)
Result. status/rows/result will always be returned: Result
  • status: statusvalue for the command.
  • rows: Number of rows created/updated.
  • result: Result message.
  • employeeworkfunctionid: Internal TimeMap Unique ID for the workfunction.
  • employeeid: Internal TimeMap Unique ID for the employee.
  • projectid: Internal TimeMap Unique ID for the project.
  • starttime: Start of the function (Format: yyyy.MM.dd HH:mm)
  • endtime: End of the function (Format: yyyy.MM.dd HH:mm)
  • note: The note
  • color: The color value

Test

The test form is only available for requests from the local machine.

SOAP 1.1

The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.

POST /TimeMapAPI.asmx HTTP/1.1
Host: testservice.timemap.dk
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/createWorkFunction"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <createWorkFunction xmlns="http://tempuri.org/">
      <apikey>string</apikey>
      <apipwd>string</apipwd>
      <username>string</username>
      <employeeid>string</employeeid>
      <salaryno>string</salaryno>
      <departmentno>string</departmentno>
      <departmentid>string</departmentid>
      <employeeworkfunctionid>string</employeeworkfunctionid>
      <note>string</note>
      <color>string</color>
      <projectno>string</projectno>
      <projectid>string</projectid>
      <starttime>string</starttime>
      <endtime>string</endtime>
    </createWorkFunction>
  </soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <createWorkFunctionResponse xmlns="http://tempuri.org/">
      <createWorkFunctionResult>string</createWorkFunctionResult>
    </createWorkFunctionResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values.

POST /TimeMapAPI.asmx HTTP/1.1
Host: testservice.timemap.dk
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <createWorkFunction xmlns="http://tempuri.org/">
      <apikey>string</apikey>
      <apipwd>string</apipwd>
      <username>string</username>
      <employeeid>string</employeeid>
      <salaryno>string</salaryno>
      <departmentno>string</departmentno>
      <departmentid>string</departmentid>
      <employeeworkfunctionid>string</employeeworkfunctionid>
      <note>string</note>
      <color>string</color>
      <projectno>string</projectno>
      <projectid>string</projectid>
      <starttime>string</starttime>
      <endtime>string</endtime>
    </createWorkFunction>
  </soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <createWorkFunctionResponse xmlns="http://tempuri.org/">
      <createWorkFunctionResult>string</createWorkFunctionResult>
    </createWorkFunctionResponse>
  </soap12:Body>
</soap12:Envelope>

HTTP GET

The following is a sample HTTP GET request and response. The placeholders shown need to be replaced with actual values.

GET /TimeMapAPI.asmx/createWorkFunction?apikey=string&apipwd=string&username=string&employeeid=string&salaryno=string&departmentno=string&departmentid=string&employeeworkfunctionid=string&note=string&color=string&projectno=string&projectid=string&starttime=string&endtime=string HTTP/1.1
Host: testservice.timemap.dk
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">string</string>