Get Conversion Caps
GET /offer/get_conversion_caps
| Description | URL | Response Format | Request Method | Authentication |
|---|---|---|---|---|
| Get a list of configured conversion caps | https://domain/api/offer/get_conversion_caps | JSON | GET | HTTP headers |
Parameters
Parameters can be sent as url encoded params. All parameters are optional so if none are entered, all enabled conversion caps will be returned.
| Name | Description | Type | Required |
|---|---|---|---|
| offerid | integer | no | |
| loginid | allowed values: | string | no |
| all | string | no | |
| each | string | no | |
| loginid | string | no | |
| enabled | allowed values: | integer | no |
| 0 | |||
| 1 | |||
| deleted | allowed values: | integer | no |
| 0 | |||
| 1 | |||
| type | allowed values: | string | no |
| Conversions | |||
| Dollars | |||
| Registrations | |||
| Unique Clicks | |||
| Clicks | |||
| Net Conversions | |||
| duration | allowed values: | string | no |
| Day | |||
| Week | |||
| Month | |||
| Year | |||
| All Time | |||
| Hour | |||
| timeframe_restriction | allowed values: | string | no |
| None | |||
| Weekdays | |||
| Weekends | |||
| Saturday | |||
| Sunday | |||
| Monday | |||
| Tuesday | |||
| Wednesday | |||
| Thursday | |||
| Friday |
Example Request
php
<?php
$curl = curl_init();
$data = array(
'offerid' => '2',
);
$data_string = http_build_query($data);
$url = 'http://domain/api/offer/get_conversion_caps?'.$data_string;
$headers = array(
'api-key: 44b5498dbcb481a0d00b404c0169af62',
'api-username: productsupport'
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_URL, $url);
$resp = curl_exec($curl);
//dumps an associative array representation of the json response
$output = json_decode($resp, true);
if($output !== NULL) {
//json was valid. Dump the decoded array
print_r($output);
}
else {
//invalid json, just dump the raw response
print_r($resp);
}
// Close request to clear up some resources
curl_close($curl);
?>
Response:
{
"result": "success",
"message": "Caps found.",
"data": [
{
"cap_redirect_id": "1",
"offerid": "2",
"loginid": "each",
"new_offerid": "5",
"new_landing_pageid": "6",
"track": "0",
"type": "5",
"value": "2",
"deleted": "0",
"enabled": "1",
"duration": "0",
"start": "1551296102",
"end": "0",
"timeframe_restriction": "0",
"advertiserid": "all",
"redirect_action": "landing_page",
"admin_notify": "0",
"start_nice": "2019/02/27 14:35:02",
"end_nice": "Never",
"type_nice": "Net Conversions",
"duration_nice": "Day",
"timeframe_restriction_nice": "None"
},
{
"cap_redirect_id": "2",
"offerid": "all",
"loginid": "all",
"track": "0",
"type": "0",
"value": "1",
"deleted": "0",
"enabled": "1",
"duration": "0",
"start": "1552422904",
"end": "0",
"timeframe_restriction": "0",
"advertiserid": "all",
"redirect_action": "none",
"admin_notify": "0",
"start_nice": "2019/03/12 16:35:04",
"end_nice": "Never",
"type_nice": "Conversions",
"duration_nice": "Day",
"timeframe_restriction_nice": "None"
}
]
}