# TimeService

This service is used for getting information about hours and costs saved in the 24SevenOffice system. You can search for recent changes or hours registered after a given date with the ChangedAfter and RegisteredAfter search parameters in GetHours (opens new window). These dates are in UTC, seconds are disregarded in the search, so only changes to minutes will have an effect on the search query.

Timeservice (opens new window)
Timeservice WSDL (opens new window)

Data types

# Guides

# Save an hour

To save an hour use the SaveHour (opens new window) method. Below you will find a table that explains the status of a registered hour based on the settings of properties Locked, Approved and NeedApproval.

<?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/">
    <SaveHour xmlns="http://24sevenOffice.com/webservices">
        <InternalNote>This is a description too</InternalNote>


Please note: These are the main combinations that should be used to achieve a given status. Other combinations may result in hours that are registered as “needing approval” but not being visible in the approval list in the user interface.

Locked Approved NeedApproval Status

# Work types

The method GetWorkTypeList (opens new window) returns a list of work types. It takes two parameters Active and ProjectId. These parameters cannot be combined. The Active parameter can be set to none or unknown to return all work types (active and inactive). True and False return active and inactive work types respectively.

If you use the ProjectId parameter, the Active parameter has no effect.


Please note: If no work types have been checked off in a project, this means that all work types are active in the project and will all be returned on requests with the ProjectId parameter

# Methods

Method Input type Return type Description
SaveHour (opens new window) Hour Long Adds an hour into the time system
GetHours (opens new window) HourSearch Hour[] Returns a list of hours
GetHourList (opens new window) HourSearch Int[] Returns a list of hour IDs
GetProjectData (opens new window) ProjectDataSearch ProjectData Returns information about a project
GetProjectList (opens new window) ProjectSearch Project[] Returns a list of projects
GetWorkTypeList (opens new window) WorkTypeSearch WorkType[] Returns a list of work types
AddCost (opens new window) Cost Adds a cost
GetCosts (opens new window) CostSearchParameters Cost[] Gets a list of costs based on search parameters
DeleteHour (opens new window) Hour Boolean Deletes an hour
GetSalaryTypes (opens new window) SalaryType[] Gets a list of salary types
GetHoursForApproval (opens new window) ApprovalSearchParameters Hour[] Gets hours pending for approval
GetTimeSettings (opens new window) KeyValuePair[] Get settings for Time Module