Purchase data

Retrieve information about the purchases made on your site

For our premium customers we offer the opportunity to retrieve information directly from our APIs. This gives the publisher an automated way to get all information about the purchases made on their site. To get access to this feature contact your Tipser CAM or send and email to support@tipser.com.

Introduction

The API is accessed via a HTTP GET and returns a paginated response containing JSON formatted data. The parameters and the response is described on this page.

Example url

https://t3-prod-api.tipser.com/v3/commissions?apikey=&from=2017-04-13&to=2017-10-13&pageSize=500&pageIndex=0

URL parameters

apikey

Authentication key that you get from Tipser

from

Date specifying start of search interval, format YYYY-MM-DD

to

Date specifying end of search interval, format YYYY-MM-DD

pageSize

number of entries per page, integer

pageIndex

Index of the page to download, integer

Example response

Example response with comments

{
  "commissionsSummary": {
    "availableCommission": 0,
    "availableCommissionIncVat": 0,
    "totalCommission": 0,
    "totalCommissionIncVat": 0,
    "itemsSold": 0,
    "currency": "SEK"
  },
  "currency": "SEK",
  "owner": "59c265406dba4222d81cbe57", //Id of user in tipser
  "ownerName": "API TEST",
  "totalPages": 1,
  "states": { // The commission can be in one of the following states
    "0": "Pending", //Order not yet shipped
    "1": "Processed", //Commission ready to be payed out
    "2": "Rejected", //Order cancelled
    "3": "ReadyForApproval", //Order still refundable by customer
    "4": "Paid", //Commission payed out
    "5": "ToRepay", 
    "6": "Repaid"
  },
  "commissions": {
    "items": [{
        "id": "59c26b77b8f3f651cc129d01",
        "creationDate": "2017-09-20T13:21:59.131Z",
        "modifiedDate": "2017-09-20T13:21:59.131Z",
        "commission": 10, //Commission earned
        "commissionIncVat": 12.5,
        "state": 0,
        "stateName": "Pending",
        "item": { //Product data
          "name": "Unlock Doormat",
          "productId": "58aaca496068934facd95ee1",
          "brandName": "Tipser",
          "merchantName": "Tipser",
          "quantity": 1,
          "variant": "[small]",
          "attributes": [
            "small"
          ],
          "orderId": "59c26b77b8f3f651cc129cfd",
          "amount": 100, //Customer price
          "amountIncVat": 125, //Customer inc VAT
          "total": 100,
          "totalIncVat": 125,
          "orderItemId": "59c26b77b8f3f651cc129cfc",
          "networkPercentage": 0.1 //Commission rate on this product,
          "posData": "{\"v\":1,\"cid\"...}"
        },
        "customer": { //Customer information
          "name": "Test User",
          "firstName": "Test",
          "lastName": "User",
          "email": "test@tipser.com",
          "phone": "070 123 45 67",
          "streetName": "Testgatan 1",
          "postalCode": "12345",
          "postalAddress": "Stockholm",
          "country": "se"
        }
      },
      {
        "id": "59c26b77b8f3f651cc129cfe",
        "creationDate": "2017-09-20T13:21:59.104Z",
        "modifiedDate": "2017-09-20T13:21:59.104Z",
        "commission": 32.8,
        "commissionIncVat": 41,
        "state": 0,
        "stateName": "Pending",
        "item": {
          "name": "BADGER HAIR SHAVING BRUSH",
          "productId": "54490fbd784155120c94e90c",
          "brandName": "CASTELBEL",
          "merchantName": "Tipser",
          "quantity": 1,
          "variant": "[]",
          "attributes": [],
          "orderId": "59c26b77b8f3f651cc129cfd",
          "amount": 328,
          "amountIncVat": 410,
          "total": 328,
          "totalIncVat": 410,
          "orderItemId": "59c26b77b8f3f651cc129cfb",
          "networkPercentage": 0.1,
          "posData": "{\"v\":1,\"cid\":\"1587579000.1487942410\",\"tid\":\"UA-00076213-0\",\"sc\":\"end\",\"aip\":1,\"sr\":\"414x736\",\"dh\":\"tipser.com\",\"cd66\":\"measurement-protocol\",\"cd51\":\"levabo\",\"cd5\":\"mobile web\",\"cd6\":\"tipser\"}"
        },
        "customer": {
          "name": "Test User",
          "firstName": "Test",
          "lastName": "User",
          "email": "test@tipser.com",
          "phone": "070 123 45 67",
          "streetName": "Testgatan 1",
          "postalCode": "12345",
          "postalAddress": "Stockholm",
          "country": "se"
        }
      }
    ],
    "pageIndex": 0,
    "itemCount": 2
  }
}