Get Transactions

Returns conversion data on transaction level in JSON format.

GET:  https://api.wecantrack.com/api/v3/transactions

Authorisation

An API key is required for each call. You can find your API key here. The API key can be sent in the query string: /endpoint?api_key=abcdef12345 or through the header X-API-Key: abcdef12345

Throttle

In the response header you can find x-ratelimit-limit which tells you how many request per minute is allowed and x-ratelimit-remaining which tells you how many request you have left. Each API endpoint will have different rate limits depending on how expensive it is. If you surpassed these limits you will receive a 429 status code “Too Many Request”. In the response header you can use x-ratelimit-reset which contains a UNIX timestamp to know when you’re allowed to make API requests again.

Request
Query Parameters
Parameter
Data Type
Available Options
Required/Optional
Description
parameter
date_type
data type

String

available options
order_date or modified_date or click_date or validation_date or last_wct_update
required/optional

Required

description

To fetch all new and updated transactions please use last_wct_update as date_type

parameter
start_date
data type

Datetime format
Y-m-d\TH:i:s

available options
required/optional

Required

description
parameter
end_date
data type

Datetime format
Y-m-d\TH:i:s

available options
required/optional

Required

description
parameter
status
data type

Array

available options
pending and approved and declined
required/optional

Optional

description

Transaction status. Array data types can be chained like so

&status[]=pending&status=[]=approved

parameter
network_id
data type

String

available options
required/optional

Optional

description
parameter
network_account_id
data type

Integer

available options
required/optional

Optional

description
parameter
network_account_tags
data type

Array

available options
required/optional

Optional

description
parameter
website_id
data type

Integer

available options
required/optional

Optional

description

Website ID can be retrieved from the websites API endpoint

parameter
page
data type

Number

available options
Default 1
required/optional

Optional

description

Current page cursor

parameter
limit
data type

Number

available options
Maximum limit of 1000
required/optional

Optional

description

The total amount of Transactions per request.

Response
Header
Content-Type: application/json
200 Body - OK

Response Example

				
					{
    "current_page": 1,
    "data": [
    {
        "transaction_id": "XXXX",
        "last_wct_update": "2020-05-14 21:26:05",
        "modified_date": "2020-05-14 14:06:15",
        "user_network_account_id": XXX,
        "reference": "WCT200514135314e7x4d",
        "sub_ids": {
            "clickRef": "WCT200514135314e7x4d"
        },
        "sale_amount": "3.29",
        "commission_amount": "0.14",
        "sale_amount_euro": "3.29",
        "commission_amount_euro": "0.14",
        "currency_id": "EUR",
        "status": "approved",
        "order_date": "2020-05-14 14:06:15",
        "click_date": null,
        "validation_date": "2020-05-14 14:06:15",
        "advertiser_id": "XXXX",
        "advertiser_name": "XXXX",
        "decline_reason": null,
        "order_ref": null,
        "clickout_url": null,
        "click_metadata": {
            "title": "XXX",
            "webshop_name": "XXX"
        }
    }
    {},
    {},
    ...
    ],
    "first_page_url": "https://api.wecantrack.com/api/v3/transactions?api_key=XXX&date_type=order_date&start_date=2019-11-13T22%3A00%3A00&end_date=2019-11-14T21%3A59%3A59&page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "https://api.wecantrack.com/api/v3/transactions?api_key=XXX&date_type=order_date&start_date=2019-11-13T22%3A00%3A00&end_date=2019-11-14T21%3A59%3A59&page=1",
    "next_page_url": null,
    "path": "https://api.wecantrack.com/api/v3/transactions",
    "per_page": 1000,
    "prev_page_url": null,
    "to": 230,
    "total": 230
}