Customers
Manage your customer records. Customers are linked to invoices, payments, and sales orders.
List Customers
GET/api/v1/customers
| Parameter | Type | Description |
|---|---|---|
search | string | Search by name, email, or phone |
status | string | Filter: active, inactive |
page | number | Page number (default: 1) |
limit | number | Items per page (default: 20) |
Response
{
"data": [
{
"_id": "65f1a2b3c4d5e6f7a8b9c0d1",
"name": "Kwame Enterprises",
"email": "info@kwame.com",
"phone": "+233201234567",
"company": "Kwame Enterprises Ltd",
"status": "active",
"totalInvoiced": 25000,
"totalPaid": 20000,
"outstandingBalance": 5000
}
],
"total": 156,
"page": 1
}Get Customer
GET/api/v1/customers/:id
Returns full customer profile including address, contact details, and balance summary.
Create Customer
POST/api/v1/customers
| Parameter | Type | Description |
|---|---|---|
namerequired | string | Customer/company name |
email | string | Email address |
phone | string | Phone number |
company | string | Company name (if different from name) |
address | object | { street, city, state, country, zip } |
taxId | string | Tax identification number |
Request
curl -X POST https://api.syncbooksapp.com/api/v1/customers \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Ama Trading Co.",
"email": "ama@trading.com",
"phone": "+233551234567",
"address": { "city": "Accra", "country": "Ghana" }
}'Update Customer
PUT/api/v1/customers/:id
Update any customer field. Only provided fields are changed.
Delete Customer
DELETE/api/v1/customers/:id
Soft-deletes a customer. Customers with open invoices cannot be deleted.