Désolé, mais cet article d’aide n’est actuellement pas disponible en français. Si vous le souhaitez, vous pouvez consulter une traduction automatique effectuée par Google.
This resource supports the GET, PATCH, and DELETE methods.
URL Parameters
Label | Description |
---|---|
:document_identifier | The project's document identifier |
:report_uuid | The UUID of the report |
:recipient_uuid | The UUID of the recipient |
GET
Returns information about the recipient's "live" address, if it exists. If the address for this recipient was removed from the project at some point after the campaign was sent, then the recipient has no live address and this resource will return a 404 Not Found status code.
GET Request Query String Parameters
Name | Required | Description |
---|---|---|
fields | No | A comma-separated list of the keys you want returned for the address. Default is to return all keys. |
GET 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 |
GET Response Body
A JSON object representing the address.
Key | Value | Description |
---|---|---|
uuid | String | The UUID of the address |
date_created | String | The date this address was created, in ISO-8601 format |
subscribe_date | String | The date this address subscribed, in ISO-8601 format |
unsubscribe_date | String | The date this address unsubscribed, in ISO-8601 format |
number_of_groups | Integer | The number of groups this address is a member of |
String | The email address | |
first_name | String | The first name |
last_name | String | The last name |
company_name | String | The company name |
custom_1 | String | Custom field #1 |
custom_2 | String | Custom field #2 |
custom_3 | String | Custom field #3 |
custom_4 | String | Custom field #4 |
custom_5 | String | Custom field #5 |
custom_6 | String | Custom field #6 |
custom_7 | String | Custom field #7 |
custom_8 | String | Custom field #8 |
custom_9 | String | Custom field #9 |
custom_10 | String | Custom field #10 |
custom_11 | String | Custom field #11 |
custom_12 | String | Custom field #12 |
custom_13 | String | Custom field #13 |
custom_14 | String | Custom field #14 |
custom_15 | String | Custom field #15 |
bounced | Boolean | True if the address is marked as "Hard Bounced" |
unsubscribed | Boolean | True if the address is marked as "Unsubscribed |
marked | Boolean | True if the address is marked with a check mark in the Direct Mail user interface |
links | Array of Object | URLs for the address (rel:self ) and for any groups that the address belongs to (rel:group ) |
GET Example
GET /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/recipients/E5A667C9-58AE-4B86-AB6D-DA0D33D7CC00/live-address HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Accept: application/json; charset=utf-8
Host: secure.directmailmac.com
HTTP/1.1 200 OK
Date: Wed, 22 Apr 2015 22:31:47 GMT
Content-Type: application/json; charset=utf-8
{
"bounced": false,
"company_name": "ABC Widgets, Inc.",
"custom_1": "9",
"custom_10": null,
"custom_11": null,
"custom_12": null,
"custom_13": null,
"custom_14": null,
"custom_15": null,
"custom_2": null,
"custom_3": null,
"custom_4": null,
"custom_5": null,
"custom_6": null,
"custom_7": null,
"custom_8": null,
"custom_9": null,
"email": "jackd@example.com",
"first_name": "Jack",
"last_name": "Doe",
"links": [
{
"href": "https://secure.directmailmac.com/api/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/recipients/E5A667C9-58AE-4B86-AB6D-DA0D33D7CC00/live-address",
"rel": "self"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/address-groups/D0693CAB-1CAF-417A-8973-337DA5AD82F2",
"rel": "group"
}
],
"marked": true,
"number_of_groups": 1,
"subscribe_date": null,
"unsubscribe_date": null,
"unsubscribed": false,
"uuid": "B4A4A0A7-84A4-474B-8A74-5A5CA50F3169"
}
PATCH
Updates the address.
PATCH Request Body
A JSON object representing the properties you want to update. You may update the following keys:
Key | Required | Value | Description |
---|---|---|---|
No | String | The email address | |
first_name | No | String | The first name |
last_name | No | String | The last name |
company_name | No | String | The company name |
custom_1 | No | String | Custom field #1 |
custom_2 | No | String | Custom field #2 |
custom_3 | No | String | Custom field #3 |
custom_4 | No | String | Custom field #4 |
custom_5 | No | String | Custom field #5 |
custom_6 | No | String | Custom field #6 |
custom_7 | No | String | Custom field #7 |
custom_8 | No | String | Custom field #8 |
custom_9 | No | String | Custom field #9 |
custom_10 | No | String | Custom field #10 |
custom_11 | No | String | Custom field #11 |
custom_12 | No | String | Custom field #12 |
custom_13 | No | String | Custom field #13 |
custom_14 | No | String | Custom field #14 |
custom_15 | No | String | Custom field #15 |
bounced | No | Boolean | True if the address is marked as "Hard Bounced" |
unsubscribed | No | Boolean | True if the address is marked as "Unsubscribed |
marked | No | Boolean | True if the address is marked with a check mark in the Direct Mail user interface |
PATCH 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 project could not be found |
403 Forbidden | Direct Mail account is disabled |
401 Unauthorized | API key, secret, or authentication method is incorrect |
400 Bad Request | One or more of the values in the request body is invalid |
202 Accepted | The request has been accepted for processing |
PATCH Response Body
A JSON object representing the merge task.
Key | Value | Description |
---|---|---|
links | Array of Object | URLs for the merge task and the updated resource. |
PATCH Example
PATCH /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/recipients/E5A667C9-58AE-4B86-AB6D-DA0D33D7CC00/live-address HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Content-Type: application/json; charset=utf-8
Host: secure.directmailmac.com
Content-Length: 63
{
"unsubscribe_date": "2015-04-22T12:59:23Z",
"unsubscribed": true
}
HTTP/1.1 202 Accepted
Date: Wed, 22 Apr 2015 22:42:02 GMT
Content-Type: application/json; charset=utf-8
{
"links": [
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/merge-task?s=52&m=PATCH&r=https%3A%2F%2Fsecure.directmailmac.com%2Fapi%2Fv2%2Fprojects%2F187812f26ba37d9769d8691d2a83c95c%2Faddress-groups%2FD0693CAB-1CAF-417A-8973-337DA5AD82F2%2Faddresses%2FB4A4A0A7-84A4-474B-8A74-5A5CA50F3169",
"rel": "merge-task"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/recipients/E5A667C9-58AE-4B86-AB6D-DA0D33D7CC00/live-address",
"rel": "resource"
}
]
}
DELETE
Removes the address from all groups.
DELETE 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 project could not be found |
403 Forbidden | Direct Mail account is disabled |
401 Unauthorized | API key, secret, or authentication method is incorrect |
400 Bad Request | One or more of the values in the request body is invalid |
202 Accepted | The request has been accepted for processing |
DELETE Response Body
A JSON object representing the merge task.
Key | Value | Description |
---|---|---|
links | Array of Object | URL for the merge task. |
DELETE Example
DELETE /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports/F4B2E4E6-B94F-462C-AFEC-1F9497BA98A0/recipients/E5A667C9-58AE-4B86-AB6D-DA0D33D7CC00/live-address HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Host: secure.directmailmac.com
HTTP/1.1 202 Accepted
Date: Wed, 22 Apr 2015 22:50:52 GMT
Content-Type: application/json; charset=utf-8
{
"links": [
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/merge-task?s=54&m=DELETE&r=https%3A%2F%2Fsecure.directmailmac.com%2Fapi%2Fv2%2Fprojects...",
"rel": "merge-task"
}
]
}