Bills (Accounts Payable)
Manage vendor bills. Bills track what you owe to suppliers. Lifecycle: draft → open (approved) → paid.
List Bills
GET/api/v1/bills
| Parameter | Type | Description |
|---|---|---|
status | string | Filter: draft, open, paid, overdue, cancelled |
vendorId | string | Filter by vendor |
startDate | date | Bill date from |
endDate | date | Bill date to |
Create Bill
POST/api/v1/bills
| Parameter | Type | Description |
|---|---|---|
vendorIdrequired | string | Vendor ID |
billDaterequired | date | Bill date |
dueDaterequired | date | Payment due date |
itemsrequired | array | Line items: { description, quantity, unitPrice } |
notes | string | Internal notes |
Request
curl -X POST https://api.syncbooksapp.com/api/v1/bills \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"vendorId": "65f1a2b3c4d5e6f7a8b9c0d1",
"billDate": "2026-06-01",
"dueDate": "2026-06-30",
"items": [
{ "description": "Office rent - June", "quantity": 1, "unitPrice": 3000 },
{ "description": "Internet service", "quantity": 1, "unitPrice": 200 }
]
}'Approve Bill
POST/api/v1/bills/:id/approve
Approve a draft bill. Changes status to "open" and posts to the General Ledger (DR Expense, CR Accounts Payable).
Record Bill Payment
POST/api/v1/bills/:id/payment
The bill must be approved first. Part payments are fine; the bill is paid once payments reach its total.
| Parameter | Type | Description |
|---|---|---|
amountrequired | number | Payment amount (≤ outstanding balance) |
paymentDate | date | Payment date (default: today) |
Reverse Payments
POST/api/v1/bills/:id/reverse-payments
Reverses every payment recorded on the bill (with their ledger entries) and puts it back to unpaid. No parameters.