Call us @ +1 508-737-1615

Introduction

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

ParameterTypeDescriptionExample
clientRequiredName of the Successful Channels Client<SCClient>
apikeyRequiredIt is only required if you want to access application through API 
emailRequiredEmail address of Partner membergary@example.com
primary_partner_idRequiredName of partner primary IDPrimary Partner ID should exists in SCF Application. As we are not creating Partner on the Fly
user_idOptionalThe contact ID of the user
first_nameRequiredName of Partner First NameSteve
last_nameRequiredName of Partner Last NameJohnson
partner_typeRequired If Partner_type=”Vendor” – it will redirect to CAM interface. And if Partner Type=”Partner” – it will redirect to Partner Contact Interface
cityOptionalCity  of Partner MemberNewyork
stateOptionalState of Partner MemberLA
countryOptionalCountry of Partner MemberUSA
zipcodeOptionalZip code  of Partner Member321901
phoneOptionalPhone Number of Partner Member+1-9999999999
addressOptionalAddress of Partner Member#301 West Valley City
titleOptionalTitle of Partner MemberTest Title

Parameters required to Access CAM Interface through API #

Parameter nameTypeDescriptionExample
apikeyRequiredSCF will provide the API Key
ClientRequired
EmailRequiredEmail address of CAMgagan@example.com
user_idOptionalThe primary ID of CAM 
first_nameRequiredFirst Name of the CAMBen
last_nameRequiredLast Name of the CAM  Stock
partner_typeRequiredAlways have to Pass type as vendor vendor
titleOptionalCAM TitleTest Title
companyOptionalCam Company NameTest Company Name
cityOptionalCAM CityNewyork
stateOptionalCAM StateWashington
phoneOptionalState+1-9999999999
countryOptionalCAM Country NameUSA
zipcodeOptionalCAM Zip Code98101

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

Access CAM Interface

	
       <?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>


© 2024 Successful Channels Inc.