GET
/
reports
/
traffic_sources
curl --request GET \
  --url https://v2.firstpromoter.com/api/v2/company/reports/traffic_sources \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>'
[
  {
    "source": "<string>",
    "id": "<string>",
    "data": {
      "clicks_count": 123,
      "revenue_amount": 123,
      "promoter_earnings_amount": 123,
      "referrals_count": 123,
      "customers_count": 123,
      "sales_count": 123,
      "refunds_count": 123,
      "cancelled_customers_count": 123,
      "referrals_to_customers_cr": 123,
      "clicks_to_customers_cr": 123,
      "clicks_to_referrals_cr": 123
    },
    "sub_data": [
      {
        "period": "<string>",
        "id": "<string>",
        "data": {
          "clicks_count": 123,
          "revenue_amount": 123,
          "promoter_earnings_amount": 123,
          "referrals_count": 123,
          "customers_count": 123,
          "sales_count": 123,
          "refunds_count": 123,
          "cancelled_customers_count": 123,
          "referrals_to_customers_cr": 123,
          "clicks_to_customers_cr": 123,
          "clicks_to_referrals_cr": 123
        }
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Access token passed as a Bearer token in the Authorization header

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Example:

"acc_123456"

Query Parameters

columns
enum<string>[]
required

Fields to be included in the report

Available options:
clicks_count,
revenue_amount,
promoter_earnings_amount,
referrals_count,
customers_count,
sales_count,
refunds_count,
cancelled_customers_count,
referrals_to_customers_cr,
clicks_to_customers_cr,
clicks_to_referrals_cr
q
string

Search query string

group_by
enum<string>
required

Time period grouping

Available options:
day,
week,
month,
year
start_date
string
required

Start date for the report period

end_date
string
required

End date for the report period

sorting
object

Sorting parameters

Response

200
application/json
Successful response

The response is of type object[].