Search the docs

Pages and API endpoints

Developer dashboard

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

ParameterTypeDescription
statusstringFilter by status: draft, sent, paid, overdue, cancelled
pagenumberPage number (default: 1)
limitnumberItems per page (default: 20, max: 100)
customerIdstringFilter 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

ParameterTypeDescription
customerIdrequiredstringCustomer ID
invoiceDaterequireddateInvoice date (ISO 8601)
dueDaterequireddatePayment due date
lineItemsrequiredarrayArray of line items (description, quantity, rate)
lineItems[].descriptionrequiredstringItem description
lineItems[].quantityrequirednumberQuantity
lineItems[].raterequirednumberUnit price
lineItems[].taxRatenumberTax rate percentage (default: 0)
notesstringNotes shown on invoice
termsstringPayment 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.