addBeneficiary

Employee_Beneficiary.addBeneficiary(WS_Employee_Beneficiary employeeBeneficiary)

The Employee_Beneficiary.addBeneficiary(WS_Employee_Beneficiary employeeBeneficiary) method allows you to adding a new Beneficiary to the system.

Arguments

WS_Employee_Beneficiary : The class type mandatory argument.

Returns

Returns the beneficiary id.

Example

API Method Call

EmpxtrackAPI.API_BASE_URL =”https://live.empxtrack.com/empxtrack/api.do“;
EmpxtrackAPI.API_KEY=”4141414141414141414141414141414141414141414156646a52684b437a5a6c4a2f7968724269775255553d”;
EmpxtrackAPI.DATE_FORMAT =”dd/MM/yyyy”;
WS_Employee_Beneficiary employeeBeneficiary = new WS_Employee_Beneficiary();
employeeBeneficiary.setBeneficiaryName(“John Smith”);
employeeBeneficiary.setEmpId(1013);
employeeBeneficiary.setDob(“10/12/1980″);
employeeBeneficiary.setRelationShipName(“Brother”);
employeeBeneficiary.setGender(“Male”);
int beneficiaryId = Employee_Beneficiary.addBeneficiary(employeeBeneficiary);

API Call through URL:

<form method=”post” action=”https://live.empxtrack.com/api.do?apiKey=[AuthToken]&methodName=addBeneficiary“><input type=”hidden”name =”empId” value=”1013″ ><input type=”hidden”name =”beneficiaryName” value=”John Smith” ><input type=”hidden”name =”dob” value=”10/12/1980″ ><input type=”hidden”name =”gender” value=”Male” ><input type=”submit” value=”Add New User” >
</form>

Example Response

JSON Output:

{“response”:{“uri”:api.do?apiKey\u003d4141414141414141414141414141414141414141414e4f765932363332496958746b5365376537466672303d\u0026methodName\u003daddBeneficiary \u0026empId\u003d1013\u0026beneficiaryName \u003dMohen das \u0026dob \u003d10/12/1980 “,”errorInfo”:{“errorCode”:”SUCCESS”,”errorMsg”:”Sucessfully executed”},”result”:{“beneficiaryId”:”4556″ }}}

Object Methods

Click on each of these links to know more about them: