(Quick Reference)
Service: List of reports
Description: This web service return the list of reports in JSON format
URL:
https://BASE_URL/api/VERSION/reports
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 | |
customerReference | Wildcard search by the resource's customer reference | String | no | customerReference=Ref-6* , customerReference=*ef-6 , customerReference=*ef-6* |
title | Wildcard search by the resource's title | String | no | |
employeeReference | Wildcard search by the resource's employee reference | String | no | employeeReference=Ref-6* , employeeReference=*ef-6 , employeeReference=*ef-6* |
Success Output
Success case: response.status=200
{
"paging": {
"total": 26,
"max": 1,
"offset": 0,
"previous": null,
"next": "/api/v1.0/reports?max=1&offset=1&sort=dateCreated&order=asc"
},
"data": [
{
"id": 2,
"title": "Marie's Jewelry complaint ",
"description": "Shipped Wrong Quantity",
"image": "BASE_URL/entity1-1450169988465/photoNotes/1471338230737_logo_color_272x92dp.png",
"latitude": 35.835454,
"longitude": 10.590584,
"checkInDate": "2015-12-31T15:48:32Z",
"type": "1",
"customerId": 2,
"customer": {
"id": 2,
"reference": "NC-3",
"name": "Marie's Jewelry",
"href": "/api/v1.0/customers/2"
},
"user": {
"id": 2,
"reference": "emp-002",
"href": "/api/v1.0/users/2"
},
"organization": "entity1",
"dateCreated": "2015-12-31T15:48:32Z",
"lastUpdated": "2015-12-31T15:48:32Z"
}
]
}
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..."
}