Avia - Dashboard API (1.6.0)

Download OpenAPI specification:

Official OpenAPI specification for the Avia Dashboard API.

Use this API to fetch dashboard data for one or all stores using Avia.

Authentication: All API tokens are generated and obtained through the Shopify app. Do not use this API to obtain or manage tokens; use the Avia app installed in your Shopify store to generate and manage your API key. Send the API key in the X-API-Key header on each request.

Rate limit: The current version of the API has a rate limit of 1 request per hour per client. Plan your integrations accordingly.

Response formats:

  • All endpoints return a JSON payload
  • 200: Successful response
  • 400: Validation errors
  • 401: Authentication errors
  • 404: Not found errors
  • 422: Validation error (invalid parameters)

Claude / MCP access: Every endpoint above (except /health/) is also exposed as an MCP (Model Context Protocol) tool, so you can ask an LLM like Claude natural-language questions about your dashboard data instead of calling this API directly. The MCP server is hosted at https://mcp.avia-app.cloud/mcp and forwards your X-API-Key unmodified to this API — it stores no credentials itself. Connect with the Claude Code CLI:

claude mcp add --transport http avia-mcp https://mcp.avia-app.cloud/mcp \
  -H "X-API-Key: <your Avia dashboard API key>" \
  -H "X-Shopify-Domain: <your-shop>.myshopify.com"

The X-Shopify-Domain header is an optional default so you don't have to repeat your shop domain in every question; omit it to specify shopify_domain per request instead. For Claude Desktop or other MCP clients without custom-header support on remote connections, use the mcp-remote bridge — see github.com/Retailogists/avia-api-mcp for setup details and the full tool list.

health

Service health check

Service health

Returns service health status. No authentication required.

Responses

Response samples

Content type
application/json
null

Per Store

Endpoints scoped to a specific store (client + one location)

Key metrics (per store)

Returns key dashboard metrics for this store only (same shape as all-stores summary). Traffic and session metrics from BigQuery; CVR, AOV, and revenue per visitor from ShopifyQL. Defaults to yesterday when startDate and endDate are omitted.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when the store was open. The time range spans from the earliest opening hour to the latest closing hour across all days of the week (e.g., if open 9am-7pm Mon-Fri and 8am-3pm weekends, the range will be 8am-7pm).

Responses

Response samples

Content type
application/json
{
  • "uniqueVisitors": 0,
  • "total_visitors": 0,
  • "dwellTimeSeconds": 0,
  • "averageDailyTraffic": 0,
  • "startDate": "string",
  • "endDate": "string",
  • "cvr_unique": 0,
  • "cvr_total": 0,
  • "revenue_per_visitor_unique": 0,
  • "revenue_per_visitor_total": 0,
  • "aov": 0,
  • "totalSales": 0,
  • "totalOrders": 0,
  • "operatingHours": {
    },
  • "storeTimezone": "string"
}

Full dashboard (per store)

Return the full dashboard payload for a single store location.

Includes demographics, heatmaps, opportunity-loss table, anomalies, and forecasts. Same data shape as the all-stores dashboard, filtered to this location. Defaults to yesterday when dates are omitted.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when the store was open. The time range spans from the earliest opening hour to the latest closing hour across all days of the week (e.g., if open 9am-7pm Mon-Fri and 8am-3pm weekends, the range will be 8am-7pm).

string or null

Comparison period type. "dod" compares current period data to the previous day, "wow" compares to the previous week. Defaults to "wow".

Responses

Response samples

Content type
application/json
{
  • "gender": [
    ],
  • "age": [
    ],
  • "ageByGender": [
    ],
  • "periodConversionRate": 0,
  • "visitorsPerRevenue": 0,
  • "cvr": 0,
  • "dailyTraffic": [
    ],
  • "heatmap": [
    ],
  • "dailyAverages": {
    },
  • "heatmapDailyTotals": [
    ],
  • "locations": [
    ],
  • "startDate": "string",
  • "endDate": "string",
  • "applyOperatingHours": true,
  • "forecastResult": [ ],
  • "forecastUpliftResult": [ ],
  • "dwellTimeSeconds": 0,
  • "uniqueVisitors": 0,
  • "anomaliesVisitsHourly": [ ],
  • "anomaliesVisits4h": [ ],
  • "anomaliesCvrHourly": [ ],
  • "anomaliesCvr4h": [ ],
  • "opportunityLossData": [ ],
  • "comparisonPeriod": "string",
  • "comparisonWeightedTotals": { },
  • "extraDevices": [ ]
}

List devices for a store

Returns the list of registered devices for the specified store.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

Responses

Response samples

Content type
application/json
{
  • "devices": [
    ]
}

Daily traffic over time (per store)

Same as all-stores GET /api/{shopify_domain}/visits with locationId set: three parallel BigQuery series (dup uniques, dup row counts, normalized in_count), merged dailyUnique and dailyTraffic as sorted [{date, traffic}, ...].

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null
Default: "true"

If true, filters results to only include hours when the store was open.

Responses

Response samples

Content type
application/json
{
  • "dailyUnique": [
    ],
  • "dailyTraffic": [
    ],
  • "startDate": "string",
  • "endDate": "string",
  • "locationId": "string",
  • "applyOperatingHours": true
}

Traffic Forecast

Predicts the rolling 14-day forecasted traffic per hour per store starting with today's date. Operating hours are always applied automatically; data is filtered to only include hours when the store is open.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

Responses

Response samples

Content type
application/json
{
  • "traffic_forecast_hourly": {
    },
  • "traffic_forecast_4h": {
    },
  • "insight": { },
  • "accuracy": 100
}

Visit Anomalies

Returns detected visit anomalies with hourly and 4-hour bucket groupings for the specified store. Each anomaly includes the anomaly value (integer) and type ('positive' or 'negative').

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when the store was open. The time range spans from the earliest opening hour to the latest closing hour across all days of the week (e.g., if open 9am-7pm Mon-Fri and 8am-3pm weekends, the range will be 8am-7pm).

Responses

Response samples

Content type
application/json
{
  • "anomalies_visits_hourly": {
    },
  • "anomalies_visits_4h": {
    }
}

Conversion Rate (CVR) Anomalies

Returns detected conversion rate (CVR) anomalies with hourly and 4-hour bucket groupings for the specified store. CVR is expressed as a percentage. Each anomaly includes the anomaly value (CVR percentage as integer) and type ('positive' or 'negative').

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when the store was open. The time range spans from the earliest opening hour to the latest closing hour across all days of the week (e.g., if open 9am-7pm Mon-Fri and 8am-3pm weekends, the range will be 8am-7pm).

Responses

Response samples

Content type
application/json
{
  • "anomalies_cvr_hourly": {
    },
  • "anomalies_cvr_4h": {
    }
}

Stockout Alerts - Top products with inventory and projections

Returns stockout alerts for a location: top products and variants with inventory and 14-day demand projections. Response includes success, shop, serverTime, received (locationId), averageCvr14d, cvr14dDetails, dailyCvr14d, dailyTraffic14d, forecastDailyVisits14d, expectedOrdersByDate14d, expectedProductOrdersByDate14dByProductId, expectedUnitsDemandByDate14dByProductId, stockoutProjectionByProductId, totalUnitsSoldAllVariants14d, topVariants, and topProducts. See StockoutAlertsResponseSchema for the full response shape.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

shopify_location_id
required
integer

Shopify location ID for the store.

query Parameters
string or null

Start date (YYYY-MM-DD).

string or null

End date (YYYY-MM-DD).

string or null

If true, filters results to only include hours when the store was open.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "shop": "string",
  • "serverTime": "string",
  • "received": {
    },
  • "averageCvr14d": 0,
  • "cvr14dDetails": {
    },
  • "dailyCvr14d": [
    ],
  • "dailyTraffic14d": [
    ],
  • "forecastDailyVisits14d": [
    ],
  • "expectedOrdersByDate14d": {
    },
  • "expectedProductOrdersByDate14dByProductId": {
    },
  • "expectedUnitsDemandByDate14dByProductId": {
    },
  • "expectedSalesByDate14dByProductId": { },
  • "stockoutProjectionByProductId": {
    },
  • "totalUnitsSoldAllVariants14d": 0,
  • "topVariants": [
    ],
  • "topProducts": [
    ]
}

All Stores

Endpoints that aggregate data across all store locations for a merchant (client)

List client stores

Returns all stores (locations) for the specified client.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

Responses

Response samples

Content type
application/json
{
  • "stores": [
    ]
}

List registered entrance devices for all stores (client-wide)

List registered entrance devices across every store for the client, for use by UI location/device pickers. Excludes POS devices (same scope as the serial numbers fed into BigQuery traffic queries) and unregistered devices. Pair a device's id with its locationId as the deviceId query param on /summary, /summary/full, /opportunity-loss, /demographics, /visits, and /heatmap.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

Responses

Response samples

Content type
application/json
{
  • "devices": [
    ]
}

Dashboard locations (id, name, active)

Returns locations in the same format the dashboard expects: list of { id, name, active }. Only includes stores that have at least one registered (ENTRANCE) traffic device; active is true when the location has at least one active license. hasActiveLicenses is true when at least one returned location is active.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

Responses

Response samples

Content type
application/json
{
  • "locations": [
    ],
  • "hasActiveLicenses": true
}

Performance metrics per locationId

Returns key dashboard metrics for each requested locationId, computed in parallel. Each result pairs a location_id with a data object holding the same kind of metrics as /summary, plus store-economics ratios (revenue per store size, revenue per rent, traffic-to-rent) when store size/rent are configured — those ratio fields are null otherwise. Also includes sales_per_hour (gross sales for the period divided by the store's total operating hours in that period, from its configured store_hours schedule — not staff/labor hours); null when the store has no operating-hours schedule configured, or when it was closed the whole period.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
locationId
required
Array of strings non-empty

One or more Shopify location IDs. Repeat the parameter (locationId=1&locationId=2).

string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null
Default: "true"

If true, filters results to only include hours when the store was open.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Key metrics (aggregate across all stores)

Returns key dashboard metrics aggregated across all stores for the specified client, or for a single store when locationId is set. Traffic and session metrics from BigQuery; CVR, AOV, and revenue per visitor from ShopifyQL. Defaults to yesterday when startDate and endDate are omitted.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
Array of strings or null

One or more Shopify location IDs. When exactly one is given, the response is scoped to that store; omit for all locations.

integer or null

Narrow to a single registered entrance device (its internal id, from /stores/{shopify_location_id}/devices) at the store. Only honored when locationId resolves to exactly one store; ignored otherwise.

string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when stores were open. The time range spans from the earliest opening hour to the latest closing hour across all days of the week.

Responses

Response samples

Content type
application/json
{
  • "uniqueVisitors": 0,
  • "total_visitors": 0,
  • "dwellTimeSeconds": 0,
  • "averageDailyTraffic": 0,
  • "startDate": "string",
  • "endDate": "string",
  • "cvr_unique": 0,
  • "cvr_total": 0,
  • "revenue_per_visitor_unique": 0,
  • "revenue_per_visitor_total": 0,
  • "aov": 0,
  • "totalSales": 0,
  • "totalOrders": 0,
  • "operatingHours": {
    },
  • "storeTimezone": "string"
}

Age and gender: unique visitors (*Unique) vs all duplicate rows (*Total)

Two breakdowns: unique visitors (genderUnique, ageUnique, ageByGenderUnique)—latest enter per visitor key (global_id + local date + camera SN)—and all duplicate rows (genderTotal, ageTotal, ageByGenderTotal), one count per device_duplicates_normalized row. Empty views are filled from in_count on device_events_normalized with the same filters as dashboard traffic.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
Array of strings or null

One or more Shopify location IDs. Repeat the parameter or comma-separate within a value. Omit for all locations.

integer or null

Narrow to a single registered entrance device (its internal id, from /stores/{shopify_location_id}/devices) at the store. Only honored when locationId resolves to exactly one store; ignored otherwise.

string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null
Default: "true"

If true, filters results to only include hours when the store(s) were open.

Responses

Response samples

Content type
application/json
{
  • "genderUnique": [
    ],
  • "ageUnique": [
    ],
  • "ageByGenderUnique": [
    ],
  • "genderTotal": [
    ],
  • "ageTotal": [
    ],
  • "ageByGenderTotal": [
    ],
  • "startDate": "string",
  • "endDate": "string",
  • "locationId": "string",
  • "applyOperatingHours": true
}

Full dashboard (aggregate across all stores)

Returns the full dashboard payload expected by the Shopify app frontend. All data (locations, user tier, shop info, summary, heatmaps, revenue, anomalies, opportunity loss) is computed here. Scoped to a single store when exactly one locationId is given, otherwise aggregated across all stores for the client.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
Array of strings or null

One or more Shopify location IDs. When exactly one is given, the response is scoped to that store.

string or null

Metric to display in the heatmap. Defaults to visits.

string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when stores were open. Defaults to true.

string or null

Comparison period type. "dod" compares to the previous day, "wow" to the previous week. Defaults to wow.

Responses

Response samples

Content type
application/json
{
  • "gender": [
    ],
  • "age": [
    ],
  • "ageByGender": [
    ],
  • "revenue": {
    },
  • "dailyTraffic": [
    ],
  • "heatmap": {
    },
  • "rawHeatmapData": [
    ],
  • "dailyTotals": [
    ],
  • "heatmapDailyTotals": [
    ],
  • "allHeatmapData": { },
  • "locations": [
    ],
  • "shop": "string",
  • "startDate": "string",
  • "endDate": "string",
  • "locationId": "string",
  • "heatmapMetric": "visits",
  • "operatingHours": { },
  • "applyOperatingHours": true,
  • "failedDevices": [
    ],
  • "hasActiveLicenses": true,
  • "activeDeviceCount": 0,
  • "validDeviceCount": 0,
  • "totalRegisteredDeviceCount": 0,
  • "userTier": "string",
  • "forecastResult": { },
  • "forecastUpliftResult": { },
  • "dwellTimeSeconds": 0,
  • "uniqueVisitors": 0,
  • "anomaliesVisitsHourly": [ ],
  • "anomaliesVisits4h": [ ],
  • "anomaliesCvrHourly": [ ],
  • "anomaliesCvr4h": [ ],
  • "opportunityLossData": [ ],
  • "comparisonPeriod": "dod",
  • "comparisonWeightedTotals": { },
  • "shopInfo": {
    },
  • "extraDevices": [ ]
}

Daily traffic over time (for traffic chart)

Three parallel BigQuery loads (same camera / date / operating-hours filters):

  • dailyUniqueByGlobalId — distinct visitor key (global_id + local date + camera SN) per day (summed across cameras) from device_duplicates_normalized.
  • dailyDuplicateTableRowsCOUNT(*) per day on device_duplicates_normalized (no per-visitor deduplication).
  • dailyNormalizedTraffic — summed in_count per day from device_events_normalized.

dailyUnique / dailyTraffic — sorted lists of { "date", "traffic" } merged from the above (unique ↔ normalized; dup rows ↔ merged unique). Raw series dailyUniqueByGlobalId, dailyDuplicateTableRows, dailyNormalizedTraffic are unchanged.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
Array of strings or null

One or more Shopify location IDs. Repeat the parameter or comma-separate within a value. Omit for all locations.

integer or null

Narrow to a single registered entrance device (its internal id, from /stores/{shopify_location_id}/devices) at the store. Only honored when locationId resolves to exactly one store; ignored otherwise.

string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null
Default: "true"

If true, filters results to only include hours when the store(s) were open.

Responses

Response samples

Content type
application/json
{
  • "dailyUnique": [
    ],
  • "dailyTraffic": [
    ],
  • "startDate": "string",
  • "endDate": "string",
  • "locationId": "string",
  • "applyOperatingHours": true
}

Heatmap data (all metrics, same as dashboard)

Return heatmap payload in the same format as the full dashboard: heatmap, rawHeatmapData, heatmapDailyTotals, allHeatmapData (visits, cvr, aov, combined), forecastResult, forecastUpliftResult, operatingHours, etc. Single-store or aggregate depending on whether exactly one locationId is provided.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
Array of strings or null

One or more Shopify location IDs. When exactly one is given, the response is scoped to that store; otherwise aggregated across all locations.

integer or null

Narrow to a single registered entrance device (its internal id, from /stores/{shopify_location_id}/devices) at the store. Only honored when locationId resolves to exactly one store; ignored otherwise.

string or null
Default: "visits"

Metric to display in the heatmap. Defaults to visits.

string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null
Default: "true"

If true, filters results to only include hours when the store(s) were open.

Responses

Response samples

Content type
application/json
{
  • "heatmap": {
    },
  • "rawHeatmapData": [
    ],
  • "dailyTotals": [
    ],
  • "heatmapDailyTotals": [
    ],
  • "allHeatmapData": { },
  • "forecastResult": { },
  • "forecastUpliftResult": { },
  • "operatingHours": { },
  • "startDate": "string",
  • "endDate": "string",
  • "heatmapMetric": "visits",
  • "locationId": "string",
  • "applyOperatingHours": true
}

Heatmap by location (multiple stores)

Returns a JSON object keyed by Shopify locationId, where each value matches the payload from GET /api/{shopify_domain}/heatmap?locationId=... (heatmap, rawHeatmapData, dailyTotals, heatmapDailyTotals, allHeatmapData, forecastResult, operatingHours, etc.).

  • locationId: repeat per store, e.g. ?locationId=1&locationId=2. Comma-separated values in a single parameter are also accepted.
  • startDate / endDate: required (YYYY-MM-DD).
  • applyOperatingHours: accepted but ignored — this endpoint always forces operating-hours filtering OFF (false), regardless of the value passed.
  • heatmapMetric: visits | cvr | aov | combined (default visits).

Non-numeric location IDs yield an empty heatmap/heatmapDailyTotals payload for that key.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
locationId
required
Array of strings non-empty

One or more Shopify location IDs. Repeat the parameter (locationId=1&locationId=2) or comma-separate within a value.

startDate
required
string^\d{4}-\d{2}-\d{2}$

Start date (YYYY-MM-DD).

endDate
required
string^\d{4}-\d{2}-\d{2}$

End date (YYYY-MM-DD).

string or null
Default: "false"

Accepted but ignored; this endpoint always disables operating-hours filtering.

string or null
Default: "visits"

Metric for the reduced heatmap and daily totals. Defaults to visits.

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Historical heatmap per locationId (calendar dates, not weekday aggregates)

Returns a JSON object keyed by Shopify locationId, where each value is { rawHeatmapData, startDate, endDate, locationId }. Unlike /heatmap/by-location, rawHeatmapData rows are keyed by real calendar date (YYYY-MM-DD) + hour instead of weekday + hour, so one range request returns actual daily history rather than a 7-weekday rollup.

  • locationId: repeat per store, e.g. ?locationId=1&locationId=2. Comma-separated values in a single parameter are also accepted.
  • startDate / endDate: required (YYYY-MM-DD).
  • Always ignores operating-hours filtering (same as /heatmap/by-location), regardless of any applyOperatingHours value — there is no such parameter on this endpoint.
  • orders/sales come from ShopifyQL and default to 0/0.0 when ShopifyQL data is absent; rows with orders == 0 from refund-only lines are filtered out upstream (same rule as the weekday-grouped heatmap endpoints).
Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
locationId
required
Array of strings non-empty

One or more Shopify location IDs. Repeat the parameter (locationId=1&locationId=2) or comma-separate within a value.

startDate
required
string^\d{4}-\d{2}-\d{2}$

Start date (YYYY-MM-DD).

endDate
required
string^\d{4}-\d{2}-\d{2}$

End date (YYYY-MM-DD).

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Opportunity loss and comparison (same filters as dashboard)

Returns opportunity loss data for the given date range and filters. Same semantics as /dashboard: startDate, endDate, locationId (optional), applyOperatingHours, comparisonPeriod ("wow" or "dod").

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

Array of strings or null

Optional location ID(s) to scope the query. Repeat the parameter for multiple locations; omit for all locations.

integer or null

Narrow to a single registered entrance device (its internal id, from /stores/{shopify_location_id}/devices) at the store. Only honored when locationId resolves to exactly one store; ignored otherwise.

string or null
Default: "true"

If true, filters results to only include hours when the store(s) were open.

string or null
Default: "wow"

Comparison period type. "dod" compares to the previous day, "wow" to the previous week. Defaults to "wow".

Responses

Response samples

Content type
application/json
{
  • "opportunityLossData": [
    ],
  • "comparisonPeriod": "dod",
  • "comparisonWeightedTotals": { },
  • "startDate": "string",
  • "endDate": "string",
  • "locationId": "string"
}

Full dashboard summary (for comparison pane)

Returns a full dashboard-style summary (demographics, opportunity loss, daily traffic, raw heatmap rows, forecasts, revenue metrics) used to populate the comparison pane. Same filter semantics as /opportunity-loss and /dashboard.

Note: unlike /dashboard, the heatmap field here is the raw per-hour row array (same content as rawHeatmapData), not a pivoted hour-to-week map.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

Array of strings or null

Optional location ID(s) to scope the query. Repeat the parameter for multiple locations; omit for all locations.

integer or null

Narrow to a single registered entrance device (its internal id, from /stores/{shopify_location_id}/devices) at the store. Only honored when locationId resolves to exactly one store; ignored otherwise.

string or null
Default: "true"

If true, filters results to only include hours when the store(s) were open.

string or null
Default: "wow"

Comparison period type. "dod" compares to the previous day, "wow" to the previous week. Defaults to "wow".

Responses

Response samples

Content type
application/json
{
  • "gender": [
    ],
  • "age": [
    ],
  • "ageByGender": [
    ],
  • "dailyTraffic": [
    ],
  • "heatmap": [
    ],
  • "rawHeatmapData": [
    ],
  • "heatmapDailyTotals": [
    ],
  • "allHeatmapData": { },
  • "locations": [
    ],
  • "deviceId": 0,
  • "startDate": "string",
  • "endDate": "string",
  • "applyOperatingHours": true,
  • "forecastResult": [ ],
  • "forecastUpliftResult": [ ],
  • "dwellTimeSeconds": 0,
  • "uniqueVisitors": 0,
  • "anomaliesVisitsHourly": [ ],
  • "anomaliesVisits4h": [ ],
  • "anomaliesCvrHourly": [ ],
  • "anomaliesCvr4h": [ ],
  • "opportunityLossData": [ ],
  • "comparisonPeriod": "dod",
  • "comparisonWeightedTotals": { },
  • "dailyAverages": { },
  • "revenue_per_visitor_unique": 0,
  • "cvr_unique": 0,
  • "revenue_per_visitor_total": 0,
  • "cvr_total": 0,
  • "total_visitors": 0,
  • "revenue_per_visitor": 0,
  • "cvr": 0,
  • "aov": 0,
  • "totalSales": 0,
  • "totalOrders": 0,
  • "shopInfo": {
    },
  • "locationId": "string"
}

POS metrics (traffic, demographics, revenue, hourly visits)

Returns POS metrics in the same structure as the Shopify app api.pos.metrics route. Used by the POS extension. Traffic and demographics from BigQuery; revenue and orders from ShopifyQL. Same filter semantics as /dashboard and /summary: startDate/endDate default to yesterday.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
Array of strings or null

One or more Shopify location IDs. When exactly one is given, the response is scoped to that store; omit for all locations.

string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when stores were open. Defaults to true.

Responses

Response samples

Content type
application/json
{
  • "shop": "string",
  • "locationId": "string",
  • "startDate": "string",
  • "endDate": "string",
  • "applyOperatingHours": true,
  • "timezone": "string",
  • "shopInfo": {
    },
  • "metrics": {
    }
}

Traffic Forecast (Aggregate)

Predicts the rolling 14-day forecasted traffic per hour aggregated across all stores for the specified client, starting with today's date. Built by aggregating each store's forecast rows by (day-of-week, hour) and projecting that pattern onto the next 14 calendar dates. Unlike the per-store variant, this aggregate response never includes an "insight" or "accuracy" field.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

Responses

Response samples

Content type
application/json
{
  • "traffic_forecast_hourly": {
    },
  • "traffic_forecast_4h": {
    },
  • "insight": { },
  • "accuracy": 100
}

Traffic Forecast per locationId (map of locationId -> forecast payload)

Returns a JSON object keyed by Shopify locationId, where each value is the exact same payload as GET /api/{shopify_domain}/stores/{shopify_location_id}/ai/traffic-forecast (traffic_forecast_hourly, traffic_forecast_4h, insight, accuracy) — so a forecast sync can fetch N locations in one request instead of N serial per-location calls.

  • locationId: repeat per store, e.g. ?locationId=1&locationId=2. Comma-separated values in a single parameter are also accepted.
  • Unlike the aggregate /ai/traffic-forecast endpoint, each per-location value always includes an insight field (empty object when no insight is available), matching the per-store variant.
  • accuracy is computed per location, from that location's own devices only — a store with multiple devices gets one weighted accuracy percentage combining all of them, not a per-device breakdown.
Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
locationId
required
Array of strings non-empty

One or more Shopify location IDs. Repeat the parameter (locationId=1&locationId=2) or comma-separate within a value.

Responses

Response samples

Content type
application/json
{
  • "property1": {
    },
  • "property2": {
    }
}

Visit Anomalies (Aggregate)

Returns detected visit anomaly keys (date -> hour or 4-hour bucket label) aggregated across all stores for the specified client. Unlike the CVR anomalies endpoint, each bucket's value is always an empty object; only the presence of a key indicates an anomaly was detected for that date/hour (or date/bucket). This aggregate shape intentionally omits the anomaly magnitude and direction that the per-store variant includes.

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when stores were open.

Responses

Response samples

Content type
application/json
{
  • "anomalies_visits_hourly": {
    },
  • "anomalies_visits_4h": {
    }
}

Conversion Rate (CVR) Anomalies (Aggregate)

Returns detected conversion rate (CVR) anomalies with hourly and 4-hour bucket groupings aggregated across all stores for the specified client. CVR is expressed as a percentage. Each anomaly includes the anomaly value (CVR percentage as integer) and type ('positive', 'negative', or 'neutral').

Authorizations:
apiKey
path Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

query Parameters
string or null

Start date (YYYY-MM-DD). Defaults to yesterday.

string or null

End date (YYYY-MM-DD). Defaults to yesterday.

string or null

If true, filters results to only include hours when stores were open.

Responses

Response samples

Content type
application/json
{
  • "anomalies_cvr_hourly": {
    },
  • "anomalies_cvr_4h": {
    }
}

CVR Investigation

CVR investigation and variant analytics

CVR Investigation - Top variants with inventory

Returns top variants with inventory data for CVR investigation. Response includes success, shop, serverTime (ISO), received (date, locationId), inventoryMessage, inventoryMessageParams, outOfStockSummary (products, variants), and topProducts (array of variants with stock data).

Authorizations:
apiKey
query Parameters
shopify_domain
required
string

Shopify myshopify domain (e.g., brand-x.myshopify.com).

string or null

Date (YYYY-MM-DD) for the investigation. When omitted, topProducts items are NOT enriched with stock fields (stockOnDate/stockSource/hadOutOfStock/outOfStockDate/stockDetails are absent).

string or null

Optional location ID to scope the investigation.

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "shop": "string",
  • "serverTime": "string",
  • "received": {
    },
  • "inventoryMessage": "string",
  • "inventoryMessageParams": { },
  • "outOfStockSummary": {
    },
  • "topProducts": [
    ]
}

Labor Efficiency

Sales-per-labor-hour reporting and staffing efficiency

Labor efficiency report

Returns a labor efficiency report for the given date range: KPIs (average sales-per-labor-hour, total/understaffed/overstaffed labor hours and slot counts) and a per-store breakdown with flagged understaffed/overstaffed time slots. Pass includeHourly=true to also get the raw hourly markers (sales, orders, visitors, staffing, CVR, SPLH) used to compute the report.

Authorizations:
apiKey
query Parameters
startDate
required
string <date>

Start date (YYYY-MM-DD).

endDate
required
string <date>

End date (YYYY-MM-DD).

string or null

Optional shop/client filter. Omit to include all clients.

Array of strings or null

Optional Shopify location ID filter. Repeat the parameter for multiple locations.

includeHourly
boolean
Default: false

When true, includes the raw hourly markers array for each store.

Responses

Response samples

Content type
application/json
{
  • "start_date": "2019-08-24",
  • "end_date": "2019-08-24",
  • "generated_at": "2019-08-24T14:15:22Z",
  • "kpis": {
    },
  • "stores": [
    ]
}