One of the hidden gems in the Keap suite of software is the API. The Keap API enables third-party applications to communicate with Keap and process, update, and destroy data for a wide variety of uses. You can do things like manage contacts, place orders, send messages, and most other things available for use in the Keap software.
The Keap API uses XML implemented as encoded XML-RPC as its communication method for both sending and receiving requests.
All requests made to the Infusionsoft XML-RPC API will be an HTTP POST to https://api.infusionsoft.com/crm/xmlrpc/v1
You can authenticate your request either with a Personal Access Token/Service Account Key (if a first-party developer) or an OAuth2 Bearer Token (if a third-party integration).
Keap officially supports the PHP library we created in-house. In addition, there are a number of third party helper libraries created by members of the community that may be useful to you. Many of these libraries are open source, so we encourage you to get into contact with their creators if you find bugs or have ideas for feature requests.
See Available Helper Libraries
Additionally, we have created a number of sample files that implement the Keap API in many languages, including ASP, .Net, Java, Perl, PHP, Python, and Ruby. You can try those out for yourself by downloading all samples on Github (zip, 2.5mb)
If you're interested in implementing the API in a custom application, or a language not shown above, we have created documentation to help you create the raw XML calls, and understand the XML replies. In this way Keap API is language agnostic and can tie in with whatever language you'd like to use.
See Available Code Samples
The Keap API uses a fairly standard implementation of OAuth 2.0 in order to provide authentication to all API endpoints. In the past, the Infusionsoft API has relied on a simple token based system; while those tokens will remain active until some date in the future for the XML-RPC API, any new implementations and all requests to the REST API will be required to use OAuth 2.0. Rather than re-explain OAuth again, it is more useful to provide a series of documents that have already been created and demonstrate the OAuth protocol, how to implement it in your code, how to troubleshoot, and how to ease development. Before that, though, it is important to have the authorization destinations and necessary details.
The first step in the OAuth flow is to redirect the user to Keap in order to authorize your application for access. The URL you generate here is where you first send your user in order for them to log in and continue the OAuth flow.
Redirect users to https://signin.infusionsoft.com/app/oauth/authorize
along with the required parameters in order to start the OAuth exchange.
Once the user has logged into their Keap account and authorized your application, they will be redirected back to your application at your specified redirect_uri with a code URL parameter that is used to request an access token.
GET https://signin.infusionsoft.com/app/oauth/authorize
Begins the OAuth flow by asking the user to choose an Infusionsoft account to authenticate with.
curl https://signin.infusionsoft.com/app/oauth/authorize
require("../../src/isdk.php");
$app = new iSDK();
$app->setClientId('CLIENTID');
$app->setSecret('CLIENTSECRET');
echo "<p>Click the link below to allow my application to access your Infusionsoft application.</p>";
echo '<a href="'.$app->getAuthorizationURL().'">Authorize My Application</a>';
$url = $infusionsoft->getAuthorizationUrl();
echo '<a href="' . $url . '">Click here to authorize</a>';
Using the code
URL parameter returned from the authorization callback, your application can request an access token and refresh token from Keap.
Requesting an access token requires you to POST
to https://api.infusionsoft.com/token
The access_token
is the token you will use to authenticate requests to the Keap API, and it expires after the time in the expires_in
field (in seconds). In order to get a new valid access token after one has expired, you must use the refresh_token
to request a new access token.
curl https://api.infusionsoft.com/token -X POST -d card=token_id
{
"token_type": "bearer",
"access_token": "axxxxx",
"expires_in": 3600,
"refresh_token": "rxxxxx",
"scope":"full|example.infusionsoft.com"
}
require("../../src/isdk.php");
$app = new iSDK();
if(isset($_GET['code'])){
$app->setClientId('CLIENTID');
$app->setSecret('CLIENTSECRET');
$app->authorize($_GET['code']);
$app->refreshAccessToken();
}
$infusionsoft->requestAccessToken($_GET['code']);
After your access token expires, you'll use the refresh token that was provided when your access token was initially granted to request a new access token.
Note: Once a Refresh Token is used to receive a new Access Token, you will be returned a new Refresh Token as well, which will need to be persisted in order to request the next access token.
Refreshing an access token requires you to POST
to https://api.infusionsoft.com/token
Provides a new access_token
that you will use to authenticate subsequent requests to the Infusionsoft API. Like the originally granted token, this expires after the amount of time in the expires_in
field (in seconds). You must use the newly provided refresh_token
to request a subsequent new access token.
Make sure to also store the new refresh token every time you request and store a new access token.
POST /token
$infusionsoft->refreshAccessToken();
$infusionsoft = new InfusionsoftInfusionsoft(array(
'clientId' => 'CLIENT_ID',
'clientSecret' => 'CLIENT_SECRET',
'redirectUri' => 'REDIRECT_URL',
));
// retrieve the existing token object from storage
$infusionsoft->setToken($yourStoredToken);
$infusionsoft->refreshAccessToken();
POST /token
$infusionsoft->refreshAccessToken();
$infusionsoft = new InfusionsoftInfusionsoft(array(
'clientId' => 'CLIENTID',
'clientSecret' => 'CLIENTSECRET',
'redirectUri' => 'https://example.com/callback',
));
// retrieve the existing token object from storage
$infusionsoft->setToken($yourStoredToken);
return $infusionsoft->refreshAccessToken();
The Affiliate Service is used to pull commission data and activities for affiliates. With this service, you have access to Clawbacks, Commissions, Payouts, Running Totals, and the Activity Summary. The methods in the Affiliate Service mirror the reports produced inside Infusionsoft. To manage affiliate information (ie Name, Phone, etc.) you will need to use the DataService.
Retrieves all clawed back commissions for a particular affiliate. Claw backs typically occur when an order has been refunded to the customer.
APIAffiliateService.affClawbacks
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIAffiliateService.affClawbacks</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>affiliateId</int></value>
</param>
<param>
<value><dateTime.iso8601>startDate</dateTime.iso8601></value>
</param>
<param>
<value><dateTime.iso8601>endDate</dateTime.iso8601></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><array><data/></array></value>
</param>
</params>
</methodResponse>
$app->affClawbacks($affiliateId, $start, $finish);
$app = new iSDK();
// perform authorization tasks
$affiliateId = 123;
$start = date('YmdTH:i:s',mktime(00,00,00,09,01,2008));
$finish = date('YmdTH:i:s',mktime(00,00,00,09,30,2008));
$claws = $app->affClawbacks($affiliateId, $start, $finish);
$infusionsoft->affiliates()->affClawbacks()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliates()->affClawbacks($affiliateId, $filterStartDate, $filterEndDate)
Retrieves all commissions for a specific affiliate within a date range.
$app->affCommissions($affiliateId, $start, $finish);
$app = new iSDK();
// perform authorization tasks
$affiliateId = 123;
$start = date('YmdTH:i:s',mktime(00,00,00,09,01,2008));
$finish = date('YmdTH:i:s',mktime(00,00,00,09,30,2008));
$comms = $app->affCommissions($affiliateId, $start, $finish);
APIAffiliateService.affCommissions
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIAffiliateService.affCommissions</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>affiliateId</int></value>
</param>
<param>
<value><dateTime.iso8601>startDate</dateTime.iso8601></value>
</param>
<param>
<value><dateTime.iso8601>endDate</dateTime.iso8601></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><array><data/></array></value>
</param>
</params>
</methodResponse>
$infusionsoft->affiliates()->affCommissions()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliates()->affCommissions($affiliateId, $filterStartDate, $filterEndDate)
Retrieves all payments for a specific affiliate within a date range
$app->affPayouts($affiliateId, $start, $finish);
$app = new iSDK();
// perform authorization tasks
$affiliateId = 123;
$start = date('YmdTH:i:s',mktime(00,00,00,09,01,2008));
$finish = date('YmdTH:i:s',mktime(00,00,00,09,30,2008));
$pays = $app->affPayouts($affiliateId, $start, $finish);
APIAffiliateService.affPayouts
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIAffiliateService.affPayouts</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>affiliateId</int></value>
</param>
<param>
<value><dateTime.iso8601>startDate</dateTime.iso8601></value>
</param>
<param>
<value><dateTime.iso8601>endDate</dateTime.iso8601></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><array><data/></array></value>
</param>
</params>
</methodResponse>
$infusionsoft->affiliates()->affPayouts()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliates()->affPayouts($affiliateId, $filterStartDate, $filterEndDate)
Retrieves a list of the redirect links for the specified Affiliate.
AffiliateService.getRedirectLinksForAffiliate
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>AffiliateService.getRedirectLinksForAffiliate</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>affiliateId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><array><data/></array></value>
</param>
</params>
</methodResponse>
$app->getRedirectLinksForAffiliate($affiliateId);
$app = new iSDK();
// perform authorization tasks
$affiliateId = 123;
$links = $app->getRedirectLinksForAffiliate($affiliateId);
$infusionsoft->affiliates()->getRedirectLinksForAffiliate()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliates()->getRedirectLinksForAffiliate($affiliateId)
Retrieves a summary of statistics for a list of affiliates.
APIAffiliateService.affSummary
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIAffiliateService.affSummary</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><array>
<data>
<value><int>affList1</int></value>
<value><int>affList2</int></value>
<value><int>affList3</int></value>
</data>
</array></value>
</param>
<param>
<value><dateTime.iso8601>startDate</dateTime.iso8601></value>
</param>
<param>
<value><dateTime.iso8601>endDate</dateTime.iso8601></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>Clawbacks</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AmountEarned</name>
<value><double>0.0</double></value>
</member>
<member>
<name>Balance</name>
<value>
<double>0.0</double></value>
</member>
<member>
<name>AffiliateId</name>
<value><i4>2</i4></value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>Clawbacks</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AmountEarned</name>
<value><double>0.0</double></value>
</member>
<member>
<name>Balance</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AffiliateId</name>
<value><i4>4</i4></value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>Clawbacks</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AmountEarned</name>
<value><double>0.0</double></value>
</member>
<member>
<name>Balance</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AffiliateId</name>
<value><i4>6</i4></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->affSummary($affiliateIds, $start, $finish);
$app = new iSDK();
// perform authorization tasks
$affiliateIds = array(123,456,789);
$start = date('YmdTH:i:s',mktime(00,00,00,09,01,2008));
$finish = date('YmdTH:i:s',mktime(00,00,00,09,30,2008));
$pays = $app->affSummary($affiliateIds, $start, $finish);
$infusionsoft->affiliates()->affSummary()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliates()->affSummary($affiliateId, $filterStartDate, $filterEndDate)
Retrieves the current balances for Amount Earned, Clawbacks, and Running Balance.
APIAffiliateService.affRunningTotals
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIAffiliateService.affRunningTotals</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><array>
<data>
<value><int>affList1</int></value>
<value><int>affList2</int></value>
<value><int>affList3</int></value>
</data>
</array></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>Clawbacks</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AmountEarned</name>
<value><double>0.5483</double></value>
</member>
<member>
<name>Payments</name>
<value><double>0.0</double></value>
</member>
<member>
<name>RunningBalance</name>
<value><double>0.5483</double></value>
</member>
<member>
<name>AffiliateId</name>
<value><i4>2</i4></value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>Clawbacks</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AmountEarned</name>
<value><double>0.0</double></value>
</member>
<member>
<name>Payments</name>
<value><double>0.0</double></value>
</member>
<member>
<name>RunningBalance</name>
<value><double>=0.0</double></value>
</member>
<member>
<name>AffiliateId</name>
<value><i4>4</i4></value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>Clawbacks</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AmountEarned</name>
<value><double>0.0</double></value>
</member>
<member>
<name>Payments</name>
<value><double>0.0</double></value>
</member>
<member>
<name>RunningBalance</name>
<value><double>0.0</double></value>
</member>
<member>
<name>AffiliateId</name>
<value><i4>6</i4></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->affPayouts($affiliateIds);
$app = new iSDK();
// perform authorization tasks
$affiliateIds = array(123,456,789);
$totals = $app->affPayouts($affiliateIds);
$infusionsoft->affiliates()->affRunningTotals()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliates()->affRunningTotals($affiliateIds)
The Affiliate Program Service allows access to some of features in the Referral Partner Center
Retrieves a list of all of the Affiliate Programs that are in the application.
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>AffiliateProgramService.getAffiliatePrograms</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<fault>
<value>
<struct>
<member>
</member>
</struct>
</value>
</fault>
</methodResponse>
$app->getAffiliatePrograms();
$app = new iSDK();
// perform authorization tasks
$programs = $app->getAffiliatePrograms();
Retrieves a list of all of the affiliates with their contact data for the specified program. This includes all of the custom fields defined for the contact and affiliate records that are retrieved.
AffiliateProgramService.getAffiliatesByProgram
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>AffiliateProgramService.getAffiliatesByProgram</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>programId</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
</param>
</params>
</methodResponse>
$app->getAffiliatesByProgram(3);
$app = new iSDK();
// perform authorization tasks
$app->getAffiliatesByProgram(3);
$infusionsoft->affiliatePrograms()->getAffiliatesByProgram()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliatePrograms()->getAffiliatesByProgram($programId)
Retrieves a list of all of the Affiliate Programs for the Affiliate specified.
AffiliateProgramService.getProgramsForAffiliate
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>AffiliateProgramService.getProgramsForAffiliate</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><i4>affiliateId</i4></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name></name>
<value></value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getProgramsForAffiliate(2);
$app = new iSDK();
// perform authorization tasks
$programs = $app->getProgramsForAffiliate(2);
$infusionsoft->affiliatePrograms()->getProgramsForAffiliate()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliatePrograms()->getProgramsForAffiliate($affiliateId)
Retrieves a list of all of the resources that are associated to the Affiliate Program specified.
AffiliateProgramService.getResourcesForAffiliateProgram
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>AffiliateProgramService.getResourcesForAffiliateProgram</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>programId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
</param>
</params>
</methodResponse>
$app->getResourcesForAffiliateProgram($programId);
$app = new iSDK();
// perform authorization tasks
$result = $app->getResourcesForAffiliateProgram(2);
$infusionsoft->affiliatePrograms()->getResourcesForAffiliateProgram()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->affiliatePrograms()->getResourcesForAffiliateProgram($programId)
The Contact service is used to manage contacts. You can add, update and find contacts in addition to managing follow up sequences, tags and action sets.
Searches for a contact by Name or Email Address
ContactService.findByNameOrEmail
<methodCall>
<methodName>ContactService.findByNameOrEmail</methodName>
<params>
<param>
<value><string>dummyKey</string></value>
</param>
<param>
<value><string>name@email.com</string></value>
</param>
<param>
<value><int>10</int></value>
</param>
<param>
<value><int>0</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>Email</name>
<value>name@email.com</value>
</member>
<member>
<name>FirstName</name>
<value>thefirstname</value>
</member>
<member>
<name>Id</name>
<value>
<i4>1</i4>
</value>
</member>
<member>
<name>LastName</name>
<value>thelastname</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
Creates a new contact record from the data passed in the associative array.
ContactService.add
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.add</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><struct>
<member><name>FirstName</name>
<value><string>John</string></value>
</member>
<member><name>LastName</name>
<value><string>Doe</string></value>
</member>
<member><name>Email</name>
<value><string>there_he_go@itsjohndoe.com</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>contactIDNumber</i4></value>
</param>
</params>
</methodResponse>
$app->addCon($contactData);
$contactData = array('FirstName' => 'John',
'LastName' => 'Doe',
'Email' => 'JDoe@email.com');
$conID = $app->addCon($contactData);
$infusionsoft->contacts()->add()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->add($data)
Adds or updates a contact record based on matching data
ContactService.addWithDupCheck
<?xml version="1.0"?>
<methodCall>
<methodName>ContactService.addWithDupCheck</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value>
<struct>
<member>
<name>FirstName</name>
<value><string>John</string></value>
</member>
<member>
<name>LastName</name>
<value><string>Doe</string></value>
</member>
<member>
<name>Email</name>
<value><string>there_he_go@itsjohndoe.com</string></value>
</member>
</struct>
</value>
</param>
<param>
<value><string>EmailAndName</string></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<i4>40</i4>
</value>
</param>
</params>
</methodResponse>
$app->addWithDupCheck();
$app = new iSDK();
// perform authorization tasks
$app->addWithDupCheck(array('FirstName' => 'test', 'LastName' => 'test', 'Email' => 'test@test.com'), 'EmailAndName');
$infusionsoft->contacts()->addWithDupCheck()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->addWithDupCheck($data, $dupCheckType)
ContactService.load
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.load</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><array>
<data>
<value><string>Id</string></value>
<value><string>FirstName</string></value>
<value><string>LastName</string></value>
</data>
</array></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>FirstName</name>
<value>Ron</value>
</member>
<member>
<name>Id</name>
<value><i4>18</i4></value>
</member>
<member>
<name>LastName</name>
<value>Doe</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->loadCon(123, $returnFields);
$app = new iSDK();
// perform authorization tasks
$returnFields = array('Email', 'FirstName', 'LastName', '_myCustomField');
$conDat = $app->loadCon(123, $returnFields);
$infusionsoft->contacts()->load()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->load($contactId, $selectedFields)
Updates a contact's information
ContactService.update
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.update</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><struct>
<member><name>fieldToUpdate1</name>
<value><string>field1</string></value>
</member>
<member><name>fieldToUpdate2</name>
<value><string>field2</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>contactIDNumber</i4></value>
</param>
</params>
</methodResponse>
$app->updateCon($ID, $contactData);
$conDat = array('Email' => 'JDoe2@email.com');
$conID = $app->updateCon(123, $conDat);
$infusionsoft->contacts()->update()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->update($contactId, $data)
Merges two contacts into a single record.
ContactService.merge
<?xml version="1.0"?>
<methodCall>
<methodName>ContactService.merge</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactId</int></value>
</param>
<param>
<value><int>duplicateContactId</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<boolean>1</boolean>
</value>
</param>
</params>
</methodResponse>
$app = new iSDK();
// perform authorization tasks
$carray = array(
php_xmlrpc_encode($app->key),
php_xmlrpc_encode(16),
php_xmlrpc_encode(24));
$app->methodCaller("ContactService.merge",$carray);
$infusionsoft->contacts()->merge()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->merge($contactId, $duplicateContactId)
Retrieves all contacts with the given email address. This searches the Email, Email 2, and Email 3 fields
ContactService.findByEmail
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.findByEmail</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>there_he_go@itsjohndoe.com</string></value>
</param>
<param>
<value><array>
<data>
<value><string>Id</string></value>
<value><string>FirstName</string></value>
<value><string>LastName</string></value>
</data>
</array></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>FirstName</name>
<value>John</value>
</member>
<member>
<name>Id</name>
<value><i4>16</i4></value>
</member>
<member>
<name>LastName</name>
<value>Doe</value>
</member>
</struct>
</value>
<value>
<struct>
<member>
<name>FirstName</name>
<value>Ron</value>
</member>
<member>
<name>Id</name>
<value><i4>18</i4></value>
</member>
<member>
<name>LastName</name>
<value>Doe</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->findByEmail($email, $returnFields);
$app = new iSDK();
// perform authorization tasks
$email = 'test@example.com';
$returnFields = array('Id', 'FirstName', 'LastName');
$data = $app->findByEmail($email, $returnFields);
$infusionsoft->contacts()->findByEmail()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->findByEmail($email, $selectedFields)
Adds a tag to a contact record (tags were originally called "groups").
ContactService.addToGroup
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.addToGroup</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><int>tagIDNumber</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->grpAssign($contactId, $tagId);
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$tagId = 456;
$result = $app->grpAssign($contactId, $tagId);
$infusionsoft->contacts()->addToGroup()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->addToGroup($contactId, $tagId)
Removes a tag from a contact (tags were originally called groups).
ContactService.removeFromGroup
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.removeFromGroup</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><int>tagIDNumber</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->grpRemove($contactId, $groupId);
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$groupId = 456;
$result = $app->grpRemove($contactId, $groupId);
$infusionsoft->contacts()->removeFromGroup()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->removeFromGroup($contactId, $tagId)
Adds a contact to a follow-up sequence (campaigns were the original name of follow-up sequences).
ContactService.addToCampaign
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.addToCampaign</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><int>campaignIDNumber</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<boolean>0</boolean>
</value>
</param>
</params>
</methodResponse>
$app->campAssign($contactId, $campaignId);
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$campId = 456;
$result = $app->campAssign($contactId, $campId)
$infusionsoft->contacts()->addToCampaign()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->addToCampaign($contactId, $campaignId)
Returns the Id number of the next follow-up sequence step for the given contact
ContactService.getNextCampaignStep
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.getNextCampaignStep</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><int>followUpSequenceId</int></value>
</param>
</params>
</methodCall>
$app->getNextCampaignStep($contactIdNumber,2);
$app = new iSDK();
// perform authorization tasks
$cStep = $app->getNextCampaignStep($contactIdNumber,2);
$infusionsoft->contacts()->getNextCampaignStep()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->getNextCampaignStep($contactId, $followUpSequenceId)
Immediately performs the given follow-up sequence step for the given contacts.
ContactService.rescheduleCampaignStep
<?xml version="1.0"?>
<methodCall>
<methodName>ContactService.rescheduleCampaignStep</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><array>
<data>
<value><int>22</int></value>
<value><int>12</int></value>
<value><int>16</int></value>
</data>
</array></value>
</param>
<param>
<value><int>2</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<i4>
3
</i4>
</value>
</param>
</params>
</methodResponse>
$app->rescheduleCampaignStep();
$app = new iSDK();
// perform authorization tasks
$contactIds = array(123,456,789);
$app->rescheduleCampaignStep($conIds, 23);
$infusionsoft->contacts()->rescheduleCampaignStep()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->rescheduleCampaignStep($contactIds, $sequenceStepId)
Pauses a follow-up sequence for the given contact record
ContactService.pauseCampaign
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.pauseCampaign</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>22</int></value>
</param>
<param>
<value><int>2</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<boolean>
1
</boolean>
</value>
</param>
</params>
</methodResponse>
$app->campPause($contactId, $seqId);
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$seqId = 456;
$result = $app->campPause($contactId, $seqId);
$infusionsoft->contacts()->pauseCampaign()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->pauseCampaign($contactId, $sequenceId)
Resumes a follow-up sequence that has been stopped/paused for a given contact.
$app->resumeCampaignForContact($contactId, $sequenceId);
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$sequenceId = 456;
$result = $app->resumeCampaignForContact($contactId, $sequenceId);
ContactService.resumeCampaignForContact
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.resumeCampaignForContact</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><int>sequenceIDNumber</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$infusionsoft->contacts()->resumeCampaignForContact()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->resumeCampaignForContact($contactId, $seqId)
Removes a follow-up sequence from a contact record
ContactService.removeFromCampaign
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.removeFromCampaign</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><int>campaignIDNumber</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<boolean>
1
</boolean>
</value>
</param>
</params>
</methodResponse>
$app->campRemove($contactId, $followUpId);
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$fusId = 456;
$result = $app->campRemove($contactId, $fusId);
$infusionsoft->contacts()->removeFromCampaign()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->removeFromCampaign($contactId, $followUpSequenceId)
This will link 2 contacts together using the specified link type.
Your Infusionsoft API Key
The first contact id to link
The second contact id to link
The link type
ContactService.linkContacts
<?xml version="1.0"?>
<methodCall>
<methodName>ContactService.linkContacts</methodName>
<params>
<param>
<value><string>privatekey</string></value>
</param>
<param>
<value><int>contactId1</int></value>
</param>
<param>
<value><int>contactId2</int></value>
</param>
<param>
<value><int>linkId</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value><boolean>1</boolean></value></param></params></methodResponse>
Unlink contacts with a specific link type
Your Infusionsoft API Key
The first contact id you want to unlink
The second contact id you want to unlink
The Link type id
ContactService.unlinkContacts
<?xml version="1.0"?>
<methodCall>
<methodName>ContactService.unlinkContacts</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactId1</int></value>
</param>
<param>
<value><int>contactId2</int></value>
</param>
<param>
<value><int>linkTypeId</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<boolean>1</boolean>
</value>
</param>
</params>
</methodResponse>
This will list all linked contacts to the given contact id.
Your Infusionsoft API Key
The contact id you want to list all linked contacts for
ContactService.listLinkedContacts
<?xml version="1.0"?>
<methodCall>
<methodName>ContactService.listLinkedContacts</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactId</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data/>
</array>
</value>
</param>
</params>
</methodResponse>
Runs an action sequence on a given contact record
ContactService.runActionSequence
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ContactService.runActionSequence</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactIDNumber</int></value>
</param>
<param>
<value><int>1</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>
Action
</name>
<value>
Apply/Remove Tag
</value>
</member>
<member>
<name>
Message
</name>
<value>
tags applied to Contact: Nurture Subscriber
</value>
</member>
<member>
<name>
IsError
</name>
<value>
<boolean>
0
</boolean>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->runAS();
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$actionId = 456;
$result = $app->runAS($contactId, $actionId);
$infusionsoft->contacts()->runActionSequence()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->contacts()->runActionSequence($contactId, $actionSetId)
The Data service is used to manipulate most data in Infusionsoft. It permits you to work on any available tables and has a wide range of uses. To manage affiliate information (i.e. Name, Phone, etc.) you will need to use the Data service.
Usable only with OAuth tokens, this retrieves information about the currently authenticated user.
Information about the authenticated user.
DataService.getUserInfo
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.getUserInfo</methodName>
<params>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>globalUserId</name>
<value>123456</value>
</member>
<member>
<name>localUserId</name>
<value>123</value>
</member>
<member>
<name>appAlias</name>
<value>somealias123</value>
</member>
<member>
<name>appUrl</name>
<value>https://app.infusionsoft.com</value>
</member>
<member>
<name>displayName</name>
<value>Macho Man</value>
</member>
<member>
<name>casUsername</name>
<value>username</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getUserInfo();
$app = new iSDK();
// perform authorization tasks
$userInfo = $app->getUserInfo();
$infusionsoft->data()->getUserInfo()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->getUserInfo()
Creates a new record in the specified Infusionsoft data table.
Returns an integer representing the ID of the new record.
DataService.add
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.add</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>Contact</string></value>
</param>
<param>
<value><struct>
<member><name>FirstName</name>
<value><string>John</string></value>
</member>
<member><name>LastName</name>
<value><string>Doe</string></value>
</member>
<member><name>Email</name>
<value><string>jdoe@email.com</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>26</i4></value>
</param>
</params>
</methodResponse>
$app->dsAdd();
$data = array('FirstName' => 'John',
'LastName' => 'Doe',
'Email' => 'JDoe@email.com');
$app->dsAdd("Contact", $data);
$infusionsoft->data()->add()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->add($table, $values)
Loads the requested fields from a specified record.
The specified fields for the given record.
DataService.load
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.load</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>tableName</string></value>
</param>
<param>
<value><int>idNumber</int></value>
</param>
<param>
<value><array>
<data>
<value><string>field1</string></value>
<value><string>field2</string></value>
<value><string>field3</string></value>
</data>
</array></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>field1</name>
<value>field1Value</value>
</member>
<member>
<name>field2</name>
<value>field2Value</value>
</member>
<member>
<name>field3</name>
<value>field3Value</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->dsLoad();
$app = new iSDK();
// perform authorization tasks
$returnFields = array('Email', 'FirstName', 'LastName');
$conDat = $app->dsLoad("Contact", 123, $returnFields);
$infusionsoft->data()->load()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->load($table, $recordID, $fields)
Retrieves all records in a table that match the given term on a specific field.
Returns one object per result found. The result will contain all fields specified in the request along with their corresponding value.
DataService.findByField
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.findByField</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>tableName</string></value>
</param>
<param>
<value><int>limit</int></value>
</param>
<param>
<value><int>page</int></value>
</param>
<param>
<value><string>fieldName</string></value>
</param>
<param>
<value><string>fieldValue</string></value>
</param>
<param>
<value><array>
<data>
<value><string>returnField1</string></value>
</data>
</array></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><array><data/></array></value>
</param>
</params>
</methodResponse>
$app->dsFind();
$app = new iSDK();
// perform authorization tasks
$returnFields = array('ContactId','ContactGroup');
$contacts = $app->dsFind('ContactGroupAssign',5,0,'GroupId',97,$returnFields);
$infusionsoft->data()->findByField()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->findByField($table, $limit, $page, $fieldName, $fieldValue, $returnFields)
Performs a query across the given table based on the query data.
Returns an array of objects, one per result found by the query. The object will contain all fields specified by the selected fields along with their corresponding values.
DataService.query
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.query</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>tableName</string></value>
</param>
<param>
<value><int>limit</int></value>
</param>
<param>
<value><int>page</int></value>
</param>
<param>
<value><struct>
<member><name>queryField</name>
<value><string>query</string></value>
</member>
</struct></value>
</param>
<param>
<value><array>
<data>
<value><string>returnField1</string></value>
<value><string>returnField2</string></value>
</data>
</array></value>
</param>
<param>
<value><string>orderBy</string></value>
</param>
<param>
<value><boolean>ascending</boolean></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>FirstName</name>
<value>Chuck</value>
</member>
<member>
<name>Id</name>
<value><i4>22</i4></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->dsQuery();
$app = new iSDK();
// perform authorization tasks
$returnFields = array('Id','FirstName');
$query = array('FirstName' => 'justin');
$contacts = $app->dsQuery("Contact",10,0,$query,$returnFields);
$infusionsoft->data()->query()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->query($table, $limit, $page, $queryData, $selectedFields, $orderBy, $ascending)
Updates a specific record in the specified Infusionsoft data table.
Returns an ID of the successfully updated record.
DataService.update
<?xml version="1.0"?>
<methodCall>
<methodName>DataService.update</methodName>
<params>
<param>
<value>
<string>privateKey</string>
</value>
</param>
<param>
<value>
<string>Table</string>
</value>
</param>
<param>
<value>
<int>Id of record</int>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>FieldName</name>
<value>
<string>Value you are updating to</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>26</i4></value>
</param>
</params>
</methodResponse>
$app->dsUpdate();
$app = new iSDK();
// perform authorization tasks
$grp = array('GroupName' => 'Test Group',
'GroupDescription' => 'This tag was Created with api');
$grpID = 97;
$grpID = $app->dsUpdate("ContactGroup", $grpID, $grp);
$infusionsoft->data()->update()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->update($table, $recordID, $values)
Deletes the specified record in the given table from the database
Returns a boolean true if successful; false otherwise.
DataService.delete
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.delete</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>tableName</string></value>
</param>
<param>
<value><int>idNumberToDelete</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->dsDelete();
$app = new iSDK();
// perform authorization tasks
$result = $app->dsDelete('Contact',123);
$infusionsoft->data()->delete()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->delete($table, $ID)
Performs a query across the given table based on the query data and returns the count of records.
Returns an integer count of the number of records that match the query.
DataService.count
<?xml version="1.0"?>
<methodCall>
<methodName>DataService.count</methodName>
<params>
<param>
<value>
<string>APIKEY</string>
</value>
</param>
<param>
<value>
<string>Contact</string>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>Email</name>
<value>
<string>test@example.com</string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<i4>7</i4>
</value>
</param>
</params>
</methodResponse>
$app->dsCount();
$app = new iSDK();
// perform authorization tasks
$query = array('FirstName' => 'justin');
$contacts = $app->dsCount("Contact",$query);
$infusionsoft->data()->count()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->count($table, $queryData)
DataService.addCustomField
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.addCustomField</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>contextOfField</string></value>
</param>
<param>
<value><string>displayName</string></value>
</param>
<param>
<value><string>dataType</string></value>
</param>
<param>
<value><int>headerID</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>4</i4></value>
</param>
</params>
</methodResponse>
$app->addCustomField();
$app = new iSDK();
// perform authorization tasks
$newField = $app->addCustomField('Contact','Test Field','Text',1);
$infusionsoft->data()->addCustomField()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->addCustomField($customFieldType, $displayName, $dataType, $headerID)
Updates the value of a custom field. Every field can have it's display name and group id changed, but only certain data types will allow you to actually change values (dropdown, listbox, radio, etc).
Note: Drilldown fields are not supported with this method.
Returns a boolean true if successfully updated.
DataService.updateCustomField
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.updateCustomField</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>customFieldId</int></value>
</param>
<param>
<value><struct>
<member><name>contextOfField</name>
<value><string>fieldValue</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><i4>4</i4></value>
</member>
<member>
<name>faultString</name>
<value>[DatabaseError]Error creating custom field</value>
</member>
</struct>
</value>
</fault>
</methodResponse>
$app->addCustomField();
$app = new iSDK();
// perform authorization tasks
$meta = $app->addCustomField('Contact','API TEST','Text',1);
$values = array('Label' => 'API_TEST_UPDATE');
$status = $app->updateCustomField($meta,$values);
$infusionsoft->data()->updateCustomField()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->updateCustomField($customFieldId, $values)
Retrieves the iCalendar file for the specified appointment
DataService.getAppointmentICal
<?xml version="1.0"?>
<methodCall>
<methodName>DataService.getAppointmentICal</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>appointmentId</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>BEGIN:VCALENDAR PRODID:-//Infusionsoft//iCal4j 1.0//EN VERSION:2.0 CALSCALE:GREGORIAN BEGIN:VEVENT DTSTAMP:20120430T235728Z DTSTART:20120430T181500Z DTEND:20120430T184500Z SUMMARY:blah UID:20120430T235728Z-vuurr24@fe80:0:0:0:d6be:d9ff:feaa:f495%3 DESCRIPTION: ORGANIZER;ROLE=REQ-PARTICIPANT;CN=Chris Conrey:mailto:chris@vuurr.com END:VEVENT END:VCALENDAR</value>
</param>
</params>
</methodResponse>
$app->methodCaller();
$app = new iSDK();
// perform authorization tasks
$carray = array(
php_xmlrpc_encode($app->key),
php_xmlrpc_encode(2));
$app->methodCaller("DataService.getAppointmentICal",$carray);
$infusionsoft->data()->getAppointmentICal()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->getAppointmentICal($appointmentId)
Retrieves the value of a given setting in the current application. In order to find the module and option names, view the HTML field name within the Infusionsoft settings. You will see something such as name="Contact_WebModule0optiontypes". The portion before the underscore is the module name. "Contact" in this example. The portion after the 0 is the setting name, "optiontypes" in this example.
DataService.getAppSetting
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DataService.getAppSetting</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>moduleName</string></value>
</param>
<param>
<value><string>settingName</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>Prospect,Customer,Partner,Personal Contact,Vendor</value>
</param>
</params>
</methodResponse>
$app->dsGetSetting();
$app = new iSDK();
// perform authorization tasks
$result = $app->dsGetSetting('Contact', 'optiontypes');
$infusionsoft->data()->getAppSetting()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->data()->getAppSetting($module, $setting)
The Discount service is used to manage products. You can add, update and find products in addition to managing follow up sequences, tags and action sets.
DiscountService.addOrderTotalDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.addOrderTotalDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>name</string></value>
</param>
<param>
<value><string>description</string></value>
</param>
<param>
<value><int>applyDiscountToCommission</int></value>
</param>
<param>
<value><int>PercentOrAmt</int></value>
</param>
<param>
<value><double>amt</double></value>
</param>
<param>
<value><string>payType</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<i4>
3
</i4>
</value>
</param>
</params>
</methodResponse>
$app->addOrderTotalDiscount();
$app = new iSDK();
// perform authorization tasks
$app->addOrderTotalDiscount("test", "test description", 0, 1, 5.00, "Gross");
$infusionsoft->discounts()->addOrderTotalDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->addOrderTotalDiscount($name, $applyDiscountToCommission, $percentOrAmt, $payType)
DiscountService.getOrderTotalDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.getOrderTotalDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>id</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>
amount
</name>
<value>
5.0
</value>
</member>
<member>
<name>
description
</name>
<value>
test
</value>
</member>
<member>
<name>
name
</name>
<value>
discount
</value>
</member>
<member>
<name>
pctOrAmt
</name>
<value>
3
</value>
</member>
<member>
<name>
payType
</name>
<value>
Gross
</value>
</member>
<member>
<name>
applyDiscountToCommission
</name>
<value>
1
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getOrderTotalDiscount();
$app = new iSDK();
// perform authorization tasks
$app->getOrderTotalDiscount(1);
$infusionsoft->discounts()->getOrderTotalDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->getOrderTotalDiscount($ID)
DiscountService.addFreeTrial
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.addFreeTrial</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>name</string></value>
</param>
<param>
<value><string>description</string></value>
</param>
<param>
<value><int>freeTrialDays</int></value>
</param>
<param>
<value><int>hidePrice</int></value>
</param>
<param>
<value><int>subscriptionPlanId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>1</i4></value>
</param>
</params>
</methodResponse>
$app->addFreeTrial();
$app = new iSDK();
// perform authorization tasks
$app->addFreeTrial("test", "test description", 5, 0, 1);
$infusionsoft->discounts()->addFreeTrial()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->addFreeTrial($name, $description, $freeTrialDays, $hidePrice, $subscriptionPlanID)
DiscountService.getFreeTrial
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.getFreeTrial</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>trialId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>freeTrialDays</name>
<value>9</value>
</member>
<member>
<name>subscriptionPlanId</name>
<value>5</value>
</member>
<member>
<name>description</name>
<value>test free trial</value>
</member>
<member>
<name>name</name>
<value>free</value>
</member>
<member>
<name>hidePrice</name>
<value>1</value>
</member>
<member>
<name>applyDiscountToCommission</name>
<value>1</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getFreeTrial();
$app = new iSDK();
// perform authorization tasks
$app->getFreeTrial(1);
$infusionsoft->discounts()->getFreeTrial()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->getFreeTrial($trialId)
DiscountService.addShippingTotalDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.addShippingTotalDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>name</string></value>
</param>
<param>
<value><string>description</string></value>
</param>
<param>
<value><int>applyDiscountToCommission</int></value>
</param>
<param>
<value><int>percentOrAmt</int></value>
</param>
<param>
<value><double>amt</double></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<i4>
9
</i4>
</value>
</param>
</params>
</methodResponse>
$app->addShippingTotalDiscount();
$app->addShippingTotalDiscount("test", "test description", 0, 2, 18.00);
$infusionsoft->discounts()->addShippingTotalDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->addShippingTotalDiscount($name, $description, $applyDiscountToCommission, $percentOrAmt, $amt)
DiscountService.getShippingTotalDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.getShippingTotalDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>id</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>
amount
</name>
<value>
1.0
</value>
</member>
<member>
<name>
description
</name>
<value>
Test
</value>
</member>
<member>
<name>
name
</name>
<value>
shipping discount
</value>
</member>
<member>
<name>
pctOrAmt
</name>
<value>
5
</value>
</member>
<member>
<name>
applyDiscountToCommission
</name>
<value>
1
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getShippingTotalDiscount();
$app->getShippingTotalDiscount(6);
$infusionsoft->discounts()->getShippingTotalDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->getShippingTotalDiscount($shippingDiscountID)
DiscountService.addProductTotalDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.addProductTotalDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>name</string></value>
</param>
<param>
<value><string>description</string></value>
</param>
<param>
<value><int>applyDiscountToCommission</int></value>
</param>
<param>
<value><int>productId</int></value>
</param>
<param>
<value><int>percentOrAmt</int></value>
</param>
<param>
<value><double>amt</double></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<i4>
7
</i4>
</value>
</param>
</params>
</methodResponse>
$app->addProductTotalDiscount();
$app = new iSDK();
// perform authorization tasks
$app->addProductTotalDiscount("test discount", "discount for a product", 0, 3, 3, 5);
$infusionsoft->discounts()->addProductTotalDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->addProductTotalDiscount($name, $description, $applyDiscountToCommission, $productID, $percentOrAmt, $amt)
DiscountService.getProductTotalDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.getProductTotalDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>id</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>
description
</name>
<value>
test
</value>
</member>
<member>
<name>
name
</name>
<value>
prod discount total
</value>
</member>
<member>
<name>
applyDiscountToCommission
</name>
<value>
1
</value>
</member>
<member>
<name>
productId
</name>
<value>
3
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getProductTotalDiscount();
$app->getProductTotalDiscount(1);
$infusionsoft->discounts()->getProductTotalDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->getProductTotalDiscount($productDiscountID)
DiscountService.addCategoryDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.addCategoryDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>name</string></value>
</param>
<param>
<value><string>description</string></value>
</param>
<param>
<value><int>applyDiscountToCommission</int></value>
</param>
<param>
<value><double>amt</double></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<i4>
5
</i4>
</value>
</param>
</params>
</methodResponse>
$app->addCategoryDiscount();
$app = new iSDK();
// perform authorization tasks
$app->addCategoryDiscount("test", "test description", 0, 5.00);
$infusionsoft->discounts()->addCategoryDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->addCategoryDiscount($name, $description, $applyDiscountToCommission, $amt)
Returns the options and values of the specified category discount ID.
DiscountService.getCategoryDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.getCategoryDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>id</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>
description
</name>
<value>
test
</value>
</member>
<member>
<name>
name
</name>
<value>
cat discount
</value>
</member>
<member>
<name>
applyDiscountToCommission
</name>
<value>
1
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getCategoryDiscount();
$app = new iSDK();
// perform authorization tasks
$app->getCategoryDiscount(1);
$infusionsoft->discounts()->getCategoryDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->getCategoryDiscount($ID)
Retrieves the options and values of the category assignment for category discount passed.
DiscountService.getCategoryAssignmentsForCategoryDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.getCategoryAssignmentsForCategoryDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>id</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>
id
</name>
<value>
1
</value>
</member>
<member>
<name>
specialItemId
</name>
<value>
5
</value>
</member>
<member>
<name>
productCategoryId
</name>
<value>
3
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->getCategoryAssignmentsForCategoryDiscount();
$app->getCategoryAssignmentsForCategoryDiscount(1);
$infusionsoft->discounts()->getCategoryAssignmentsForCategoryDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->getCategoryAssignmentsForCategoryDiscount($ID)
DiscountService.addCategoryAssignmentToCategoryDiscount
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>DiscountService.addCategoryAssignmentToCategoryDiscount</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>id</int></value>
</param>
<param>
<value><int>productId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<i4>
1
</i4>
</value>
</param>
</params>
</methodResponse>
$app->addCategoryAssignmentToCategoryDiscount();
$app = new iSDK();
// perform authorization tasks
$app->addCategoryAssignmentToCategoryDiscount(1, 2);
$infusionsoft->discounts()->addCategoryAssignmentToCategoryDiscount()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->discounts()->addCategoryAssignmentToCategoryDiscount($ID, $productID)
The Email service allows you to email your contacts as well as attaching emails sent elsewhere (this lets you send email from multiple services and still see all communications inside of Infusionsoft).
Opts-in an email address. This method only works the first time an email address opts-in.
Returns a boolean true upon successful opt-in.
APIEmailService.optIn
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.optIn</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>email</string></value>
</param>
<param>
<value><string>reason</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>0</boolean></value>
</param>
</params>
</methodResponse>
$app->optIn();
$app = new iSDK();
// perform authorization tasks
$app->optIn($subscriberEmail,"Home page newsletter subscriber");
$infusionsoft->emails()->optIn()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->optIn($email, $optInReason)
Opts-out an email address. Once an address is opt-out, the API cannot opt it back in.
APIEmailService.optOut
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.optOut</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>email</string></value>
</param>
<param>
<value><string>reason</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>0</boolean></value>
</param>
</params>
</methodResponse>
$app->optOut();
$app = new iSDK();
// perform authorization tasks
$app->optOut($subscriberEmail,"Opted out from our website");
$infusionsoft->emails()->optOut()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->optOut($email, $optOutReason)
Returns an integer value of 0 for opt out/non-marketable/soft bounce/hard bounce, 1 for single opt-in, or 2 for double opt-in.
APIEmailService.getOptStatus
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.getOptStatus</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>email</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>0</i4></value>
</param>
</params>
</methodResponse>
$app->optStatus();
$app = new iSDK();
// perform authorization tasks
$app->optStatus('test@example.com');
$infusionsoft->emails()->getOptStatus()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->getOptStatus($email)
Creates a new email template that can be used when sending emails.
Returns an ID of the created template.
APIEmailService.addEmailTemplate
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.addEmailTemplate</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>title</string></value>
</param>
<param>
<value><string>categories</string></value>
</param>
<param>
<value><string>fromAddress</string></value>
</param>
<param>
<value><string>toAddress</string></value>
</param>
<param>
<value><string>ccAddresses</string></value>
</param>
<param>
<value><string>bccAddresses</string></value>
</param>
<param>
<value><string>subject</string></value>
</param>
<param>
<value><string>textBody</string></value>
</param>
<param>
<value><string>htmlBody</string></value>
</param>
<param>
<value><string>contentType</string></value>
</param>
<param>
<value><string>mergeContext</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>3378</i4></value>
</param>
</params>
</methodResponse>
$app->addEmailTemplate();
$app = new iSDK();
// perform authorization tasks
$title = "template API test";
$category = "API Category";
$fromAddress = "from@infusionsoft.com";
$toAddress = "~Contact.Email~";
$ccAddress = "";
$bccAddresses = "";
$subject = "My Fancy Subject Line";
$textBody = "This is the text email body";
$htmlBody = "This is the HTML email body"
$contentType = "HTML";
$mergeContext = "Contact";
$tmpId = $app->addEmailTemplate($title, $category, $fromAddress, $toAddress, $ccAddress, $bccAddresses, $subject, $textBody, $htmlBody, $contentType, $mergeContext);
$infusionsoft->emails()->addEmailTemplate()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->addEmailTemplate($templateName, $categories, $fromAddress, $toAddress, $ccAddress, $bccAddress, $subject, $textBody, $htmlBody, $contentType, $mergeContext)
APIEmailService.getEmailTemplate
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.getEmailTemplate</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>templateId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>pieceTitle</name>
<value>template API Test</value>
</member>
<member>
<name>categories</name>
<value>API Category</value>
</member>
<member>
<name>fromAddress</name>
<value>from@infusionsoft.com</value>
</member>
<member>
<name>toAddress</name>
<value>~Contact.Email~</value>
</member>
<member>
<name>ccAddress</name>
<value/>
</member>
<member>
<name>bccAddress</name>
<value/>
</member>
<member>
<name>subject</name>
<value>My Fancy Subject Line</value>
</member>
<member>
<name>textBody</name>
<value>This is the text email body</value>
</member>
<member>
<name>htmlBody</name>
<value>This is html body</value>
</member>
<member>
<name>contentType</name>
<value>HTML</value>
</member>
<member>
<name>mergeContext</name>
<value>Contact</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getEmailTemplate();
$app = new iSDK();
// perform authorization tasks
$app->getEmailTemplate(42);
$infusionsoft->emails()->getEmailTemplate()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->getEmailTemplate($templateId)
Updates an email template that can be used when sending emails.
Returns an ID of the updated template.
APIEmailService.updateEmailTemplate
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.updateEmailTemplate</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>templateId</string></value>
</param>
<param>
<value><string>templateName</string></value>
</param>
<param>
<value><string>categories</string></value>
</param>
<param>
<value><string>fromAddress</string></value>
</param>
<param>
<value><string>toAddress</string></value>
</param>
<param>
<value><string>ccAddresses</string></value>
</param>
<param>
<value><string>bccAddresses</string></value>
</param>
<param>
<value><string>subject</string></value>
</param>
<param>
<value><string>textBody</string></value>
</param>
<param>
<value><string>htmlBody</string></value>
</param>
<param>
<value><string>contentType</string></value>
</param>
<param>
<value><string>mergeContext</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>3378</i4></value>
</param>
</params>
</methodResponse>
$app->updateEmailTemplate();
$app = new iSDK();
// perform authorization tasks
$template = 1;
$title = "template API test";
$category = "API Category";
$fromAddress = "from@infusionsoft.com";
$toAddress = "~Contact.Email~";
$ccAddress = "";
$bccAddresses = "";
$subject = "My Fancy Subject Line";
$textBody = "This is the text email body";
$htmlBody = "HTML"
$contentType = "Contact";
$mergeContext = "";
$tmpId = $app->addEmailTemplate($template, $title, $category, $fromAddress, $toAddress, $ccAddress, $bccAddresses, $subject, $textBody, $htmlBody, $contentType, $mergeContext);
$infusionsoft->emails()->updateEmailTemplate()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->updateEmailTemplate($templateId, $templateName, $categories, $fromAddress, $toAddress, $ccAddress, $bccAddress, $subject, $textBody, $htmlBody, $contentType, $mergeContext)
APIEmailService.sendEmail
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.sendEmail</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><array>
<data>
<value><int>12</int></value>
<value><int>16</int></value>
<value><int>22</int></value>
</data>
</array></value>
</param>
<param>
<value><int>3380</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<boolean>
1
</boolean>
</value>
</param>
</params>
</methodResponse>
$app->sendTemplate();
$app = new iSDK();
// perform authorization tasks
$app->sendTemplate(array(12,16,22), 3380);
$infusionsoft->emails()->sendEmail()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->sendEmail($contactList, $templateID)
Send an email to a list of contacts, as well as records the email in each contacts' email history.
Returns boolean true if the email has been successfully sent.
APIEmailService.sendEmail
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.sendEmail</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><array>
<data>
<value><int>contactList1</int></value>
<value><int>contactList2</int></value>
<value><int>contactList3</int></value>
</data>
</array></value>
</param>
<param>
<value><string>fromAddress</string></value>
</param>
<param>
<value><string>toAddress</string></value>
</param>
<param>
<value><string>ccAddresses</string></value>
</param>
<param>
<value><string>bccAddresses</string></value>
</param>
<param>
<value><string>contentType</string></value>
</param>
<param>
<value><string>subject</string></value>
</param>
<param>
<value><string>htmlBody</string></value>
</param>
<param>
<value><string>textBody</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->sendEmail();
$app = new iSDK();
// perform authorization tasks
$clist = array(123,456,789);
$status = $app->sendEmail($clist,"Test@test.com","~Contact.Email~", "","","Text","Test Subject","","This is the body");
$infusionsoft->emails()->sendEmail()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->sendEmail($contactList, $fromAddress, $toAddress, $ccAddresses, $bccAddresses, $contentType, $subject, $htmlBody, $textBody)
This retrieves all possible merge fields in the provided context - Contact, Opportunity, Invoice, or CreditCard.
Returns an array of the available merge fields.
This will create an item in the email history for a contact. This does not actually send the email, it only places an item into the email history. Using the API to instruct Infusionsoft to send an email will handle this automatically.
Returns a boolean true upon success.
APIEmailService.attachEmail
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>APIEmailService.attachEmail</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactId</int></value>
</param>
<param>
<value><string>fromName</string></value>
</param>
<param>
<value><string>fromAddress</string></value>
</param>
<param>
<value><string>toAddress</string></value>
</param>
<param>
<value><string>ccAddress</string></value>
</param>
<param>
<value><string>bccAddress</string></value>
</param>
<param>
<value><string>contentType</string></value>
</param>
<param>
<value><string>subject</string></value>
</param>
<param>
<value><string>htmlBody</string></value>
</param>
<param>
<value><string>textBody</string></value>
</param>
<param>
<value><string>header</string></value>
</param>
<param>
<value><string>receivedDate</string></value>
</param>
<param>
<value><string>sentDate</string></value>
</param>
<param>
<value><int>emailSentType(Set To 1)</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->attachEmail();
$app = new iSDK();
// perform authorization tasks
$contactId = 123;
$fromName = "John Doe";
$fromAddress = "JDoe@test.com";
$toAddress = "Tester@test.com";
$ccAddress = "cc@test.com";
$bccAddress = "bcc$test.com";
$contentType = "TEXT";
$subject = "test subject";
$htmlBody = "html here";
$textBody = "Test Body Can Be Anything";
$header = "Email header";
$receiveDate = "";
$sentDate = "";
$emailSentType = 1;
$status = $app->attachEmail($contactId, $fromName, $fromAddress, $toAddress, $ccAddress, $bccAddress, $contentType, $subject, $htmlBody, $textBody, $header, $receiveDate, $sentDate, $emailSentType);
$infusionsoft->emails()->attachEmail()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->emails()->attachEmail($contactId, $fromName, $fromAddress, $toAddress, $ccAddresses, $bccAddresses, $contentType, $subject, $htmlBody, $textBody, $header, $receivedDate, $sentDate, $emailSentType)
The FileService methods allow you to create and modify files inside of Infusionsoft.
Uploads a file to Infusionsoft. The optional contactID parameter is used to place the file in a specific contact's filebox.
FileService.uploadFile
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>FileService.uploadFile</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactID</int></value>
</param>
<param>
<value><string>fileName</string></value>
</param>
<param>
<value><string>RGVycE15RGVycA==.......base64EncodedFile</string></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value><i4>482</i4></value>
</param>
</params>
</methodResponse>
$app->uploadFile();
$app = new iSDK();
// perform authorization tasks
$fileName = 'Test';
$base64Enc = 'RGVycE15RGVycA==.......base64EncodedFile';
$cid = 10;
$app->uploadFile($fileName, $base64Enc, $cid);
$infusionsoft->files()->uploadFile()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->files()->uploadFile($contactID, $fileName, $base64EncodedData)
Retrieves the file data for the specified file ID.
FileService.getFile
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>FileService.getFile</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>fileUID</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>fileData</value>
</param>
</params>
</methodResponse>
$app->getFile();
$fileId = 64;
$myUrl = $app->getFile($fileId);
$infusionsoft->files()->getFile()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->files()->getFile($fileID)
FileService.getDownloadUrl
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>FileService.getDownloadUrl</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>fileUID</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
https://example.com/123xyz
</value>
</param>
</params>
</methodResponse>
$app->getDownloadUrl();
$app = new iSDK();
// perform authorization tasks
$fileId = 64;
$myUrl = $app->getDownloadUrl($fileId);
$infusionsoft->files()->getDownloadUrl()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->files()->getDownloadUrl($fileID)
Replaces a file's data.
FileService.replaceFile
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>FileService.replaceFile</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>fileId</int></value>
</param>
<param>
<value><string>RGVycE15RGVycA==.......base64EncodedFile</string></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value><i4>482</i4></value>
</param>
</params>
</methodResponse>
$app->replaceFile();
$app = new iSDK();
// perform authorization tasks
$fileName = 'Test';
$base64Enc = 'RGVycE15RGVycA==.......base64EncodedFile';
$app->replaceFile($fileName, $base64Enc, $cid);
$infusionsoft->files()->replaceFile()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->files()->replaceFile($fileId, $base64EncodedData)
FileService.renameFile
<?xml version="1.0"?>
<methodCall>
<methodName>FileService.renameFile</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>fileUID</int></value>
</param>
<param>
<value><string>fileName</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<boolean>
1
</boolean>
</value>
</param>
</params>
</methodResponse>
$infusionsoft->files()->renameFile()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->files()->renameFile($fileID, $fileName)
The Funnel Service is used to add contacts to marketing sequences.
FunnelService.achieveGoal
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>FunnelService.achieveGoal</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>Integration</string></value>
</param>
<param>
<value><string>CallName</string></value>
</param>
<param>
<value><int>contactId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>success</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>msg</name>
<value></value>
</member>
<member>
<name>funnelId</name>
<value><i4>175</i4></value>
</member>
<member>
<name>goalId</name>
<value><i4>3</i4></value>
</member>
<member>
<name>flowStart</name>
<value><array><data>
<value>
<struct>
<member>
<name>success</name>
<value><boolean>1</boolean></value>
</member>
<member>
<name>msg</name>
<value></value>
</member>
<member>
<name>flowId</name>
<value><i4>10</i4></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</member>
- <member>
<name>flowStop</name>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>success</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>msg</name>
<value>No Sequences were configured to be stopped by this Goal.</value>
</member>
<member>
<name>flowId</name>
<value><i4>0</i4></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->achieveGoal();
$app = new iSDK();
// perform authorization tasks
$Integration = 'test';
$callName = 'goal';
$cid = 123;
$app->achieveGoal($Integration, $callName, $cid);
$infusionsoft->funnels()->achieveGoal()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->funnels()->achieveGoal($integration, $callName, $contactID)
The Invoice Service allows you to manage Infusionsoft eCommerce transactions.
Creates a blank invoice with no line items that has not yet been paid.
Returns an ID representing the newly created invoice.
InvoiceService.createBlankOrder
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.createBlankOrder</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>22</int></value>
</param>
<param>
<value><string>hello world</string></value>
</param>
<param>
<value><dateTime.iso8601>20080908T00:00:00</dateTime.iso8601></value>
</param>
<param>
<value><int>2</int></value>
</param>
<param>
<value><int>2</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>8</i4></value>
</param>
</params>
</methodResponse>
$app->blankOrder();
$app = new iSDK();
// perform authorization tasks
$date = $app->infuDate("8-9-2015");
$invoiceId = $app->blankOrder(123,"Some Cart Order", $date, 0, 187);
$infusionsoft->invoices()->createBlankOrder()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->createBlankOrder($contactID, $name, $orderDate, $leadAffiliateID, $saleAffiliateID)
Charges the specified card the amount currently due on the invoice.
Returns a struct containing payment details.
InvoiceService.chargeInvoice
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.chargeInvoice</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceId</int></value>
</param>
<param>
<value><string>notes</string></value>
</param>
<param>
<value><int>creditCardId</int></value>
</param>
<param>
<value><int>merchId</int></value>
</param>
<param>
<value><boolean>bypassComm</boolean></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>
Successful
</name>
<value>
<boolean>
0
</boolean>
</value>
</member>
<member>
<name>
Message
</name>
<value>
(TESTMODE)
</value>
</member>
<member>
<name>
RefNum
</name>
<value>
0
</value>
</member>
<member>
<name>
Code
</name>
<value>
ERROR
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->chargeInvoice();
$app = new iSDK();
// perform authorization tasks
$result = $app->chargeInvoice(16,"API Upsell Payment",2,1,false);
$infusionsoft->invoices()->chargeInvoice()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->chargeInvoice($invoiceID, $notes, $creditCardID, $merchantAccountID, $bypassComissions)
InvoiceService.getPayments
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.getPayments</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>paymentId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>Id</name>
<value><i4>2</i4></value>
</member>
<member>
<name>PayDate</name>
<value><dateTime.iso8601>20120314T00:00:00</dateTime.iso8601></value>
</member>
<member>
<name>UserId</name>
<value><i4>14</i4></value>
</member>
<member>
<name>PayAmt</name>
<value><double>5.0</double></value>
</member>
<member>
<name>PayType</name>
<value>Credit Card (Manual)</value>
</member>
<member>
<name>ContactId</name>
<value><i4>22</i4></value>
</member>
<member>
<name>PayNote</name>
<value/>
</member>
<member>
<name>InvoiceId</name>
<value><i4>6</i4></value>
</member>
<member>
<name>RefundId</name>
<value><i4>0</i4></value>
</member>
<member>
<name>ChargeId</name>
<value><i4>0</i4></value>
</member>
<member>
<name>Synced</name>
<value><i4>0</i4></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->getPayments();
$app = new iSDK();
// perform authorization tasks
$invoiceId = '1';
$result = $app->getPayments($invoiceId);
$infusionsoft->invoices()->getPayments()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->getPayments($invoiceID)
Retrieves the outstanding amount of an invoice
InvoiceService.calculateAmountOwed
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.calculateAmountOwed</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><double>41.14</double></value>
</param>
</params>
</methodResponse>
$app->amtOwed();
$app = new iSDK();
// perform authorization tasks
$invoiceID = 1;
$app->amtOwed($invoiceID);
$infusionsoft->invoices()->calculateAmountOwed()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->calculateAmountOwed($invoiceID)
Adds a line item to an Order.
Returns "true" upon success.
InvoiceService.addOrderItem
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.addOrderItem</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceId</int></value>
</param>
<param>
<value><int>productId</int></value>
</param>
<param>
<value><int>type</int></value>
</param>
<param>
<value><double>price</double></value>
</param>
<param>
<value><int>quantity</int></value>
</param>
<param>
<value><string>description</string></value>
</param>
<param>
<value><string>notes</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->addOrderItem();
$app = new iSDK();
// perform authorization tasks
$result = $app->addOrderItem($invoiceId, 17, 6, 23.07, 2, "Turbo Booster", "Jay's Awesome Turbo Booster");
$infusionsoft->invoices()->addOrderItem()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->addOrderItem($invoiceId, $productId, $type, $price, $quantity, $description, $notes)
Adds a payment to an invoice without actually processing a charge through a merchant. This is useful if you accept cash/check, or handle payments outside of Infusionsoft.
Returns true on success.
InvoiceService.addManualPayment
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.addManualPayment</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceId</int></value>
</param>
<param>
<value><double>amt</double></value>
</param>
<param>
<value><dateTime.iso8601>paymentDate</dateTime.iso8601></value>
</param>
<param>
<value><string>paymentType</string></value>
</param>
<param>
<value><string>paymentDescription</string></value>
</param>
<param>
<value><boolean>bypassCommissions</boolean></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->manualPmt();
$app = new iSDK();
// perform authorization tasks
$currentDate = date("d-m-Y");
$pDate = $app->infuDate($currentDate);
$result = $app->manualPmt(123,9.95,$pDate,'Credit Card','$9.95 paid by Credit Card',false);
$infusionsoft->invoices()->addManualPayment()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->addManualPayment($invoiceID, $amount, $date, $paymentType, $description, $bypassCommissions)
Adds a commission to an existing invoice
Returns true upon success
InvoiceService.addOrderCommissionOverride
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.addOrderCommissionOverride</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceId</int></value>
</param>
<param>
<value><int>affiliateId</int></value>
</param>
<param>
<value><int>productId</int></value>
</param>
<param>
<value><int>commissionPercentage</int></value>
</param>
<param>
<value><double>amountPaid</double></value>
</param>
<param>
<value><int>payoutType</int></value>
</param>
<param>
<value><string>desc</string></value>
</param>
<param>
<value><dateTime.iso8601>date</dateTime.iso8601></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->commOverride();
$app = new iSDK();
// perform authorization tasks
$cDate = $app->infuDate("01-12-2007");
$app->commOverride(43,1,3,15,5.06,5,"No Description",$cDate);
$infusionsoft->invoices()->addOrderCommissionOverride()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->addOrderCommissionOverride($invoiceID, $affiliateID, $productID, $percent, $amount, $payoutType, $description, $date)
Calculates tax based on the line items of the invoice, and adds the amount to the invoice.
Returns true upon success
InvoiceService.recalculateTax
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.recalculateTax</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->recalculateTax();
$app = new iSDK();
// perform authorization tasks
$invoiceId = "1";
$ret = $app->recalculateTax($invoiceId);
$infusionsoft->invoices()->recalculateTax()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->recalculateTax($invoiceID)
Deletes an invoice. Also deletes the order within the Job table tied to the invoice.
Returns true upon successful deletion.
InvoiceService.deleteInvoice
<?xml version="1.0"?>
<methodCall>
<methodName>InvoiceService.deleteInvoice</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceID</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<boolean>1</boolean>
</value>
</param>
</params>
</methodResponse>
$app->deleteInvoice();
$invoiceId = 1;
$result = $app->deleteInvoice($invoiceId);
$infusionsoft->invoices()->deleteInvoice()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->deleteInvoice($invoiceID)
Creates a subscription for a contact. Subscriptions are billed automatically by Infusionsoft within six hours of creation. If you want to bill immediately you will need to then call the InvoiceService.createInvoiceForRecurring and InvoiceService.chargeInvoice methods.
Returns the ID of the newly created subscription.
InvoiceService.addRecurringOrder
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.addRecurringOrder</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactId</int></value>
</param>
<param>
<value><boolean>allowDup</boolean></value>
</param>
<param>
<value><int>SubscriptionPlanId</int></value>
</param>
<param>
<value><int>qty</int></value>
</param>
<param>
<value><double>price</double></value>
</param>
<param>
<value><boolean>allowTax</boolean></value>
</param>
<param>
<value><int>merchantId</int></value>
</param>
<param>
<value><int>creditCardId</int></value>
</param>
<param>
<value><int>affiliateId</int></value>
</param>
<param>
<value><int>trialPeriod</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>6</i4></value>
</param>
</params>
</methodResponse>
$app->addRecurringAdv();
$app = new iSDK();
// perform authorization tasks
$subscriptionId = $app->addRecurringAdv($cid,false,23,2,2.95,true,1,$ccId,$affId,0);
$infusionsoft->invoices()->addRecurringOrder()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->addRecurringOrder($contactID, $Allow Duplicate, $subscriptionID, $quantity, $price, $taxable, $merchantAccountID, $creditCardID, $affiliateID, $trialPeriod)
Creates an invoice for all charges due on a subscription. If the subscription has multiple billing cycles due, it will create a single invoice with charges for all charges due.
Returns the ID of the newly created invoice. Returns 0 if no invoices were generated.
InvoiceService.createInvoiceForRecurring
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.createInvoiceForRecurring</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>subscriptionID</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>10</i4></value>
</param>
</params>
</methodResponse>
$app->recurringInvoice();
$app = new iSDK();
// perform authorization tasks
$invoiceID = $app->recurringInvoice($recurringOrderId);
$infusionsoft->invoices()->createInvoiceForRecurring()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->createInvoiceForRecurring($subscriptionID)
Changes the next date a subscription is paid
InvoiceService.updateJobRecurringNextBillDate
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.updateJobRecurringNextBillDate</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>recurringOrderId</int></value>
</param>
<param>
<value><dateTime.iso8601>nextBillDate</dateTime.iso8601></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->updateSubscriptionNextBillDate();
$app = new iSDK();
// perform authorization tasks
$currentDate = date("d-m-Y");
$nDate = $app->infuDate($currentDate);
$result = $app->updateSubscriptionNextBillDate($recurringOrderId,$nDate);
$infusionsoft->invoices()->updateJobRecurringNextBillDate()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->updateJobRecurringNextBillDate($subscriptionID, $nextBillDate)
Deletes the specified subscription, as well as all invoices tied to the subscription.
Returns true upon success.
InvoiceService.deleteSubscription
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.deleteSubscription</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>subscriptionId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->deleteSubscription();
$app = new iSDK();
// perform authorization tasks
$result = $app->deleteSubscription($recurringOrderId);
$infusionsoft->invoices()->deleteSubscription()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->deleteSubscription($subscriptionID)
InvoiceService.validateCreditCard
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.validateCreditCard</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><struct>
<member><name>CardType</name>
<value><string>Visa</string></value>
</member>
<member><name>ContactId</name>
<value><int>123</int></value>
</member>
<member><name>CardNumber</name>
<value><string>4111111111111111</string></value>
</member>
<member><name>ExpirationMonth</name>
<value><string>12</string></value>
</member>
<member><name>ExpirationYear</name>
<value><string>2009</string></value>
</member>
<member><name>CVV2</name>
<value><string>123</string></value>
</member>
</struct></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Message</name>
<value>Card has expired</value>
</member>
<member>
<name>Valid</name>
<value>false</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->validateCard();
$app = new iSDK();
// perform authorization tasks
$card = array('CardType' => 'Visa',
'ContactId' => 123,
'CardNumber' => "4111111111111111",
'ExpirationMonth' => '12',
'ExpirationYear' => '2009',
'CVV2' => '123');
$result = $app->validateCard($card);
$infusionsoft->invoices()->validateCreditCard()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->validateCreditCard($cardType, $contactID, $cardNumber, $expirationMonth, $expirationYear, $securityCode)
InvoiceService.validateCreditCard
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.validateCreditCard</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>cardID</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Message</name>
<value>Card has expired</value>
</member>
<member>
<name>Valid</name>
<value>false</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->validateCard();
$app = new iSDK();
// perform authorization tasks
$result = $app->validateCard(156);
$infusionsoft->invoices()->validateCreditCard()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->validateCreditCard($cardID)
Retrieves a credit card for the specified contact
Returns the credit card ID on success; 0 upon failure.
InvoiceService.locateExistingCard
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.locateExistingCard</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactId</int></value>
</param>
<param>
<value><string>last4</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>0</i4></value>
</param>
</params>
</methodResponse>
$app->locateCard();
$app = new iSDK();
// perform authorization tasks
$contactId = "1";
$result = $app->locateCard($contactId,"1234");
$infusionsoft->invoices()->locateExistingCard()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->locateExistingCard($contactID, $lastFour)
Retrieves all payment types available within the requested Infusionsoft account
InvoiceService.getAllPaymentOptions
<?xml version='1.0' encoding='UTF-8'?>
<methodCall> <methodName>InvoiceService.getAllPaymentOptions</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Credit Card (Manual)</name>
<value>Credit Card (Manual)</value>
</member>
<member>
<name>Check</name>
<value>Check</value>
</member>
<member>
<name>Cash</name>
<value>Cash</value>
</member>
<member>
<name>Money Order</name>
<value>Money Order</value>
</member>
<member>
<name>Adjustment</name>
<value>Adjustment</value>
</member>
<member>
<name>Credit Card</name>
<value>Credit Card</value>
</member>
<member>
<name>Credit</name>
<value>Credit</value>
</member>
<member>
<name>Refund</name>
<value>Refund</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getAllPaymentOptions();
$app = new iSDK();
// perform authorization tasks
$result = $app->getAllPaymentOptions();
$infusionsoft->invoices()->getAllPaymentOptions()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->getAllPaymentOptions()
Creates a custom recurring payment for an invoice.
Returns true on successful creation
InvoiceService.addPaymentPlan
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>InvoiceService.addPaymentPlan</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>invoiceId</int></value>
</param>
<param>
<value><boolean>autoCharge</boolean></value>
</param>
<param>
<value><int>creditCardId</int></value>
</param>
<param>
<value><int>merchantAccountId</int></value>
</param>
<param>
<value><int>daysRetry</int></value>
</param>
<param>
<value><int>maxRetry</int></value>
</param>
<param>
<value><double>initialPmt</double></value>
</param>
<param>
<value><dateTime.iso8601>initialPmtDate</dateTime.iso8601></value>
</param>
<param>
<value><dateTime.iso8601>planStartDate</dateTime.iso8601></value>
</param>
<param>
<value><int>numPmts</int></value>
</param>
<param>
<value><int>daysBetweenPmts</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->payPlan();
$app = new iSDK();
// perform authorization tasks
$invoiceDate = $app->infuDate("10-11-2008");
$startDate = $app->infuDate("10-25-2008");
$result = $app->payPlan(43,true,12,1,2,3,25.50,$invoiceDate,$startDate,5,30);
$infusionsoft->invoices()->addPaymentPlan()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->invoices()->addPaymentPlan($invoiceID, $autoCharge, $creditCardID, $merchantAccountID, $daysUntilRetry, $maxRetry, $initialPaymentAmount, $initialPaymentDate, $planStartDate, $numberOfPayments, $daysBetweenPayments)
The Order Service is used to create and charge an order.
Returns the result of order placement along with IDs of the order and invoice that were created and the status of a credit card charge (if applicable).
OrderService.placeOrder
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>OrderService.placeOrder</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>contactId</int></value>
</param>
<param>
<value><int>creditCardId</int></value>
</param>
<param>
<value><int>payPlanId</int></value>
</param>
<param>
<value><array>
<data>
<value><int>productIds</int></value>
</data>
</array></value>
</param>
<param>
<value><array>
<data>
<value><int>subscriptionPlanIds</int></value>
</data>
</array></value>
</param>
<param>
<value><boolean>processSpecials</boolean></value>
</param>
<param>
<value><array>
<data>
<value><string>promoCodes</string></value>
</data>
</array></value>
</param>
<param>
<value><int>0</int></value>
</param>
<param>
<value><int>0</int></value>
</param>
</params>
</methodCall>
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Successful</name>
<value>false</value>
</member>
<member>
<name>Message</name>
<value>DECLINE - Response code(200)</value>
</member>
<member>
<name>RefNum</name>
<value>2879922578</value>
</member>
<member>
<name>OrderId</name>
<value>2935</value>
</member>
<member>
<name>InvoiceId</name>
<value>2937</value>
</member>
<member>
<name>Code</name>
<value>None</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app = new iSDK();
// perform authorization tasks
$carray = array(
$app->key,
$contactId,
$creditCardId,
$payPlanId,
array($productId1, $productId2),
array($subscriptionPlanId1, $subscriptionPlanId2),
$processSpecials,
array($promoCode1, $promoCode2)) // array of strings
);
$app->placeOrder($carray);
$infusionsoft->orders()->placeOrder()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->orders()->placeOrder($contactID, $cardID, $planID, $productIDs, $subscriptionIDs, $processSpecials, $promoCodes, $leadAffiliateID, $saleAffiliateID)
The Product Service is used to manage products stored in Infusionsoft. You can add, update and find products in addition to managing follow up sequences, tags and action sets.
Returns the available inventory for the requested product as an integer.
ProductService.getInventory
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ProductService.getInventory</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>productId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><i4>0</i4></value>
</param>
</params>
</methodResponse>
$app->getInventory();
$app = new iSDK();
// perform authorization tasks
$app->getInventory(1);
$infusionsoft->products()->getInventory()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->products()->getInventory($productID)
Increments the specified product's inventory by one unit.
Returns a boolean true on success.
ProductService.incrementInventory
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ProductService.incrementInventory</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>productId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->incrementInventory();
$app = new iSDK();
// perform authorization tasks
$app->incrementInventory(1);
$infusionsoft->products()->incrementInventory()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->products()->incrementInventory($productID)
Decrements the specified product's inventory by one unit.
ProductService.decrementInventory
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ProductService.decrementInventory</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>productId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->decrementInventory();
$app = new iSDK();
// perform authorization tasks
$app->decrementInventory(1);
$infusionsoft->products()->decrementInventory()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->products()->decrementInventory($productID)
Increases the available inventory for the specified product.
ProductService.increaseInventory
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ProductService.increaseInventory</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>productId</int></value>
</param>
<param>
<value><int>quantity</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->increaseInventory();
$app = new iSDK();
// perform authorization tasks
$app->increaseInventory(1, 3);
$infusionsoft->products()->increaseInventory()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->products()->increaseInventory($productID, $quantity)
Decreases the available inventory for the specified product.
ProductService.decreaseInventory
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ProductService.decreaseInventory</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>productId</int></value>
</param>
<param>
<value><int>quantity</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->decreaseInventory();
$app = new iSDK();
// perform authorization tasks
$app->decreaseInventory(1, 3);
$infusionsoft->products()->decreaseInventory()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->products()->decreaseInventory($productID, $quantity)
Returns boolean true if the card is successfully deactivated.
ProductService.deactivateCreditCard
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ProductService.deactivateCreditCard</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>creditCardId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><boolean>1</boolean></value>
</param>
</params>
</methodResponse>
$app->deactivateCreditCard();
$app = new iSDK();
// perform authorization tasks
$app->deactivateCreditCard(1);
$infusionsoft->products()->deactivateCreditCard()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->products()->deactivateCreditCard($cardID)
The Search Service allows you to retrieve the results of saved searches and reports that have been saved within Infusionsoft. Saved searches/reports are tied to the User that created them. This service also allows you to utilize the quick search function found in the upper right hand corner of your Infusionsoft application. To retrieve the ID for a saved search, you will need to utilize the DataService.query method to query the SavedFilter table based with the ID of the user that created the saved search. Also note that UserId field on the SavedFilter table can contain multiple userId's separated by a comma, so if you are querying for a report created by userId 6, I recommend appending the wildcard to the end of the userId. Something like $query = array( 'UserId' => '6%' );
Returns an array of the fields available on a saved search/report.
SearchService.getAllReportColumns
<?xml version="1.0"?>
<methodCall>
<methodName>SearchService.getAllReportColumns</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>savedSearchId</int></value>
</param>
<param>
<value><int>userId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>Id</name>
<value>Id</value>
</member>
<member>
<name>FilterId</name>
<value>Filter Id</value>
</member>
<member>
<name>ContactId</name>
<value>Contact Id</value>
</member>
<member>
<name>ContactName</name>
<value>Name</value>
</member>
<member>
<name>ContactName.firstName</name>
<value>First Name</value>
</member>
<member>
<name>ContactName.lastName</name>
<value>Last Name</value>
</member>
...
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getAvailableFields();
$app = new iSDK();
// perform authorization tasks
$savedSearchId = 3;
$userId = 1;
$results = $app->getAvailableFields($savedSearchId, $userId);
$infusionsoft->search()->getAllReportColumns()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->search()->getAllReportColumns($savedSearchID, $userID)
Returns a struct with all available fields in a saved search
SearchService.getSavedSearchResultsAllFields
<?xml version="1.0"?>
<methodCall>
<methodName>SearchService.getSavedSearchResultsAllFields</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>savedSearchId</int></value>
</param>
<param>
<value><int>userId</int></value>
</param>
<param>
<value><int>pageNumber</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>Id</name>
<value><i4>12</i4></value>
</member>
<member>
<name>ContactName</name>
<value>Andrew Watson</value>
</member>
<member>
<name>Company</name>
<value>Widgets inc</value>
</member>
<member>
<name>PhoneWithExtension1</name>
<value>
</value>
</member>
<member>
<name>Email</name>
<value/>
</member>
<member>
<name>State</name>
<value/>
</member>
</struct>
</value>
...
</data>
</array>
</value>
</param>
</params>
</methodResponse>
$app->savedSearchAllFields();
$app = new iSDK();
// perform authorization tasks
$savedSearchId = 5;
$userId = 34;
$results = $app->savedSearchAllFields($savedSearchId, $userId, 0);
$infusionsoft->search()->getSavedSearchResultsAllFields()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->search()->getSavedSearchResultsAllFields($savedSearchID, $userID, $pageNumber)
Returns a struct with the specified fields from a saved search
SearchService.getSavedSearchResults
<?xml version="1.0"?>
<methodCall>
<methodName>SearchService.getSavedSearchResults</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>savedSearchId</int></value>
</param>
<param>
<value><int>userId</int></value>
</param>
<param>
<value><int>pageNumber</int></value>
</param>
<param>
<value><array>
<data>
<value><string>ContactId</string></value>
</data>
</array></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>
ContactId
</name>
<value>
<i4>
12
</i4>
</value>
</member>
</struct>
</value>
...
</param>
</params>
</methodResponse>
$infusionsoft->search()->getSavedSearchResults()
$infusionsoft = new InfusionsoftInfusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->search()->getSavedSearchResults($savedSearchID, $userID, $pageNumber)
$infusionsoft->search()->getSavedSearchResults()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->search()->getSavedSearchResults($savedSearchID, $userID, $pageNumber, $returnFields)
Returns a struct of the requesting user's available quick searches.
SearchService.getAvailableQuickSearches
<?xml version="1.0"?>
<methodCall>
<methodName>SearchService.getAvailableQuickSearches</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>14</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>FindPerson</name>
<value>Person</value>
</member>
<member>
<name>FindCompany</name>
<value>Company</value>
</member>
<member>
<name>FindTask</name>
<value>Task/Appt/Note</value>
</member>
<member>
<name>FindOrder</name>
<value>Order</value>
</member>
<member>
<name>FindSubscription</name>
<value>Subscription</value>
</member>
<member>
<name>FindOpportunity</name>
<value>Opportunity</value>
</member>
<member>
<name>FindAffiliate</name>
<value>Affiliate</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getQuickSearches();
$app = new iSDK();
// perform authorization tasks
$userId = 6;
$result = $app->getQuickSearches($userId);
$infusionsoft->search()->getAvailableQuickSearches()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->search()->getAvailableQuickSearches($userID)
Retrieves the requested user's default quick search type
SearchService.getDefaultQuickSearch
<?xml version="1.0"?>
<methodCall>
<methodName>SearchService.getDefaultQuickSearch</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>userId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>null</value>
</param>
</params>
</methodResponse>
$app->getDefaultQuickSearch();
$app = new iSDK();
// perform authorization tasks
$userId = 1;
$results= $app->getDefaultQuickSearch($userId);
$infusionsoft->search()->getDefaultQuickSearch()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->search()->getDefaultQuickSearch($userID)
Returns a quick search, equivalent to using the search box in the Infusionsoft application.
Returns a struct of report results.
SearchService.quickSearch
<?xml version="1.0"?>
<methodCall>
<methodName>SearchService.quickSearch</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><string>quickSearchType</string></value>
</param>
<param>
<value><int>userId</int></value>
</param>
<param>
<value><string>searchData</string></value>
</param>
<param>
<value><int>page</int></value>
</param>
<param>
<value><int>limit</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><array><data/></array></value>
</param>
</params>
</methodResponse>
$app->quickSearch();
$app = new iSDK();
// perform authorization tasks
$userId = 1;
$searchData = 'in';
$results = $app->quickSearch('FindPerson', $userId, $searchData, 0, 1000);
$infusionsoft->search()->quickSearch()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->search()->quickSearch($searchType, $userID, $searchData, $page, $limit)
The Shipping Service is used to retrieve available shipping options.
ShippingService.getAllShippingOptions
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getAllShippingOptions</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value><array><data/></array></value>
</param>
</params>
</methodResponse>
$app->getAllConfiguredShippingOptions();
$app = new iSDK();
// perform authorization tasks
$app->getAllConfiguredShippingOptions();
$infusionsoft->shipping()->getAllShippingOptions()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getAllShippingOptions()
Returns the options and values of the requested weight based shipping option.
ShippingService.getWeightBasedShippingOption
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getWeightBasedShippingOption</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>optionId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>id</name>
<value>11</value>
</member>
<member>
<name>description</name>
<value/>
</member>
<member>
<name>name</name>
<value>Ship by Weight</value>
</member>
<member>
<name>orderBased</name>
<value>true</value>
</member>
<member>
<name>international</name>
<value>false</value>
</member>
<member>
<name>active</name>
<value>true</value>
</member>
<member>
<name>type</name>
<value>Weight</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getWeightBasedShippingOption();
$app = new iSDK();
// perform authorization tasks
$app->getWeightBasedShippingOption(1);
$infusionsoft->shipping()->getWeightBasedShippingOption()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getWeightBasedShippingOption($optionID)
ShippingService.getFlatRateShippingOption
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getFlatRateShippingOption</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>optionId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>id</name>
<value>1</value>
</member>
<member>
<name>price</name>
<value>0.0</value>
</member>
<member>
<name>description</name>
<value>test</value>
</member>
<member>
<name>orderBased</name>
<value>false</value>
</member>
<member>
<name>name</name>
<value>Flat Rate Per Order</value>
</member>
<member>
<name>international</name>
<value>false</value>
</member>
<member>
<name>active</name>
<value>true</value>
</member>
<member>
<name>type</name>
<value>Flat</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getFlatRateShippingOption();
$app = new iSDK();
// perform authorization tasks
$app->getFlatRateShippingOption(1);
$infusionsoft->shipping()->getFlatRateShippingOption()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getFlatRateShippingOption($optionID)
Returns an array of shipping options and values for the requested product shipping option.
ShippingService.getProductBasedShippingOption
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getProductBasedShippingOption</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>optionId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>id</name>
<value>3</value>
</member>
<member>
<name>description</name>
<value/>
</member>
<member>
<name>name</name>
<value>Specific Price Per Product</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getProductBasedShippingOption();
$app = new iSDK();
// perform authorization tasks
$app->getProductBasedShippingOption(1);
$infusionsoft->shipping()->getProductBasedShippingOption()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getProductBasedShippingOption($optionID)
Returns an array of options and values for order shipping option.
ShippingService.getOrderTotalShippingOption
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getOrderTotalShippingOption</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>optionId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data/>
</array>
</value>
</param>
</params>
</methodResponse>
$app->getOrderTotalShippingOption();
$app = new iSDK();
// perform authorization tasks
$app->getOrderTotalShippingOption(1);
$infusionsoft->shipping()->getOrderTotalShippingOption()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getOrderTotalShippingOption($optionID)
Returns the options and values of the order quantity shipping option provided.
ShippingService.getOrderQuantityShippingOption
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getOrderQuantityShippingOption</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>optionId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>id</name>
<value>7</value>
</member>
<member>
<name>baseShippingPrice</name>
<value>1.0</value>
</member>
<member>
<name>pricePerItem</name>
<value>1.0</value>
</member>
<member>
<name>description</name>
<value/>
</member>
<member>
<name>orderBased</name>
<value>false</value>
</member>
<member>
<name>name</name>
<value>test quan</value>
</member>
<member>
<name>international</name>
<value>false</value>
</member>
<member>
<name>active</name>
<value>true</value>
</member>
<member>
<name>type</name>
<value>Quantity</value>
</member>
<member>
<name>minimumShippingPrice</name>
<value>1.0</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getOrderQuantityShippingOption();
$app->getOrderQuantityShippingOption(1);
$app = new iSDK();
// perform authorization tasks
$infusionsoft->shipping()->getOrderQuantityShippingOption()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getOrderQuantityShippingOption($optionID)
Returns the available values for order shipping ranges based on the requested shipping option.
ShippingService.getOrderTotalShippingRanges
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getOrderTotalShippingRanges</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int>optionId</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<array>
<data/>
</array>
</value>
</param>
</params>
</methodResponse>
$app->getOrderTotalShippingRanges();
$app = new iSDK();
// perform authorization tasks
$app->getOrderTotalShippingRanges(1);
$infusionsoft->shipping()->getOrderTotalShippingRanges()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getOrderTotalShippingRanges($optionID)
Returns the options and values of the requested UPS shipping option.
ShippingService.getUpsShippingOption
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>ShippingService.getUpsShippingOption</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
<param>
<value><int> optionId </int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>deliveryType</name>
<value>01,03,07</value>
</member>
<member>
<name>orderBased</name>
<value>false</value>
</member>
<member>
<name>international</name>
<value>false</value>
</member>
<member>
<name>accessLicenseNumber</name>
<value>niewonfidso</value>
</member>
<member>
<name>type</name>
<value>UPS</value>
</member>
<member>
<name>pickupType</name>
<value>01</value>
</member>
<member>
<name>id</name>
<value>13</value>
</member>
<member>
<name>accountNumber</name>
<value>39208234</value>
</member>
<member>
<name>accessPassword</name>
<value>ronald11</value>
</member>
<member>
<name>destinationType</name>
<value>0</value>
</member>
<member>
<name>description</name>
<value/>
</member>
<member>
<name>packagingType</name>
<value>01</value>
</member>
<member>
<name>name</name>
<value>UPS</value>
</member>
<member>
<name>active</name>
<value>true</value>
</member>
<member>
<name>accessUserId</name>
<value>ron</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getUpsShippingOption();
$app = new iSDK();
// perform authorization tasks
$app->getUpsShippingOption(1);
$infusionsoft->shipping()->getUpsShippingOption()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->shipping()->getUpsShippingOption($optionID)
The Webform Service is used to retrieve available web forms created within Keap.
WebFormService.getHTML
<?xml version="1.0"?>
<methodCall>
<methodName>WebFormService.getHTML</methodName>
<params>
<param>
<value><string>c94a1f2b395a9ab97d4263b37f7b0923</string></value>
</param>
<param>
<value><int>6</int></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<html style="height:100%; margin:0;
...
</value>
</param>
</params>
</methodResponse>
$app->getWebFormHtml();
$app = new iSDK();
// perform authorization tasks
$formId = 6;
$form = $app->getWebFormHtml($formId);
$infusionsoft->webForms()->getHTML()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->webForms()->getHTML($formID)
WebFormService.getMap
<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>WebFormService.getMap</methodName>
<params>
<param>
<value><string>privateKey</string></value>
</param>
</params>
</methodCall>
<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>
6
</name>
<value>
test
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
$app->getWebFormMap();
$app = new iSDK();
// perform authorization tasks
$map = $app->getWebFormMap();
$infusionsoft->webForms()->getMap()
$infusionsoft = new \Infusionsoft\Infusionsoft(array(
'clientId' => CLIENT_ID,
'clientSecret' => CLIENT_SECRET,
'redirectUri' => REDIRECT_URL,
));
$infusionsoft->refreshAccessToken();
$infusionsoft->webForms()->getMap()