Get prepared asset performance
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-asset-performance \
--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-asset-performance', 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-asset-performance"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"prepared": true,
"hierarchyLevel": "campaign",
"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>"
}
],
"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 prepared asset performance
Returns decision-ready performance rows at campaign, ad set, or ad level. A 409 response means the requested range does not have complete prepared coverage.
GET
/
ad-metrics
/
{storeUrl}
/
prepared-asset-performance
Get prepared asset performance
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/prepared-asset-performance \
--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-asset-performance', 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-asset-performance"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"prepared": true,
"hierarchyLevel": "campaign",
"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>"
}
],
"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.
Advertising hierarchy level.
Available options:
campaign, adset, ad Optional comma-separated advertising account IDs from the store's accessible account set.