API get transactions ids

From Wiki

Jump to: navigation, search

Contents

GET transactions (by ID)

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). In addition to pulling transactions for a certain time frame, transactions can also be pulled by their IDs.

Who can use it

publishers and advertisers

How to call it

As an advertiser:

https://api.awin.com/advertisers/<yourAdvertiserId>/transactions/?
ids=<idOfTheTransaction>&timezone=UTC


Example:
http://api.awin.com/advertisers/1001/transactions/?ids=1234567%2C7654321&timezone=UTC


As a publisher:

https://api.awin.com/publishers/<yourPublisherId>/transactions/?
ids=<idOfTheTransaction>&timezone=UTC


Example:
http://api.awin.com/publishers/45628/transactions/?ids=1234567%2C7654321&timezone=UTC


Add the parameter 'accessToken' to provide your access key as described in API authentication and authorization.


parameter format mandatory/optional
ids numeric, comma-separated mandatory
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

optional, default is UTC
showBasketProducts JSON array 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,
    "commissionSharingSelectedRatePublisherId": 189069,
    "campaign": "campaign name"
    "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
  },
    "basketProducts": null
}]


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

Basket Products

If &showBasketProducts=true then products sent via Product Level Tracking matched to the transaction can be viewed
(please see "Conditional datafields" below for restrictions that might apply)

"basketProducts": [
      {
        "productId": "12345678",
        "productName": "Product Name",
        "unitPrice": 10.10,
        "quantity": 1,
        "skuCode": "98F65K37",
        "commissionGroupCode": "DEFAULT",
        "category": "Category Name"
      }
    ]

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
basketProducts 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