Analytics › Get clicks per day

Analytics

Get clicks per day

GET/api/{ORG}/analytics/chartPermalink

Answers the AnalyticsSeries.

Permission
Analytics · view
Plan
Plans that include the API: Pricing
Retry
Safe: a read changes nothing

Example request

bash
curl "https://console.brevily.com/api/NORTHWIND/analytics/chart" \  -H "x-api-key: brv_ak_7Fq2Lw9xK3" \  -H "x-api-secret: $BREVILY_SECRET"

Example answer

json
{  "days": 1,  "history": 1,  "from": "example",  "to": "example",  "zone": "example",  "series": [    {      "day": "example",      "clicks": 1,      "qrScans": 1,      "uniqueVisitors": 1    }  ],  "previous": [    {      "day": "example",      "clicks": 1    }  ]}

Made-up values.

PathPermalink

Path parameters
NameTypeRequiredDescriptionAllowed values
ORGstringrequiredYour organisation’s code.—

QueryPermalink

Query parameters
NameTypeRequiredDescriptionAllowed values
rangestringoptionalNarrows the answer: ?range=<value>, or ?range=eq:<value>.—
linkstringoptionalNarrows the answer: ?link=<value>, or ?link=eq:<value>.—
domainstringoptionalNarrows the answer: ?domain=<value>, or ?domain=eq:<value>.—
comparestringoptionalNarrows the answer: ?compare=<value>, or ?compare=eq:<value>.—
tagstringoptionalNarrows the answer: ?tag=<value>, or ?tag=eq:<value>.—
folderstringoptionalNarrows the answer: ?folder=<value>, or ?folder=eq:<value>.—
appstringoptionalNarrows the answer: ?app=<value>, or ?app=eq:<value>.—
bystringoptionalNarrows the answer: ?by=<value>, or ?by=eq:<value>.—
monthstringoptionalNarrows the answer: ?month=<value>, or ?month=eq:<value>.—
daystringoptionalNarrows the answer: ?day=<value>, or ?day=eq:<value>.—
campaignstringoptionalNarrows the answer: ?campaign=<value>, or ?campaign=eq:<value>.—
sourcestringoptionalNarrows the answer: ?source=<value>, or ?source=eq:<value>.—
mediumstringoptionalNarrows the answer: ?medium=<value>, or ?medium=eq:<value>.—
qstringoptionalA search term.—

AnswerPermalink

AnalyticsSeries

Answer fields
NameTypeDescriptionAllowed values
daysintegerThe days reported, in the organisation’s time zone: the range asked for, cut to what the plan keeps (0: it keeps none).—
historyintegerThe days of daily totals the plan keeps; null for unlimited.or null
fromstringThe first day, YYYY-MM-DD (the organisation’s time zone).—
tostringThe last day, YYYY-MM-DD (the organisation’s time zone), today.—
zonestringThe IANA time zone the days are counted in: the organisation’s, or UTC when it set none.—
seriesReportDay[]One entry per day, oldest first.—
previousPreviousDay[]The period before, a day per day of series (compare=1); null when not asked for.or null
Fields of series
Fields of series
NameTypeDescriptionAllowed values
daystringThe day, YYYY-MM-DD, in the organisation’s time zone.—
clicksintegerHuman clicks that day.—
qrScansintegerOf them, QR scans.—
uniqueVisitorsintegerUnique visitors that day.—
Fields of previous
Fields of previous
NameTypeDescriptionAllowed values
daystringThe day, the range’s length before the series’ day.—
clicksintegerHuman clicks that day; null for a day the plan no longer keeps.or null

ErrorsPermalink

Errors
Status Code When
400 VALIDATION_FAILED A field, a parameter or the body is wrong; details.fields says which.
401 UNAUTHENTICATED No key, a key that does not match, or one expired or revoked.
403 ACCESS_DENIED The key lacks Analytics · view, or the organisation’s plan does not include it.
404 NOT_FOUND No organisation with that code for this key, or no such record in it.
429 RATE_LIMITED Too many calls: wait Retry-After seconds.

Rate limitsPermalink

Counted with every other call of the organisation, by plan: Pricing. The answer carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset; more on rate limits.