Get a customer lifetime value summary
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/customer-ltv-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}/customer-ltv-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}/customer-ltv-summary"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"shop": "<string>",
"currency": "<string>",
"ltv_total_customers": 123,
"ltv_total_orders": 123,
"ltv_total_revenue": 123,
"ltv_total_refunds": 123,
"ltv_net_revenue": 123,
"ltv_avg_order_value": 123,
"ltv_30d": 123,
"ltv_90d": 123,
"ltv_6m": 123,
"ltv_12m": 123,
"ltv_avg_last_order_days_ago": 123,
"ltv_avg_time_to_second_purchase_days": 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 customer lifetime value summary
Returns zero or one store-scoped summary row with customer, order, revenue, refund, value-window, and purchase-cadence totals.
GET
/
ad-metrics
/
{storeUrl}
/
customer-ltv-summary
Get a customer lifetime value summary
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{storeUrl}/customer-ltv-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}/customer-ltv-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}/customer-ltv-summary"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"shop": "<string>",
"currency": "<string>",
"ltv_total_customers": 123,
"ltv_total_orders": 123,
"ltv_total_revenue": 123,
"ltv_total_refunds": 123,
"ltv_net_revenue": 123,
"ltv_avg_order_value": 123,
"ltv_30d": 123,
"ltv_90d": 123,
"ltv_6m": 123,
"ltv_12m": 123,
"ltv_avg_last_order_days_ago": 123,
"ltv_avg_time_to_second_purchase_days": 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
Optional first date to include, in YYYY-MM-DD format.
Optional last date to include, in YYYY-MM-DD format.
Response
Request completed successfully.