List Emails¶
Use /activities/email to retrieve all email communication sent from the WM portal.The email can be system generated or a communication sent by the CSR agent.A date range can be specified to retrive the email communication that happened within those dates.
URI¶
GET /api/v1/customers/{customerId}/activities/email
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 |
| fromDate | N | Date | query | Start date formatted as yyyy-MM-dd |
| toDate | N | Date | query | End date formatted as yyyy-MM-dd |
Response Fields¶
| Parameter | Data Type | Description |
|---|---|---|
| activities | Object | The activity details |
| id | Number | The activity Identifier |
| user_id | Number | Customer login Identifier |
| email_info | Object | The email details |
| type_id | Number | The email type Identifier |
| type_description | String | The email type description |
| from_address | String | Sender email address |
| to_address | String | Recipient email address |
| cc_address | String | Other recipients in the email |
| subject | String | Subject of email |
| body | String | Content in the email |
| sent_by | String | Origin of email |
| send_status | String | Status of the email sent |
| sent_date_time | String | Timestamp of when the email was sent |
| audit_info | Object | Contains audit info |
| created_by | String | Origin of email |
| created_date_time | String | Timestamp of when the email was created |
| modified_by | String | Modified by |
| modified_date_time | String | Timestamp of when the email was modified |
Tip
For information about how to test, see How To Test
Sample Request¶
http://api.wm.com/v1/customers/123456789/activities/email?fromDate=2016-06-01&toDate=2016-08-01
Sample Response¶
{ "activities": [{ "id": "380589", "user_id": "3842591", "email_info": { "type_id": "13", "type_description": "Paperless Activation Confirmation", "from_address": "wmonline@wm.com", "to_address": "create_email@wm.com", "subject": "Paperless Billing Has Been Activated For Your ccount", "body": "Hello create_email@wm.com,You have successfully activated paperless billing for your account on 01/13/2015. New invoices will no longer be mailed to you at your billing address, but will be available when you log into your “My WM Online” profile at www.wm.com . Thanks for doing your part to help the environment and reducing your carbon footprint. For questions regarding the payment process, please contact the Waste Management Service Center at (866) 834-2080 and select the option for WM ezPay. For service or billing issues, please contact your local Waste Management office at the number provided on your invoice. Thank you,Waste Management Service Cente use of WM ezPay constitutes acceptance of Waste Management's WM ezPay Terms and Conditions, which may be reviewed at www.wm.com", "sent_by": "CSS_APP", "send_status": "null", "sent_date_time": "2015-01-13 10:14:05.0" }, "audit_info": { "created_by": "CSS_APP", "created_date_time": "2015-01-13 10:14:05.0", "modified_by": "CSS_APP", "modified_date_time": "2015-01-13 10:14:05.0" } }], "metadata": [{ "totalCount": "1" }]}