Get a prepared channel summary
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-channel-summary \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-channel-summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-channel-summary"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"prepared": true,
"data": [
{
"shop": "<string>",
"date": "2023-12-25",
"time": "<string>",
"channel": "<string>",
"ad_id": "<string>",
"adset_id": "<string>",
"campaign_id": "<string>",
"ad_name": "<string>",
"adset_name": "<string>",
"campaign_name": "<string>",
"p_spend": 123,
"p_clicks": 123,
"p_impressions": 123,
"p_reach": 123,
"conversions": 123,
"conv_value": 123,
"customers": 123,
"sessions": 123,
"pageviews": 123,
"p_currency": "<string>",
"fp_currency": "<string>"
}
],
"canonicalTotals": {
"spend": 123,
"revenue": 123,
"orders": 123,
"customers": 123,
"sessions": 123,
"clicks": 123,
"impressions": 123
},
"statistics": {
"elapsed": 123,
"rows_read": 123,
"bytes_read": 123
}
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Analytics
Get a prepared channel summary
Returns decision-ready channel rows and canonical totals for a date range. A 409 response means the requested range does not have complete prepared coverage.
GET
/
ad-metrics
/
{storeUrl}
/
prepared-channel-summary
Get a prepared channel summary
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-channel-summary \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-channel-summary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-channel-summary"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"prepared": true,
"data": [
{
"shop": "<string>",
"date": "2023-12-25",
"time": "<string>",
"channel": "<string>",
"ad_id": "<string>",
"adset_id": "<string>",
"campaign_id": "<string>",
"ad_name": "<string>",
"adset_name": "<string>",
"campaign_name": "<string>",
"p_spend": 123,
"p_clicks": 123,
"p_impressions": 123,
"p_reach": 123,
"conversions": 123,
"conv_value": 123,
"customers": 123,
"sessions": 123,
"pageviews": 123,
"p_currency": "<string>",
"fp_currency": "<string>"
}
],
"canonicalTotals": {
"spend": 123,
"revenue": 123,
"orders": 123,
"customers": 123,
"sessions": 123,
"clicks": 123,
"impressions": 123
},
"statistics": {
"elapsed": 123,
"rows_read": 123,
"bytes_read": 123
}
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}{
"error": "Store not found",
"requestId": "<string>",
"details": "<unknown>",
"retryAfter": "<string>"
}Authorizations
ApiKeyAuthBearerAuth
A server-side Bily API key created under Settings > MCP > Access key fallback. Select the intended store before creating it.
Headers
An organization ID returned by GET /context or GET /organizations. Required for GET /stores and optional for store-scoped paths.
Example:
"org_01J8W7T9G3E6ZQ4M2K5N8P1R0S"
Path Parameters
The exact store URL returned by GET /context or GET /stores.
Example:
"store.example.com"
Query Parameters
First date to include, in YYYY-MM-DD format.
Last date to include, in YYYY-MM-DD format.