NATS4 API Get Affiliate Payout

From TMMwiki
Jump to: navigation, search
NATS 4
SOAP API
API
WSDL Cache
Add Affiliate
Add Member Note
Admin Get Adtools
Adtool Categories
Adtool Types
Affiliate Get Campaigns
Bulk Import Adtools
Caching
Decode Natscode
Expire Manual Member
Get Affiliate Campaigns
Get Affiliate Hit Data
Get Affiliate Loginids
Get Affiliate Nats Codes
Get Affiliate Payout
Get Affiliate Program Campaign List
Get_Affiliate_Program_Campaign_List
Get Member Details
Get Member Instant Upgrade String
Get Member Package Upgrade String
Get Member Token Rebuy String
Get Member Upsell String
Get Payment Data
Get Payvia Rule
Get Profit Loss Report
Ping
Record Member Login
Search Affiliate Info
Search Member Info
Send Email API Function
Set Affiliate Admin Settings
Set Affiliate Customs
Set Affiliate Defaults
Set Affiliate Information
Set Affiliate Settings
Set Member Details
Set Payment Status
Set Payvia Rule
REST API
API Overview
REST API PATH UPDATES
Adtools
GET /adtools/admin
GET /adtools/categories
GET /adtools/types
POST /adtools/importdump
Affiliate
GET /affiliate/campaigns
GET /affiliate/hitdata
GET /affiliate/payout
GET /affiliate/searchinfo
POST /affiliate/addaffiliate
POST /affiliate/invoice
PATCH /affiliate/setadminsettings
PATCH /affiliate/setcustoms
PATCH /affiliate/setdefaults
PATCH /affiliate/setinformation
PATCH /affiliate/setpayviainfo
PATCH /affiliate/setsettings
PATCH /affiliate/status
Member
GET /member/upsellstring
GET /member/tokenrebuystring
GET /member/instantupgradestring
GET /member/packageupgradestring
GET /member/signupplusstring
GET /member/cancelstring
GET /member/details
GET /member/searchinfo
GET /suggestedcanceloffers
PATCH /member/setdetails
PATCH /member/setexpiration
POST /member/addnote
POST /member/recordlogin
PUT /member/expiremanual
Option
GET /option/getrule
PATCH /option/editrule
POST /option/addrule
PUT /option/edittext
Payments
GET /payments/getpayments
GET /payviarule
PATCH /payments/setstatus
PATCH /payviarule
Report
GET /profitlossreport
Service
GET /service/decodenatscode
GET /service/ping
POST /service/sendemail

NATS4 supports an API function to get affiliate payout data for a specific time frame. You can choose a specific site or receive the payout data back for all of the sites.

get_affiliate_payout accepts the following parameters:

  • loginid - The affiliate ID. This parameter is required.
  • siteid - The siteid you wish to grab payout data for. If not supplied, NATS will grab payout data for all sites.
  • startDate - The beginning date for the data you wish to see. Date will be parsed by the PHP strtotime function. A valid date can be YYYY-MM-DD.
  • endDate - The ending date for the data you wish to see. Date will be parsed by the PHP strtotime function. A valid date can be YYYY-MM-DD.

NuSOAP Example

This example continues from the main article NuSOAP Example):

$params = Array(
	'loginid' => '2',
	'siteid' => 3,
	'startDate' => '2012-10-10',
	'endDate' => '2012-10-31',
);

$result = $client->call('get_affiliate_payout', $params, 'natsapiadmin_wsdl');

print_r($result);

Payout Data Output

The output will be the amount (in cents) earned and stored within the time period.

Array
(
    [earned] => 8753
    [stored] => 51250
)