> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List customers

> List all customers within Layer.

The `GET` endpoint lists all created customers within Layer.
Only active customers are returned by default, but archived customers can be included via the `include_archived` flag.

### Path Parameters

<ParamField path="business_id" required="true" type="string">
  ID of the [Business](/api-reference/business/business) the customer is associated with.
</ParamField>

### Query Parameters

<ParamField query="include_archived" type="boolean">
  Include archived customers in the response. Defaults to false.
</ParamField>

<ParamField query="external_id" type="string">
  The external ID of the customer to fetch.
</ParamField>

<ParamField query="external_id_contains" type="string">
  A case-insensitive substring used to filter customers whose external ID contains the specified value.
</ParamField>

<ParamField query="name" type="string">
  The name of the customers to fetch.
</ParamField>

<ParamField query="name_contains" type="string">
  A case-insensitive substring used to filter customers whose name contains the specified value.
</ParamField>

### Response

Returns a list of [Customer objects](/api-reference/invoice/customer)

<RequestExample>
  ```bash Request theme={null}
  curl -X GET https://sandbox.layerfi.com/v1/businesses/${business_id}/customers/ \
    -H "Authorization: Bearer <access_token>" \
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": [
      {
        "external_id": "customer-1",
        "individual_name": "John Doe",
        "company_name": "Acme, Inc.",
        "email": "john@hotmail.com",
        "mobile_phone": "555-555-5555",
        "office_phone": "555-555-5555",
        "address_string": "123 Main St, Phoenix, AZ 85001",
        "notes": "This is a note"
      },
      {
        "external_id": "customer-2",
        "individual_name": "Jane Doe",
        "company_name": "MegaCorp",
        "email": "jane@hotmail.com"
      }
    ]
  }
  ```
</ResponseExample>
