## Get single subscriber's account

### cURL

```bash
curl --request GET \
  --url https://prod01.copilot.fabric.inc/data-subscription/v1/customers/{id} \
  --header 'Authorization: Bearer <token>'
```

### Python

```python
import requests

url = "https://prod01.copilot.fabric.inc/data-subscription/v1/customers/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

### JavaScript (Fetch)

```javascript
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://prod01.copilot.fabric.inc/data-subscription/v1/customers/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### PHP

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://prod01.copilot.fabric.inc/data-subscription/v1/customers/{id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
?>
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

url := "https://prod01.copilot.fabric.inc/data-subscription/v1/customers/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}
```

### HTTP Response Examples

#### Success Response (200)
```json
{
  "id": "62cffd65e8d7eb868c6a29d6",
  "customerReferenceId": "12345",
  "locale": "en_US",
  "email": "customer@example.com",
  "contactNumber": "+923333709568",
  "firstName": "Pat",
  "middleName": "E",
  "lastName": "Kake",
  "segment": [
    "employee"
  ],
  "employeeId": "345",
  "communicationPreference": {
    "email": true,
    "sms": true
  },
  "status": "ACTIVE",
  "createdAt": "2021-10-12T21:35:05.756Z",
  "updatedAt": "2021-10-14T05:40:55.997Z"
}
```

#### Not Found Response (404)
```json
{
  "responseStatus": "NOT_FOUND",
  "message": "Not found"
}
```

### Authorizations

#### Authorization
- *Type:* string
- *Location:* header
- *Required:* Bearer authentication header of the form `Bearer <token>`, where `<token>` is your auth token.

### Path Parameters

- **id** (string, required): Customer ID. Example: `"62cffd65e8d7eb868c6a29d6"`

### Response Details

- **200 Response**: Customer details after creation.
- **Attributes:**
  - **id** (string): Customer ID.
  - **customerReferenceId** (string): Customer reference ID.
  - **locale** (string): Customer locale (language_country).
  - **email** (string): Customer's email address.
  - **contactNumber** (string): Customer's contact number.
  - **firstName** (string): Customer's first name.
  - **middleName** (string): Customer's middle name or initial.
  - **lastName** (string): Customer's last name.
  - **segment** (string[]): Customer's segments.
  - **employeeId** (string): Customer employee ID.
  - **communicationPreference** (object): Customer's communications preferences.
  - **status** (enum<string>): Customer status (`ACTIVE`, `INACTIVE`).
  - **createdAt** (string): Time customer was created.
  - **updatedAt** (string): Most recent time customer was updated.
