APIAffiliateProgramService

APIAffiliateProgramService

The Affiliate Program Service allows access to some of features in the Referral Partner Center


AffiliateProgramService.getAffiliatesByProgram

Gets 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.

Required Parameters

Parameter Name Type Definition
key string Your Infusionsoft API key
programId int The Referral Partner Commission Program Id

Returns

All Affiliate Fields and Affiliate Custom Fields
All Contact Fields and Contact Custom Fields

Sample Request

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

Sample Response

<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
  <params>
    <param>

    </param>
  </params>
</methodResponse>

PHP iSDK Sample

$app->getAffiliatesByProgram(3);

AffiliateProgramService.getProgramsForAffiliate

Gets a list of all of the Affiliate Programs for the Affiliate specified.

Required Parameters

Parameter Name Type Definition
key string Your Infusionsoft API key
affiliateId int The affiliate you want to get the programs for

Returns

Id - The unique identifier for the referral partner program
Name - The name of the program
Priority - The priority of this program determines when it is used when a referral partner has more than one program assigned to them. (lower priorities are selected first)
Notes - Notes on the program.
AffiliateId - If this program represents the special overridden program for a referral partner than this id will be specified, otherwise it is 0.

Sample Request

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

Sample Response

<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name></name>
            <value></value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>

PHP iSDK Sample

$programs = $app->getProgramsForAffiliate(2);

AffiliateProgramService.getAffiliatePrograms

Gets a list of all of the Affiliate Programs that are in the application.

Required Parameters

Parameter Name Type Definition
key string Your Infusionsoft API key

Returns

Id - The unique identifier for the referral partner program
Name - The name of the program
Priority - The priority of this program determines when it is used when a referral partner has more than one program assigned to them. (lower priorities are selected first)
Notes - Notes on the program.
AffiliateId - If this program represents the special overridden program for a referral partner than this id will be specified, otherwise it is 0.

Sample Request

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
  <methodName>AffiliateProgramService.updateCustomField</methodName>
  <params>
    <param>
      <value><string>privateKey</string></value>
    </param>
  </params>
</methodCall>

Sample Response

<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
  <fault>
    <value>
      <struct>
        <member>
        </member>
      </struct>
    </value>
  </fault>
</methodResponse>

PHP iSDK Sample

$programs = $app->getAffiliatePrograms();

AffiliateProgramService.getResourcesForAffiliateProgram

Gets a list of all of the resources that are associated to the Affiliate Program specified.

Required Parameters

Parameter Name Type Definition
key string Your Infusionsoft API key
programId int The commission program you want the resources for

Returns

The resources

Sample Request

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

Sample Response

<?xml version='1.0' encoding='UTF-8'?>
<methodResponse>
  <params>
    <param>
    </param>
  </params>
</methodResponse>

PHP iSDK Sample

$result = $app->getResourcesForAffiliateProgram(2);