listTransactions()

Please, notice that transactions are updating once per hour.

Parameters:

Name Type Description
publisherToken string You can find your publisher token at api-keys page.
offset integer From which offer you want to get results. Helpful in pagination.
limit integer Number of results you want to retrieve. E.g. if you want to display 10 offers per page, and you are on third, just set limit to 10 and offset to 20.
criteria object
-   associateEmail string Set an email address of the associate, to get the list of offers created by associate.
-   transactionId string Find specific transaction.
-   customerEmail string Filter by customer email.
-   offerId string Choose transactions of which offer you want to list e.g. A_123456789_FR
-   dateFrom string From when you want to get transactions, leave empty if you want to get all of them. Format: Unix Timestamp
-   dateTo string Until when you want to get transactions, leave empty if you want to get all of them. Format: Unix Timestamp
-   campaignId integer Choose transactions of which campaign you want to list e.g. 832934859
- required parameter

Request:

    [
    {
    "method": "listTransactions",
    "params": {
    "publisherToken": "YOUR_PUB_TOKEN",
    "offset": "0",
    "limit": "2",
    "criteria": {
    "associateEmail": "associate@email.com",
    "dateFrom": "1384927200",
    "dateTo": "1384999200"
    }
    },
    "jsonrpc": "2.0",
    "id": 1
    }
    ]

Response:

    [
    {
    "result": {
    "items": [
    {
    "transactionId": "T123123123",
    "transactionDate": "1375138990",
    "offerId": "A123123123_US",
    "offerType": "single",
    "offerTitle": "DATA",
    "offerPeriod": "",
    "publisherSiteName": null,
    "transactionPriceExclTax": "4.9900",
    "transactionCurrency": "USD",
    "contentExternalId": "0",
    "shortUrl": "http:\/\/cleeng.it\/link",
    "campaignId": null,
    "campaignName": "",
    "couponCode": "",
    "discountRate": "0.0000",
    "discountValue": "0.0000",
    "discountedOfferPrice": "4.9900",
    "offerCurrency": "USD",
    "applicableTax": "1.0479",
    "transactionPriceInclTax": "6.0379",
    "publisherEarnings": "4.4305",
    "publisherCurrency": "USD",
    "transactionPriceInPublisherCurrencyExclTax": "4.9900",
    "appliedExchangeRateCustomer": "1.0000",
    "customerId": "123123123",
    "customerEmail": "customer@email.com",
    "customerLocale": "en_US",
    "customerCountry": "US",
    "customerIpCountry": "United States",
    "customerCurrency": "USD",
    "privacy": "only-important",
    "paymentMethod": "visa",
    "referalUrl": "",
    "transactionExternalData": "",
    "publisherId": null,
    "distributorEarnings": null,
    "totalEarnings": null,
    "distributorCurrency": null,
    "transactionPriceInDistributorCurrencyExclTax": null
    },
    {
    "transactionId": "T123123123",
    "transactionDate": "1375135451",
    "offerId": "A123123123_US",
    "offerType": "single",
    "offerTitle": "TITLE",
    "offerPeriod": "",
    "publisherSiteName": null,
    "transactionPriceExclTax": "4.9900",
    "transactionCurrency": "USD",
    "contentExternalId": "0",
    "shortUrl": "http:\/\/cleeng.it\/link",
    "campaignId": null,
    "campaignName": "",
    "couponCode": "",
    "discountRate": "0.0000",
    "discountValue": "0.0000",
    "discountedOfferPrice": "4.9900",
    "offerCurrency": "USD",
    "applicableTax": "1.0479",
    "transactionPriceInclTax": "6.0379",
    "publisherEarnings": "4.4305",
    "publisherCurrency": "USD",
    "transactionPriceInPublisherCurrencyExclTax": "4.9900",
    "appliedExchangeRateCustomer": "1.0000",
    "customerId": "123123123",
    "customerEmail": "customer@email.com",
    "customerLocale": "en_US",
    "customerCountry": "US",
    "customerIpCountry": "United States",
    "customerCurrency": "USD",
    "privacy": "only-important",
    "paymentMethod": "visa",
    "referalUrl": "",
    "transactionExternalData": "",
    "publisherId": null,
    "distributorEarnings": null,
    "totalEarnings": null,
    "distributorCurrency": null,
    "transactionPriceInDistributorCurrencyExclTax": null
    }
    ],
    "totalItemCount": 1234
    },
    "id": "1",
    "error": null,
    "jsonrpc": "2.0"
    }
    ]

Example:

<?php
    $cleengApi = new Cleeng_Api();
    $cleengApi->setPublisherToken('PUBLISHER_TOKEN');

    $offerList = $cleengApi->listTransactions(
    array(//criteria
    'associateEmail' => 'associate@email.com',
    'dateFrom': '1384927200',
    'dateTo': '1384999200'
    ),
    0,//offset
    5 //limit
    );
    

Remember! you can always check it by yourself using API Console - listTransactions()

Back to Reporting