Aller au contenu

GET /v1/invoices/client-summary

GET
/v1/invoices/client-summary
curl --request GET \
--url 'https://api.asap.cool/v1/invoices/client-summary?contact_id=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--header 'Authorization: Bearer <token>'
contact_id
required
string format: uuid

Contact to summarize.

Per-client billing summary.

Media type application/json

Response body of GET /v1/invoices/client-summary.

object
acompte
required

Deposit (acompte) count + total.

object
count
required

Document count, any status.

integer format: int64
total_ttc_cents
required

Sum of total_ttc over those documents (centimes).

integer format: int64
avoir
required

Credit-note (avoir) count + total.

object
count
required

Document count, any status.

integer format: int64
total_ttc_cents
required

Sum of total_ttc over those documents (centimes).

integer format: int64
cash_collected_cents
required

Cash collected on this contact’s documents (centimes).

integer format: int64
devis
required

Quote (devis) count + total.

object
count
required

Document count, any status.

integer format: int64
total_ttc_cents
required

Sum of total_ttc over those documents (centimes).

integer format: int64
facture
required

Invoice (facture) count + total.

object
count
required

Document count, any status.

integer format: int64
total_ttc_cents
required

Sum of total_ttc over those documents (centimes).

integer format: int64
open_quotes_cents
required

Open quote value for this contact (centimes).

integer format: int64
outstanding_cents
required

Outstanding receivable on this contact’s issued, unsettled invoices.

integer format: int64
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.

Media type application/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}

Missing invoice:read scope.

Media type application/json

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
code
required

Stable machine token (e.g. invalid_credentials).

string
field

Offending request field for validation errors, when known.

string | null
message
required

Human-readable message.

string
Example generated
{
"code": "example",
"field": "example",
"message": "example"
}