FullContact Platform
Stats
Understanding your current API usage is helpful, not only for billing purposes, but also within your application. For example, if you are nearing or have exceeded your usage limits for our Enrich API, you may want your application to behave differently, possibly limiting or preventing further requests until you have upgraded your plan to avoid overages. The Account Stats API will give you the insights needed to make these sorts of decisions by providing usage information for the current billing period.
Retrieving Usage
Example Request
curl -X POST https://api.fullcontact.com/v3/stats.get \
-H "Authorization: Bearer {Your API Key}" \
-H "Content-Type: application/json"
Response
Example Response
{
"period": {
"start": "2020-04-10T00:00:00Z",
"end": "2021-04-10T00:00:00Z"
},
"plan": {
"name": "customer_plan_12345",
"period": "yearly",
"baseCost": 1000,
"daysRemainingInPeriod": 277
},
"stats": {
"person": {
"enrichment": {
"matches": {
"count": 4839,
"quota": 0,
"overQuota": true
},
"misses": {
"count": 201,
"quota": null,
"overQuota": false
},
"total": {
"count": 5040
}
},
"subscriptions": {
"count": 0,
"quota": null,
"overQuota": false
}
},
"company": {
"enrichment": {
"matches": {
"count": 75,
"quota": 1000,
"overQuota": false
},
"misses": {
"count": 0,
"quota": null,
"overQuota": false
},
"total": {
"count": 75,
"quota": null,
"overQuota": false
}
}
}
}
}
The Stats API returns back an object with information regarding the current billing period, plan details, and usage metrics. The usage metrics are available in the stats key, with a sub-key for each category. Every category will contain sub-keys for its respective metrics, with each metric containing keys for count, quota, and overQuota. count will hold the current value of the given metric, quota represents the amount or limit allowed for the given period (if applicable), and overQuota is a simple boolean, with a value of true if the count is greater than the quota for a given metric.
| Response Properties |
|---|
| period.start string |
| period.end string |
| plan.name string |
| plan.period string |
| plan.baseCost double |
| plan.daysRemainingInPeriod integer |
| stats.person.enrichment.matches object |
| stats.person.enrichment.misses object |
| stats.person.enrichment.total object |
| stats.person.subscriptions object |
| stats.company.enrichment.matches object |
| stats.company.enrichment.misses object |
| stats.company.enrichment.total object |