(Quick Reference)
Service: List of check-in Description: This web service return the list of check-in data in JSON Format URL: https://BASE_URL/api/VERSION/checkIns 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 | | startDate_gt | Filters by the resource's start check-In date time and operator greater than | Date | no | | startDate_gte | Filters by the resource's start check-In date time and operator greater than or equal | Date | no | | startDate_lt | Filters by the resource's start check-In date time and operator less than | Date | no | | startDate_lte | Filters by the resource's start check-In date time and operator less than or equal | Date | no | | endDate_gt | Filters by the resource's end check-out date time and operator greater than | Date | no | | endDate_gte | Filters by the resource's end check-out date time and operator greater than or equal | Date | no | | endDate_lt | Filters by the resource's end check-out date time and operator less than | Date | no | | endDate_lte | Filters by the resource's end check-out date time and operator less than or equal | Date | no | | customerReference | Wildcard search by the resource's reference | String | no | customerReference=Ref-6* , customerReference=*ef-6 , customerReference=*ef-6* | employeeReference | Wildcard search by the resource's reference | String | no | employeeReference=Ref-6* , employeeReference=*ef-6 , employeeReference=*ef-6* | visitRank | rank of visit of customer | Integer | no | | type | check-In type | String | no | inside , outside | isSure | it represent confirmation of the declared new position of the customer | Boolean | no | false , true |
Dates should be formatted as the ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ)
When type value equal to inside it means the check-in is done inside customer GPS position.
When type value equal to outside it means the check-in is done outside customer GPS position.
isSure value is set to true when check-in is outside however we are inside customer.
Success Output Success case: response.status=200 {
"paging": {
"total": 3,
"max": 100,
"offset": 0,
"previous": null,
"next": null
},
"data": [
{
"id": 8,
"visitRank": 1,
"startDate": "2016-02-20T14:00:00Z",
"endDate": "2016-02-20T14:30:00Z",
"type": "inside",
"latitude": 36.856,
"longitude": 10.195,
"customerLatitude": 36.856,
"customerLongitude": 10.195,
"distance": null,
"isSure": null,
"editable": true,
"routeId": 1,
"reason": null,
"user": {
"id": 3,
"href": "/api/v1.0/users/3"
},
"customer": {
"id": 2,
"href": "/api/v1.0/customers/2"
},
"organization": "entity1",
"dateCreated": "2016-10-03T15:24:12Z",
"lastUpdated": "2016-10-03T15:24:12Z"
},
{
"id": 9,
"visitRank": 2,
"startDate": "2016-02-20T17:00:00Z",
"endDate": "2016-02-20T18:30:00Z",
"type": "outside",
"latitude": 36.81328,
"longitude": 10.1331903,
"customerLatitude": 36.8561473,
"customerLongitude": 10.1953111,
"distance": 9256,
"isSure": true,
"editable": true,
"routeId": 1,
"reason": null,
"user": {
"id": 3,
"href": "/api/v1.0/users/3"
},
"customer": {
"id": 3,
"href": "/api/v1.0/customers/3"
},
"organization": "entity1",
"dateCreated": "2016-10-03T15:24:29Z",
"lastUpdated": "2016-10-03T15:24:29Z"
},
{
"id": 10,
"visitRank": 3,
"startDate": "2016-02-20T21:00:00Z",
"endDate": null,
"type": "outside",
"latitude": 43.7111496,
"longitude": 7.1947483,
"customerLatitude": 43.7254711,
"customerLongitude": 7.2848838,
"distance": 15206,
"isSure": false,
"editable": true,
"routeId": 1,
"reason": null,
"user": {
"id": 3,
"href": "/api/v1.0/users/3"
},
"customer": {
"id": 3,
"href": "/api/v1.0/customers/3"
},
"organization": "entity1",
"dateCreated": "2016-10-03T15:26:59Z",
"lastUpdated": "2016-10-03T15:26:59Z"
}
]
} 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..."
}
|
|