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

# List Locations

> The dealers and dealer locations your key can reach

Returns the dealers (and their child locations) your key can reach, as one flat list sorted by company name and city. Use it to check which dealers Okasie linked to your key and to look up their Dealer ID (`locationCode`) and UUID (`id`). There is no paging.

Any valid API key can call this endpoint. It is not rate limited and returns no rate limit headers.

## Query parameters

**parentId** `string`

Only this dealer UUID (and, with `includeChildren`, its child locations). Also accepted as `parent_id`. A value that is not a UUID is ignored.

**includeChildren** `boolean` (default: true)

Only used with `parentId`: `true` returns the dealer and all its child locations, `false` only the dealer itself. Accepts `true`/`false`, `1`/`0`, `yes`/`no`.

**withCounts** `boolean` (default: true)

Fill `stats` with listing counts. With `false`, every count is `0`.

**search** `string`

Case-insensitive text match on company name, name, city, province and Dealer ID.

## Response

**data** `object[]`

**location properties**

**id** `string`

Dealer profile UUID; usable as `dealerProfileId`.

**parentId** `string | null`

UUID of the parent dealer, `null` when there is none.

**isRoot** `boolean | null`

`true` when Okasie linked this dealer directly to your key, `false` for a child location reached through it (and for every location when your key has no dealer restriction).

**locationCode** `string | null`

Dealer ID, for example `OK-00148`; usable as `dealerLocationCode`.

**companyName** `string | null`

Company name.

**fullName** `string | null`

Name of the account holder.

**displayName** `string | null`

Company name, else name, else e-mail.

**email** `string | null`

E-mail.

**phone** `string | null`

Phone.

**address** `string | null`

Street address.

**postalCode** `string | null`

Postal code.

**city** `string | null`

City.

**province** `string | null`

Province.

**logoUrl** `string | null`

Logo.

**metadata** `object`

Extra location data, `{}` when none.

**parent** `object | null`

`id`, `locationCode`, `companyName`, `fullName`, `displayName` of the parent dealer.

**stats** `object`

`activeListings`, `totalListings`, `avgActivePrevMonth` (number or `null`).

**updatedAt** `string | null`

ISO 8601.

**meta** `object`

`total` (number of locations), `profileIds` (their UUIDs), `rootProfileIds` (the dealers linked to your key), `filters` (`parentId`, `search`) and `partner` (`id`, `name`, `access`).

```bash cURL theme={null}
curl "https://www.okasie.be/api/external/v1/locations" \
  -H "Authorization: Bearer YOUR_API_SECRET"
```

```json 200 theme={null}
{
  "data": [
    {
      "id": "7f7f7f7f-7f7f-407f-a7f7-7f7f7f7f7f7f",
      "parentId": null,
      "isRoot": true,
      "locationCode": "OK-00148",
      "companyName": "Example Cars BV",
      "fullName": null,
      "displayName": "Example Cars BV",
      "email": "sales@example.com",
      "phone": "+32 9 000 00 00",
      "address": "Voorbeeldstraat 1",
      "postalCode": "9000",
      "city": "Gent",
      "province": "Oost-Vlaanderen",
      "logoUrl": null,
      "metadata": {},
      "parent": null,
      "stats": {"activeListings": 42, "totalListings": 57, "avgActivePrevMonth": 40},
      "updatedAt": "2026-10-20T08:00:00.000Z"
    }
  ],
  "meta": {
    "total": 1,
    "profileIds": ["7f7f7f7f-7f7f-407f-a7f7-7f7f7f7f7f7f"],
    "rootProfileIds": ["7f7f7f7f-7f7f-407f-a7f7-7f7f7f7f7f7f"],
    "filters": {"parentId": null, "search": null},
    "partner": {
      "id": "your-partner-name",
      "name": "your-partner-name",
      "access": {
        "scope": "restricted",
        "rootProfileIds": ["7f7f7f7f-7f7f-407f-a7f7-7f7f7f7f7f7f"],
        "profileIds": ["7f7f7f7f-7f7f-407f-a7f7-7f7f7f7f7f7f"]
      }
    }
  }
}
```

A key that reaches no dealer yet gets `200` with an empty `data` array.

## Errors

| Status | Body | When |
| - | - | - |
| 401 | `{"error": "Unauthorized"}` | Missing or unknown API key |
| 500 | `{"error": "Failed to load locations"}` | Okasie could not read the locations; retry later |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.