Affpoint API

Recent changes:

Requests

Request URL format:

https://affpoint.net/en/<apiMethodName>/?key=<apiKey>&format=<format>&a=1&b=2&c=...

Methods available to all users:

Methods available to webmasters:

Methods available to advertisers:

Responses

The returned data always has a single root element named result or error. The data structure does not depend on the format. The encoding is UTF-8.

error

error means that an error occurred; it contains two elements: code and text — the error code and description. Error codes:

Error example in XML format:

<error>
    <code type="integer">400</code>
    <text type="string">Bad request: key is empty</text>
</error>

Error example in JSON format:

{ "error": { "code":400, "text":"Bad request: key is empty" } }

result

result means that the request was successful; it contains the returned data.

In XML format, each data element has a type attribute with the value type: string, integer, float, boolean or NULL

Methods

apiWmOffers

Shows detailed information about offers. Only offers available to the webmaster on their current tariff are returned. Only active offers are shown.

Parameters:

List request examples:

https://affpoint.net/en/apiWmOffers/?key=KEY&format=xml
https://affpoint.net/en/apiWmOffers/?key=KEY&format=xml&category=19
https://affpoint.net/en/apiWmOffers/?key=KEY&format=xml&page=1
https://affpoint.net/en/apiWmOffers/?key=KEY&format=xml&timestamp=2013-10-07 15:41:51
https://affpoint.net/en/apiWmOffers/?key=KEY&format=xml&category=19&page=3&timestamp=2013-10-07 15:41:51

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <offers>
        <offer>
            <id type="integer">123</id>
            <name type="string">Offer name</name>
            <description type="string">
                Offer description
            </description>
            <link type="string">http://offer.site.ru/</link>
            <storedLogo type="string">http://offer.site.ru/logo.png</storedLogo>
            <createDate type="string">2012-01-01</createDate>
            <customLandings type="boolean">true</customLandings>
            <deeplink type="boolean">false</deeplink>
            <geo>
                <excludeCountries type="boolean">true</excludeCountries>
                <includeCountries>
                    <includeCountry type="string">RU</includeCountry>
                </includeCountries>
                <includeCities/>
                <excludeCities/>
            </geo>
            <categories>
                <category>
                    <id type="integer">9</id>
                    <name type="string">TV shop</name>
                </category>
                ...
            </categories>
            <deniedTrafficTypes>
                <deniedTrafficType>
                    <id type="integer">159</id>
                    <name type="string">Incentivized traffic</name>
                </deniedTrafficType>
                ...
            </deniedTrafficTypes>
            <adultsOnly type="boolean">false</adultsOnly>
            <rating>1.5</rating>

            <!-- offer selection data -->
            <status>
                <id type="integer">2</id>
                <name type="string">Active</name>
            </status>
            <geoString>Moscow, Moscow region, Bryansk, Cherepovets, Ukraine</geoString>
            <minTariff>
                <id type="integer">1</id>
                <name type="string">Basic</name>
            </minTariff>
            <activateDate type="string">2012-01-01</activateDate>
            <freezeDate type="string">2012-01-01</freezeDate>
            <trafficTypes>
                <trafficType>
                    <name type="string">Contextual advertising</name>
                    <status type="integer">1</status>
                </trafficType>
                ...
            </trafficTypes>
            <banners>
                <count type="integer">859</count>
                <sizes>
                    <size type="string">120x600 (92)</size>
                    ...
                </sizes>
                <download type="string">http://affpoint.net/ww-en/wmGetCode/downloadAll/id:12321</download>
            </banners>
            <hasWidgets type="boolean">true</hasWidgets>
            <hasYmls type="boolean">true</hasYmls>
            <Ymls>
                <Yml type="string">http://offer.site.ru/files/catalog.xml</Yml>
                ...
            </Ymls>
            <!-- /offer selection data -->

            <aims>
                <aim>
                    <id type="integer">16</id>
                    <name type="string">Order placement</name>
                    <price type="string">269.23 RUR</price>
                    <postclick type="integer">30</postclick>
                    <hold type="integer">14</hold>
                    <geo>
                        <excludeCountries type="boolean">true</excludeCountries>
                        <includeCountries>
                            <includeCountry type="string">RU</includeCountry>
                        </includeCountries>
                        <includeCities/>
                        <excludeCities/>
                    </geo>
                    <tariff>
                        <id type="integer">1</id>
                        <name type="string">Basic</name>
                    </tariff>
                    <acceptRate type="float">99.95</acceptRate>
                </aim>
            </aims>
        </offer>
        <offer>
            ...

Single offer request example:

https://affpoint.net/en/apiWmOffers/?key=KEY&format=xml&offer=234

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <offers>
        <offer>
            <id type="integer">234</id>
            ...
        </offer>
</result>

In geo, one of the fields excludeCountries or includeCountries has the value true instead of a list of country codes.

The aim price is calculated according to the webmaster's current tariff.

In the trafficType field, the status parameter takes the following values:

For more detailed information about offer YML files, use the apiWmYmls method.


apiWmMyOffers

Shows connected offers, allows connecting sources to them and disconnecting sources from them, and configuring the traffic back URL.

1. List of connected offers

Request example:

https://affpoint.net/en/apiWmMyOffers/?key=KEY&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <favouriteOffers>
        <favouriteOffer>
            <offer>
                <id type="integer">234</id>
                <name type="string">Offer</name>
                <status>
                    <id type="string">2</id>
                    <name type="string">Active</name>
                </status>
            </offer>
            <available type="boolean">true</available>
            <status>
                <id type="string">1</id>
                <name type="string">Active</name>
            </status>
            <linksBlocked type="boolean">false</linksBlocked>
            <createDate type="string">2012-07-26</createDate>
            <trafficBackUrl type="string">http://trafback.url</trafficBackUrl>
            <sources>
                <source>
                    <id type="integer">12321</id>
                    <name type="string">affpoint.net</name>
                </source>
            </sources>
        </favouriteOffer>
        <favouriteOffer>
            ...
2. View a connected offer

Parameters:

Request example:

https://affpoint.net/en/apiWmMyOffers/?key=KEY&format=xml&offer=234

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <favouriteOffer>
        ...
    </favouriteOffer>
</result>
3. Connect to an offer

Parameters:

Request example:

../apiWmMyOffers/?key=KEY&format=xml&act=add&offer=234

The response contains the parameters of the connected offer, or the parameters of the automatically created connection request

4. Disconnect from an offer

Parameters:

Request example:

../apiWmMyOffers/?key=KEY&format=xml&act=delete&offer=234

The response contains true on successful removal.

5. Connected offer settings

Parameters:

URL parameters can also be passed in a POST request.

Request example:

../apiWmMyOffers/?key=KEY&format=xml&act=options&offer=234&trafficBackUrl=http://tr.af

The response contains the connected offer parameters with the changes applied.

6. Offer limits

Returns offer limits. Note that for some types of restrictions the exact values of value and valueLimit cannot be shown; these fields will contain NULL. However, the percentage of the limit used is always present in the percent field.

Request example:

../apiWmMyOffers/?key=KEY&format=xml&act=limits

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <limits>
        <limit>
            <id type="integer">1</id>
            <offer>
                <id type="string">123</id>
                <name type="string">Offer name</name>
            </offer>
            <periodType>
                <id type="string">1</id>
                <name type="string">Per day</name>
            </periodType>
            <valueType>
                <id type="string">5</id>
                <name type="string">Number of accepted actions</name>
            </valueType>
            <value type="float">825</value>
            <valueLimit type="float">1000</valueLimit>
            <percent type="float">82.50</percent>
        </limit>
   </limits>
</result>
7. List of offer connection requests

Returns the list of the webmaster's requests to connect to offers.

Request example:

../apiWmMyOffers/?key=KEY&format=xml&act=requests

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <requests>
        <request>
            <date type="string">2015-06-17 17:40:25</date>
            <offer>
                <id type="integer">3800</id>
                <name type="string">Offer with individual access</name>
            </offer>
            <status>
                <id type="integer">1</id>
                <name type="string">Connection not possible</name>
            </status>
        </request>
        ...
    </requests>
</result>


apiWmLandings

Shows offer landings. If the offer allows webmasters to add their own landings (customLandings), the webmaster's landings are shown as well, and they can be added, deleted and edited.

1. List of landings

Parameters: - offer (required) - offer ID

Request example:

https://affpoint.net/en/apiWmLandings/?key=KEY&format=xml&offer=234

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
<landings>
    <landing>
        <id type="integer">45911</id>
        <name type="string">Tvigle kids</name>
        <url type="string">http://www.tvigle.ru/kids/</url>
        <isCustom type="boolean">false</isCustom>
    </landing>
    <landing>
            ...

isCustom indicates that the landing was added by the webmaster and can be edited or deleted by them.

2. Add or edit a landing

Parameters: - act=save required action indicator - offer (required) - offer ID - landing (optional) - if an ID is specified, this landing will be edited, otherwise a new one will be created - name (required) - landing name - url (required) - landing URL

landing, name and url can also be passed in a POST request.

Request example:

.../apiWmLandings/?key=KEY&format=xml&offer=234&act=save&name=Hats&url=http://shop.com/hats

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <landing>
        <id type="integer">45678</id>
        <name type="string">Hats</name>
        <url type="string">http://shop.com/hats</url>
        <isCustom type="boolean">true</isCustom>
    </landing>
</result>
3. Delete a landing

Parameters: - act=delete required action indicator - landing (required) - landing ID

Request example:

.../apiWmLandings/?key=KEY&format=xml&act=delete&landing=45678

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result type="boolean">true</result>


apiWmSources

Returns information about the webmaster's sources.

1. List of sources

Parameters:

Request example:

https://affpoint.net/en/apiWmSources/?key=KEY&format=xml&active=1

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <sources>
        <source>
            <id type="integer">12321</id>
            <name type="string">my.source.ru</name>
            <description type="string">My blog</description>
            <type>
                <id type="string">1000</id>
                <name type="string">Other</name>
            </type>
            <status>
                <id type="string">2</id>
                <name type="string">Active</name>
            </status>
            <createDate type="string">2012-07-26 18:00:26</createDate>
            <modifyDate type="string">2012-08-31 11:42:27</modifyDate>
        </source>
        <source>
            ...
2. Source information by ID

Parameters:

Request example:

https://affpoint.net/en/apiWmSources/?key=KEY&format=xml&source=12321

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <source>
        <id type="integer">12321</id>
        ...
    </source>
</result>


apiWmSubaccounts

Returns the list of subaccounts that have ever been used by the webmaster.

Request example:

https://affpoint.net/en/apiWmSubaccounts/?key=KEY&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <subaccounts>
        <subaccount type="string">subaccount</subaccount>
        <subaccount type="string">direct</subaccount>
        <subaccount type="string">adwords</subaccount>
        <subaccount type="string">rotator</subaccount>
    </subaccounts>
</result>


apiWmYmls

Returns information about offer YML files. Allows getting a personal YML file with deeplinks.

1. List of offers with YML files

Only active connected offers are shown.

Parameters:

Request example:

https://affpoint.net/en/apiWmYmls/?key=KEY&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <offer>
        <id type="integer">12</id>
        <name type="string">Offer Name</name>
        <deeplinks type="boolean">true</deeplinks>
        <ymls>
            <yml>
                <id type="integer">123</id>
                <name type="string">YML catalog</name>
                <file>
                    <url type="string">http://affpoint.net/cn/.../yml123.xml</url>
                    <size type="integer">28094061</size>
                </file>
                <infoFile>
                    <url type="string">http://affpoint.net/cn/.../yml37-info.xml</url>
                    <size type="integer">168</size>
                </infoFile>
                <regionalFile>
                    <url type="string">http://affpoint.net/cn/.../yml37-regional.xml</url>
                    <size type="size">28098978</size>
                    <tag type="string">moscow</tag>
                </regionalFile>
            </yml>
            <yml>
                ...
            </yml>
        </ymls>
    </offer>
            ...
2. Get a YML file with deeplinks

Parameters:

Request example:

https://affpoint.net/en/apiWmYmls/?key=KEY&format=xml&act=deeplinks&source=12321

Response example: you will receive the requested YML file in which all links are routed through your deeplink.

The YML file is always returned in its original format, so the format parameter here only affects the format in which an error is returned, if one occurs.


apiWmLinks

Returns the list of links for driving traffic.

Parameters:

Request example:

https://affpoint.net/en/apiWmLinks/?key=KEY&format=xml&offer=234&source=12321

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <links>
        <link>
            <source>
                <id type="integer">12321</id>
                <name type="string">my.source.ru</name>
            </source>
            <landing>
                <id type="integer">34543</id>
                <name type="string">
                    Order page
                </name>
            </landing>
            <url type="string">
                http://apytrc.com/click/1234567890abcdef12345678/34543/12321/subaccount
            </url>
            <cleanUrl type="string">http://myoffer.ru/shop/</cleanUrl>
            <isDefaulted type="boolean">false</isDefaulted>
        </link>
        <link>
            ...

Attention! The isDefaulted flag means that the landing is disabled, and traffic from this affiliate link goes to the offer's main landing. You need to redirect your traffic urgently, since clicks will stop being counted 2 weeks after this flag appears.

apiWmLinkRotators

Returns the list of configured link rotators.

Parameters:

Request example:

https://affpoint.net/en/apiWmLinkRotators/?key=KEY&format=xml&id=234

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <rotators>
        <rotator>
            <name type="string">rotator</name>
            <source>
                <id type="integer">12321</id>
                <name type="string">my.source.ru</name>
            </source>
            <link type="string">
                http://apytrc.com/rlink/123/456
            </link>
            <rotatedOffers>
                <rotatedOffer type="string">123</rotatedOffer>
                <rotatedOffer type="string">456</rotatedOffer>
                <rotatedOffer type="string">789</rotatedOffer>
                ...
            </rotatedOffers>
        </rotator>
        <rotator>
            ...

apiWmStats / apiAdvStats

1. Aggregated statistics

Parameters

Note: from and till are specified in "YYYY-MM-DD" format. Multiple subId filters in one request are not allowed. For a request like subId1=a&subId2=b, only the first filter will be used. For reference, the server response includes the requested dates and parameters.

Request example:

https://affpoint.net/en/apiWmStats/?key=KEY&format=xml&group=offer&from=2014-01-01

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <query>
        <group type="string">offer</group>
        <from type="string">2014-04-20</from>
        <till type="string">2014-04-22</till>
    </query>
    <stats>
        <stat>
            <key>
                <title type="string">234 - Demo Offer</title>
                <type type="string">Offer</type>
                <value type="integer">234</value>
            </key>
            <offer type="integer">234</offer>
            <clicks type="integer">4</clicks>
            <accepted type="integer">1</accepted>
            <processing type="integer">2</processing>
            <rejected type="integer">3</rejected>
            <conversion type="float">1.5</conversion>
            <paid>
                <RUR type="float">3.2</RUR>
                <USD type="float">0</USD>
                <EUR type="float">0</EUR>
                <UAH type="float">0</UAH>
            </paid>
            <hold>
                <RUR type="float">6.4</RUR>
                <USD type="float">0</USD>
                <EUR type="float">0</EUR>
                <UAH type="float">0</UAH>
            </hold>
            <epc>
                <RUR type="float">3.2</RUR>
                <USD type="float">0</USD>
                <EUR type="float">0</EUR>
                <UAH type="float">0</UAH>
            </epc>
        </stat>
        ...
    </stats>
</result>

Response example with nested grouping (group=offerAndStamp):

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <query>
        <group type="string">offerAndStamp</group>
        <from type="string">2014-04-20</from>
        <till type="string">2014-04-22</till>
    </query>
    <stats>
        <stat>
            <groupKey>
                <title type="string">234 - Demo Offer</title>
                <type type="string">Offer</type>
                <value type="integer">234</value>
            </groupKey>
            <offer type="integer">234</offer>
            <stats>
                <stat>
                    <key>
                        <title type="string">20.04.2014</title>
                        <type type="string">Stamp</type>
                        <value type="integer">20140420</value>
                    </key>
                    <stamp type="string">2014-04-20</stamp>
                    <clicks type="integer">8</clicks>
                    <accepted type="integer">1</accepted>
                    <processing type="integer">0</processing>
                    <rejected type="integer">2</rejected>
                    <conversion type="float">0.375</conversion>
                    <paid>
                        ...
                    </paid>
                    <hold>
                        ...
                    </hold>
                    <epc>
                        ...
                    </epc>
                </stat>
                <stat>
                    <key>
                        <title type="string">21.04.2014</title>
                        <type type="string">Stamp</type>
                        <value type="integer">20140421</value>
                    </key>
                    <stamp type="string">2014-04-21</stamp>
                    ...
                </stat>
            </stats>
            <groupKey>
                <title type="string">345 - Demo Offer #2</title>
                <type type="string">Offer</type>
                <value type="integer">345</value>
            </groupKey>
            <offer type="integer">345</offer>
            <stats>
                <stat>
                    <key>
                        <title type="string">20.04.2014</title>
                        <type type="string">Stamp</type>
                        <value type="integer">20140420</value>
                    </key>
                    <stamp type="string">2014-04-20</stamp>
                    ...
                </stat>
            </stats>
        </stat>
        ...
    </stats>
</result>
2. List of available groupings

Parameters:

Request example:

https://affpoint.net/en/apiWmStats/?key=KEY&format=xml&act=groupTypes

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <groupTypes>
        <groupType>
            <type type="string">offerAndStamp</type>
            <description type="string">Offer and date</description>
            <keyTypes>
                <keyType type="string">Offer</keyType>
                <keyType type="string">Stamp</keyType>
            </keyTypes>
        </groupType>
        ...
    </groupTypes>
</result>
3. Detailed statistics

Parameters

Note: from and till are specified in "YYYY-MM-DD" format. Multiple subId filters in one request are not allowed. For a request like subId1=a&subId2=b, only the first filter will be used. The requested period must not exceed 7 days. For reference, the server response includes the requested dates and parameters.

Request example:

https://affpoint.net/en/apiWmStats/?key=KEY&format=xml&offer=234&source=12321

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <query>
        <from type="string">2012-08-25</from>
        <till type="string">2012-08-31</till>
        <offer type="string">234</offer>
    </query>
    <actions>
        <action>
            <uniqueid type="string">837cbf8ab90e7fb130a08651</uniqueid>
            <apid type="string">876545678</apid>
            <date type="string">2012-08-29 18:44:16</date>
            <processingEndDate type="string">2012-08-29 18:44:16</processingEndDate>
            <holdEndDate type="string">2012-08-29 18:44:16</holdEndDate>
            <decisionDate type="NULL"/>
            <status>
                <id type="integer">300</id>
                <name type="string">On hold</name>
            </status>
            <ip type="string">1.2.3.4</ip>
            <country type="string">RU</country>
            <city type="string">MOW</city>
            <offer type="integer">234</offer>
            <aim type="integer">1230</aim>
            <landing type="integer">45654</landing>
            <source type="integer">12321</source>
            <subaccount type="string">subaccount</subaccount>
            <price type="NULL"/>
            <priceCurrency type="string">RUB</priceCurrency>
            <payment type="float">3.2</payment>
            <paymentCurrency type="string">RUB</paymentCurrency>
            <getParams>
                <abc type="string">123</abc>
                <xyz type="string">321</xyz>
            </getParams>
        </action>
        ...
    </actions>
    <page type="integer">1</page>
    <itemsPerPage type="integer">50</itemsPerPage>
    <pageCount type="float">1</pageCount>
</result>
4. Request by APIDs or UniqueIDs

Parameters:

If the offer parameter is passed, the id[] array is treated as a list of APIDs (action identifiers within the offer). If the offer parameter is not passed, the id[] array is treated as a list of UniqueIDs (globally unique action identifiers). When requesting a large number of actions, it is recommended to pass id[] in a POST request.

Request example:

.../apiWmStats/?key=KEY&format=xml&offer=234&id[]=876545678&id[]=987656789

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <actions>
        <action>
            <uniqueid type="string">837cbf8ab90e7fb130a08651</uniqueid>
            <apid type="string">876545678</apid>
            <date type="string">2012-08-29 18:44:16</date>
            <processingEndDate type="string">2012-08-29 18:44:16</processingEndDate>
            <holdEndDate type="string">2012-08-29 18:44:16</holdEndDate>
            <decisionDate type="NULL"/>
            <status>
                <id type="integer">300</id>
                <name type="string">On hold</name>
            </status>
            <ip type="string">1.2.3.4</ip>
            <country type="string">RU</country>
            <city type="string">MOW</city>
            <offer type="integer">234</offer>
            <aim type="integer">1230</aim>
            <landing type="integer">45654</landing>
            <source type="integer">12321</source>
            <subaccount type="string">subaccount</subaccount>
            <price type="NULL"/>
            <payment type="float">3.2</payment>
            <getParams>
                <abc type="string">123</abc>
                <xyz type="string">321</xyz>
            </getParams>
        </action>
        <action>
            ...
    </actions>
</result>


apiGeoCodes

Returns the name of a city or country by its geographic code.

Parameters:

Request example:

https://affpoint.net/en/apiGeoCodes/?key=KEY&format=xml&code=MOW

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result type="string">
    Moscow
</result>


apiCategories

Returns the list of offer categories.

Request example:

https://affpoint.net/en/apiCategories/?key=KEY&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
<categories>
    <category>
        <id type="integer">9</id>
        <name type="string">TV shop</name>
    </category>
    <category>
        <id type="integer">11</id>
        <name type="string">Entertainment</name>
    </category>
    <category>
        ...


apiWmDashboard

Returns the webmaster's statistics and wallet balances for the previous day.

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <stats>
        <click type="integer">0</click>
        <accept type="integer">0</accept>
        <hold type="integer">0</hold>
        <pay_wm_rur type="integer">0</pay_wm_rur>
        <pay_wm_usd type="integer">0</pay_wm_usd>
        <pay_wm_eur type="integer">0</pay_wm_eur>
    </stats>
    <wallets>
        <wallet>
            <code type="string">RUR</code>
            <title type="string">Rubles</title>
            <balance type="float">7072</balance>
            <hold type="float">5233</hold>
            <available type="float">1839</available>
        </wallet>
            ...
    </wallets>
</result>


apiWmNotices

1. Get all news

Returns the list of news for the webmaster, limited by tariff (20 news items per page).

Parameters:

Request example:

https://affpoint.net/en/apiWmNotices/?key=KEY&format=xml&page=2

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <notices>
        <notice>
            <id type="integer">11</id>
            <subject type="string">Flirchi allows CIS traffic! Since 05.06.12</subject>
            <createDate type="string">2012-06-05</createDate>
            <text type="string">Maybe with your help someone will find their destiny?</text>
            <offers>
                <offer>
                    <id type="integer">1694</id>
                    <name type="string">Flirchi.ru</name>
                    <url type="NULL"></url>
                </offer>
                    ...
            </offers>
            <coupons>
                <coupon>
                    <id type="integer">511</id>
                    <name type="string">coming soon</name>
                </coupon>
                    ...
            </coupons>
        </notice>
            ...
    </notices>
    <timestamp type="string">2013-10-08 10:04:54</timestamp>
    <page type="integer">4</page>
    <pageCount type="float">43</pageCount>
</result>
2. Get unread news

Returns the list of unread news for the webmaster, limited by tariff

Request example:

https://affpoint.net/en/apiWmNotices/unread/?key=KEY&timestamp=2013-10-07 15:41:51&format=xml
or
https://affpoint.net/en/apiWmNotices/?key=KEY&act=unread&timestamp=2013-10-07 15:41:51&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <notices>
        <notice>
            <id type="integer">11</id>
            <subject type="string">Flirchi allows CIS traffic! Since 05.06.12</subject>
            <createDate type="string">2012-06-05</createDate>
            <text type="string">Maybe with your help someone will find their destiny?</text>
            <offers>
                <offer>
                    <id type="integer">1694</id>
                    <name type="string">Flirchi.ru</name>
                    <url type="NULL"></url>
                </offer>
                    ...
            </offers>
            <coupons>
                <coupon>
                    <id type="integer">511</id>
                    <name type="string">coming soon</name>
                </coupon>
                    ...
            </coupons>
        </notice>
            ...
    </notices>
    <timestamp type="string">2013-10-08 10:04:54</timestamp>
</result>
3. Get the number of unread news

Returns the number of the webmaster's unread news

Request example:

https://affpoint.net/en/apiWmNotices/check/?key=KEY&format=xml
or
https://affpoint.net/en/apiWmNotices/?key=KEY&act=check&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <count type="integer">20</count>
</result>


apiWmTickets

1. Get all ticket threads

Returns the list of the webmaster's ticket threads (20 threads per page).

Parameters:

Request example:

https://affpoint.net/en/apiWmTickets/?key=KEY&format=xml&page=2

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <tickets>
        <ticket>
            <id type="integer">17097</id>
            <subject type="string">Correction of on-hold amounts</subject>
            <createDate type="string">2012-12-14</createDate>
            <modifyDate type="NULL"></modifyDate>
            <userRead type="boolean">true</userRead>
            <status>
                <id type="string">3</id>
                <name type="string">Answer read</name>
            </status>
        </ticket>
            ...
    </tickets>
    <timestamp type="string">2013-10-08 10:35:21</timestamp>
    <page type="integer">1</page>
    <pageCount type="float">14</pageCount>
</result>
2. Get new ticket threads

Returns the list of the webmaster's new ticket threads.

Parameters:

Request example:

https://affpoint.net/en/apiWmTickets/unread/?key=KEY&timestamp=2013-10-07 15:41:51&format=xml
or
https://affpoint.net/en/apiWmTickets/?key=KEY&act=unread&timestamp=2013-10-07 15:41:51&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <tickets>
        <ticket>
            <id type="integer">17097</id>
            <subject type="string">Correction of on-hold amounts</subject>
            <createDate type="string">2012-12-14</createDate>
            <modifyDate type="NULL"></modifyDate>
            <userRead type="boolean">true</userRead>
            <status>
                <id type="string">3</id>
                <name type="string">Answer read</name>
            </status>
        </ticket>
            ...
    </tickets>
    <timestamp type="string">2013-10-08 10:35:21</timestamp>
</result>
3. Get the number of unread tickets

Returns the number of the webmaster's unread tickets

Request example:

https://affpoint.net/en/apiWmTickets/check/?key=KEY&format=xml
or
https://affpoint.net/en/apiWmTickets/?key=KEY&act=check&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <count type="integer">20</count>
</result>
4. Get ticket messages

Returns the ticket itself along with all of its messages

Request example:

https://affpoint.net/en/apiWmTickets/view/?key=KEY&ticket=21336&format=xml
or
https://affpoint.net/en/apiWmTickets/?key=KEY&act=view&ticket=21336&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <ticket>
        <id type="integer">21336</id>
        <subject type="string">Question</subject>
        <createDate type="string">2013-06-14</createDate>
        <modifyDate type="string">2013-09-10</modifyDate>
        <userRead type="boolean">true</userRead>
        <status>
            <id type="string">1</id>
            <name type="string">Unanswered</name>
        </status>
        <sender>
            <name>John Smith</name>
            <itsMe>true</itsMe>
        </sender>
    </ticket>
    <messages>
        <message>
            <sender>
                <name>John Smith</name>
                <itsMe>true</itsMe>
            </sender>
            <createDate type="string">10.09.2013 at 10:18</createDate>
            <text type="string">Message 1</text>
        </message>
            ...
    </messages>
</result>
5. Create a ticket

POST request. Creates and returns a ticket and a message

GET parameters:

POST parameters:

Request example:

POST /ww-en/apiWmTickets/?act=add&format=xml HTTP/1.1 (or POST /ww-en/apiWmTickets/add/?format=xml HTTP/1.1)
Host: affpoint.net
Accept: */*
Content-Type: application/x-www-form-urlencoded

subject=Trololo&text=mesage

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <ticket>
        <id type="integer">21336</id>
        <subject type="string">Question</subject>
        <createDate type="string">2013-06-14</createDate>
        <modifyDate type="string">2013-09-10</modifyDate>
        <notification type="integer">112233</notification>
        <userRead type="boolean">true</userRead>
        <status>
            <id type="string">1</id>
            <name type="string">Unanswered</name>
        </status>
    </ticket>
    <messages>
        <message>
            <sender type="string">devWebmaster11</sender>
            <createDate type="string">10.09.2013 at 10:18</createDate>
            <text type="string">Message 1</text>
        </message>
    </messages>
</result>
6. Create a ticket message

POST request. Creates a message in the ticket and returns the ticket with all its messages

GET parameters:

POST parameters:

Request example:

POST /ww-en/apiWmTickets/?act=post&format=xml HTTP/1.1 (or POST /ww-en/apiWmTickets/post/?format=xml HTTP/1.1)
Host: affpoint.net
Accept: */*
Content-Type: application/x-www-form-urlencoded

ticket=21373&text=mesage

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <ticket>
        <id type="integer">21336</id>
        <subject type="string">Question</subject>
        <createDate type="string">2013-06-14</createDate>
        <modifyDate type="string">2013-09-10</modifyDate>
        <notification type="integer">112233</notification>
        <userRead type="boolean">true</userRead>
        <status>
            <id type="string">1</id>
            <name type="string">Unanswered</name>
        </status>
    </ticket>
    <messages>
        <message>
            <sender type="string">devWebmaster11</sender>
            <createDate type="string">10.09.2013 at 10:18</createDate>
            <text type="string">Message 1</text>
        </message>
            ...
    </messages>
</result>


apiWmReferrals

1. Get the list of referrals

Returns the link for referring partners, the list of referred partners and their contact details.

Request example:

https://affpoint.net/en/apiWmReferrals/?key=KEY&format=xml

Response example:

<result>
    <link type="string">https://api.affpoint.net/ref:r3f3rr41c0d3</link>
    <referrals>
        <referral>
        <login type="string">foobar</login>
        <registerDate type="string">2014-09-04</registerDate>
        <contacts>
            <skype type="string">foobarskype</skype>
            <icq type="string">123456789</icq>
            <jabber type="NULL"/>
        </contacts>
    </referral>
    <referral>
        ...
</result>
2. Daily income

Returns referral earnings for each day over the last 30 days.

Parameters:

Request example:

https://affpoint.net/en/apiWmReferrals/?key=KEY&act=byDate&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <dates>
        <date>
            <date type="string">2014-08-05</date>
            <actions type="integer">198</actions>
            <payments>
                <payment>
                    <currency type="string">RUR</currency>
                    <amount type="string">443.92</amount>
                </payment>
            </payments>
        </date>
        <date>
            <date type="string">2014-08-06</date>
            <actions type="integer">140</actions>
            <payments>
                <payment>
                    <currency type="string">RUR</currency>
                    <amount type="string">319.97</amount>
                </payment>
            </payments>
        </date>
        <date>
            ...
</result>
3. Income per referral

Returns earnings from each referral over the last 30 days.

Request example:

https://affpoint.net/en/apiWmReferrals/?key=KEY&act=byRef&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <total>
        <actions type="integer">3562</actions>
        <payments>
            <payment>
                <currency type="string">RUR</currency>
                <amount type="float">5964.87</amount>
            </payment>
        </payments>
    </total>
    <referrals>
        <referral>
            <login type="string">foobar</login>
            <registerDate type="string">2014-09-04</registerDate>
            <contacts>
                <skype type="string">foobarskype</skype>
                <icq type="string">123456789</icq>
                <jabber type="NULL"/>
            </contacts>
            <actions type="integer">363</actions>
            <payments>
                <payment>
                    <currency type="string">RUR</currency>
                    <amount type="string">272.58</amount>
                </payment>
            </payments>
        </referral>
        <referral>
            ...
</result>


apiWmPayouts

1. Balance and payouts information

Returns information about wallet balances, ordered payouts, wire transfers and balance corrections.

Request example:

https://affpoint.net/en/apiWmPayouts/?key=KEY&format=xml

Response example:

<result>
    <wallets>
        <wallet>
            <currency type="string">RUR</currency>
            <available type="float">12407.73</available>
            <hold type="float">0</hold>
        </wallet>
        <wallet>
            <currency type="string">USD</currency>
            <available type="float">0</available>
            <hold type="float">0</hold>
        </wallet>
        <wallet>
            <currency type="string">EUR</currency>
            <available type="float">0</available>
            <hold type="float">0</hold>
        </wallet>
    </wallets>
    <emoneys>
        <emoney>
            <id type="integer">23</id>
            <system type="string">WebMoney WMR</system>
            <account type="string">R1234567890</account>
            <currency type="string">RUR</currency>
            <createDate type="string">2014-09-01 12:01:59</createDate>
            <status>
                <id type="string">1</id>
                <name type="string">Active</name>
            </status>
        </emoney>
    </emoneys>
    <payouts>
        <payout>
            <id type="integer">123</id>
            <currency type="string">RUR</currency>
            <amount type="float">1000</amount>
            <amountPaid type="float">1000</amountPaid>
            <emoney>
                <id type="integer">23</id>
                <system type="string">WebMoney WMR</system>
                <account type="string">R1234567890</account>
                <currency type="string">RUR</currency>
                <createDate type="string">2014-09-01 12:01:59</createDate>
                <status>
                    <id type="string">1</id>
                    <name type="string">Active</name>
                </status>
            </emoney>
            <requestDate type="string">2014-09-04 13:31:12</requestDate>
            <processDate type="string">2014-09-05 16:27:11</processDate>
            <status>
                <id type="string">3</id>
                <name type="string">Paid</name>
            </status>
            <rejectReason type="NULL"/>
        </payout>
    </payouts>
    <wiretransfersOnly type="boolean">false</wiretransfersOnly>
    <wiretransfers>
        <wiretransfer>
            <amount type="float">500</amount>
            <currency type="string">RUR</currency>
            <createDate type="string">2014-09-03 14:45:25</createDate>
            <status>
                <id type="string">200</id>
                <name type="string">Confirmed</name>
            </status>
            <comment type="string">manager's comment</comment>
        </wiretransfer>
    </wiretransfers>
    <corrections>
        <correction>
            <operation>
                <id type="string">1</id>
                <name type="string">increase</name>
            </operation>
            <amount type="float">100</amount>
            <currency type="string">RUR</currency>
            <status>
                <id type="string">2</id>
                <name type="string">Accepted</name>
            </status>
            <comment type="string">manager's comment</comment>
        </correction>
    </corrections>
</result>
2. Order a payout

Orders a payout to the given payment system wallet.

Parameters:

Request example:

https://affpoint.net/en/apiWmPayouts/?key=KEY&format=xml&act=order&emoney=123&amount=1000

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <ok type="boolean">true</ok>
    <payout>
        <id type="integer">124</id>
        <currency type="string">RUR</currency>
        <amount type="float">1000</amount>
        <amountPaid type="NULL"/>
        <emoney>
            <id type="integer">23</id>
            <system type="string">WebMoney WMR</system>
            <account type="string">R1234567890</account>
            <currency type="string">RUR</currency>
            <createDate type="string">2014-09-01 12:01:59</createDate>
            <status>
                <id type="string">1</id>
                <name type="string">Active</name>
            </status>
        </emoney>
        <requestDate type="string">2014-09-04 13:31:12</requestDate>
        <processDate type="NULL"/>
        <status>
            <id type="string">1</id>
            <name type="string">Awaiting processing</name>
        </status>
        <rejectReason type="NULL"/>
    </payout>
</result>

Error response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <ok type="boolean">false</ok>
    <error type="string">
        Payouts are blocked for this account
    </error>
    <errorCode type="integer">1</errorCode>
</result>


apiNotifications

1. Get the list of notifications

Returns the list of notifications. The response contains one page of notifications - 25 records.

Request example:

https://affpoint.net/en/apiNotifications/?key=KEY&format=xml

Parameters:

Response example:

<result>
    <notifications>
        <notification>
            <id type="integer">112233</id>
            <subject type="string">
                Traffic on a disconnected offer
            </subject>
            <text type="string">
                You are sending traffic to offer "X".
                You have disconnected from it, actions for it are not accepted.
                Please reconnect to the offer or redirect your traffic urgently!
            </text>
            <link type="NULL"/>
            <createDate type="string">2014-08-15</createDate>
            <expireDate type="NULL"/>
            <importance>
                <id type="string">300</id>
                <name type="string">Critical</name>
            </importance>
            <solving>
                <id type="string">1</id>
                <name type="string">No solution required</name>
            </solving>
            <status>
                <id type="string">1</id>
                <name type="string">New</name>
            </status>
            <ticket type="integer">32132</ticket>
        </notification>
        <notification>
            ...
    </notifications>
    <page type="integer">1</page>
    <pageCount type="float">5</pageCount>
</result>
2. Number of unread notifications

Returns the number of unread notifications.

Parameters:

Request example:

https://affpoint.net/en/apiNotifications/?key=KEY&format=xml&act=unreadCount

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result type="integer">2</result>
3. Delete notifications

Removes the given notification from the user's notification list

Parameters:

Request example:

https://affpoint.net/en/apiNotifications/?key=KEY&format=xml&act=delete&id=112233

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result type="boolean">true</result>


apiWmLostActions

1. Get the list of lost action reports

Parameters:

Request example:

https://affpoint.net/en/apiWmLostActions/?key=KEY&format=xml&offer=111&status=1

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <lostActions>
        <lostAction>
            <id type="integer">19</id>
            <offer type="string">240</offer>
            <eventIdentifier type="string">44545</eventIdentifier>
            <description type="string">problem description</description>
            <source type="integer">32177</source>
            <orderDate type="string">2017-07-10</orderDate>
            <orderSum type="string">12.3000</orderSum>
            <currency type="string">1</currency>
            <documents/>
            <status>
                <id type="integer">1</id>
                <name type="string">New</name>
            </status>
    </lostActions>
</result>
2. Submit a report

Parameters: - orderDate - (required) order date - offer - (required) offer ID - description - (required) comment - eventIdentifier - (required) order number - source (required) source ID - orderSum (required) order amount - currency (required) currency - documents - (optional) photos of receipts or other materials confirming the action ('image/png', 'image/jpeg', 'application/zip')

Request example:

https://affpoint.net/en/apiWmLostActions/add/?key=KEY&format=xml&offer=240&eventIdentifier=order123&description=i+lost+it&source=32177&orderDate=2017-07-10&orderSum=12.30&currency=1

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <lostAction>
        <id type="integer">19</id>
        <offer type="string">240</offer>
        <eventIdentifier type="string">23232323</eventIdentifier>
        <description type="string">problem description</description>
        <source type="integer">32177</source>
        <orderDate type="string">2017-07-10</orderDate>
        <orderSum type="string">12.3</orderSum>
        <currency type="string">RUR</currency>
        <documents/>
        <status>
            <id type="integer">1</id>
            <name type="string">New</name>
        </status>
    </lostAction>
</result>
3. Get a report

Parameters: - id - (required) report ID

Request example:

https://affpoint.net/en/apiWmLostActions/view/?key=KEY&format=xml&id=11

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <lostAction>
        <id type="integer">11</id>
        <offer type="string">240</offer>
        <eventIdentifier type="string">12112</eventIdentifier>
        <description type="string">problem</description>
        <source type="integer">32177</source>
        <orderDate type="string">2017-07-14</orderDate>
        <orderSum type="string">122.0000</orderSum>
        <currency type="string">1</currency>
        <documents>
            <document type="string">
                //affpoint.net/cn/14/99/16/test.jpg
            </document>
        </documents>
        <status>
            <id type="integer">1</id>
            <name type="string">New</name>
        </status>
    </lostAction>
</result>


apiWmPostbacks

1. Get the list of postbacks

Parameters:

Request example:

https://affpoint.net/en/apiWmPostbacks/?key=KEY&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <postbacks>
        <postback>
            <id type="integer">12345</id>
            <createdAt type="string">2018-08-10 15:51:43</createdAt>
            <updatedAt type="string">2018-08-13 19:35:36</updatedAt>
            <active type="boolean">true</active>
            <eventTypes>
                <eventType>
                    <id type="integer">2</id>
                    <name type="string">Accepted</name>
                    <value type="string">accepted</value>
                </eventType>
            </eventTypes>
            <matchingType>
                <id type="string">1</id>
                <name type="string">Any offers except the specified ones</name>
            </matchingType>
            <globalFallback type="boolean">false</globalFallback>
            <excludeOffers/>
            <url type="string"></url>
        </postback>
    </postbacks>
</result>
2. Add or edit a postback

GET parameters:

POST data:

Request example:

POST https://affpoint.net/en/apiWmPostbacks/add/?key=KEY&format=xml

eventTypes[]=created
matchingType=2
offers[]=4536
url=http://my.service/postbacks/{eventType}/?offer={offer}&sum={payment}

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <ok type="boolean">true</ok>
    <postback>
        <id type="integer">12345</id>
        <createdAt type="string">2018-08-13 19:54:38</createdAt>
        <updatedAt type="string">2018-08-13 20:57:07</updatedAt>
        <active type="boolean">false</active>
        <eventTypes>
            <eventType>
                <id type="integer">1</id>
                <name type="string">Created</name>
                <value type="string">created</value>
            </eventType>
        </eventTypes>
        <matchingType>
            <id type="integer">2</id>
            <name type="string">Specified offers</name>
        </matchingType>
        <offers>
            <offer>
                <id type="integer">4536</id>
                <name type="string">AP DemoShop</name>
            </offer>
        </offers>
        <url type="string">http://my.service/postbacks/{eventType}/?offer={offer}&amp;sum={payment}</url>
    </postback>
</result>
3. Enable/disable a postback

Parameters:

Request example:

https://affpoint.net/en/apiWmPostbacks/enable/?key=KEY&format=xml&id=12345
https://affpoint.net/en/apiWmPostbacks/disable/?key=KEY&format=xml&id=12345

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <postback>
        ...current state of the postback
    </postback>
</result>
4. Get the list of postback delivery failures

Parameters:

Request example:

https://affpoint.net/en/apiWmPostbacks/failures/?key=KEY&format=xml

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <page type="integer">1</page>
    <totalPages type="integer">1</totalPages>
    <failures>
        <failure>
            <id type="integer">60660</id>
            <postback type="integer">12345</postback>
            <date type="string">2018-08-13 20:57:07</date>
            <action>
                <uniqueId type="string">1111222233334444aaaaffff</uniqueId>
                <offer>
                    <id type="integer">4536</id>
                    <name type="string">AP DemoShop</name>
                </offer>
                <aim>
                    <id type="integer">7890</id>
                    <name type="string">Purchase</name>
                </aim>
                <apid type="string">order_2131</apid>
            </action>
            <error type="string">Non-200 HTTP response code</error>
            <log type="string">
                ...delivery details...
            </log>
        </failure>
    </failures>
</result>
5. Retry failed deliveries

Parameters:

Request example:

POST https://affpoint.net/en/apiWmPostbacks/retryPush/?key=KEY&format=xml

failures[]=10001&failures[]=10002&failures[]=10003

or

failures=10001,10002,10003

Response example:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <ok type="boolean">true</ok>
    <failures>
        <failure type="integer">10001</failure>
        <failure type="integer">10002</failure>
        <failure type="integer">10003</failure>
    </failures>
    <notFoundFailures />
</result>