Salesforce

Publisher API: GET transactions (by ID)

« Go Back
Information
Publisher API: GET transactions (by ID)
All information about GET transactions (by ID) API call
Publisher-API-GET-transactions-byID
Details
Do you offer an API call to pull transactions by ID for a certain time frame?

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

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

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


Add the parameter 'accessToken' to provide your access key as described in How do I generate my Publisher API access token?
 
ParameterFormatMandatory/Optional
IDsnumeric, comma-separatedmandatory
timezoneEurope/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
showBasketProductsJSON arrayoptional

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",
        "trackedParts": [
          {
            "code": "DEFAULT",
            "amount": 44.76,
            "currency": GBP
       }
      ]
      }
 
      {
 
        "commissionGroupId": 654321,
        "amount": 11.20,
        "commissionAmount": 1.50,
        "commissionGroupCode": "EXISTING",
        "commissionGroupName": "EXISTING",
        "trackedParts": [
          {
            "code": "EXISTING",
            "amount": 11.20,
            "currency": GBP
       }
      ] 
      }
 
 
    ],
    "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.

DatafieldAvailable for advertisersAvailable for publishers
orderRefyesyes, if the publisher is activated to see it
clickRefyesyes
clickRef2 - clickRef6noyes
customParametersyesyes, if the advertiser shares them with his publishers
basketProductsyesyes, if the advertiser shares them with his publishers
Version Info
 
Needs Review
Published
Checked
English
Main Article Info
21/02/2022, 15:49
15/12/2022, 10:50
14,712
21/02/2022, 15:43
Translation Info
System info
Valentina Porro
Jesús Iglesias Berenguer

Powered by