UKG Pro Web Services API Guide
Employee Pay Statement Service
Employee Pay Statement Service API
The UKG Pro Employee Pay Statement Service API enables the user to programmatically retrieve the last employee pay statement information or a range of pay statements.
Introduction
With UKG’s UKG Pro Web Services, you can leverage your UKG Pro data for solving business application and integration needs.
This document is intended for individuals who are familiar with software development and web service technologies.
Overview
This document describes the methods of the service and provides code examples using Microsoft’s Visual Studio 2008 using C# and XML (.NET Framework 3.0 or higher).
The following information describes the service requirements.
Service Specifications | |
---|---|
Protocol | Simple Object Access Protocol (SOAP) 1.2 |
SSL Support | Required |
Signup and Licensing | |
---|---|
Account Required | One of the following is required:
|
Using a UKG Pro Service Account is recommended. For information regarding establishing and maintaining a UKG Pro Service Account, refer to the Manage Service Accounts guide located in the UKG Pro Learning Center (Home > Content > System Management > Web Services).
Employee Pay Statement Object
The employee pay statement object includes the following properties and collections. Please note when using certain method, the paging properties must be entered. Please see the Methods sections later in this document.
Base Object
Property | Type | Description |
---|---|---|
AddressLine1 | String | Address line 1 |
AddressLine2 | String | Address line 2 |
City | String | Employee city |
CompanyAddressCity | String | Company address city |
CompanyAddressCountry | String | Company address country |
CompanyAddressCounty | String | Company county |
CompanyAddressLine1 | String | Company address line 1 |
CompanyAddressLine2 | String | Company address line 2 |
CompanyAddressPostalCode | String | Company postal code |
CompanyAddressStateOrProvince | String | Company state or province |
CompanyName | String | Company name |
CompanyPhone | String | Company phone |
CompanyPhoneExt | String | Company phone extension |
Country | String | Employee country |
DeductionsCurrent | Decimal | Total current deductions |
DeductionsYTD | Decimal | Total year to date deductions |
Document | String | Pay statement document number |
EmployeeNumber | String | Employee number |
FederalAdditionalAmountWithheld | Decimal | Additional amount of federal taxes withheld |
FederalAllowancesClaimed | Integer | Federal allowances claimed |
FederalFilingStatus | String | Federal filing status |
FederalTaxableWagesCurrent | Decimal | Current federal taxable wages |
FederalTaxableWagesYTD | Decimal | Year to date federal taxable wages |
FullName | String | Employee full name |
GrossWagesCurrent | Decimal | Current gross wages |
GrossWagesYTD | Decimal | Year to date gross wages |
Job | String | Employee job |
Location | String | Employee location |
NetPayCurrent | Decimal | Current net pay |
NetPayYTD | Decimal | Year to date net pay |
OrgLevel1 | String | Organizational 1 |
OrgLevel2 | String | Organizational 2 |
OrgLevel3 | String | Organizational 3 |
OrgLevel4 | String | Organizational 4 |
PayDate | Date | Pay statement pay date |
PayFrequency | String | Pay frequency code |
PayGroup | String | Pay group |
PayIdentifier | String | Unique check identifier |
PayRate | Decimal | Employee’s rate of pay |
PeriodEndDate | Date | Pay period end date |
PeriodStartDate | Date | Pay period start date |
PostalCode | String | Postal code |
ResidentStateAllowancesClaimed | Integer | Resident State allowances |
ResidentStateFilingStatus | String | Resident state filing status |
SSN | String | Social Security Number |
StateOrProvince | String | State or Province |
TaxesCurrent | Decimal | Current total taxes |
TaxesYTD | Decimal | Year to date total taxes |
WorkStateAllowancesClaimed | Integer | Work state allowances |
WorkStateFilingStatus | String | Work state filing status |
Accruals Collection
Property | Type | Description |
---|---|---|
AmountCurrent | Decimal | Current accrual amount |
AmountType | String |
Type of accrual H=Hours D=Dollars |
Balance | Decimal | Accrual balance |
PlanCode | String | Accrual plan code |
PlanDescription | String | Accrual plan description |
Deductions Collection
Property | Type | Description |
---|---|---|
BasisAmount | Decimal | Deduction basis amount. The amount of wages the deduction is based on. |
DeductionCode | String | Deduction code |
DeductionDescription | String | Deduction description |
EmployeeAmount | Decimal | Current employee deduction amount |
EmployeeAmountYtd | Decimal | Year to date deduction amount |
EmployerAmount | Decimal | Current employer deduction amount |
EmployerAmountYtd | Decimal | Year to date employer deduction amount |
PreTax | Boolean | Is the deduction pre tax |
Earnings Collection
Property | Type | Description |
---|---|---|
Amount | Decimal | Current employee earnings |
AmountYtd | Decimal | Ytd employee earnings amount |
Hours | Decimal | Current hours |
HoursYtd | Decimal | Ytd hours |
PayCode | String | Earnings pay code |
PayDescription | String | Earning pay description |
PayRate | Decimal | Rate of pay |
PeriodEnd | Date | Pay period end date |
PeriodStart | Date | Pay period start date |
PieceCount | Decimal | Current piece count |
PiecePayRate | Decimal | Piece pay rate |
NetPay Collection
Property | Type | Description |
---|---|---|
AccountNumber | String | Bank account number |
AccountType | String |
Bank account type C=Checking S=Savings |
Amount | Decimal | Distribution amount to the bank account |
Taxes Collection
Property | Type | Description |
---|---|---|
Amount | Decimal | Current tax amount |
AmountYtd | Decimal | Ytd tax amount |
BasisAmount | Decimal | Tax basis amount. The amount of wages the tax is based on. |
TaxDescription | String | Tax description |
Quick Start
This section provides steps for creating a sample application in your development environment to retrieve and update the employee pay statement information.
Prerequisites
In order to use the service, you will need the following items:
- A UKG Pro Service Account username and password OR a UKG Pro Web User username and password
- The Customer API key from the UKG Pro Web Service administrative page
- If you use a UKG Pro Service Account:
- You will need the User API key from the Service Account administrative page.
- You must have appropriate permissions granted to the Service Account for the Employee Pay Statement service on the Service Account administrative page.
- If you use a UKG Pro Web User account, you will need the User API key from the Web Service administrative page.
Methods
This section introduces the API methods for the Employee Pay Statement Web Service.
FindLastPayStatement
This method provides a way to query the web service based on one or more filter criteria. See the Getting Started with UKG Pro Web Services guide for a list of query properties and operations supported. When calling this method, the last employee pay statement will be returned for the given query criteria. It will return zero or one pay statements in an Employee Pay Statement collection.
Note that the paging properties are required to be set when using this method. You can specify the PageNumber and PageSize. The page number indicates which page you want to return and the PageSize refers to the number of pay statements to return per PageNumber. You can return a maximum of 100 pay statements per PageNumber.
GetLastPayStatementByEmployeeIdentifier
This method allows you to retrieve an individual pay statement by providing an employee identifier. This is helpful if you are designing an application that is aware of the employees to retrieve.
- Syntax
-
Binding.GetLastPayStatementByEmployeeIdentifier(employeeIdentifier)
GetEmployeePayStatementByRange
This method returns zero or more pay statements for a specific employee identified by the passed-in employee identifier. The pay statement returned is based on the start date and the end date passed in.
For large data sets, paging is implemented for this method. Set the page number you want to land on and the number per page. The maximum per page is 1000.
GetPayStatementSummaryByRange
This method returns zero or more pay statement summaries for a given start date and end date. The pay summary information gives you a quick view of the total earnings, deductions and taxes. You may also pass in a PayGroup or CompanyIdentifier to further filter the list of pay summaries returned.
Pay summary information includes the following properties.
Property | Description |
---|---|
EmployeeIdentifier | Identifier that represents the employee |
PayIdentifier | Identifier that represents a pay statement. This can be used to call the GetPayStatementByPayIdentifier to get the pay statement details. |
PayDate | Pay statement pay date |
Document | Pay statement document number |
TotalEarnings | Sum total of earnings for the pay statement |
TotalDeductions | Sum total of deductions for the pay statement |
TotalTaxes | Sum total of taxes for the pay statement |
For large data sets, paging is implemented for this method. Set the page number you want to land on and the number per page. The maximum per page is 1000.
GetPayStatementByPayIdentifier
This function returns zero or one pay statements based on the given pay identifier. The pay identifier is a string value that represents a unique pay statement.
C# Example
Generate the Service Reference
Once you have a user and API keys, you need to create a service reference to the Login Service and the Pay Statement Service. In your development environment, add the service references.
In Visual Studio, select the Add Service Reference menu item from the Project menu. Once you enter the service information you should have the references display in the solution explorer.
![Created service reference](/AuthoringImages/en-us/WebServices/WebSvcsEmployeePayStatementServiceRef.png)
Example Code
The following code is an example of retrieving employee pay statement information from your UKG Pro data in a console application. You can copy the entire contents to a C# console application and update the following values and have an operable application.
See the methods section for further explanation.
UserName = "YOUR SERVICE ACCOUNT OR WEB USER NAME ",
Password = "YOUR PASSWORD",
UserAPIkey = "YOUR USER API KEY",
CustomerAPIkey = "YOUR CUSTOMER API KEY"
//Example Quick Start Code Begin
namespace EmployeePayStatementSample
{
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
using ConsoleSample.EmployeePayStatementService;
using ConsoleSample.LoginService;
class Program
{
private const string CustomerApIkey = "";
private const string UserApIkey = "";
private const string Username = "";
private const string Password = "";
private const string UltiProTokenNamespace =
"http://www.ultimatesoftware.com/foundation/authentication/ultiprotoken";
private const string ClientAccessKeyNamespace =
"http://www.ultimatesoftware.com/foundation/authentication/clientaccesskey";
private static CompanyIdentifier companyIdentifier;
private static EmployeeIdentifier employeeIdentifier;
private static string payIdentifier;
private static string payGroup;
static void Main(string[] args)
{
string token;
var loginClient = new LoginServiceClient();
try
{
string message;
loginClient.Authenticate(
CustomerApIkey,
Password,
UserApIkey,
Username,
out message,
out token);
if (message != null)
{
Console.WriteLine("Could not authenticate: " + message);
Console.WriteLine("Token: " + token);
Console.ReadLine();
return;
}
loginClient.Close();
}
catch (Exception ex)
{
loginClient.Abort();
Console.WriteLine("Exception:" + ex);
throw;
}
var client = new EmployeePayStatementClient();
try
{
// The following is required to attach the necessary headers used for authentication of the service.
using (new OperationContextScope(client.InnerChannel))
{
OperationContext.Current.OutgoingMessageHeaders.Add(
MessageHeader.CreateHeader("UltiProToken", UltiProTokenNamespace, token));
OperationContext.Current.OutgoingMessageHeaders.Add(
MessageHeader.CreateHeader("ClientAccessKey", ClientAccessKeyNamespace, CustomerApIkey));
FindLastPayStatement(client);
GetEmployeePayStatementByRange(client);
GetLastPayStatementByEmployeeIdentifier(client);
GetPayStatementByPayIdentifier(client);
GetPayStatementSummaryByRange(client);
}
client.Close();
}
catch (Exception ex)
{
Console.WriteLine("Exception: " + ex);
client.Abort();
}
Console.ReadLine();
}
private static void FindLastPayStatement(EmployeePayStatementClient client)
{
Console.WriteLine("Calling FindLastPayStatement...");
var query = new EmployeeQuery
{
CompanyCode = String.Empty,
CompanyName = String.Empty,
Country = String.Empty,
EmployeeNumber = String.Empty,
FirstName = String.Empty,
FormerName = String.Empty,
FullOrPartTime = String.Empty,
Job = String.Empty,
LastHire = String.Empty,
LastName = String.Empty,
Location = String.Empty,
OrganizationLevel1 = String.Empty,
OrganizationLevel2 = String.Empty,
OrganizationLevel3 = String.Empty,
OrganizationLevel4 = String.Empty,
OriginalHire = String.Empty,
PageNumber = "1",
PageSize = "1",
PayGroup = String.Empty,
Status = String.Empty,
SupervisorLastName = String.Empty,
TerminationDate = String.Empty,
TimeClockId = String.Empty,
};
PayStatementFindResponse response = client.FindLastPayStatement(query);
// The results of the operation, includes details such as success, failure,
// warnings, and paging information
if (!response.OperationResult.Success)
{
foreach (var message in response.OperationResult.Messages)
{
Console.WriteLine(message.Code + Environment.NewLine +
"\t" + message.Message + Environment.NewLine +
"\t" + message.PropertyName + Environment.NewLine +
"\t" + message.Severity + Environment.NewLine +
"\t" + message.LogEntryId);
}
return;
}
var pagingInfo = response.OperationResult.PagingInfo;
Console.WriteLine("Paging Info:");
Console.WriteLine("The employee query returned a total of " + pagingInfo.TotalItems + " records.");
Console.WriteLine("The employee query returned a total of " + pagingInfo.PageTotal + " pages.");
Console.WriteLine("Each page contains " + pagingInfo.PageSize + " records.");
Console.WriteLine("The Results contain the records for page " + pagingInfo.CurrentPage + ".");
// An array of summary information. Ties employees to their pay statements
// One pay statement per employee matching the query
EmployeePayStatement[] payStatementInfos = response.Results;
foreach (var payStatementInfo in payStatementInfos)
{
Console.WriteLine("Pay Statement Info:");
Console.WriteLine("CompanyCode : " + payStatementInfo.CompanyCode);
Console.WriteLine("EmployeeNumber : " + payStatementInfo.EmployeeNumber);
Console.WriteLine("FirstName : " + payStatementInfo.FirstName);
Console.WriteLine("LastName : " + payStatementInfo.LastName);
companyIdentifier = new CompanyCodeIdentifier { CompanyCode = payStatementInfo.CompanyCode };
// Detailed pay statements
foreach (var payStatement in payStatementInfo.PayStatements)
{
Console.WriteLine("\tAddressLine1 : " + payStatement.AddressLine1);
Console.WriteLine("\tAddressLine2 : " + payStatement.AddressLine2);
Console.WriteLine("\tCity : " + payStatement.City);
Console.WriteLine("\tCompanyAddressCity : " + payStatement.CompanyAddressCity);
Console.WriteLine("\tCompanyAddressCountry : " + payStatement.CompanyAddressCountry);
Console.WriteLine("\tCompanyAddressCounty : " + payStatement.CompanyAddressCounty);
Console.WriteLine("\tCompanyAddressLine1 : " + payStatement.CompanyAddressLine1);
Console.WriteLine("\tCompanyAddressLine2 : " + payStatement.CompanyAddressLine2);
Console.WriteLine("\tCompanyAddressPostalCode : " + payStatement.CompanyAddressPostalCode);
Console.WriteLine("\tCompanyAddressStateOrProvince : " + payStatement.CompanyAddressStateOrProvince);
Console.WriteLine("\tCompanyName : " + payStatement.CompanyName);
Console.WriteLine("\tCompanyPhone : " + payStatement.CompanyPhone);
Console.WriteLine("\tCompanyPhoneExt : " + payStatement.CompanyPhoneExt);
Console.WriteLine("\tCountry : " + payStatement.Country);
Console.WriteLine("\tDeductionsCurrent : " + payStatement.DeductionsCurrent);
Console.WriteLine("\tDeductionsYTD : " + payStatement.DeductionsYTD);
Console.WriteLine("\tDocument : " + payStatement.Document);
Console.WriteLine("\tEmployeeNumber : " + payStatement.EmployeeNumber);
Console.WriteLine("\tFederalAdditionalAmountWithheld : " + payStatement.FederalAdditionalAmountWithheld);
Console.WriteLine("\tFederalAllowancesClaimed : " + payStatement.FederalAllowancesClaimed);
Console.WriteLine("\tFederalFilingStatus : " + payStatement.FederalFilingStatus);
Console.WriteLine("\tFederalTaxableWagesCurrent : " + payStatement.FederalTaxableWagesCurrent);
Console.WriteLine("\tFederalTaxableWagesYTD : " + payStatement.FederalTaxableWagesYTD);
Console.WriteLine("\tFullName : " + payStatement.FullName);
Console.WriteLine("\tGrossWagesCurrent : " + payStatement.GrossWagesCurrent);
Console.WriteLine("\tGrossWagesYTD : " + payStatement.GrossWagesYTD);
Console.WriteLine("\tJob : " + payStatement.Job);
Console.WriteLine("\tLocation : " + payStatement.Location);
Console.WriteLine("\tNetPayCurrent : " + payStatement.NetPayCurrent);
Console.WriteLine("\tNetPayYTD : " + payStatement.NetPayYTD);
Console.WriteLine("\tOrgLevel1 : " + payStatement.OrgLevel1);
Console.WriteLine("\tOrgLevel2 : " + payStatement.OrgLevel2);
Console.WriteLine("\tOrgLevel3 : " + payStatement.OrgLevel3);
Console.WriteLine("\tOrgLevel4 : " + payStatement.OrgLevel4);
Console.WriteLine("\tPayDate : " + payStatement.PayDate);
Console.WriteLine("\tPayFrequency : " + payStatement.PayFrequency);
Console.WriteLine("\tPayGroup : " + payStatement.PayGroup);
Console.WriteLine("\tPayIdentifier : " + payStatement.PayIdentifier);
Console.WriteLine("\tPayRate : " + payStatement.PayRate);
Console.WriteLine("\tPeriodEndDate : " + payStatement.PeriodEndDate);
Console.WriteLine("\tPeriodStartDate : " + payStatement.PeriodStartDate);
Console.WriteLine("\tPostalCode : " + payStatement.PostalCode);
Console.WriteLine("\tResidentStateAllowancesClaimed : " + payStatement.ResidentStateAllowancesClaimed);
Console.WriteLine("\tResidentStateFilingStatus : " + payStatement.ResidentStateFilingStatus);
Console.WriteLine("\tSSN : " + payStatement.SSN);
Console.WriteLine("\tStateOrProvince : " + payStatement.StateOrProvince);
Console.WriteLine("\tTaxesCurrent : " + payStatement.TaxesCurrent);
Console.WriteLine("\tTaxesYTD : " + payStatement.TaxesYTD);
Console.WriteLine("\tWorkStateAllowancesClaimed : " + payStatement.WorkStateAllowancesClaimed);
Console.WriteLine("\tWorkStateFilingStatus : " + payStatement.WorkStateFilingStatus);
// Employee identifier
employeeIdentifier = payStatement.EmployeeIdentifier;
payGroup = payStatement.PayGroup;
Console.WriteLine("\tAccruals:");
// Accruals
foreach (var accrual in payStatement.Accruals)
{
Console.WriteLine("\t[ ]");
Console.WriteLine("\t\tAmountCurrent : " + accrual.AmountCurrent);
Console.WriteLine("\t\tAmountType : " + accrual.AmountType);
Console.WriteLine("\t\tBalance : " + accrual.Balance);
Console.WriteLine("\t\tPlanCode : " + accrual.PlanCode);
Console.WriteLine("\t\tPlanDescription : " + accrual.PlanDescription);
}
Console.WriteLine("\tDeductions:");
// Deductions
foreach (var deduction in payStatement.Deductions)
{
Console.WriteLine("\t[ ]");
Console.WriteLine("\t\tBasisAmount : " + deduction.BasisAmount);
Console.WriteLine("\t\tDeductionCode : " + deduction.DeductionCode);
Console.WriteLine("\t\tDeductionDescription : " + deduction.DeductionDescription);
Console.WriteLine("\t\tEmployeeAmount : " + deduction.EmployeeAmount);
Console.WriteLine("\t\tEmployeeAmountYtd : " + deduction.EmployeeAmountYtd);
Console.WriteLine("\t\tEmployerAmount : " + deduction.EmployerAmount);
Console.WriteLine("\t\tEmployerAmountYtd : " + deduction.EmployerAmountYtd);
Console.WriteLine("\t\tPreTax : " + deduction.PreTax);
}
Console.WriteLine("\tEarnings:");
// Earnings
foreach (var earning in payStatement.Earnings)
{
Console.WriteLine("\t[ ]");
Console.WriteLine("\t\tAmount : " + earning.Amount);
Console.WriteLine("\t\tAmountYtd : " + earning.AmountYtd);
Console.WriteLine("\t\tHours : " + earning.Hours);
Console.WriteLine("\t\tHoursYtd : " + earning.HoursYtd);
Console.WriteLine("\t\tPayCode : " + earning.PayCode);
Console.WriteLine("\t\tPayDescription : " + earning.PayDescription);
Console.WriteLine("\t\tPayRate : " + earning.PayRate);
Console.WriteLine("\t\tPeriodEnd : " + earning.PeriodEnd);
Console.WriteLine("\t\tPeriodStart : " + earning.PeriodStart);
Console.WriteLine("\t\tPieceCount : " + earning.PieceCount);
Console.WriteLine("\t\tPiecePayRate : " + earning.PiecePayRate);
}
Console.WriteLine("\tNetPay: ");
// Net Pay
foreach (var netPay in payStatement.NetPay)
{
Console.WriteLine("\t[ ]");
Console.WriteLine("\t\t : " + netPay.AccountNumber);
Console.WriteLine("\t\t : " + netPay.AccountType);
Console.WriteLine("\t\t : " + netPay.Amount);
}
Console.WriteLine("\tTaxes:");
// Taxes
foreach (var tax in payStatement.Taxes)
{
Console.WriteLine("\t[ ]");
Console.WriteLine("\t\tAmount : " + tax.Amount);
Console.WriteLine("\t\tAmountYtd : " + tax.AmountYtd);
Console.WriteLine("\t\tBasisAmount : " + tax.BasisAmount);
Console.WriteLine("\t\tTaxCode : " + tax.TaxCode);
Console.WriteLine("\t\tTaxDescription : " + tax.TaxDescription);
}
}
}
}
private static void GetEmployeePayStatementByRange(EmployeePayStatementClient client)
{
Console.WriteLine("Calling GetEmployeePayStatementByRange...");
var year2000 = new DateTime(2000, 1, 1);
var year2010 = new DateTime(2010, 1, 1);
const int PageNumber = 1;
const int PageSize = 1;
PayStatementGetResponse response = client.GetEmployeePayStatementByRange(employeeIdentifier, year2000, year2010, PageNumber, PageSize);
if (!response.OperationResult.Success)
{
foreach (var message in response.OperationResult.Messages)
{
Console.WriteLine(message.Code + Environment.NewLine +
"\t" + message.Message + Environment.NewLine +
"\t" + message.PropertyName + Environment.NewLine +
"\t" + message.Severity + Environment.NewLine +
"\t" + message.LogEntryId);
}
return;
}
foreach (var payStatement in response.Results)
{
// See FindLastPayStatement method for all fields
Console.WriteLine("\tPayIdenfitier : " + payStatement.PayIdentifier);
}
}
private static void GetLastPayStatementByEmployeeIdentifier(EmployeePayStatementClient client)
{
Console.WriteLine("Calling GetLastPayStatementByEmployeeIdentifier...");
PayStatementGetResponse response = client.GetLastPayStatementByEmployeeIdentifier(employeeIdentifier);
if (!response.OperationResult.Success)
{
foreach (var message in response.OperationResult.Messages)
{
Console.WriteLine(message.Code + Environment.NewLine +
"\t" + message.Message + Environment.NewLine +
"\t" + message.PropertyName + Environment.NewLine +
"\t" + message.Severity + Environment.NewLine +
"\t" + message.LogEntryId);
}
return;
}
// Should only be a single payStatement within this array
// Unless the user has no pay statements, then it will be empty
PayStatement[] payStatements = response.Results;
if (payStatements.Length > 0)
{
// See FindLastPayStatement method for all fields
Console.WriteLine("\tPayIdenfitier : " + payStatements[0].PayIdentifier);
payIdentifier = payStatements[0].PayIdentifier;
}
}
private static void GetPayStatementByPayIdentifier(EmployeePayStatementClient client)
{
Console.WriteLine("Calling GetPayStatementByPayIdentifier...");
PayStatementGetResponse response = client.GetPayStatementByPayIdentifier(payIdentifier);
if (!response.OperationResult.Success)
{
foreach (var message in response.OperationResult.Messages)
{
Console.WriteLine(message.Code + Environment.NewLine +
"\t" + message.Message + Environment.NewLine +
"\t" + message.PropertyName + Environment.NewLine +
"\t" + message.Severity + Environment.NewLine +
"\t" + message.LogEntryId);
}
return;
}
// Should only be a single payStatement within this array
// Unless the payIdentifier was not valid
PayStatement[] payStatements = response.Results;
if (payStatements.Length > 0)
{
// see FindLastPayStatement method for all fields
Console.WriteLine("\tPayIdenfitier : " + payStatements[0].PayIdentifier);
}
}
private static void GetPayStatementSummaryByRange(EmployeePayStatementClient client)
{
Console.WriteLine("Calling GetPayStatementSummaryByRange...");
var year2000 = new DateTime(2000, 1, 1);
var year2010 = new DateTime(2010, 1, 1);
const int PageSize = 1;
const int PageNumber = 1;
GetPayStatementSummaryResponse response = client.GetPayStatementSummaryByRange(companyIdentifier, year2000, year2010, payGroup, PageNumber, PageSize);
if (!response.OperationResult.Success)
{
foreach (var message in response.OperationResult.Messages)
{
Console.WriteLine(message.Code + Environment.NewLine +
"\t" + message.Message + Environment.NewLine +
"\t" + message.PropertyName + Environment.NewLine +
"\t" + message.Severity + Environment.NewLine +
"\t" + message.LogEntryId);
}
return;
}
foreach (var payStatementSummary in response.Results)
{
Console.WriteLine("[ ]");
Console.WriteLine("\tDocument : " + payStatementSummary.Document);
Console.WriteLine("\tPayDate : " + payStatementSummary.PayDate);
Console.WriteLine("\tPayIdentifier : " + payStatementSummary.PayIdentifier);
Console.WriteLine("\tTotalDeductions : " + payStatementSummary.TotalDeductions);
Console.WriteLine("\tTotalEarnings : " + payStatementSummary.TotalEarnings);
Console.WriteLine("\tTotalTaxes : " + payStatementSummary.TotalTaxes);
// Also includes an employee identifier
}
// In order to get detailed information about the pay statements
// the most efficient way is to call GetPayStatementByPayIdentifier
}
}
}
// Example Quick Start Code End
XML Examples
XML Examples
The Authentication Service (http://<address>/services/LoginService) is required to get the Token needed for all Core Web Service Calls. Please refer to the UKG Pro Login Service API Guide for further information.
GetPayStatementSummaryByRange
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.ultipro.com/services/employeepaystatement/IEmployeePayStatement/GetPayStatementSummaryByRange</a:Action>
<UltiProToken xmlns="http://www.ultimatesoftware.com/foundation/authentication/ultiprotoken">200edafb-34d1-4114-ace2-562365c8a72d</UltiProToken>
<ClientAccessKey xmlns="http://www.ultimatesoftware.com/foundation/authentication/clientaccesskey">UGIYS</ClientAccessKey>
</s:Header>
<s:Body>
<GetPayStatementSummaryByRange xmlns="http://www.ultipro.com/services/employeepaystatement">
<companyIdentifier xmlns:b="http://www.ultipro.com/contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="b:CompanyCodeIdentifier">
<b:CompanyCode>C0014</b:CompanyCode>
</companyIdentifier>
<startDate>2013-04-15T00:00:00</startDate>
<endDate>2013-04-30T00:00:00</endDate>
<payGroup>BIWEEK</payGroup>
<pageNumber>1</pageNumber>
<pageSize>5</pageSize>
</GetPayStatementSummaryByRange>
</s:Body>
</s:Envelope>
GetLastPayStatementByEmployeeIdentifier
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.ultipro.com/services/employeepaystatement/IEmployeePayStatement/GetLastPayStatementByEmployeeIdentifier</a:Action>
<UltiProToken xmlns="http://www.ultimatesoftware.com/foundation/authentication/ultiprotoken">200edafb-34d1-4114-ace2-562365c8a72d</UltiProToken>
<ClientAccessKey xmlns="http://www.ultimatesoftware.com/foundation/authentication/clientaccesskey">UGIYS</ClientAccessKey>
</s:Header>
<s:Body>
<GetLastPayStatementByEmployeeIdentifier xmlns="http://www.ultipro.com/services/employeepaystatement">
<employeeIdentifier xmlns:b="http://www.ultipro.com/contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="b:EmployeeNumberIdentifier">
<b:CompanyCode>C0014</b:CompanyCode>
<b:EmployeeNumber>555667788</b:EmployeeNumber>
</employeeIdentifier>
</GetLastPayStatementByEmployeeIdentifier>
</s:Body>
</s:Envelope>
GetEmployeePayStatementByRange
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.ultipro.com/services/employeepaystatement/IEmployeePayStatement/GetEmployeePayStatementByRange</a:Action>
<UltiProToken xmlns="http://www.ultimatesoftware.com/foundation/authentication/ultiprotoken">200edafb-34d1-4114-ace2-562365c8a72d</UltiProToken>
<ClientAccessKey xmlns="http://www.ultimatesoftware.com/foundation/authentication/clientaccesskey">UGIYS</ClientAccessKey>
</s:Header>
<s:Body>
<GetEmployeePayStatementByRange xmlns="http://www.ultipro.com/services/employeepaystatement">
<identifier xmlns:b="http://www.ultipro.com/contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" i:type="b:EmployeeNumberIdentifier">
<b:CompanyCode>C0014</b:CompanyCode>
<b:EmployeeNumber>555667788</b:EmployeeNumber>
</identifier>
<startDate>2013-02-15T00:00:00</startDate>
<endDate>2013-04-30T00:00:00</endDate>
<pageNumber>1</pageNumber>
<pageSize>5</pageSize>
</GetEmployeePayStatementByRange>
</s:Body>
</s:Envelope>
GetPayStatementByPayIdentifier
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.ultipro.com/services/employeepaystatement/IEmployeePayStatement/GetPayStatementByPayIdentifier</a:Action>
<UltiProToken xmlns="http://www.ultimatesoftware.com/foundation/authentication/ultiprotoken">ce40f973-aaa3-44a5-94f7-89d677ed3473</UltiProToken>
<ClientAccessKey xmlns="http://www.ultimatesoftware.com/foundation/authentication/clientaccesskey">UGIYS</ClientAccessKey>
</s:Header>
<s:Body>
<GetPayStatementByPayIdentifier xmlns="http://www.ultipro.com/services/employeepaystatement">
<payIdentifier>76ZBPC00S0K0</payIdentifier>
</GetPayStatementByPayIdentifier>
</s:Body>
</s:Envelope>
FindLastPayStatement
<s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.ultipro.com/services/employeepaystatement/IEmployeePayStatement/FindLastPayStatement</a:Action>
<UltiProToken xmlns="http://www.ultimatesoftware.com/foundation/authentication/ultiprotoken">ce40f973-aaa3-44a5-94f7-89d677ed3473</UltiProToken>
<ClientAccessKey xmlns="http://www.ultimatesoftware.com/foundation/authentication/clientaccesskey">UGIYS</ClientAccessKey>
</s:Header>
<s:Body>
<FindLastPayStatement xmlns="http://www.ultipro.com/services/employeepaystatement">
<EmployeeNumber>= 638945004</EmployeeNumber>
<LastName xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
<PageNumber>1</PageNumber>
<PageSize>20</PageSize>
</FindLastPayStatement>
</s:Body>
</s:Envelope>
© UKG Inc. All rights reserved. For a full list of UKG trademarks, visit www.ukg.com/trademarks. All other trademarks, if any, are the property of their respective owners. No part of this document or its content may be reproduced in any form or by any means or stored in a database or retrieval system without the prior written authorization of UKG Inc. (“UKG”). Information in this document is subject to change without notice. The document and its content are confidential information of UKG and may not be disseminated to any third party. Nothing herein constitutes legal advice, tax advice, or any other advice. All legal or tax questions or concerns should be directed to your legal counsel or tax consultant.
Liability/Disclaimer
UKG makes no representation or warranties with respect to the accuracy or completeness of the document or its content and specifically disclaims any responsibility or representation for other vendors’ software. The terms and conditions of your agreement with us regarding the software or services provided by us, which is the subject of the documentation contained herein, govern this document or content. All company, organization, person, and event references are fictional. Any resemblance to actual companies, organizations, persons, and events is entirely coincidental.
Links to Other Materials: The linked sites and embedded links are not under the control of UKG. We reserve the right to terminate any link or linking program at any time. UKG does not endorse companies or products to which it links. If you decide to access any of the third-party sites linked to the site, you do so entirely at your own risk.