Spiacenti, questo articolo di supporto non è al momento tradotto in italiano. Se lo desideri, puoi provare una traduzione basata su Google.
This resource supports the GET method.
GET
Returns an array of all projects that the authenticated API key is allowed to access.
GET Request Query String Parameters
Name | Required | Description |
---|---|---|
fields | No | A comma-separated list of the keys you want returned for each project. 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 |
403 Forbidden | Direct Mail account is disabled |
401 Unauthorized | API key, secret, or authentication method is incorrect |
200 OK | Success |
GET Response Headers
Name | Description |
---|---|
X-Total-Count | The total number of available projects |
GET Response Body
JSON representation of an array of objects. Each object in the array represents a project. Please consult the /projects/:document_identifier
resource for a description of the object keys for each project.
GET Example
GET /api/v2/projects/ HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Accept: application/json; charset=utf-8
Host: secure.directmailmac.com
HTTP/1.1 200 OK
Date: Fri, 24 Apr 2015 21:41:05 GMT
Content-Type: application/json; charset=utf-8
X-Total-Count: 2
[
{
"address_custom_column_names": [
"Custom 1",
"Custom 2",
"Custom 3",
"Custom 4",
"Custom 5",
"Custom 6",
"Custom 7",
"Custom 8",
"Custom 9",
"Custom 10",
"Custom 11",
"Custom 12",
"Custom 13",
"Custom 14",
"Custom 15"
],
"document_identifier": "fa877ea921c9ce814b2344550c193c25",
"links": [
{
"href": "https://secure.directmailmac.com/api/v2/projects/fa877ea921c9ce814b2344550c193c25/messages",
"rel": "messages"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/fa877ea921c9ce814b2344550c193c25/address-groups",
"rel": "address-groups"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/fa877ea921c9ce814b2344550c193c25/reports",
"rel": "reports"
}
],
"locale_identifier": "en_US",
"name": "Direct Mail Project",
"time_zone_name": "America/Los_Angeles"
},
{
"address_custom_column_names": [
"Age",
"Gender",
"City",
"State",
"Country",
"Test",
"Custom 7",
"Custom 8",
"Custom 9",
"Custom 10",
"Custom 11",
"Custom 12",
"Custom 13",
"Custom 14",
"Custom 15"
],
"document_identifier": "187812f26ba37d9769d8691d2a83c95c",
"links": [
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/messages",
"rel": "messages"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/address-groups",
"rel": "address-groups"
},
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/reports",
"rel": "reports"
}
],
"locale_identifier": "en_US",
"name": "API Test Project",
"time_zone_name": "America/Vancouver"
}
]