Invoices API
Create, retrieve, and manage invoices through the Invoices API.
List Invoices
Retrieve all invoices for your organization.
curl https://api.lawnledgercrm.com/api/invoices \
-b cookies.txtResponse:
{
"data": [
{
"id": "inv_xyz789",
"invoiceNumber": "INV-0042",
"customerId": "cust_abc123",
"status": "sent",
"subtotal": 350.00,
"tax": 28.00,
"total": 378.00,
"amountPaid": 0,
"balance": 378.00,
"invoiceDate": "2025-06-01",
"dueDate": "2025-06-15",
"createdAt": "2025-06-01T09:00:00Z"
}
]
}Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: draft, sent, paid, overdue, void |
customerId | string | Filter by customer ID |
from | string | Start date (ISO 8601) |
to | string | End date (ISO 8601) |
page | number | Page number |
limit | number | Results per page |
Example:
curl "https://api.lawnledgercrm.com/api/invoices?status=overdue&limit=25" \
-b cookies.txtGet Invoice
Retrieve a single invoice by ID.
curl https://api.lawnledgercrm.com/api/invoices/inv_xyz789 \
-b cookies.txtCreate Invoice
Create a new invoice.
curl -X POST https://api.lawnledgercrm.com/api/invoices \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"customerId": "cust_abc123",
"propertyId": "prop_def456",
"invoiceDate": "2025-06-15",
"dueDate": "2025-07-15",
"lineItems": [
{
"description": "Weekly Lawn Mowing",
"quantity": 4,
"unitPrice": 75.00
},
{
"description": "Edge trimming",
"quantity": 4,
"unitPrice": 25.00
}
],
"notes": "Thank you for your business!"
}'Required Fields
| Field | Type | Description |
|---|---|---|
customerId | string | Customer ID |
lineItems | array | At least one line item |
Line Item Fields
| Field | Type | Description |
|---|---|---|
description | string | Service or item description |
quantity | number | Quantity |
unitPrice | number | Price per unit |
Update Invoice
Update an existing invoice. Only draft invoices can be fully edited.
curl -X PUT https://api.lawnledgercrm.com/api/invoices/inv_xyz789 \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"dueDate": "2025-07-30",
"notes": "Extended payment terms"
}'Record Payment
Record a payment against an invoice.
curl -X POST https://api.lawnledgercrm.com/api/payments \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"invoiceId": "inv_xyz789",
"amount": 378.00,
"paymentDate": "2025-06-20",
"method": "check"
}'When a payment covers the full invoice balance, the invoice status automatically changes to Paid.