Skip to main content
POST
/
v1
/
reports
/
referrals
Get Referrals Report
curl --request POST \
  --url https://api.tryprofound.com/v1/reports/referrals \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "metrics": [
    "visits"
  ],
  "domain": "<string>",
  "start_date": "2023-11-07T05:31:56Z",
  "date_interval": "day",
  "dimensions": [],
  "order_by": {},
  "pagination": {
    "limit": 10000,
    "offset": 0
  },
  "end_date": "2023-11-07T05:31:56Z",
  "filters": [
    {
      "field": "<string>",
      "operator": "is",
      "value": "<string>"
    }
  ]
}
'
{
  "info": {
    "total_rows": 123,
    "query": {}
  },
  "data": [
    {
      "metrics": [
        123
      ],
      "dimensions": [
        "<string>"
      ]
    }
  ]
}

Authorizations

X-API-Key
string
header
required

Body

application/json
metrics
enum<string>[]
required
Available options:
visits,
last_visit
domain
string
required

Domain to query logs for.

start_date
string<date-time>
required

Start date for logs. Accepts: YYYY-MM-DD, YYYY-MM-DD HH:MM, YYYY-MM-DD HH:MM:SS, or full ISO timestamp.

date_interval
enum<string>
default:day

Date interval for the report. (only used with date dimension)

Available options:
day,
week,
month,
year
dimensions
enum<string>[]

Dimensions to group the report by.

Available options:
date,
path,
referral_source
order_by
Order By · object

Custom ordering of the report results.

The order is a record of key-value pairs where:

  • key is the field to order by, which can be a metric or dimension
  • value is the direction of the order, either 'asc' for ascending or 'desc' for descending.

When not specified, the default order is the first metric in the query descending.

Example:
{ "date": "asc" }
pagination
Pagination · object

Pagination settings for the report results.

end_date
string<date-time>

End date for logs. Accepts same formats as start_date. Defaults to now if omitted.

filters
(PathFilter · object | ReferralSourceFilter · object)[]

Filters for referrals report.

Filter by request path

Response

Successful Response

Base response model for reports.

info
Info · object
required

Base model for report information.

data
Result · object[]
required