API get transactions list

From Wiki

Jump to: navigation, search

Contents

GET transactions (list)

Publishers and advertisers can pull individual transactions, to check the status of the transactions, to create own reports, and to pull additional information that can be shared between publishers and advertisers via clickref (from publisher to advertiser) and orderRef and custom parameters (from advertiser to publisher)

Who can use it

publishers and advertisers

How to call it

As an advertiser:

https://api.awin.com/advertisers/<yourAdvertiserId>/transactions/?
startDate=yyyy-MM-ddThh%3Amm%3Ass&endDate=yyyy-MM-ddThh%3Amm%3Ass&timezone=UTC&
dateType=transaction&status=pending&publisherId=<publisherIdForWhichToFilter>&accessToken=<addYourTokenHere>


Example:
https://api.awin.com/advertisers/1001/transactions/?startDate=2017-02-20T00%3A00%3A00&endDate=2017-02-21T01%3A59%3A59&timezone=UTC&accessToken=12345678-1234-1234-1234-123456789123

As a publisher:

https://api.awin.com/publishers/<yourPublisherId>/transactions/?
startDate=yyyy-MM-ddThh%3Amm%3Ass&endDate=yyyy-MM-ddThh%3Amm%3Ass&timezone=UTC&
dateType=transaction&status=pending&advertiserId=<advertiserIdForWhichToFilter>&accessToken=<addYourTokenHere>


Example:
https://api.awin.com/publishers/45628/transactions/?startDate=2017-02-20T00%3A00%3A00&endDate=2017-02-21T01%3A59%3A59&timezone=UTC&accessToken=12345678-1234-1234-1234-123456789123 (as a publisher)


Please note: the maximum date range between startDate and endDate currently supported is 31 days.

parameter format mandatory/optional
startDate yyyy-MM-ddThh:mm:ss mandatory
endDate yyyy-MM-ddThh:mm:ss mandatory
dateType transaction

validation

optional (falls back to "transaction" if not set)
timezone Europe/Berlin

Europe/Paris
Europe/London
Europe/Dublin
Canada/Eastern
Canada/Central
Canada/Mountain
Canada/Pacific
US/Eastern
US/Central
US/Mountain
US/Pacific
UTC

mandatory
publisherId 12345 or 12345,67890 for multiple ones optional, available for advertisers
advertiserId 12345 or 12345,67890 for multiple ones optional, available for publishers
status pending

approved
declined
deleted

optional
accessToken

Your access token as described in API authentication and authorization

optional


How the response looks

(please see "Conditional datafields" below for restrictions that might apply)

[
  {
    "id": 259630312,
    "url": "http://www.publisher.com",
    "advertiserId": 7052,
    "publisherId": 189069,
    "commissionSharingPublisherId": 55555,
    "siteName": "Publisher",
    "commissionStatus": "pending",
    "commissionAmount": {
      "amount": 5.59,
      "currency": "GBP"
    },
    "saleAmount": {
      "amount": 55.96,
      "currency": "GBP"
    },
    "ipHash": "-66667778889991112223",
    "customerCountry": "GB",
    "clickRefs": {
      "clickRef": "12345",
      "clickRef2": "22222",
      "clickRef3": "33333",
      "clickRef4": "44444",
      "clickRef5": "55555",
      "clickRef6": "66666"
    },
    "clickDate": "2017-01-23T12:18:00",
    "transactionDate": "2017-02-20T22:04:00",
    "validationDate": null,
    "type": "Commission group transaction",
    "declineReason": null,
    "voucherCodeUsed": true,
    "voucherCode": "example123",
    "lapseTime": 2454307,
    "amended": false,
    "amendReason": null,
    "oldSaleAmount": null,
    "oldCommissionAmount": null,
    "clickDevice": "Windows",
    "transactionDevice": "Windows",
    "publisherUrl": "http://www.publisher.com/search?query=dvds",
    "advertiserCountry": "GB",
    "orderRef": "111222333444",
    "customParameters": [
      {
        "key": "1",
        "value": "555666"
      },
      {
        "key": "2",
        "value": "example entry"
      },
      {
        "key": "3",
        "value": "LLLMMMNNN"
      }
    ],
    "transactionParts": [
      {
        "commissionGroupId": 12345,
        "amount": 44.76,
        "commissionAmount": 4.50,
        "commissionGroupCode": "DEFAULT",
        "commissionGroupName": "Default Commission"
      }
 
      {
 
        "commissionGroupId": 654321,
        "amount": 11.20,
        "commissionAmount": 1.50,
        "commissionGroupCode": "EXISTING",
        "commissionGroupName": "EXISTING" 
      }
 
 
    ],
    "paidToPublisher": false,
    "paymentId": 0,
    "transactionQueryId": 0,
    "originalSaleAmount": null
  },
 
(...)


Note that the field "lapseTime" is the conversion time in seconds

Conditional datafields

Some datafields are only available to either publishers or advertisers, or depend on additional settings.

datafield available for advertisers available for publishers
orderRef yes yes, if the publisher is activated to see it
clickRef yes yes
clickRef2 - clickRef6 no yes
customParameters yes yes, if the advertiser shares them with his publishers

Privacy

Due to new European legislation regarding how websites store information about you, AWIN is updating its privacy policy. You can see the new version of our policy here. If you would like to see the information we capture on this website, please click here for further details. In order to accept cookies on this site please click the 'I ACCEPT' button