Commerce campaign and template rankings
curl --request GET \
--url https://api.pineyard.ai/commerce/analytics/rankings \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/commerce/analytics/rankings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/commerce/analytics/rankings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"campaigns": [
{
"id": "<string>",
"name": "<string>",
"orders": 123,
"revenueByCurrency": [
{
"currency": "<string>",
"amount": "<string>"
}
],
"spendInr": 123,
"roas": 123
}
],
"templates": [
{
"id": "<string>",
"name": "<string>",
"orders": 123,
"revenueByCurrency": [
{
"currency": "<string>",
"amount": "<string>"
}
],
"spendInr": 123,
"roas": 123
}
]
}Orders & revenue
Commerce campaign and template rankings
GET
/
commerce
/
analytics
/
rankings
Commerce campaign and template rankings
curl --request GET \
--url https://api.pineyard.ai/commerce/analytics/rankings \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pineyard.ai/commerce/analytics/rankings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/commerce/analytics/rankings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"campaigns": [
{
"id": "<string>",
"name": "<string>",
"orders": 123,
"revenueByCurrency": [
{
"currency": "<string>",
"amount": "<string>"
}
],
"spendInr": 123,
"roas": 123
}
],
"templates": [
{
"id": "<string>",
"name": "<string>",
"orders": 123,
"revenueByCurrency": [
{
"currency": "<string>",
"amount": "<string>"
}
],
"spendInr": 123,
"roas": 123
}
]
}Required scope:
sales.view
Requires commerce analytics enabled for your workspace. Otherwise the request is refused; see Errors.

