Get top ecommerce products REST API
GET
/api/sites/{id}/ecommerce/products
const url = 'https://app.hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ecommerce/products';const options = {method: 'GET', headers: {cookie: 'hk_token=<hk_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://app.hitkeep.com/api/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ecommerce/products \ --cookie hk_token=<hk_token>Returns top products by revenue from purchase events.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Query Parameters
Section titled “Query Parameters”from
string format: date-time
to
string format: date-time
filter
string
Filter in form type:value (repeatable). Supported types: path, hostname, referrer, referrer_host, device, country, city, provider, asn, browser, language, utm_campaign, utm_content, utm_medium, utm_source, utm_term, qr_code_id.
filter_type
string
filter_value
string
item_id
string
item_name
string
limit
integer
Responses
Section titled “Responses”Ecommerce products
Media typeapplication/json
Array<object>
object
item_id
string
item_name
string
orders
integer
quantity
integer
revenue
number
Examplegenerated
[ { "item_id": "example", "item_name": "example", "orders": 1, "quantity": 1, "revenue": 1 }]