Lo sentimos, este artículo de ayuda aún no está traducido al español. Si lo desea, puede probar una traducción automática de Google.
Este artículo de ayuda es para una versión anterior de Direct Mail.
This resource supports the GET method.
URL Parameters
Label | Description |
---|---|
:document_identifier | The project's document identifier |
:report_uuid | The UUID of the report |
GET
Returns information about the message that was sent for this campaign.
Request Query String Parameters
Name | Required | Description |
---|---|---|
fields | No | A comma-separated list of the keys you want returned for the message. Default is to return all keys. |
Response Status Codes
Code | Description |
---|---|
503 Service Unavailable | Server is undergoing maintenance and is unavailable |
429 Rate Limited | Rate limiting in effect, try again later |
404 Not Found | The resource could not be found or your API key has not been granted access to it |
403 Forbidden | Direct Mail account is disabled |
401 Unauthorized | API key, secret, or authentication method is incorrect |
200 OK | Success |
Response Body
A JSON object representing the message.
Key | Value | Description |
---|---|---|
uuid | String | The UUID of the message |
date_created | String | The date and time the message was created, in ISO 8601 format |
from_email | String | The "From" email address |
from_name | String | The "From" name |
subject | String | The subject |
title | String | The title of the message (only displayed in Direct Mail) |
automatic_text_content | Boolean | True if Direct Mail should automatically create the text content from the HTML content at send time. If false, the text_content property should be set. |
content_type | String | Either text/html or text/plain |
text_content | String | The plain-text content of the message |
html_content | String | The HTML content of the message |
text_encoding | String | If auto , then Direct Mail will infer the text encoding automatically, otherwise an IANA text encoding name |
number_of_attachments | Integer | The number of attachments |
number_of_headers | Integer | The number of extra message headers (does not include From or Subject headers) |
links | Array of Object | URLs for the message (rel:self ), its attachments (rel:attachments ), and headers (rel:headers ) |
Example
GET /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/message HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Accept: application/json; charset=utf-8
Host: secure.directmailmac.com
HTTP/1.1 200 OK
Date: Thu, 23 Apr 2015 23:02:38 GMT
Content-Type: application/json; charset=utf-8
{
"automatic_text_content": true,
"content_type": "text/html",
"date_created": "2015-04-22T16:35:27+0000",
"from_email": "jdoe@example.com",
"from_name": "John Doe",
"html_content": "<html>...truncated...</html>",
"links": [
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/message",
"rel": "self"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/message/attachments",
"rel": "attachments"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/message/headers",
"rel": "headers"
}
],
"number_of_attachments": 0,
"number_of_headers": 0,
"subject": "This is a test email",
"text_content": "This is the text that will appear if the recipient cannot view HTML messages. Replace this with a plain text version of your message.\n\nIf you want Direct Mail to create the plain text version for you automatically, uncheck Message > Content Type > Use Custom Plain-Text Alternative from the menu bar.",
"text_encoding": "auto",
"title": "Sample Message",
"uuid": "9DE0D4F8-A621-47EA-A982-FCD756D51316"
}