Knowledgebase

Get Bounce Rules

Method: GET
Endpoint: /api/getBounceRules


Parameters

Parameter Type Required Description
id int No Bounce rule id which rule you want to get
limit_start int (default: 0) No Starting row of result. Default: 0
limit_count int (default: 25) No Number of records to get. Default: 25


Response Parameters

Parameter Type Description
status JSON Success or Error
result JSON Result of the operation
response JSON Output of the operation


Example Request (CURL)

<?php

// Authentication
$api_token	=	'API_KEY'; // Mumara API Key (can be found in Settings -> API Key)
$domain		=	'http://www.anydomain.com'; // Your Mumara Domain Name

// API Endpoint
$endpoint	=	'/api/getBounceRules';

//parameters
$data = array (
    'limit_start'	=> '1',
    'limit_count'	=> '2'
);

$params = '';
foreach($data as $key=>$value)
    $params .= $key.'='.$value.'&';
$params = trim($params, '&');

// Defining cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$domain.$endpoint.'?'.$params);
curl_setopt($ch, CURLOPT_HTTPHEADER,
    array('Content-Type: application/json', 'Authorization: Bearer ' . $api_token));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Executing cURL
$output = curl_exec ($ch);

// Printing Output
echo "<pre>";
echo json_encode(json_decode($output),JSON_PRETTY_PRINT );

// Closing cURL
curl_close ($ch);

?>

 

Example Response (JSON)

{
    "status": "success",
    "result": [
        {
            "id": 146,
            "label": "5.0.0 (Address does not exist)",
            "code": "5.0.0",
            "code_condition": "is",
            "reason": "address does not exist",
            "details_condition": "is",
            "reason_condition": "is",
            "details": "address does not exist",
            "type": "hard",
            "status": 1,
            "is_default": 0,
            "sort_order": 199,
            "user_id": 2,
            "created_at": "2020-02-13 12:50:25",
            "updated_at": "2020-08-27 13:38:32"
        },
        {
            "id": 147,
            "label": "5.1.0 (Another address status)",
            "code": "5.1.0",
            "code_condition": "is",
            "reason": "another address status",
            "details_condition": "contains",
            "reason_condition": "is",
            "details": "other address status",
            "type": "hard",
            "status": 1,
            "is_default": 0,
            "sort_order": 200,
            "user_id": 2,
            "created_at": "2020-02-13 12:51:48",
            "updated_at": "2020-08-27 13:38:32"
        }
    ]
}
Status value of the success response will be "Success"


Example Error Response (JSON)

{
    "status": "error",
    "result": "Error: Bounce Rule does not exist."
}


Possible Errors

  • Bounce Rule does not exist.
  • Access Denied
GET
/api/getBounceRules
Try it out