(Quick Reference)
Service: Show a contact
Description: Returns the requested contact in json format when successful. Returns a json response, describing the failure condition when unsuccessful.
URL:
https://BASE_URL/api/VERSION/contacts/{id}
Method: GET
Parameters:
Name | Description | Type | Required | Example values |
---|
id | The numerical ID of the desired contact | Long | yes | 123 |
Success Output
Success case: response.status=200
{
"id": 5,
"customerReference": "C0959",
"customer": {
"id": 3229,
"reference": "C0959",
"name": "Marie's Jewelry",
"href": "/api/v1.0/customers/3229"
},
"firstName": "Marie",
"lastName": "Schrader",
"mobile": "",
"fax": "",
"email": "",
"fonction": "Commercial",
"phone": "",
"phone2": "",
"comment": "",
"country": "",
"city": "",
"postalCode": "",
"address": "",
"isDecisionMaker": true,
"photo": null,
"user": {
"id": 4,
"reference": "emp-00",
"href": "/api/v1.0/users/4"
},
"organization": "entity1",
"dateCreated": "2015-12-18T13:21:18Z",
"lastUpdated": "2016-08-16T13:35:20Z"
}
To get resized images, add prefix
small_
or
medium_
to the link url before the image's name, for example:
<BASE_URL>/entity1-1450169988465/photoContact/small_1471508040029_2938_marie_schrader.png
Failure Output
Failure case:response.status = 400
{
"error": "invalid_param_type",
"error_description": "The type of parameter id you provided is not valid for this request."
}
Failure case:response.status = 404
{
"error": "not_found",
"error_description": "The contact with the id 7065 doesn't exist."
}