High level API

Overview

High level API provides objects foreasy manipulation with common entities, like affiliates, commissions,etc. For every entity there are two main objects: * row object – (for example: Pap_Api_Affiliate) – it can retrieve one record, you can edit, or add new record using this object * grid object – (for example: Pap_Api_AfiliatesGrid) – it can retrieve grid of affiliates (list of affiliate records) High level API classes have names startwith Pap_Api_****** Row objects can be use...

Pap_Api_RecurringCommission

Triggering the recurring commission via php API can be useful when you want some special recurence presets or you are integrating PAP with some custom payment processor. So, make sure the Recurring commissions (http://support.qualityunit.com/980100-Recurring-commissions#302274) feature is turned on in the Features section in the merchant panel. As soon as it is turned on, click the _Configure_ button next to it and check in the "_Use only API to trigger commissions (planned task will be disab...

Pap_Api_Transaction

Row object - class representing one transaction (commission) record. You can use it to retrieve, edit and manually add commissions. Methods: _load()_ - loads record with given transaction id. You have to set transaction id before calling this method. _save()__ _- save changes in given record (record must be loaded first). _add()_ - inserts new record refund($note = '', $fee = 0, $refundMultiTier = false) - makes refund of transaction with optional note and fee that is substracted f...

Pap_Api_BannersGrid

Grid object - this class handles requests to the list of banners. You can use it to search and filter in banners. Methods: * all methods are inherited from_Gpf_Rpc_GridRequest_class, check it's documentation. Example retrieving list of all banners (first 30 records) //---------------------------------------------- // get recordset with list of banners $request = new Pap_Api_BannersGrid($session);//columns that you want to load (unless the default columns are enough)$request->addParam...

Pap_Api_Affiliate

Row object means class representing one affiliate record. You can use it to retrieve, edit and add affiliates. Methods: load() - loads record with given user id or other parameters. You have to set at least one field before calling this method. _Note: If you try to load some affiliate data, you must first setup data to load from, for example username, then call load method and after that all other available informations will be available to you._ save()_ _- save changes in given record (re...

Pap_Api_AffiliateSignup

Object for affiliates signup, it doesn't require merchant's credentials or session. Methods: add() - inserts new record setLanguage('en-US') – notification signup email will be sent in 'en-US' language instead of default language, this function is for adding affiliate. setUserid($value) setRefid($value) setParentUserId($value) setUsername($value) setPassword($value) setFirstname($value) setLastname($value) setIp($value) setNotificationEmail($value) setPayoutOptionId($value) setP...

Pap_Api_TransactionsGrid

Grid object - this class handles requests to the list of transactions. You can use it to search and filter in the registered transactions (commissions). Example retrieving list of all transactions (do not forget to login via api as merchant (http://support.qualityunit.com/389075-Getting-started-example)): //---------------------------------------------- // get recordset of list of transactions $request = new Pap_Api_TransactionsGrid($session); // set filter $request->addFilter('dateinsert...

Pap_Api_Payouts

Grid object - this class handles requests to the list of payouts. You can use it to search and filter in merchant payouts. _Note: This api is for merchant only._ Methods: * all methods are inherited from _Gpf_Rpc_GridRequest_ class, check it's documentation. * _addAllAffiliatesToPay()_ - this adds all affiliates loaded to payouts grid to payout process * _addAffiliateToPay(affiliateid)_ - this adds affiliate with id affiliateid to payout process * _payAffiliates(paymentNote, affi...

Pap_Api_PayoutsHistory

Grid object - this class handles requests to the list of payouts already payed to affiliates. You can use it to search and filter in merchant payouts history. _Note: This api is for merchant only._ Methods: * all methods are inherited from _Gpf_Rpc_GridRequest_ class, check it's documentation. * g_etPayeesDeatilsInfo(payeeid)_ - gets info about affiliates in specified payout Possible filters you can use: * _dateinserted _- date value * _merchantnote _- text value * _use...

Pap_Api_AffiliatesGrid

Grid object - this class handlesrequests to the list of affiliates. You can use it to search andfilter in affiliates. Methods: * all methods are inherited from _Gpf_Rpc_GridRequest_ class, check it's documentation. Example retrieving list of allaffiliates (first 30 records) //---------------------------------------------- // get recordset with list of affiliates $request = new Pap_Api_AffiliatesGrid($session);//Filtering affiliate with username affiliate@example.com - Filters are not man...