Overview
Welcome to WM.com for developers. We have provided a set of RESTful API's to access customer information.
Sample data sets available include balance due, contract details, invoice history and pick-up status. These API use HTTP methods, RESTful endpoint structure, and JSON Web Token (JWT) for authorization.
Calling the API¶
To construct a REST call, combine:
- The HTTP method
- The full URI to the resource
- HTTP headers, if required
- The JSON-formatted payload, if required
For information about how to test, see How To Test.
Base URL¶
You can use Waste Management REST APIs in below two environments,
| Enviroment | EndPoint |
|---|---|
| Test | https://apitest.wm.com/v1 |
| Production | https://api.wm.com/v1 |
Headers¶
For each API call the following headers need to be set:
- Authorization: Bearer
<JSON Web Token>. Send the token with authentication type set as Bearer.For more information about Authorization, see Security - Request-Tracking-Id: Unique identifier for each request.
- ClientId: Will be provided by WM.
- Accept: Set to application/json or application/xml. Default is application/json.(Optional)
Version¶
v1
HTTP Status Codes¶
Waste Management returns below standard HTTP status codes for successful and error responses.
| Status code | Description |
|---|---|
| 200 | OK |
| 204 | No Content |
| 304 | Not Modified |
| 400 | Bad Request |
| 401 | Unauthorized |
| 422 | Validation Error |
| 404 | Invalid Resource |
| 500 | Internal Server Error |
Error Response¶
Waste Management returns below error response body for errors
{ "error": { "code": "<http_status_code>", "message": "<http_status_description>", "errors": [ { "message": "<error_decription_with_details_of_error>" } ] }}