(Quick Reference)
Service: Show an assigned customer to an employee
Description: This web service returns an assigned customer to an employee data in JSON format
Method: GET
URL:
https://BASE_URL/api/VERSION/customerEmployees/{id}
Parameters:
Name | Description | Type | Required | Example values |
---|
id | id of the wanted record | Integer | Yes | 777 |
URL with external_id:
https://BASE_URL/api/VERSION/customerEmployees/reference/{customerId}/{userId}
Parameters:
Name | Description | Type | Required | Examples values |
---|
customerId | reference of the customer | String | Yes | CC-002 |
userId | reference of the user | String | Yes | U-001 |
Success Output
Success case: response.status=200
{
"id": 570,
"customerReference": "C-002",
"employeeReference": "Ref 6654",
"customer": {
"id": 1335,
"reference": "C-002",
"name": "Joe",
"href": "/api/v1.0/customers/1335"
},
"user": {
"id": 8,
"reference": "Ref 6654",
"href": "/api/v1.0/users/8"
},
"organization": "Lyon",
"dateCreated": "2016-08-22T09:42:19Z",
"lastUpdated": "2016-08-22T09:42:19Z"
}
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 customer employee with the id 999 doesn't exist."
}