## Customers of the tenant for the customer picker (desk:write, desk:admin or hr:work:billing)

`GET /api/desk/v1/directory/customers`

Module: Desk · operationId: `searchCustomers` · Tag: Configuration · Auth: access token (`Authorization: Bearer <accessToken>`)

Masterdata addresses with the role customer, matching `q` by name, number or city (at most 20). The `id` is what a ticket's, project's or work entry's `customer.id` stores.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `q` | query | string |  |  |

### Responses

- **200** Customers (`application/json`)
- **403** Error (`application/json`)
- **503** Masterdata is not configured or not reachable (`application/json`)

Fields of the 200 answer:

- `items` (array of CustomerOption, required)
  - `id` (string (uuid), required): Masterdata address id – the customer ref of tickets
  - `name` (string, required): Name of the customer
  - `adrNr` (string): Address number in masterdata
  - `blockReason` (string): Why the customer is blocked
  - `blocked` (boolean): The customer is blocked in masterdata
  - `city` (string): City of the customer
  - `customerNumber` (string): Customer number

Example 200 answer:

```json
{
  "items": [
    {
      "adrNr": "10005",
      "blockReason": "",
      "blocked": false,
      "city": "Neutraubling",
      "customerNumber": "10005",
      "id": "3c5e7a9c-1d3f-4b5a-9c7e-1a3c5e7a9c21",
      "name": "Donau Maschinenbau AG"
    }
  ]
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/desk/v1/directory/customers' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
