Publisher API Documentation

Introduction

The official betterbusiness GmbH "Publisher API" allows users to track their affiliated transactions. The API key as well as your publisher ID is supplied by your betterbusiness GmbH contact person.

Endpoint & Authorization

The API endpoint is https://api.betterbusiness.com/publisher-api/v1/transactions/{publisher_id}.

To connect to this endpoint, your JSON POST request has to supply the X-AUTH-TOKEN header with your personal API token.

Requests

Answers

The API endpoint will return a JSON response with the following structure:

{
  "from": "2021-10-22",
  "to": "2021-10-22",
  "transactions": [
    {
      "id": "835286",
      "clickout_date": "2021-10-21 23:52:27",
      "transaction_date": "2021-10-22 00:06:23",
      "vendor": "Some Vendor",
      "product": "Some Product",
      "sub_id": null,
      "transaction_type": "signup"
    },
    {
      "id": "835287",
      "clickout_date": "2021-10-21 23:59:19",
      "transaction_date": "2021-10-22 00:12:15",
      "vendor": "Some Vendor",
      "product": "Some Other Product",
      "sub_id": "campaign122",
      "transaction_type": "sale"
    }
  ]
}

These values should be self-explanatory. However, it is important to note that while sales are commissioned, signups are not.

Simple Request

Sending an empty JSON object to the endpoint will return all of today's transactions.

{
}

The from Parameter

Specifying the from parameter will return all transactions from the given date up to one month after it.

{
  "from": "2021-10-22"
}

The to Parameter

The from parameter may be combined with the to parameter to specify a time span.

Important: Please mind that the maximum time span is one month.

{
  "from": "2021-10-22",
  "to": "2021-11-22"
}
© betterbusiness GmbH 2021