API12


Click here for a complete list of operations.

UpdateEmployeeFields

Updates fields in an employee record, optionally adding a new employee if they don't already exist.

Returns: Success - FALSE indicates that there was at least one problem updating or adding an employee, in which case you would need to check the ValidationFailuresList for information on which employee and field caused the failure. If any fields fail to update, the employee that had the failure should be resubmitted when the problem is corrected.

Test

The test form is only available for requests from the local machine.

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/api12.asmx HTTP/1.1
Host: www.payrollservers.us
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://mc2cs.com/UpdateEmployeeFields"

<?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>
    <UpdateEmployeeFields xmlns="http://mc2cs.com/">
      <sessionID>string</sessionID>
      <ApplicationID>string</ApplicationID>
      <AddIfNotFound>boolean</AddIfNotFound>
      <IdentityField>EMPLOYEECODE or UNIQUEID</IdentityField>
      <Employees>
        <EmployeeFieldsToUpdate>
          <FieldsToUpdate>
            <FieldToUpdate xsi:nil="true" />
            <FieldToUpdate xsi:nil="true" />
          </FieldsToUpdate>
          <Identifier>string</Identifier>
          <OptionalSecondaryIdentifier>string</OptionalSecondaryIdentifier>
        </EmployeeFieldsToUpdate>
        <EmployeeFieldsToUpdate>
          <FieldsToUpdate>
            <FieldToUpdate xsi:nil="true" />
            <FieldToUpdate xsi:nil="true" />
          </FieldsToUpdate>
          <Identifier>string</Identifier>
          <OptionalSecondaryIdentifier>string</OptionalSecondaryIdentifier>
        </EmployeeFieldsToUpdate>
      </Employees>
      <OptionalSecondaryIdentityField>NOTUSED or DEPARTMENT or LOCATION or SUPERVISOR</OptionalSecondaryIdentityField>
    </UpdateEmployeeFields>
  </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>
    <UpdateEmployeeFieldsResponse xmlns="http://mc2cs.com/">
      <UpdateEmployeeFieldsResult>
        <ValidationFailuresList>
          <EmployeeUpdateFailures>
            <FieldValidationFailures xsi:nil="true" />
            <Identifier>string</Identifier>
          </EmployeeUpdateFailures>
          <EmployeeUpdateFailures>
            <FieldValidationFailures xsi:nil="true" />
            <Identifier>string</Identifier>
          </EmployeeUpdateFailures>
        </ValidationFailuresList>
      </UpdateEmployeeFieldsResult>
    </UpdateEmployeeFieldsResponse>
  </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/api12.asmx HTTP/1.1
Host: www.payrollservers.us
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>
    <UpdateEmployeeFields xmlns="http://mc2cs.com/">
      <sessionID>string</sessionID>
      <ApplicationID>string</ApplicationID>
      <AddIfNotFound>boolean</AddIfNotFound>
      <IdentityField>EMPLOYEECODE or UNIQUEID</IdentityField>
      <Employees>
        <EmployeeFieldsToUpdate>
          <FieldsToUpdate>
            <FieldToUpdate xsi:nil="true" />
            <FieldToUpdate xsi:nil="true" />
          </FieldsToUpdate>
          <Identifier>string</Identifier>
          <OptionalSecondaryIdentifier>string</OptionalSecondaryIdentifier>
        </EmployeeFieldsToUpdate>
        <EmployeeFieldsToUpdate>
          <FieldsToUpdate>
            <FieldToUpdate xsi:nil="true" />
            <FieldToUpdate xsi:nil="true" />
          </FieldsToUpdate>
          <Identifier>string</Identifier>
          <OptionalSecondaryIdentifier>string</OptionalSecondaryIdentifier>
        </EmployeeFieldsToUpdate>
      </Employees>
      <OptionalSecondaryIdentityField>NOTUSED or DEPARTMENT or LOCATION or SUPERVISOR</OptionalSecondaryIdentityField>
    </UpdateEmployeeFields>
  </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>
    <UpdateEmployeeFieldsResponse xmlns="http://mc2cs.com/">
      <UpdateEmployeeFieldsResult>
        <ValidationFailuresList>
          <EmployeeUpdateFailures>
            <FieldValidationFailures xsi:nil="true" />
            <Identifier>string</Identifier>
          </EmployeeUpdateFailures>
          <EmployeeUpdateFailures>
            <FieldValidationFailures xsi:nil="true" />
            <Identifier>string</Identifier>
          </EmployeeUpdateFailures>
        </ValidationFailuresList>
      </UpdateEmployeeFieldsResult>
    </UpdateEmployeeFieldsResponse>
  </soap12:Body>
</soap12:Envelope>