Get cohort metrics
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{resourceUrl}/cohorts \
--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/{resourceUrl}/cohorts', 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/{resourceUrl}/cohorts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"shop": "<string>",
"cohort_month": "<string>",
"months_since_first_purchase": 123,
"cohort_size": 123,
"active_customers": 123,
"revenue": 123,
"orders": 123,
"ltv_revenue": 123,
"retention_rate": 123,
"revenue_per_customer": 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>"
}Analytics
Get cohort metrics
Returns monthly retention and cumulative revenue metrics for customer cohorts. Available only for Shopify resources; website requests return 400 with code resource_type_mismatch.
GET
/
ad-metrics
/
{resourceUrl}
/
cohorts
Get cohort metrics
curl --request GET \
--url https://app.bily.ai/api/customer/v1/ad-metrics/{resourceUrl}/cohorts \
--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/{resourceUrl}/cohorts', 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/{resourceUrl}/cohorts"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"shop": "<string>",
"cohort_month": "<string>",
"months_since_first_purchase": 123,
"cohort_size": 123,
"active_customers": 123,
"revenue": 123,
"orders": 123,
"ltv_revenue": 123,
"retention_rate": 123,
"revenue_per_customer": 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>"
}Authorizations
ApiKeyAuthBearerAuth
Headers
Path Parameters
Query Parameters
Response
Request completed successfully.