Opportunity counts
curl --request GET \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/counts \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/counts"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"counts": {
"all": 123,
"open": 123,
"won": 123,
"lost": 123
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}Opportunities
Opportunity counts
Tab counts for all/open/won/lost over the same visible scope as the list.
GET
/
api
/
v1
/
accounts
/
{account_id}
/
opportunities
/
counts
Opportunity counts
curl --request GET \
--url https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/counts \
--header 'api_access_token: <api-key>'const options = {method: 'GET', headers: {api_access_token: '<api-key>'}};
fetch('https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.yampi.ai/api/v1/accounts/{account_id}/opportunities/counts"
headers = {"api_access_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"counts": {
"all": 123,
"open": 123,
"won": 123,
"lost": 123
}
}{
"description": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>",
"code": "<string>"
}
]
}{}{}