eCore Developers

API Documentation

Functional Overview

All Operations

The API supports the following distinct data records for consumption:

Name Description
GetEmployees Returns a list of employee records
GetSchedules Returns a list of schedules records
GetPunches To get a list of punches records
GetCertifications To get a list of certification records
PutEmployeeProfile Insert the employee profile information into ePro Scheduler Plus
PutEmployeeCertification Insert the employee certification information into ePro Scheduler Plus

Operation Specifications

GetEmployees
Description

This will return a list of all active employees' info.

Signature
EmployeeResponse GetEmployees(string customerId, string password, string vendorKey, string employeeId);
Request Parameters
Name Type Description
custId string CustomerId
pass string Password
vendorKey string Vendor key
empId string Employee id (optional parameter)
EmployeeResponse (in XML format)
Name Type Description
Status int 0 = Successful, -1 = Unsuccessful
ErrorCode int Error Code
ErrorMessage string Error Message
Employees Employee[] An array of employees in XML format
<EmployeeResponse xmlns="http://schemas.datacontract.org/2004/07/API.Service" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 
  <ErrorCode>0</ErrorCode> 
  <ErrorMessage><ErrorMessage />
  <Status>0</Status> 
  <Employees> 
    <Employee> 
      <EmployeeId>2824</EmployeeId> 
      <FirstName>Julie</FirstName> 
      <LastName>Crane</LastName> 
      <CellPhone>555-555-5555</CellPhone> 
      <Pager>555-555-5555</Pager> 
      <EmailAddress>[email protected]</EmailAddress> 
      <Status>0</Status> 
      <HomeCostCenter>421</HomeCostCenter> 
      <Address>14 First Avenue</Address> 
      <City>Blaine</City> 
      <State>MN</State> 
      <Zip>55423</Zip> 
      <FTHireDate>10/20/2004</FTHireDate> 
      <HireDate>10/20/2004</HireDate> 
      <BirthDate>09/04/1974</BirthDate> 
    </Employee> 
  </Employees> 
</EmployeeResponse> 
C# Code Sample

The following C# code shows how to call GetEmployees:


        
string serviceUri = string.Format("http://<api_url>/EmployeeService.svc/GetEmployees?custId={0}&pass={1}&vendorKey={2}&empId={3}", 
    customerId, password, vendorKey, employeeId);

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(serviceUri);

HttpWebResponse response = (HttpWebResponse)request.GetResponse();

StreamReader sr = new StreamReader(response.GetResponseStream());

string result = sr.ReadToEnd();

Console.WriteLine();
Console.ReadKey();
GetSchedules
Description

This will return a list of schedule info that meets the criteria: Called from external application.

Signature
ScheduleResponse GetSchedules(string customerId, string password, string vendorKey, string employeeId, string startTime, string endTime); 
Request Parameters
Name Type Description
custId string Customer id
Pass string Password
vendorKey string Vendor key
empId string Employee Id (optional)
starttime string schedule start time
endtime string schedule end time
ScheduleResponse (in XML format)
Name Type Description
Status int 0 = Successful, -1 = Unsuccessful
ErrorCode int Error Code
ErrorMessage string Error Message
Schedules Schedule[] An array of schedules in XML format
<ScheduleResponse xmlns="http://schemas.datacontract.org/2004/07/API.Service" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 
  <Status>0</Status> 
  <ErrorCode>0</ErrorCode> 
  <ErrorMessage><ErrorMessage />
  <Schedules> 
    <Schedule> 
      <EmployeeId>0</EmployeeId> 
      <StartTime>3/23/2008 8:00:00 PM</StartTime> 
      <EndTime>3/23/2008 6:00:00 PM</EndTime> 
      <Duration>12</Duration> 
      <Qualification>Pilot</Qualification> 
      <UnitName>BLS 12</UnitName> 
      <CostCenter>002</CostCenter> 
      <EarningCode>R</EarningCode> 
      <ResourceType>NA</ResourceType> 
      <Comments>Weather Check in AM</Comments> 
      <VehicleName>482</ VehicleName> 
      <InServiceTime>3/23/2008 8:20:00 AM</ InServiceTime> 
      <OutOfServiceTime>3/23/2008 5:04:00 PM</ OutOfServiceTime> 
      <ItemId>303</ItemId> 
      <ShiftId>0</ShiftId>
    </Schedule>
    <Schedule> 
      <EmployeeId>10494</EmployeeId> 
      <StartTime>3/24/2008 8:00:00 AM</StartTime> 
      <EndTime>3/24/2008 4:00:00 PM</EndTime> 
      <Duration>8</Duration> 
      <Qualification>Admin</Qualification> 
      <UnitName>Base 7</UnitName> 
      <CostCenter>004</CostCenter> 
      <EarningCode>R</EarningCode> 
      <ResourceType>NA</ResourceType> 
      <Comments>Weather Check in AM</Comments> 
      <VehicleName>483</ VehicleName> 
      <InServiceTime>3/23/2008 8:20:00 AM</ InServiceTime> 
      <OutOfServiceTime>3/23/2008 5:04:00 PM</ OutOfServiceTime> 
      <ItemId>302</ItemId> 
      <ShiftId>0</ShiftId>
    </Schedule> 
  </Schedules> 
</ScheduleResponse> 
C# Code Sample

The following C# code shows how to call GetSchedules:

GetPunches
Description

This will return a list of punch info that meets the criteria: Called from external application.

Signature
PunchResponse GetPunches(string customerId, string password, string vendorKey, string employeeId, string startTime, string endTime); 
Request Parameters
Name Type Description
custId string Customer id
Pass string Password
vendorKey string Vendor key
empId string Employee Id (optional)
starttime string Start time
endtime string End time
PunchResponse (in XML format)
Name Type Description
Status int 0 = Successful, -1 = Unsuccessful
ErrorCode int Error Code
ErrorMessage string Error Message
Punches Punch[] An array of punches in XML format
<PunchResponse xmlns="http://schemas.datacontract.org/2004/07/API.Service" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 
  <Status>0</Status> 
  <ErrorCode>0</ErrorCode> 
  <ErrorMessage><ErrorMessage />
  <Punches> 
    <Punch>
      <EmployeeId>8776</EmployeeId> 
      <InPunchTime>3/26/2008 8:00:00 AM</InPunchTime> 
      <OutPunchTime>3/28/2008 2:55:34 PM</OutPunchTime> 
    </Punch> 
    <Punch> 
      <EmployeeId>99110</EmployeeId> 
      <InPunchTime>3/24/2008 7:56:00 AM</InPunchTime> 
      <OutPunchTime>3/24/2008 9:00:00 PM</OutPunchTime> 
    </Punch> 
  </Punches> 
</PunchResponse> 
C# Code Sample

The following C# code shows how to call GetPunches:

GetCertifications
Description

This will return a list of certifications info that meets the criteria: Called from external application.

Signature
CertificationResponse GetCertifications(string customerId, string password, string vendorKey, string employeeId); 
Request Parameters
Name Type Description
custId string Customer id
Pass string Password
vendorKey string Vendor key
empId string Employee Id (optional)
Response Result (in XML format)
Name Type Description
Status int 0 = Successful, -1 = Unsuccessful
ErrorCode int Error Code
ErrorMessage string Error Message
Certifications Certification[] An array of certifications in XML format
<CertificationResponse xmlns="http://schemas.datacontract.org/2004/07/API.Service" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 
  <Status>0</Status> 
  <ErrorCode>0</ErrorCode> 
  <ErrorMessage><ErrorMessage />
  <Certifications> 
    <Certification> 
      <EmployeeId>10490</EmployeeId> 
      <CertificationName>CPR</CertificationName> 
      <CertificationNumber>123</CertificationNumber> 
      <EffectiveDate>9/25/2013 12:00:00 AM</EffectiveDate> 
      <ExpirationDate>9/25/2014 12:00:00 AM</ExpirationDate> 
    </Certification> 
    <Certification> 
      <EmployeeId>10491</EmployeeId> 
      <CertificationName>Medic</CertificationName> 
      <CertificationNumber>123</CertificationNumber> 
      <EffectiveDate>9/25/2013 12:00:00 AM</EffectiveDate> 
      <ExpirationDate>9/25/2014 12:00:00 AM</ExpirationDate> 
    </Certification> 
  </Certifications> 
</CertificationResponse> 
C# Code Sample
PutEmployeeProfile
Description

This will insert the employee profile information into ePro Scheduler Plus for the designated customer. The insert will fail if the Employee ID exists.

Signature
EmployeeProfileResponse PutEmployeeProfile(EmployeeProfileRequest request); 
Request Body

An EmployeeProfileRequest object in XML format.

<EmployeeProfileRequest xmlns="https://www.net-scheduler.com/eProPlus"> 
  <CustomerId>developer</CustomerId> 
  <Password>password</Password> 
  <VendorKey>Sunbee</VendorKey> 
  <EmployeeProfile> 
    <EmployeeId>5555511</EmployeeId> 
    <FirstName>Patrick</FirstName> 
    <LastName>Fitzsimmons</LastName> 
    <HireDate>12/21/2016 5:00:39 PM</HireDate> 
    <FTHireDate>9/21/2016 5:00:39 PM</FTHireDate> 
    <PayRate>40.50</PayRate> 
    <PayPayType>H</PayPayType> 
    <Address>8360 LBJ Fwy, Suite #255</Address> 
    <City>Dallas</City> 
    <State>TX</State> 
    <Zip>75243</Zip> 
    <HomePhone>888-123-3435</HomePhone> 
    <Pager>888-121-3344</Pager> 
    <CellPhone>888-121-3344</CellPhone> 
    <EmergencyContactPhone>888-121-3344</EmergencyContactPhone> 
    <EmergencyContactPerson>Justin Custer</EmergencyContactPerson> 
    <EmailAddress>[email protected]</EmailAddress> 
    <HomeCostCenter>001</HomeCostCenter> 
  </EmployeeProfile> 
</EmployeeProfileRequest> 
EmployeeProfileRequest Object
Name Type Description
CustomerId string Customer id
Password string Password
VendorKey string Vendor key
EmployeeProfile object EmployeeProfile object
EmployeeProfile Object
Name Type Description
EmployeeId string Employee Id
FirstName string First name
LastName string Last name
HireDate string Hire date
FTHireDate string Full time hire date
PayRate string Pay Rate
PayType string H or S (Hourly or Salary)
Address string Home address
City string Home city
State string Home state
Zip string Home zip code
HomePhone string Home phone number
Pager string Pager number
CellPhone string Cell phone number
EmergencyContactPhone string Emergency contact phone number
EmergencyContactPerson string Emergency contact person
EMailAddress string Email Address
HomeCostCenter string Home Cost Center/Department
Response Result (in XML format)
Name Type Description
Status int 0 = Successful, -1 = Unsuccessful
ErrorCode int Error Code
ErrorMessage string Error Message
<EmployeeProfileResponse xmlns="http://schemas.datacontract.org/2004/07/API.Service" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Status>0</Status>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage />
</EmployeeProfileResponse>
C# Code Sample

The following C# code shows how to call PutEmployeeProfile:

PutEmployeeCertification
Description

This will insert the employee certification information into ePro Scheduler Plus for the designated customer. The insert will fail if the certification does not exist.

Signature
EmployeeCertificationResponse PutEmployeeCertification(EmployeeCertificationRequest request); 
Request Body

An EmployeeCertificationRequest object in xml format.

<EmployeeCertificationRequest xmlns="https://www.net-scheduler.com/eProPlus"> 
  <CustomerId>(CustomerId)</CustomerId> 
  <Password>(Password)</Password> 
  <VendorKey>(VendorKey)</VendorKey> 
  <EmployeeCertification> 
    <EmployeeId>(EmployeeId)</EmployeeId> 
    <Certification>(CertificationName)</Certification> 
    <Number></Number> 
    <ExpirationDate></ExpirationDate> 
    <EffectiveDate></EffectiveDate> 
    <Notes></Notes> 
  </EmployeeCertification> 
</EmployeeCertificationRequest> 
EmployeeCertificationRequest Object
Name Type Description
CustomerId string Customer id
Password string Password
VendorKey string Vendor key
EmployeeCertification object EmployeeCertification object
EmployeeCertification Object
Name Type Description
EmployeeId string Employee Id
Certification string Certification name
Number string Certification Number
ExpirationDate string Expiration Date
EffectiveDate string Effective Date
Notes string Notes
Response Result (in XML format)
Name Type Description
Status int 0 = Successful, -1 = Unsuccessful
ErrorCode int Error Code
ErrorMessage string Error Message
<EmployeeCertificationResponse xmlns="http://schemas.datacontract.org/2004/07/API.Service" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <Status>0</Status>
  <ErrorCode>0</ErrorCode>
  <ErrorMessage />
</EmployeeCertificationResponse>
C# Code Sample

The following C# code shows how to call PutEmployeeCertification:

Error Code and Error Messages
Description

On errors, the system generates and returns a custom error message with error code. The table shows all error messages corresponding to their code number.

Error Code Error Message
100 Authentication Failed. Invalid customer ID or password.
101 Customer ID is required.
102 Password is required.
103 Customer ID and password are required.
104 Time format is invalid.
105 Start time is required.
106 End time is required.
107 Start and end time are required.
108 Date range cannot be more than one week.
109 Start time cannot be greater than end time.
110 Illegal access.
111 An internal or network error occurred.
112 Vendor does not exist.
113 Vendor key is required.
114 Usage Threshold Exceeded: «data type»