We are using cookies to improve your experience!

By clicking "Allow all", you agree to use of all cookies. Visit our Privacy Policy to learn more.

List All Customers

GET /api/v1/customers

Retrieve a paginated list of all customers associated with your business account. Customers can be individuals or businesses, with details like contact info, address, and currency preferences.

Description

This endpoint supports pagination via query parameters. It returns a JSON response with customer data, metadata for pagination, and navigation links.

Path Parameters

None.

Query Parameters

Parameter Type Required Description Default Example
page Integer No Page number for pagination 1 1
per_page Integer No Number of records per page 20 10

Request Headers

Header Value Description
Authorization Bearer <access_token> OAuth 2.0 Bearer token
Content-Type application/json Request body format
Accept application/json Response format

Request Example

curl -X GET "https://koteshen.com/api/v1/customers?page=1&per_page=5" \
  -H "Authorization: Bearer <access_token>" \
  -H "Accept: application/json"

Response

  • Status Code: 200 OK
  • Content-Type: application/json

Success Response Body

{
  "data": [
    {
      "id": 7,
      "name": "Randall Rodrigo",
      "company": "Softbank",
      "customer_type": "individual",
      "phone": "+27675711214",
      "phone_country": "za",
      "currency": "USD",
      "email": "given@unspik.com",
      "website": "https://weldoge.co.zw",
      "business_id": 1,
      "notes": "",
      "created_at": "2025-08-27T20:34:43.872Z",
      "updated_at": "2025-09-24T22:35:10.418Z",
      "address": {
        "id": 8,
        "line": "1 Mahem Pl",
        "line2": "",
        "post_code": "5256",
        "city": "East London",
        "country": "ZA",
        "created_at": "2025-08-27T20:34:43.883Z",
        "updated_at": "2025-08-27T20:34:43.883Z"
      },
      "url": "https://koteshen.com/api/v1/customers/7.json"
    },
    {
      "id": 9,
      "name": "Homing Construction",
      "company": "Homing Construction",
      "customer_type": "business",
      "phone": "+27675711214",
      "phone_country": "za",
      "currency": "ZAR",
      "email": "finance@koteshen.com",
      "website": "",
      "business_id": 1,
      "notes": "",
      "created_at": "2025-09-25T10:12:57.189Z",
      "updated_at": "2025-09-25T10:12:57.189Z",
      "address": {
        "id": 21,
        "line": "78 Main Rd",
        "line2": "",
        "post_code": "",
        "city": "East London",
        "country": "ZA",
        "created_at": "2025-09-25T10:12:57.231Z",
        "updated_at": "2025-09-25T10:12:57.231Z"
      },
      "url": "https://koteshen.com/api/v1/customers/9.json"
    },
    {
      "id": 11,
      "name": "Verily Industries",
      "company": "Verily Industries",
      "customer_type": "business",
      "phone": "+27675711214",
      "phone_country": "za",
      "currency": "ZAR",
      "email": "finances@koteshen.com",
      "website": "",
      "business_id": 1,
      "notes": "",
      "created_at": "2025-09-25T10:29:07.354Z",
      "updated_at": "2025-09-25T10:29:07.354Z",
      "address": {
        "id": 23,
        "line": "1 Mahem Pl",
        "line2": "",
        "post_code": "",
        "city": "East London",
        "country": "ZA",
        "created_at": "2025-09-25T10:29:07.357Z",
        "updated_at": "2025-09-25T10:29:07.357Z"
      },
      "url": "https://koteshen.com/api/v1/customers/11.json"
    },
    {
      "id": 12,
      "name": "Softbank",
      "company": "Softbank",
      "customer_type": "business",
      "phone": "+27675711214",
      "phone_country": "za",
      "currency": "ZAR",
      "email": "sales@unspik.com",
      "website": "",
      "business_id": 1,
      "notes": "",
      "created_at": "2025-09-25T10:30:07.980Z",
      "updated_at": "2025-09-25T10:30:07.980Z",
      "address": {
        "id": 24,
        "line": "78 Main Rd",
        "line2": "",
        "post_code": "",
        "city": "East London",
        "country": "ZA",
        "created_at": "2025-09-25T10:30:07.987Z",
        "updated_at": "2025-09-25T10:30:07.987Z"
      },
      "url": "https://koteshen.com/api/v1/customers/12.json"
    },
    {
      "id": 13,
      "name": "Texas Ins",
      "company": "Texas Ins",
      "customer_type": "business",
      "phone": "+27675711214",
      "phone_country": "za",
      "currency": "zar",
      "email": "procurement@texas.com",
      "website": "https://texas.com",
      "business_id": 1,
      "notes": "notesy",
      "created_at": "2025-10-12T19:00:37.057Z",
      "updated_at": "2025-10-12T19:09:27.293Z",
      "address": {
        "id": 26,
        "line": "1 Mahem Pl",
        "line2": "Unit 23",
        "post_code": "5256",
        "city": "East London",
        "country": "South Africa",
        "created_at": "2025-10-12T19:09:27.300Z",
        "updated_at": "2025-10-12T19:09:27.300Z"
      },
      "url": "https://koteshen.com/api/v1/customers/13.json"
    }
  ],
  "meta": {
    "pagination": {
      "current_page": 1,
      "prev_page": null,
      "next_page": null,
      "total_pages": 1,
      "total_count": 5
    }
  },
  "links": {
    "first": "https://koteshen.com/api/v1/customers.json?page=1",
    "last": "https://koteshen.com/api/v1/customers.json?page=1",
    "self": "https://koteshen.com/api/v1/customers.json?page=1"
  }
}

Error Responses

  • 401 Unauthorized: { "error": "Unauthorized" }
  • 429 Too Many Requests: { "error": "Rate limit exceeded" }

Usage Notes

  • Use this endpoint to populate customer dropdowns in your invoicing UI.
  • Addresses are nested and immutable once set; update via the Update endpoint.