GET /v1/contacts/stats
const url = 'https://api.asap.cool/v1/contacts/stats?from=example&to=example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.asap.cool/v1/contacts/stats?from=example&to=example' \ --header 'Authorization: Bearer <token>'Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Query Parameters
Section intitulée « Query Parameters »Inclusive lower bound (YYYY-MM-DD).
Inclusive upper bound (YYYY-MM-DD).
Responses
Section intitulée « Responses »Address-book growth over the window.
Response of GET /v1/contacts/stats.
object
Lead-status mix of the active book (window-invariant), largest first.
Active contacts in one lead status.
object
How many.
new, qualified, contacted, won or lost.
Month series over the window, gap-filled, oldest first.
One month of address-book growth.
object
Active contacts created that month.
Month, YYYY-MM.
Active contacts now (window-invariant).
Example generated
{ "by_lead_status": [ { "count": 1, "lead_status": "example" } ], "series": [ { "created_count": 1, "period": "example" } ], "total": 1}No active org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Missing contacts:read scope.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Invalid window (bad date, from > to, span > 366d).
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}