List service history¶
Use /services/stats to retrieve a summary of your completed services in a time frame of your choosing. The summary includes the total number of services, successful services, missed pickups, service exceptions and more. This response will also include a detailed list of completed services including the date & time of service completion, status, and explanation of any problems that may have occurred when we attempted to service your containers.
URI¶
GET /api/v1/customers/{customerId}/services/stats
Headers¶
| Parameter | Mandatory | Data Type | Allowed Values | Description |
|---|---|---|---|---|
| Request-Tracking-Id | Y | String | Unique Identifier for each request | |
| Authorization | Y | String | Access token | |
| ClientId | Y | String | Will be provided by WM | |
| Accept | N | String | application/json or application/xml | Default is application/json |
Request Parameters¶
Pass the following parameters in the request.
| Parameter | Mandatory | Data Type | Type | Description |
|---|---|---|---|---|
| customerId | Y | Number | path | Unique Customer Identifier |
| numberOfdays | N | String | query | Number of days for which history needs to be retrieved.Default is 60 |
| summary | N | String | query | Provide 'Y' or 'N' to get summary of services |
Response Fields¶
| Parameter | Data Type | Description |
|---|---|---|
| request_tracking_id | String | Unique Identifier for each request |
| services | Object | The services details |
| id | Number | Unique Service Identifier |
| status | String | Service status (Confirmed Positive,Confirmed Negative,Confirmed Incomplete) |
| ticket_number | Number | Unique Ticket Identifier |
| ticket_type | String | Ticket Type |
| planned_date | Date | Planned date of the service |
| ordered_date | Date | Date of service execution |
| ticket_load_type | String | Ticket load type |
| exception_reason_code | String | Exception reason code |
| exception_class | String | Exception class |
| service_time | Date | Serviced date time |
| operations | Object | Service operation details |
| route_id | String | Route for which service is assigned |
| route_order_number | String | Service route order number |
| summary | Object | Service Summary details |
| service_id | Number | Unique Service Identifier |
| service_code | String | Service code |
| number_of_confirmed_services | Number | Total number of services that are confirmed |
| number_of_ETA_requests | Number | Number of ETA requests |
| number_of_missed_pickups | Number | Total number of missed pickups |
| number_of_courtesy_services | Number | Total number of courtesy services |
| number_of_service_exceptions | Number | Total number of service exceptions |
Tip
For information about how to test, see How To Test
Sample Request¶
http://api.wm.com/v1/customers/000137987913003/services/stats?numberOfDays=60&summary=Y
Sample Response¶
{ "request_tracking_id": "8989", "services": [ { "id": "000000001", "status": "Confirmed Positive", "ticket_number": "888151", "planned_date": "04/03/2017", "ordered_date": "04/03/2017", "ticket_load_type": "E/R", "service_time": "2017-04-03 20:56:10 EDT", "operations": [ { "route_id": "RO_ODSCO", "route_order_number": "151758369" } ] }, { "id": "000000001", "status": "Confirmed Negative", "ticket_number": "893097", "planned_date": "04/07/2017", "ordered_date": "04/07/2017", "ticket_load_type": "TRP", "exception_reason_code": "Not Out / Container Empty", "exception_class": "HAULCALL", "service_time": "2017-04-07 05:59:50 EDT", "operations": [ { "route_id": "RO_ODHAY", "route_order_number": "151811640" } ] } ], "metadata": [ { "totalCount": "2" } ]}