-
Notifications
You must be signed in to change notification settings - Fork 2
Person API
vaibhav-sinha edited this page Oct 2, 2014
·
4 revisions
This api will Search person by name and bring back all results which match the given name criteria i.e. Ravi Sharma can be searched with rav vi har ma
Type : GET
Service End point
/ajax/person/search/name/{searchParam}
searchParam - name or part of name to be searched
Response
[
{
"id": 33132,
"name": "Ravi Sharma",
"biodata": "My BioData",
"dob": "13173247274", //Date in millisconds
"gender": "Male",
"email": "ravi@eswaraj.com",
"landlineNumber1": "9876543210",
"landlineNumber2": "8796543210",
"mobileNumber1": "1234567890",
"mobileNumber2": "5647382910",
"personAddress": {
"id": 33132,
"line1":"Address Line1",
"line2":"Address Line2",
"line3":"Address Line3",
"postalCode":"121102",
"villageId":"12",
"wardId":"23",
"cityId":"34",
"districtId":"45",
"stateId":"56",
"countryId":"67"
}
},
{
"id": 33132,
"name": "Ravi Sharma",
"biodata": "My BioData",
"dob": "13173247274", //Date in millisconds
"gender": "Male",
"email": "ravi@eswaraj.com",
"landlineNumber1": "9876543210",
"landlineNumber2": "8796543210",
"mobileNumber1": "1234567890",
"mobileNumber2": "5647382910",
"personAddress": {
"id": 33132,
"line1":"Address Line1",
"line2":"Address Line2",
"line3":"Address Line3",
"postalCode":"121102",
"villageId":"12",
"wardId":"23",
"cityId":"34",
"districtId":"45",
"stateId":"56",
"countryId":"67"
}
}
]
This api will save a Person
Type : POST
Service End point
/ajax/person/save
Request Payload should be in the following format
{
"id": 33132,// Required only if it is Update request for create it should be null
"name": "Ravi Sharma",
"biodata": "My BioData",
"dob": "13173247274", //Date in millisconds
"gender": "Male",
"email": "ravi@eswaraj.com",
"landlineNumber1": "9876543210",
"landlineNumber2": "8796543210",
"mobileNumber1": "1234567890",
"mobileNumber2": "5647382910",
"personAddress": {
"id": 33132,
"line1":"Address Line1",
"line2":"Address Line2",
"line3":"Address Line3",
"postalCode":"121102",
"villageId":"12",
"wardId":"23",
"cityId":"34",
"districtId":"45",
"stateId":"56",
"countryId":"67"
}
}
This will return data in following format
{
"id": 33132,
"name": "Ravi Sharma",
"biodata": "My BioData",
"dob": "13173247274", //Date in millisconds
"gender": "Male",
"email": "ravi@eswaraj.com",
"landlineNumber1": "9876543210",
"landlineNumber2": "8796543210",
"mobileNumber1": "1234567890",
"mobileNumber2": "5647382910",
"personAddress": {
"id": 33132,
"line1":"Address Line1",
"line2":"Address Line2",
"line3":"Address Line3",
"postalCode":"121102",
"villageId":"12",
"wardId":"23",
"cityId":"34",
"districtId":"45",
"stateId":"56",
"countryId":"67"
}
}
This api will get person by id
Type : GET
Service End point
/ajax/person/get/{personID}
Response
{"id":77892,
"externalId":null,
"name":"HARI NAGAR","biodata":null,
"dob":null,
"gender":null,
"email":null,
"landlineNumber1":null,
"landlineNumber2":null,
"mobileNumber1":null,
"mobileNumber2":null,
"profilePhoto":null,
"personAddress":null}