Successful Channels provides a partner planning and performance management platform for building partner commitments, capabilities, and performance. This includes scorecards, sales and profit forecasts, action plans, marketing plans and QBR tools.
API Access of <SCF Application>
Successfulchannels provides the flexibility to access Application through API by sending us the required parameters which are mentioned in below Screen and also we have provided the sample Code in PHP to access CAM Interface as well as Partner/Partner Member Interface.
Parameters required to Access Partner Interface through API
Parameter | Type | Description | Example |
client | Required | Name of the Successful Channels Client | <SCClient> |
apikey | Required | It is only required if you want to access application through API | |
Required | Email address of Partner member | gary@example.com | |
primary_partner_id | Required | Name of partner primary ID | Primary Partner ID should exists in SCF Application. As we are not creating Partner on the Fly |
user_id | Optional | The contact ID of the user | |
first_name | Required | Name of Partner First Name | Steve |
last_name | Required | Name of Partner Last Name | Johnson |
partner_type | Required | If Partner_type=”Vendor” – it will redirect to CAM interface. And if Partner Type=”Partner” – it will redirect to Partner Contact Interface | |
city | Optional | City of Partner Member | Newyork |
state | Optional | State of Partner Member | LA |
country | Optional | Country of Partner Member | USA |
zipcode | Optional | Zip code of Partner Member | 321901 |
phone | Optional | Phone Number of Partner Member | +1-9999999999 |
address | Optional | Address of Partner Member | #301 West Valley City |
title | Optional | Title of Partner Member | Test Title |
Parameters required to Access CAM Interface through API #
Parameter name | Type | Description | Example |
apikey | Required | SCF will provide the API Key | |
Client | Required | ||
Required | Email address of CAM | gagan@example.com | |
user_id | Optional | The primary ID of CAM | |
first_name | Required | First Name of the CAM | Ben |
last_name | Required | Last Name of the CAM | Stock |
partner_type | Required | Always have to Pass type as vendor | vendor |
title | Optional | CAM Title | Test Title |
company | Optional | Cam Company Name | Test Company Name |
city | Optional | CAM City | Newyork |
state | Optional | CAM State | Washington |
phone | Optional | State | +1-9999999999 |
country | Optional | CAM Country Name | USA |
zipcode | Optional | CAM Zip Code | 98101 |
Error Codes for API #
API Key Error message:
1007 – Invalid Api key.
Cam Error message:
1001 – Client name is required, or client name is incorrect.
1002 – CAM Name is Required.
1003 – Email ID is required or invalid.
1006 – Partner type is invalid.
Partner Member Error message:
1001 – Client name is required or client name is incorrect.
1002 – Partner Member Name is Required.
1003 – Email ID is required or invalid.
1004 – Partner Primary ID is required.
1005 – Partner ID Doesn’t Exists.
1006 – Partner type is invalid.
Sample Code to Access SC Application through API
<?php
$url="https://<clientname>.successfulchannels.com/saml/api/api_user";
$data['apikey'] = "U4DxxnLelYT/yd+8bcWUzg"; // required
$data['client'] = "<clientname>"; // required
$data['email']= "wwwert@gmail.com"; // required
$data['partner_type'] = "vendor";
$data['user_id'] = "sdsdsssdsd22233";
$data['first_name'] = "adom";
$data['last_name'] = "gilcrist";
$data['title'] = "Test";
$data['company'] = "#3450 ipsum4";
$data['city'] = "newyork";
$data['state'] = "LA";
$data['phone'] = "+19912455555";
$data['zipcode'] = "10001";
$data['country'] = "USA";
$post_field_string = http_build_query($data, '', '&');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_field_string);
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);
curl_close ($ch);
if (!($response >= 1001 && $response <= 1008)){
$newURL = 'https://<clientname>.successfulchannels.com/saml/api/login/'.$response ;
?>
<iframe src="<?php echo $newURL;?>" scrolling="true" class="iframecode"/></iframe>
<!-- header('Location: '.$newURL); -->
<?php
}
else{
echo $response ;
}
?>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.2/iframeResizer.js"></script>
<style>.iframecode {width: 100%;} </style>
<script type="text/javascript">
iFrameResize({
log : true,
checkOrigin : false,
inPageLinks : true,
});
</script>
Access Partner/Partner Contact Interface
<?php
$url="https://<clientname>.successfulchannels.com/saml/api/api_user";
$data['apikey'] = ""; // required
$data['client'] = "<clientname>"; // required
$data['primary_partner_id'] = "0017g00001S1lz2AAB"; // required
$data['user_id'] = "";
$data['partner_type'] = "partner"; // required
$data['email'] = ""; // required
$data['first_name'] = "alex"; // required
$data['last_name'] = "test";
$data['city'] = "Chandigarh";
$data['state'] = "Punjab";
$data['country'] = "India";
$data['zipcode'] = "144521";
$data['phone'] = "99999999999";
$data['address'] = "#1234 street 2";
$data['title'] = "test";
$post_field_string = http_build_query($data, '', '&');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_field_string);
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);
curl_close ($ch);
if (!($response >= 1001 && $response <= 1008)){
$newURL = 'https://<clientname>.successfulchannels.com/saml/api/login/'.$response ;
?>
<iframe src="<?php echo $newURL;?>" scrolling="true" class="iframecode"/></iframe>
<!-- header('Location: '.$newURL); -->
<?php
}
else{
echo $response ;
}
?>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.6.2/iframeResizer.js"></script>
<style>.iframecode {width: 100%;} </style>
<script type="text/javascript">
iFrameResize({
log : true,
checkOrigin : false,
inPageLinks : true,
});
</script>