Commerce repeat-customer and cohort analytics
curl --request GET \
--url https://api.pineyard.ai/commerce/analytics/customers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/commerce/analytics/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/commerce/analytics/customers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"identifiedOrders": 123,
"identityCoveragePct": 123,
"newCustomers": 123,
"returningCustomers": 123,
"repeatCustomerRate": 123,
"cohorts": [
{
"cohort": "<string>",
"customers": 123,
"retention": [
123
]
}
]
}Orders & revenue
Commerce repeat-customer and cohort analytics
GET
/
commerce
/
analytics
/
customers
Commerce repeat-customer and cohort analytics
curl --request GET \
--url https://api.pineyard.ai/commerce/analytics/customers \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/commerce/analytics/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/commerce/analytics/customers"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"identifiedOrders": 123,
"identityCoveragePct": 123,
"newCustomers": 123,
"returningCustomers": 123,
"repeatCustomerRate": 123,
"cohorts": [
{
"cohort": "<string>",
"customers": 123,
"retention": [
123
]
}
]
}Required scope:
sales.view
Requires commerce analytics enabled for your workspace. Otherwise the request is refused; see Errors.
Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Query Parameters
Available options:
today, 7d, 30d, 90d 
