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.
Example Request
curl -X POST https://api.fullcontact.com/v3/stats.get \-H "Authorization: Bearer {Your API Key}" \-H "Content-Type: application/json" \
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 it's 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 | The start date of the reporting period, in format YYYY-MM-DD . |
period.end string | The end date of the reporting period, in format YYYY-MM-DD . |
plan.name string | The display name of your current plan. |
plan.period string | The billing term of your plan. Possible values are MONTH or YEAR . |
plan.baseCost double | The base cost or price of your plan. Note that this is only the base cost, and may differ from your charged amount due to overages and other factors. |
plan.daysRemainingInPeriod integer | The number of days left in the current billing period. |
stats.person.enrichment.matches object | The number of person enrichment requests that resulted in a match. |
stats.person.enrichment.misses object | The number of person enrichment requests that resulted in a miss/not found found. |
stats.person.enrichment.total object | The total number of person enrichment requests. |
stats.person.subscriptions object | The total number of person subscription requests. |
stats.company.enrichment.matches object | The number of company enrichment requests that resulted in a match. |
stats.company.enrichment.misses object | The number of company enrichment requests that resulted in a miss/not found found. |
stats.company.enrichment.total object | The total number of company enrichment requests. |