GET /v1/invoices/client-summary
const url = 'https://api.asap.cool/v1/invoices/client-summary?contact_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';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/invoices/client-summary?contact_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'Authorization: Bearer <token>'Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Query Parameters
Section intitulée « Query Parameters »Contact to summarize.
Responses
Section intitulée « Responses »Per-client billing summary.
Response body of GET /v1/invoices/client-summary.
object
Deposit (acompte) count + total.
object
Document count, any status.
Sum of total_ttc over those documents (centimes).
Credit-note (avoir) count + total.
object
Document count, any status.
Sum of total_ttc over those documents (centimes).
Cash collected on this contact’s documents (centimes).
Quote (devis) count + total.
object
Document count, any status.
Sum of total_ttc over those documents (centimes).
Invoice (facture) count + total.
object
Document count, any status.
Sum of total_ttc over those documents (centimes).
Open quote value for this contact (centimes).
Outstanding receivable on this contact’s issued, unsettled invoices.
Example generated
{ "acompte": { "count": 1, "total_ttc_cents": 1 }, "avoir": { "count": 1, "total_ttc_cents": 1 }, "cash_collected_cents": 1, "devis": { "count": 1, "total_ttc_cents": 1 }, "facture": { "count": 1, "total_ttc_cents": 1 }, "open_quotes_cents": 1, "outstanding_cents": 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 invoice: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"}