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 and DELETE methods.
URL Parameters
Label | Description |
---|---|
:document_identifier | The project's document identifier |
:webhook_uuid | The UUID of the webhook |
GET
Returns information about the webhook.
GET Request Query String Parameters
Name | Required | Description |
---|---|---|
fields | No | A comma-separated list of the keys you want returned for the webhook. 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 webhook.
Key | Value | Description |
---|---|---|
uuid | String | The UUID of the webhook |
events | Array of Object | The events that trigger the webhook |
url | String | The URL that is POSTed to when this webhook is invoked |
date_created | String | The date this webhook was created, in ISO-8601 date format |
last_request_date | String | The last time this webhook was invoked (successfully or not), in ISO-8601 date format |
last_response_status_code | Integer | The last status code received from your server |
next_retry_date | String | The next time this URL will be retried (if the last request failed), in ISO-8601 date format |
links | Array of Object | URLs for the webhook (rel:self ) |
GET Example
GET /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/webhooks/260EB943-3D2B-419D-AC9D-063DC48681EA HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Host: secure.directmailmac.com
User-Agent: Paw/2.2.1 (Macintosh; OS X/10.10.3) GCDHTTPRequest
HTTP/1.1 200 OK
Date: Sat, 02 May 2015 00:02:57 GMT
Content-Type: application/json; charset=utf-8
{
"date_created": "2015-05-01T12:45:17-07:00",
"events": [
{
"type": "campaign-sent"
"options": null,
}
],
"last_request_date": "2015-05-01T14:37:00-07:00",
"last_response_status_code": 200,
"links": [
{
"href": "https://secure.directmailmac.com/api/v2/projects/187812f26ba37d9769d8691d2a83c95c/webhooks/260EB943-3D2B-419D-AC9D-063DC48681EA",
"rel": "self"
}
],
"next_retry_date": null,
"url": "http://requestb.in/t3e7ejt3",
"uuid": "260EB943-3D2B-419D-AC9D-063DC48681EA"
}
DELETE
Deletes the webhook.
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 or the message is not editable |
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 |
204 No Content | The webhook has been deleted |
DELETE Example
DELETE /api/v2/projects/187812f26ba37d9769d8691d2a83c95c/webhooks/260EB943-3D2B-419D-AC9D-063DC48681EA HTTP/1.1
Authorization: Basic QzFENDREMjEtNTA4MC00NTM3LUFFOD
Host: secure.directmailmac.com
HTTP/1.1 204 No Content
Date: Sat, 02 May 2015 00:04:19 GMT