EUlabel
API Reference

Analytics

Retrieve scan analytics for products.

Retrieve scan analytics for products.

Get scan analytics

GET
/analytics/product/{productId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication. Pass your key in the Authorization header: Authorization: Bearer sk_live_...

In: header

Path Parameters

productId*string

Unique product identifier.

Formatuuid

Query Parameters

start?string

Start of analytics window (defaults to 90 days ago).

Formatdate
end?string

End of analytics window (defaults to today).

Formatdate
granularity?string

Time bucket granularity for scansByDay.

Value in"day" | "week" | "month"

Response Body

application/json

application/json

application/json

curl -X GET "https://api.eulabel.eu/v1/analytics/product/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "productId": "dcd53ddb-8104-4e48-8cc0-5df1088c6113",
  "period": {
    "start": "2019-08-24T14:15:22Z",
    "end": "2019-08-24T14:15:22Z"
  },
  "totalScans": 0,
  "uniqueCountries": 0,
  "locations": {
    "property1": 0,
    "property2": 0
  },
  "topReferrers": [
    {
      "domain": "string",
      "scans": 0
    }
  ],
  "devices": {
    "mobile": 0,
    "desktop": 0,
    "tablet": 0
  },
  "scansByDay": [
    {
      "date": "2019-08-24",
      "scans": 0
    }
  ]
}
{
  "error": {
    "type": "authentication_error",
    "message": "Invalid API key",
    "code": "authentication_error"
  }
}
{
  "error": {
    "type": "not_found",
    "message": "Resource not found",
    "code": "not_found"
  }
}