(Quick Reference)
Service: List
Description: This web service return the list of customers categories in JSON format
URL:
https://BASE_URL/api/VERSION/customerCategories
Method: GET
Parameters:
Pagination parameters:
Name | Description | Type | Required | Possible values |
---|
offset | Tells where to start returning records from the entire set of results | Integer | No | |
max | limits the number of resources requested to return | Integer | No | |
sort | Orders the results by the specified field | String | No | |
order | Orders ascending (ASC) or descending DESC | Integer | No | asc, desc |
Filters parameters:
Name | Description | Type | Required | Example values |
---|
dateCreated_gt | Filters by the resource's creation date time and operator greater than | Date | no | 2016-08-15T14:52:48Z |
dateCreated_gte | Filters by the resource's creation date time and operator greater than or equal | Date | no | |
dateCreated_lt | Filters by the resource's creation date time and operator less than | Date | no | |
dateCreated_lte | Filters by the resource's creation date time and operator less than or equal | Date | no | |
lastUpdated_gt | Filters by the resource's last-modified date time and operator greater than | Date | no | |
lastUpdated_gte | Filters by the resource's last-modified date time and operator greater than or equal | Date | no | |
lastUpdated_lt | Filters by the resource's last-modified date time and operator less than | Date | no | |
lastUpdated_lte | Filters by the resource's last-modified date time and operator less than or equal | Date | no | |
reference | Wildcard search by the resource's reference | String | no | reference=Ref-6* , reference=*ef-6 , reference=*ef-6* |
name | Wildcard search by the resource's name | String | no | |
Success Output
Success case: response.status=200
{
"paging": {
"total": 7,
"max": 100,
"offset": 0,
"previous": null,
"next": null
},
"data": [
{
"id": 2,
"name": "Home",
"isRoot": true,
"parentId": null,
"parentCategory": null,
"reference": "Ref-01",
"description": "Home",
"image": "BASE_URL/Nice-1444810602520/photoCustomerCategory/1455207900621_users_crowd.png",
"organization": "Lyon",
"dateCreated": "2015-10-13T10:12:40Z",
"lastUpdated": "2016-02-11T16:25:00Z"
},
{
"id": 9,
"name": "TPE",
"isRoot": false,
"parentId": 2,
"parentCategory": {
"id": 2,
"reference": "Ref-01",
"name": "Home",
"href": "/api/v1.0/customerCategories/2"
},
"reference": "Ref-02",
"description": "Trés petites entreprises ",
"image": "BASE_URL/Nice-1444810602520/photoCustomerCategory/1455207886452_users_crowd.png",
"organization": "Lyon",
"dateCreated": "2015-10-30T10:19:40Z",
"lastUpdated": "2016-02-11T16:24:46Z"
},
{
"id": 10,
"name": "PME",
"isRoot": false,
"parentId": 2,
"parentCategory": {
"id": 2,
"reference": "Ref-01",
"name": "Home",
"href": "/api/v1.0/customerCategories/2"
},
"reference": "Ref-03",
"description": "Petites et moyennes entreprises",
"image": "BASE_URL/Nice-1444810602520/photoCustomerCategory/1455176799278_88c0f2f7d904fecacecaf4e585abcc45.png",
"organization": "Lyon",
"dateCreated": "2015-10-30T10:20:24Z",
"lastUpdated": "2016-02-11T07:46:40Z"
},
{
"id": 11,
"name": "TGE",
"isRoot": false,
"parentId": 2,
"parentCategory": {
"id": 2,
"reference": "Ref-01",
"name": "Home",
"href": "/api/v1.0/customerCategories/2"
},
"reference": "Ref-04",
"description": "Trés grande entreprise",
"image": "BASE_URL/Nice-1444810602520/photoCustomerCategory/1455207868614_users_crowd.png",
"organization": "Lyon",
"dateCreated": "2015-10-30T10:21:38Z",
"lastUpdated": "2016-02-11T16:24:29Z"
},…
]
}
To get resized images, add prefix small_
or medium_
to the link url before the image's name, for example:
<BASE_URL>/Nice-1444810602520/photoCustomerCategory/small_1455207868614_users_crowd.png
Failure Output
Failure case:response.status = 400
{
"error": "invalid_param",
"error_description": "The parameters [dateCreated_gta] you provided are not valid for this request."
}
{
"error": "invalid_datetime_format",
"error_description": "Invalid datetime filter (not ISO-8601 formatted): [2016-08-1Z]"
}
Failure case:response.status = 500
{
"error": "server_error",
"error_description": "Oops! Something went wrong..."
}