Application and API requests limit

As the cloud-hosted accounts run on our servers, we have to make sure they do not get overloaded. Because of this, we limit the requests made on the application and API to make sure the server operates smoothly. The requests limit is set to 500 requests per 30 seconds. This limit includes both requests on the application and API requests together.

Overview

Post Affiliate Pro API Post Affiliate Pro system is divided into two parts: - client – AJAX application running on browser - server – PHP based back end Client communicates with server using requests and responses encoded in JSON format (https://support.qualityunit.com/110653-Data-model-JSON-description). Because of this, the application natively supports API and everything that you can control through merchant or affiliate control panel, you can access also from exter...

API Requirements

Requests can be sent using any programming language, you only need to follow our JSON format (https://support.qualityunit.com/110653-Data-model-JSON-description) of requests/responses. We provide PHP object library (single file PapApi.class.php or PapApiNamespace.class.php) that simplifies making the requests to the Post Affiliate Pro API and processing the responses. PapApi.class.php is part of every Post Affiliate Pro distribution (since version 4.1.4.5) and can be found in api folder in ...

High level API

It gives you objects that correspond to the entities, for example object for affiliate or commission. Using these objects you can easily retrieve, edit or add affiliates, commissions, or other objects of the affiliate system. These high level objects are extended from and internally use the low level API objects to make the requests and process responses. Example of using high level API (PHP code): // getting list of affiliates $request = new Pap_Api_AffiliatesGrid($session); $request->...

Low level API

Our API library contains low level API classes and methods that allow you to send requests like asking for a form, or asking for a list of records (grid). There classes (for example Gpf_Rpc_GridRequest, Gpf_Rpc_FormRequest) are general purpose classes to handle general requests. Example of using low level API (PHP code): // getting list of affiliates $request = new Gpf_Rpc_GridRequest("Pap_Merchants_User_AffiliatesGridSimple", "getRows", $session); $request->addFilter("search", Gpf_...

Data model (JSON) description

The data transferred between client (request your script) and server (represented by scripts/server.php) are encoded in JSON format. This is the lowest level of communication. You can use this level of communication if you cannot use our PHP based API (file PapApi.class.php) that allows you to create requests and process responses. Pap_Api_Session (Gpf_Api_Session) Login JSON request contains parameters: - C: class name "Pap_Api_AuthService" - M: method name "authenticate" - ...

Data model (JSON) example of use

In Post Affiliate Pro you can create and use JSON data model for any action that is possible to do via Merchant Panel and Affiliate Panel. You can get the actual JSON which is called on different actions by debugging (https://support.qualityunit.com/775501-Debugging-with-Firefox) the requests with Firebug for example. The JSON data which you get by debugging (https://support.qualityunit.com/775501-Debugging-with-Firefox) should be URL encoded (you can use this nice tool (https://meyerweb.com/er...

Click tracking request data description

Post Affiliate Pro tracking is based on requests between client (banner destination web page, 'thank you page') and server. If it is the first request, browser visitor cookie is not loaded, the server generates a new cookie value and sends it to the client as a response. JavaScript on Client will store the received cookie value to browser and HTML5 local storage cookie. If browser visitor cookie is loaded and inserted into request parameter 'visitorId', then response is empty and click/sale is ...

Sale (action) tracking request data description

Sale/action tracking request This request is sent from sale tracker to Post Affiliate Pro server: https://my_pap_url/scripts/track.php?visitorId=b910a79d013c8856a01393511GPTWP0s&accountId=&url=H_localhost%2Ftests%2Fapi%2Fme%2Fsale.php&referrer=&tracking=1&getParams=&ip=127.0.0.1&sale=%5B%7B%22ac%22%3A%22%22%2C%22t%22%3A%22100%22%2C%22f%22%3A%22%22%2C%22o%22%3A%22oid%22%2C%22p%22%3A%22pid%22%2C%22d1%22%3A%22data1value%22%2C%22d2%22%3A%22data2value%22%2C%22d3%22%3A%22data3value%22%2C%2...

Inspecting and rewriting application requests into API

You can use developer tools in your favorite browser to intercept the requests between the application and the server in both the merchant and affiliate panels. You can then either rewrite these requests using your preferred programming language or rewrite them using our PHP based low level API (https://support.qualityunit.com/922663-Low-level-API). This way you can see which requests are called on particular actions, and what are their parameters. You can then choose the appropriate lo...
×