Invoices
Create, retrieve, update, and delete invoices. Invoices track amounts owed by customers.
List Invoices
GET/api/v1/invoices
Returns a paginated list of invoices for your organization.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: draft, sent, paid, overdue, cancelled |
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20, max: 100) |
customerId | string | Filter by customer ID |
Response
{
"data": [
{
"_id": "65f1a2b3c4d5e6f7a8b9c0d1",
"invoiceNumber": "INV-06-0001",
"customerId": { "name": "Kwame Enterprises", "email": "info@kwame.com" },
"invoiceDate": "2026-06-01T00:00:00.000Z",
"dueDate": "2026-07-01T00:00:00.000Z",
"subtotal": 2000,
"taxAmount": 375,
"totalAmount": 2375,
"paidAmount": 0,
"status": "sent"
}
],
"total": 42,
"page": 1,
"limit": 20
}Get Invoice
GET/api/v1/invoices/:id
Retrieve a single invoice by ID with full line items and customer details.
cURL
curl https://api.syncbooksapp.com/api/v1/invoices/65f1a2b3c4d5e6f7a8b9c0d1 \
-H "Authorization: Bearer sk_live_your_key"Create Invoice
POST/api/v1/invoices
Create a new invoice. Requires invoices:write scope.
Request Body
| Parameter | Type | Description |
|---|---|---|
customerIdrequired | string | Customer ID |
invoiceDaterequired | date | Invoice date (ISO 8601) |
dueDaterequired | date | Payment due date |
lineItemsrequired | array | Array of line items (description, quantity, rate) |
lineItems[].descriptionrequired | string | Item description |
lineItems[].quantityrequired | number | Quantity |
lineItems[].raterequired | number | Unit price |
lineItems[].taxRate | number | Tax rate percentage (default: 0) |
notes | string | Notes shown on invoice |
terms | string | Payment terms |
Request
curl -X POST https://api.syncbooksapp.com/api/v1/invoices \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"customerId": "65f1a2b3c4d5e6f7a8b9c0d1",
"invoiceDate": "2026-06-01",
"dueDate": "2026-07-01",
"lineItems": [
{ "description": "Web Development", "quantity": 1, "rate": 5000, "taxRate": 15 },
{ "description": "Hosting (monthly)", "quantity": 3, "rate": 200 }
],
"notes": "Thank you for your business"
}'Response (201 Created)
{
"data": {
"_id": "65f1a2b3c4d5e6f7a8b9c0d2",
"invoiceNumber": "INV-06-0002",
"status": "draft",
"subtotal": 5600,
"taxAmount": 750,
"totalAmount": 6350,
"paidAmount": 0
}
}Update Invoice
PUT/api/v1/invoices/:id
Update an existing draft invoice. Only draft invoices can be modified.
Delete Invoice
DELETE/api/v1/invoices/:id
Soft-delete an invoice. Only draft invoices can be deleted. Sent/paid invoices must be voided instead.