My tickets
 
Submit ticket
 
Login
 
API v1
Home
>
Post Affiliate Pro
>
Programmers documentation
>
API
>
API v1
Overview
Post Affiliate Pro API Post Affiliate Pro application work on two levels: - client – AJAX application running on browser - server – PHP based back end The client communicates with a 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. Everything that you can control in merchant or affiliate control panel, you can also access from an external application usin...
Application and API requests limits
Application limit As cloud-hosted accounts run on our servers we need to make sure they do not get overloaded. Because of this we limit the requests made on the application and API to make sure our servers operate smoothly. - the requests limit is set to 500 requests per 30 seconds - the limit includes requests on the application and API together (including callbacks, webhooks or any other requests to the application) - in API, one request can ask for maximum 500 results (rows). Grid limit ...
API Requirements
Requests can be sent using any programming language - you only have to follow the [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 requests to the Post Affiliate Pro API and processing the responses. PapApi.class.php is part of every Post Affiliate Pro distribution and can be found in api folder in your installation files or you ...
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...
High level API
Overview
Pap_Api_Transaction
Pap_Api_TransactionsGrid
and 7 more ...
Low level API
Overview
Pap_Api_Session
Gpf_Rpc_Request
and 6 more ...
Tracking API
Pap_Api_ClickTracker
Pap_Api_SaleTracker
Examples
Integration related
Feature and plugin specific
Work with banners
and 71 more ...
Subcategories
High level API
Low level API
Tracking API
Examples