Overview
This request lists all transactional suppressions. These include bounce, user, unsubscribe, etc. All types of transactional suppressions.
The response will provide a listing of 100 transactional suppressions per page. The maximum number of items you can query per page is 2000 using the count parameter.
The Method
| API | - | Method |
|---|---|---|
| REST | GET | https://[Your URL]/api/2.0/trans_suppressions/ |
Your URL is the address of your install.
Parameters
| Property | Type | Description | Default | Required | Read Only |
|---|---|---|---|---|---|
| $page | integer | Page number | 1 | No | No |
| $count | integer | Number of suppressions. Maximum is 2000. | 100 | No | No |
| $order | string | Name of the field to order with. | trans_suppressed_date | No | No |
| $direction | string | Direction of ordering | ASC (Ascending) | No | No |
Code Samples
Example Request
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://[your url]/api/2.0/trans_suppressions/
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS =>"{}",
CURLOPT_HTTPHEADER => array(
"Authorization: Basic [base64 encoded string of username and password]",
"Content-Type: application/json", ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Example Response
{
"links": [
{
"title": "Self",
"rel": "self",
"href": "http://[your url]/api/2.0/trans_suppressions/"
},
{
"title": "Home",
"rel": "home",
"href": "http://[your url]/api/2.0/"
},
{
"title": "Next",
"rel": "next",
"href": "http://[your url]/api/2.0/trans_suppressions/?page=2&count=100"
},
{
"title": "End of the List",
"rel": "end",
"href": "http://[your url]/api/2.0/trans_suppressions/?page=7&count=100"
}
],
"collection": [
{
"href": "http://[your url]/api/2.0/trans_suppressions",
"data": {
"trans_suppressed_id": "11",
"trans_suppressed_customer_id": "1",
"trans_suppressed_log_id": "",
"trans_suppressed_date": "1603355859",
"trans_suppressed_email": "[email protected]",
"trans_suppressed_origin": "unsubscribe",
"trans_suppressed_reason": ""
}
},
{
"href": "http://[your url]/api/2.0/trans_suppressions",
"data": {
"trans_suppressed_id": "19",
"trans_suppressed_customer_id": "1",
"trans_suppressed_log_id": "",
"trans_suppressed_date": "1603363638",
"trans_suppressed_email": "[email protected]",
"trans_suppressed_origin": "unsubscribe",
"trans_suppressed_reason": ""
}
}
]
}