EmployeeWebInterface
Click here for a complete list of operations.
GetEmployee
Based on the site given in the SOAP header, a list of all employees will be returned in an XML string that can be parsed and read in any way needed for your payroll software. Returns a single employee based on the SwipeClock-assigned unique ID (which you can get by making calls to other WebMethods such as GetEmployees that return the entire employee roster).
- Compatibility with TimeWorks: Fully compatible
- Compatibility with TimeWorksPlus: Compatible, but only returns data in fields that are built-in and common to TimeWorksPlus and TimeWorks, and does not provide dated revisions of date-versioned fields. Keep in mind that TimeWorksPlus and TimeWorks share the same employee database. This WebMethod implementation lacks awareness of TimeWorksPlus's ability to add custom fields in employee setup, as well as date-versioned fields.
- Future plans for this WebMethod: We recommend that employee identity information be pushed to SwipeClock rather than pulled, so that most or all changes to employee data is done in a central place (ideally the service bureau software). For example, a good arrangement is to have SwipeClock responsible for setting card numbers, but having everything else (like name, department, payrate) configured from the payroll software, and changes pushed using the EEIDSubmit call found in our latest API. This methodology typically negates the need to pull employee roster data from SwipeClock.
Test
To test the operation using the HTTP POST protocol, click the 'Invoke' button.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 /pg/xml/EmployeeWebInterface.asmx HTTP/1.1 Host: www.swipeclock.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://mc2cs.com/scci/GetEmployee" <?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:Header> <AuthHeader xmlns="https://mc2cs.com/scci"> <password>string</password> <site>string</site> <userName>string</userName> </AuthHeader> </soap:Header> <soap:Body> <GetEmployee xmlns="https://mc2cs.com/scci"> <employee>string</employee> </GetEmployee> </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> <GetEmployeeResponse xmlns="https://mc2cs.com/scci"> <GetEmployeeResult>string</GetEmployeeResult> </GetEmployeeResponse> </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 /pg/xml/EmployeeWebInterface.asmx HTTP/1.1 Host: www.swipeclock.com 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:Header> <AuthHeader xmlns="https://mc2cs.com/scci"> <password>string</password> <site>string</site> <userName>string</userName> </AuthHeader> </soap12:Header> <soap12:Body> <GetEmployee xmlns="https://mc2cs.com/scci"> <employee>string</employee> </GetEmployee> </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> <GetEmployeeResponse xmlns="https://mc2cs.com/scci"> <GetEmployeeResult>string</GetEmployeeResult> </GetEmployeeResponse> </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 /pg/xml/EmployeeWebInterface.asmx/GetEmployee?employee=string HTTP/1.1 Host: www.swipeclock.com
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <string xmlns="https://mc2cs.com/scci">string</string>
HTTP POST
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
POST /pg/xml/EmployeeWebInterface.asmx/GetEmployee HTTP/1.1 Host: www.swipeclock.com Content-Type: application/x-www-form-urlencoded Content-Length: length employee=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <string xmlns="https://mc2cs.com/scci">string</string>