The time off balance web service allows you to extract and use time off balance data from Web TimeSheet without having to directly access your database. You can use this data in external applications, such as exception ticketing systems. Web services allow you to access XML data using HTTP protocols. That is, you can extract data by appending your Web TimeSheet URL.

Using the Time Off Balance Web Service:
1. Log in to Web TimeSheet. (Note:You must be logged in to Web TimeSheet to access the web service.)
2. Modify your URL to call a web service method, using the format below:
[WebTimeSheetURL]1/services/TimeOffBalanceReportService.asmx/[MethodName]?[Parameter1Name=Parameter1Value]&[Parameter2Name=Parameter2Value] Where: " Method determines what records the web service returns (akin to a report). " Parameters limit the data returned (akin to filters in reports).
Information on the available methods, and examples of URL formatting are provided below.
(Note:Method names are case sensitive, parameter names are not.)
3. Press Enter. The service will return time off balance data in an XML file. The names and values of the returned fields match fields found in the Time Off Balance report. However, there are some exceptions, outlined below. Understanding the Time Off Balance Methods and Parameters: Two methods are available for the Time Off Balance web service:
a)GetTimeOffBalanceData : – A time off balance record for each time off type that the specified user can book or enter time against.
b)GetTimeOffBalanceDataForType :- A single time off balance record for the specified time off type For each method, you define 2 or 3 parameters (depending on the method). All parameters available for a method are required:
UserLoginName1: The login name of the user whose data you want returned. Your Web TimeSheet URL differs depending on the type of server you are using: "For ISAPI IIS: https:// server name or IP address/cgi/rt.dll/timesheet "For CGI IIS: https:// server name or IP address /cgi/rt.exe/timesheet "For Internal web server: https:// server name or IP address/timesheet "For Replicon-hosted/SaaS: https:// server name or IP address/company key AsOfDate.
The date whose balance you want returned; that is, the balance returned will be the time off balance at that date. TimeOffTypeName: The name of the time off type whose balance you want returned. Examples of Formatting the URL for a Time Off Balance Web Service Call Example 1 (Internal web server): https:// johnsmithxp:81/timesheet/services/TimeOffBalanceReportService.asmx/GetTimeOffBalanceData?userLoginName=admin&asOfDate=June 2, 2009 Example 2 (ISAPI IIS): https:// smith:8083/cgi/rt.dll/timesheet/services/TimeOffBalanceReportService.asmx/GetTimeOffBalanceDataForType?userLoginName=john&timeoffTypeName=sick&asOfDate=February 13, 2010 Example 3 (Replicon-hosted/SaaS): https:// hosted.webtimesheet.com/companyx/services/TimeOffBalanceReportService.asmx/GetTimeOffBalanceDataForType?userLoginName=sally&timeoffTypeName=vacation&asOfDate=March 15, 2011

Understanding the Data Fields Returned by the Web Service: Most of the fields returned by the Time Off Balance web service match  in both name and data values  fields found in the Time Off Balance report.
However, to provide complete time off balance data, the web service also includes balance values that match those displayed in the time off calendar. To allow for this, the following data relationships are used to display the web service data.
Time Off Calendar Source Field: Remaining Days, Remaining Hours,Taken Days,Taken Hours Web Service Field Name RemainingDays, RemainingHours, TakenToResetDays, TakenToResetHours Time Off Balance Report Source Fields: Time Off Remaining (Days), Time Off Remaining (Hrs), Time Off Taken (Days), Time Off Taken (Hrs) Web Service Field Name BalanceDays, BalanceHours, TakenToDateDays, TakenToDateHours

Why do time off balance values differ depending on the data source?
In the Time Off Balance report, the time off balance displayed is your exact balance on the As of date you select. However, since the Time Off Calendar is more of a planning tool than a report, calendar balances take into account future time off booked up to the next balance reset or new policy. Balances displayed in both will be identical if you have no future time off booked.