Invoices
Manage invoices, line items, and payment status.
In: header
Query Parameters
11 <= value251 <= value <= 100UUID v4
uuid"draft" | "sent" | "paid" | "void" | "written_off"Filter by the derived overdue condition. true → open (sent) invoices past their due date with a balance owing; false → everything else.
"true" | "false"Return the invoice that supersedes (replaces) the given invoice id — the forward void→reissue link.
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://www.clientcasa.com/api/v1/invoices"{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"invoiceNumber": "string",
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"billingContactId": "550e8400-e29b-41d4-a716-446655440000",
"projectIds": [
"550e8400-e29b-41d4-a716-446655440000"
],
"status": "draft",
"subject": "string",
"issueDate": "2019-08-24",
"dueDate": "2019-08-24",
"currency": "string",
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"total": 0,
"amountPaid": 0,
"balanceDue": 0,
"overdue": true,
"supersedesInvoice": "550e8400-e29b-41d4-a716-446655440000",
"paymentTerms": "string",
"notes": "string",
"paidAt": "2019-08-24T14:15:22Z",
"lineItems": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"description": "string",
"quantity": 0,
"unitPrice": 0,
"taxable": true,
"discountPercent": 0,
"total": 0
}
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"pagination": {
"page": 1,
"pageSize": 1,
"total": 0,
"totalPages": 0,
"hasMore": true
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}In: header
Header Parameters
Optional unique key that makes this create safely retryable. Replaying the same key returns the original response instead of creating a duplicate; reusing a key with a different request body returns 409.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://www.clientcasa.com/api/v1/invoices" \ -H "Content-Type: application/json" \ -d '{ "clientId": "550e8400-e29b-41d4-a716-446655440000", "lineItems": [ { "description": "string", "quantity": 0, "unitPrice": 0 } ] }'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"invoiceNumber": "string",
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"billingContactId": "550e8400-e29b-41d4-a716-446655440000",
"projectIds": [
"550e8400-e29b-41d4-a716-446655440000"
],
"status": "draft",
"subject": "string",
"issueDate": "2019-08-24",
"dueDate": "2019-08-24",
"currency": "string",
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"total": 0,
"amountPaid": 0,
"balanceDue": 0,
"overdue": true,
"supersedesInvoice": "550e8400-e29b-41d4-a716-446655440000",
"paymentTerms": "string",
"notes": "string",
"paidAt": "2019-08-24T14:15:22Z",
"lineItems": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"description": "string",
"quantity": 0,
"unitPrice": 0,
"taxable": true,
"discountPercent": 0,
"total": 0
}
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}In: header
Path Parameters
UUID v4
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://www.clientcasa.com/api/v1/invoices/550e8400-e29b-41d4-a716-446655440000"{
"id": "550e8400-e29b-41d4-a716-446655440000",
"invoiceNumber": "string",
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"billingContactId": "550e8400-e29b-41d4-a716-446655440000",
"projectIds": [
"550e8400-e29b-41d4-a716-446655440000"
],
"status": "draft",
"subject": "string",
"issueDate": "2019-08-24",
"dueDate": "2019-08-24",
"currency": "string",
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"total": 0,
"amountPaid": 0,
"balanceDue": 0,
"overdue": true,
"supersedesInvoice": "550e8400-e29b-41d4-a716-446655440000",
"paymentTerms": "string",
"notes": "string",
"paidAt": "2019-08-24T14:15:22Z",
"lineItems": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"description": "string",
"quantity": 0,
"unitPrice": 0,
"taxable": true,
"discountPercent": 0,
"total": 0
}
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}In: header
Path Parameters
UUID v4
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://www.clientcasa.com/api/v1/invoices/550e8400-e29b-41d4-a716-446655440000" \ -H "Content-Type: application/json" \ -d '{}'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"invoiceNumber": "string",
"clientId": "550e8400-e29b-41d4-a716-446655440000",
"billingContactId": "550e8400-e29b-41d4-a716-446655440000",
"projectIds": [
"550e8400-e29b-41d4-a716-446655440000"
],
"status": "draft",
"subject": "string",
"issueDate": "2019-08-24",
"dueDate": "2019-08-24",
"currency": "string",
"subtotal": 0,
"discountAmount": 0,
"taxAmount": 0,
"total": 0,
"amountPaid": 0,
"balanceDue": 0,
"overdue": true,
"supersedesInvoice": "550e8400-e29b-41d4-a716-446655440000",
"paymentTerms": "string",
"notes": "string",
"paidAt": "2019-08-24T14:15:22Z",
"lineItems": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"description": "string",
"quantity": 0,
"unitPrice": 0,
"taxable": true,
"discountPercent": 0,
"total": 0
}
],
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}In: header
Path Parameters
UUID v4
uuidResponse Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://www.clientcasa.com/api/v1/invoices/550e8400-e29b-41d4-a716-446655440000"{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "unauthorized",
"message": "string",
"requestId": "string",
"details": {
"property1": null,
"property2": null
}
}
}Void & reissue lineage
supersedesInvoice— read-only. When an invoice is voided and reissued as a correction, the new invoice points to the voided original;nullotherwise.- To find the forward link — the corrected invoice that replaced a given one — list with
?supersedesInvoice={id}. overdueis a derived read-only boolean (past due with a balance owing), not a status. Filter open-but-late invoices with?overdue=true.