4.7 Sales Agents and Commisions API
4.7.1 Retrieve Commission plan list
Request Type: GET
Returns a paged list of Commission Plans.
GET https://datasafe.blubilling-test.com/rest/commissionPlans
Sample Output:
<?xml version="1.0" encoding="UTF-8"?>
<list>
<commissionPlan id="119">
<accountingCode />
<planName>Annual Commission- 2year</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="259">
<position>1</position>
<customOptions>MULTIPLIER=12</customOptions>
<dateToChargeUnits>Months</dateToChargeUnits>
<code>15YR</code>
<commissionText>Commissions </commissionText>
<commissionAmount>15.000000</commissionAmount>
<commissionPlan id="119" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>1</dateToChargeValue>
</commissionCharge>
<commissionCharge id="260">
<position>2</position>
<customOptions>MULTIPLIER=12</customOptions>
<dateToChargeUnits>Months</dateToChargeUnits>
<code>10YR</code>
<commissionText>Commissions</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="119" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>13</dateToChargeValue>
</commissionCharge>
</commissionCharges>
<commissionCode>15YR10YR</commissionCode>
<contractOfferings />
</commissionPlan>
<commissionPlan id="143">
<accountingCode />
<planName>20-10-5</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="293">
<position>1</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>20COMM</code>
<commissionText>20% Year 1 Commission</commissionText>
<commissionAmount>20.000000</commissionAmount>
<commissionPlan id="143" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>1</dateToChargeValue>
</commissionCharge>
<commissionCharge id="294">
<position>2</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>10COMM</code>
<commissionText>Year 2 Commission</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="143" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>2</dateToChargeValue>
</commissionCharge>
<commissionCharge id="295">
<position>3</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>5COMM</code>
<commissionText>Year 3 Commission</commissionText>
<commissionAmount>5.000000</commissionAmount>
<commissionPlan id="143" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>3</dateToChargeValue>
</commissionCharge>
<commissionCharge id="296">
<position>4</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>4ONWARDS</code>
<commissionText>Comissions for year 4 and above</commissionText>
<commissionAmount>5.000000</commissionAmount>
<commissionPlan id="143" />
<notes />
<chargeType>DateBasedCharge</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>100</dateToChargeValue>
</commissionCharge>
</commissionCharges>
<commissionCode>20-10-5</commissionCode>
<contractOfferings />
</commissionPlan>
<commissionPlan id="141">
<accountingCode />
<planName>40-20-10</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="289">
<position>1</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>40</code>
<commissionText>1st year commission rate</commissionText>
<commissionAmount>40.000000</commissionAmount>
<commissionPlan id="141" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>1</dateToChargeValue>
</commissionCharge>
<commissionCharge id="290">
<position>2</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>20</code>
<commissionText>2nd Year commission</commissionText>
<commissionAmount>20.000000</commissionAmount>
<commissionPlan id="141" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>2</dateToChargeValue>
</commissionCharge>
<commissionCharge id="291">
<position>3</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>10</code>
<commissionText>3rd Year Commission</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="141" />
<notes />
<chargeType>DateBasedCharge</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>3</dateToChargeValue>
</commissionCharge>
</commissionCharges>
<commissionCode>40-20-10</commissionCode>
<contractOfferings />
</commissionPlan>
<commissionPlan id="142">
<accountingCode>5COMM</accountingCode>
<planName>5%</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="292">
<position>1</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>5COMM</code>
<commissionText>Commission Charged</commissionText>
<commissionAmount>5.000000</commissionAmount>
<commissionPlan id="142" />
<notes />
<chargeType>RecurringCharge</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>3</dateToChargeValue>
</commissionCharge>
</commissionCharges>
<commissionCode>5</commissionCode>
<contractOfferings />
</commissionPlan>
<commissionPlan id="118">
<accountingCode />
<planName>Year 1 Annual Plan</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="297">
<position>1</position>
<customOptions>MULTIPLIER=12</customOptions>
<dateToChargeUnits>Months</dateToChargeUnits>
<code>ANNUAL</code>
<commissionText>Commission based on MMR for 12 months</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="118" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>1</dateToChargeValue>
</commissionCharge>
<commissionCharge id="298">
<position>2</position>
<customOptions />
<dateToChargeUnits>Months</dateToChargeUnits>
<code>MONTH-YR2</code>
<commissionText>Commission Charges</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="118" />
<notes />
<chargeType>DateBasedCharge</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>13</dateToChargeValue>
</commissionCharge>
</commissionCharges>
<commissionCode>COMM-A</commissionCode>
<contractOfferings />
</commissionPlan>
<commissionPlan id="144">
<accountingCode />
<planName>Forever Commission</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="300">
<position>1</position>
<customOptions />
<dateToChargeUnits>Months</dateToChargeUnits>
<code>INITIAL-COM</code>
<commissionText>Intial Commission on Set up</commissionText>
<commissionAmount>50.000000</commissionAmount>
<commissionPlan id="144" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Amount</commissionType>
<dateToChargeValue>1</dateToChargeValue>
</commissionCharge>
<commissionCharge id="301">
<position>2</position>
<customOptions />
<dateToChargeUnits>Years</dateToChargeUnits>
<code>RECURRING-COM</code>
<commissionText>Recurring Commission for rest of Month</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="144" />
<notes />
<chargeType>DateBasedCharge</chargeType>
<commissionType>Amount</commissionType>
<dateToChargeValue>9999</dateToChargeValue>
</commissionCharge>
</commissionCharges>
<commissionCode>FOREVER</commissionCode>
<contractOfferings />
</commissionPlan>
<commissionPlan id="132">
<accountingCode />
<planName>Monthly Commissions</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="274">
<position>1</position>
<customOptions />
<dateToChargeUnits>null</dateToChargeUnits>
<code>MTH</code>
<commissionText>Monthly Commissions</commissionText>
<commissionAmount>100.000000</commissionAmount>
<commissionPlan id="132" />
<notes />
<chargeType>RecurringCharge</chargeType>
<commissionType>Amount</commissionType>
<dateToChargeValue />
</commissionCharge>
</commissionCharges>
<commissionCode>MONTHLY</commissionCode>
<contractOfferings />
</commissionPlan>
<commissionPlan id="134">
<accountingCode />
<planName>Security Plus - 10% Commission</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="276">
<position>1</position>
<customOptions />
<dateToChargeUnits>null</dateToChargeUnits>
<code>SECURITY</code>
<commissionText>Fixed Commissions</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="134" />
<notes />
<chargeType>RecurringCharge</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue />
</commissionCharge>
</commissionCharges>
<commissionCode>Security</commissionCode>
<contractOfferings>
<contractOffering id="824" />
</contractOfferings>
</commissionPlan>
</list>
4.7.2 Retrieve Commission plan
To return a Commission plan with the CommissionPlan Id
GET https://datasafe.blubilling-test.com/rest/commissionPlans/119
To return a Commission plan with the commission code
GET https://datasafe.blubilling-test.com/rest/commissionPlans?commissionCode=15YR10YR
Sample Output:
<?xml version="1.0" encoding="UTF-8"?>
<commissionPlan id="119">
<accountingCode />
<planName>Annual Commission- 2year</planName>
<activate>true</activate>
<commissionCharges>
<commissionCharge id="259">
<position>1</position>
<customOptions>MULTIPLIER=12</customOptions>
<dateToChargeUnits>Months</dateToChargeUnits>
<code>15YR</code>
<commissionText>Commissions </commissionText>
<commissionAmount>15.000000</commissionAmount>
<commissionPlan id="119" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>1</dateToChargeValue>
</commissionCharge>
<commissionCharge id="260">
<position>2</position>
<customOptions>MULTIPLIER=12</customOptions>
<dateToChargeUnits>Months</dateToChargeUnits>
<code>10YR</code>
<commissionText>Commissions</commissionText>
<commissionAmount>10.000000</commissionAmount>
<commissionPlan id="119" />
<notes />
<chargeType>DateBasedChargeOneTime</chargeType>
<commissionType>Percent</commissionType>
<dateToChargeValue>13</dateToChargeValue>
</commissionCharge>
</commissionCharges>
<commissionCode>15YR10YR</commissionCode>
<contractOfferings />
</commissionPlan>
4.7.3 Adding a Sales Agent with an ID or Order number
To Adding a Sales Agent with an ID
POST https://datasafe.blubilling-test.com/rest/order/6536/salesAgent
To add a Sales Agent with an Order Number
POST https://datasafe.blubilling-test.com/rest/order/salesAgent?orderNumber=1116
Sample Request:
<list>
<subscriptionOrderBiller>
<joiningDate>2010-01-25</joiningDate>
<commissionPlan id="119" />
<biller id="123" />
</subscriptionOrderBiller>
<subscriptionOrderBiller>
<joiningDate>2010-01-25</joiningDate>
<commissionPlan id="143" />
<biller id="116" />
</subscriptionOrderBiller>
</list>
Sample Response would be same as you sent if Success
<?xml version="1.0" encoding="UTF-8"?>
<list>
<subscriptionOrderBiller id="1118">
<joiningDate>2010-01-25</joiningDate>
<biller id="123" />
<commissionPlan id="119" />
</subscriptionOrderBiller>
<subscriptionOrderBiller id="1119">
<joiningDate>2010-01-25</joiningDate>
<biller id="116" />
<commissionPlan id="143" />
</subscriptionOrderBiller>
</list>
4.7.4 Retrieve a Sales Agent for an Order
To get a Sales Agent with an ID
GET https://datasafe.blubilling-test.com/rest/order/6536/salesAgent //
To get a Sales Agent with an orderNumber
GET http://acme.localhost:8080/rest/order/salesAgent?orderNumber=1023 //
Sample Output:
<?xml version="1.0" encoding="UTF-8"?>
<list>
<subscriptionOrderBiller id="23">
<joiningDate>
2010-01-25
</joiningDate>
<biller id="1" />
<commissionPlan id="1" />
</subscriptionOrderBiller>
<subscriptionOrderBiller id="22">
<joiningDate>
2010-01-25
</joiningDate>
<biller id="1" />
</subscriptionOrderBiller>
</list>
4.7.5 Retrieve the list of Sales Agents
To get a Sales Agent with an Order
GET https://datasafe.blubilling-test.com/rest/salesAgents // List of SalesAgents
Sample Output:
<?xml version="1.0" encoding="UTF-8"?>
<list>
<biller id="116">
<achRoutingNumber />
<referenceNumber />
<cellPhone />
<commissionCode />
<workPhone />
<firstName>Phil </firstName>
<lastName>Donner</lastName>
<notificationsEnabled>true</notificationsEnabled>
<achAccountNumber />
<referringBillerCommissionCode />
<lastUpdated>2014-10-17</lastUpdated>
<code>PD-COMM</code>
<companyName />
<disbursementToken />
<disbursementsEnabled>true</disbursementsEnabled>
<address>
<street2></street2>
<zip></zip>
<street1></street1>
<state></state>
<countryCode>usa</countryCode>
<class>com.blusynergy.blubilling.common.Address</class>
<country>United States</country>
<city></city>
</address>
<email>pd@blusynergy.com</email>
<accountType />
<dateCreated>2014-10-17</dateCreated>
</biller>
<biller id="123">
<achRoutingNumber />
<referenceNumber />
<cellPhone />
<commissionCode />
<workPhone />
<firstName>Mary</firstName>
<lastName>Wilson</lastName>
<notificationsEnabled>true</notificationsEnabled>
<achAccountNumber />
<referringBillerCommissionCode />
<lastUpdated>2014-10-30</lastUpdated>
<code>MARYWILSON</code>
<companyName />
<disbursementToken />
<disbursementsEnabled>true</disbursementsEnabled>
<address>
<street2></street2>
<zip></zip>
<street1></street1>
<state></state>
<countryCode>usa</countryCode>
<class>com.blusynergy.blubilling.common.Address</class>
<country>United States</country>
<city></city>
</address>
<email>mw@blusynergy.com</email>
<accountType />
<dateCreated>2014-10-30</dateCreated>
</biller>
<biller id="124">
<achRoutingNumber />
<referenceNumber />
<cellPhone />
<commissionCode />
<workPhone />
<firstName>Carl</firstName>
<lastName>Levy</lastName>
<notificationsEnabled>true</notificationsEnabled>
<achAccountNumber />
<referringBillerCommissionCode />
<lastUpdated>2014-10-30</lastUpdated>
<code>LEVY AGENC</code>
<companyName>Levy Agency</companyName>
<disbursementToken />
<disbursementsEnabled>true</disbursementsEnabled>
<commissionPlan id="119" />
<address>
<street2></street2>
<zip></zip>
<street1></street1>
<state></state>
<countryCode>usa</countryCode>
<class>com.blusynergy.blubilling.common.Address</class>
<country>United States</country>
<city></city>
</address>
<email>levyagency@blusynergy.com</email>
<accountType />
<dateCreated>2014-10-30</dateCreated>
</biller>
<biller id="125">
<achRoutingNumber />
<referenceNumber />
<cellPhone />
<commissionCode />
<workPhone />
<firstName>Matt</firstName>
<lastName>Mason</lastName>
<notificationsEnabled>true</notificationsEnabled>
<achAccountNumber />
<referringBillerCommissionCode />
<lastUpdated>2014-11-14</lastUpdated>
<code>MATTMASON</code>
<companyName />
<disbursementToken />
<disbursementsEnabled>true</disbursementsEnabled>
<commissionPlan id="132" />
<address>
<street2></street2>
<zip></zip>
<street1></street1>
<state></state>
<countryCode>usa</countryCode>
<class>com.blusynergy.blubilling.common.Address</class>
<country>United States</country>
<city></city>
</address>
<email>mm@blusynergy.com</email>
<accountType />
<dateCreated>2014-10-30</dateCreated>
</biller>
<biller id="132">
<achRoutingNumber />
<referenceNumber />
<cellPhone />
<commissionCode />
<workPhone />
<firstName>Avery</firstName>
<lastName>Simon</lastName>
<notificationsEnabled>true</notificationsEnabled>
<achAccountNumber />
<referringBillerCommissionCode />
<lastUpdated>2015-06-17</lastUpdated>
<code>AZ SALES</code>
<companyName>AZ Sales</companyName>
<disbursementToken />
<disbursementsEnabled>true</disbursementsEnabled>
<address>
<street2></street2>
<zip></zip>
<street1></street1>
<state></state>
<countryCode>usa</countryCode>
<class>com.blusynergy.blubilling.common.Address</class>
<country>United States</country>
<city></city>
</address>
<email>as@blusynergy.com</email>
<accountType />
<dateCreated>2015-06-17</dateCreated>
</biller>
</list>
4.7.6 Retrieve a Sales Agent with an ID or an Order Number
To get a SalesAgent with an id
GET https://datasafe.blubilling-test.com/rest/salesAgents/116. //
To get a SalesAgent with an Order Number
GET https://datasafe.blubilling-test.com/rest/salesAgents?agentCode=PD-COMM. //
Sample Output:
<biller id="116">
<achRoutingNumber />
<referenceNumber />
<cellPhone />
<commissionCode />
<workPhone />
<firstName>Phil </firstName>
<lastName>Donner</lastName>
<notificationsEnabled>true</notificationsEnabled>
<achAccountNumber />
<referringBillerCommissionCode />
<lastUpdated>2014-10-17</lastUpdated>
<code>PD-COMM</code>
<companyName />
<disbursementToken />
<disbursementsEnabled>true</disbursementsEnabled>
<address>
<street2></street2>
<zip></zip>
<street1></street1>
<state></state>
<countryCode>usa</countryCode>
<class>com.blusynergy.blubilling.common.Address</class>
<country>United States</country>
<city></city>
</address>
<email>pd@blusynergy.com</email>
<accountType />
<dateCreated>2014-10-17</dateCreated>
</biller>
Note: A Sales Agent cannot be created using an API. It can only be retrieved or posted.