Search the docs

Pages and API endpoints

Developer dashboard
Docs/Customers

Customers

Manage your customer records. Customers are linked to invoices, payments, and sales orders.

List Customers

GET/api/v1/customers
ParameterTypeDescription
searchstringSearch by name, email, or phone
statusstringFilter: active, inactive
pagenumberPage number (default: 1)
limitnumberItems 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
ParameterTypeDescription
namerequiredstringCustomer/company name
emailstringEmail address
phonestringPhone number
companystringCompany name (if different from name)
addressobject{ street, city, state, country, zip }
taxIdstringTax 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.