# Retrieve Customer by External ID

This request enables you to retrieve details of customers based on their `merchant_customer_id`, which needs to be provided in the request path.

**GET** `/customers`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Retrieve Customer by External ID

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Query parameters

- `merchant_customer_id` (string)
  The unique identifier of the customer in the external merchant (MAX 255; MIN 1).

## Responses

### 200

200

- `id` (string)
- `merchant_customer_id` (string)
- `first_name` (string)
- `last_name` (string)
- `gender` (string)
- `date_of_birth` (string)
- `email` (string)
- `nationality` (string)
- `country` (string)
- `document` (object)
  - `document_type` (string)
  - `document_number` (string)
- `phone` (object)
  - `number` (string)
  - `country_code` (string)
- `billing_address` (object)
  - `address_line_1` (string)
  - `address_line_2` (string)
  - `country` (string)
  - `state` (string)
  - `city` (string)
  - `zip_code` (string)
  - `neighborhood` (string)
- `shipping_address` (object)
  - `address_line_1` (string)
  - `address_line_2` (string)
  - `country` (string)
  - `state` (string)
  - `city` (string)
  - `zip_code` (string)
  - `neighborhood` (string)
- `metadata` (object[])
  - `key` (string)
  - `value` (string)
- `created_at` (string)
- `updated_at` (string)
- `merchant_customer_created_at` (string)

Example:

```json
{
  "id": "94121f98-98f7-4d57-aa5f-228401d35b12",
  "merchant_customer_id": "1744402154",
  "first_name": "John",
  "last_name": "Doe",
  "gender": "F",
  "date_of_birth": "1990-02-28",
  "email": "john.doe@gmail.com",
  "nationality": "CO",
  "country": "CO",
  "document": {
    "document_type": "CC",
    "document_number": "1010268952"
  },
  "phone": {
    "number": "3132450765",
    "country_code": "57"
  },
  "billing_address": {
    "address_line_1": "Calle 34 # 56 - 78",
    "address_line_2": "Apartamento 502, Torre I",
    "country": "CO",
    "state": "Cundinamarca",
    "city": "Bogotá",
    "zip_code": "111111",
    "neighborhood": "Test"
  },
  "shipping_address": {
    "address_line_1": "Calle 34 # 56 - 78",
    "address_line_2": "Apartamento 502, Torre I",
    "country": "CO",
    "state": "Cundinamarca",
    "city": "Bogotá",
    "zip_code": "111111",
    "neighborhood": "Test"
  },
  "metadata": [
    {
      "key": "ID",
      "value": "1234"
    }
  ],
  "created_at": "2025-04-11T20:09:14.927971Z",
  "updated_at": "2025-04-11T20:09:14.927972Z",
  "merchant_customer_created_at": "2023-08-05T14:43:58.980718Z"
}
```

### 400

400

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "INVALID_REQUEST",
  "messages": [
    "Invalid request"
  ]
}
```

### 401

401

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "INVALID_CREDENTIALS",
  "messages": [
    "Invalid credentials"
  ]
}
```

### 403

403

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "AUTHORIZATION_REQUIRED",
  "messages": [
    "The merchant has no authorization to use this API."
  ]
}
```

### 404

404

- `code` (string)
- `messages` (string[])

Example:

```json
{
  "code": "CUSTOMER_NOT_FOUND",
  "messages": [
    "Customer not found"
  ]
}
```