# 

## Prerequisites

* A valid API key — see [Obtain API credentials](/docs/how-tos/setup/obtain-credentials)


## Client reporting endpoints

| Endpoint | Method | Description |
|  --- | --- | --- |
| `/v1/clients` | GET | List all client accounts |
| `/v1/clients/{id}` | GET | Retrieve details for a specific client |


## Option A: List all clients

Send `GET /v1/clients` to retrieve all client accounts visible to the authenticated account.

curl
```shell
curl https://api.dev.paradisegateway.net/v1/clients \
  -H "APIKEY: YOUR-API-KEY"
```

Python
```python
import requests

resp = requests.get(
    "https://api.dev.paradisegateway.net/v1/clients",
    headers={"APIKEY": "YOUR-API-KEY"},
)
clients = resp.json()
for c in clients:
    print(f"{c['id']} — {c['dba']} ({c['type']})")
```

JavaScript
```javascript
const resp = await fetch(
  "https://api.dev.paradisegateway.net/v1/clients",
  { headers: { "APIKEY": "YOUR-API-KEY" } }
);
const clients = await resp.json();
clients.forEach((c) => console.log(`${c.id} — ${c.dba} (${c.type})`));
```

C#
```csharp
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("APIKEY", "YOUR-API-KEY");
var resp = await client.GetAsync(
    "https://api.dev.paradisegateway.net/v1/clients");
Console.WriteLine(await resp.Content.ReadAsStringAsync());
```

Java
```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.dev.paradisegateway.net/v1/clients"))
    .header("APIKEY", "YOUR-API-KEY")
    .GET().build();
HttpResponse<String> resp = client.send(request,
    HttpResponse.BodyHandlers.ofString());
System.out.println(resp.body());
```

Go
```go
req, _ := http.NewRequest("GET",
    "https://api.dev.paradisegateway.net/v1/clients", nil)
req.Header.Set("APIKEY", "YOUR-API-KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
```

PHP
```php
$ch = curl_init("https://api.dev.paradisegateway.net/v1/clients");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["APIKEY: YOUR-API-KEY"],
]);
echo curl_exec($ch); curl_close($ch);
```

Ruby
```ruby
require "net/http"
uri = URI("https://api.dev.paradisegateway.net/v1/clients")
req = Net::HTTP::Get.new(uri, { "APIKEY" => "YOUR-API-KEY" })
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts resp.body
```

### Response

The response is an array of client objects.

```json
[
  {
    "id": "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa",
    "object": "client",
    "dba": "Acme Jewelry",
    "parent_id": "CLIENT-01JMRSPCK7XVNP3KS8F2W4T6Y",
    "type": "merchant",
    "admin_contact_details": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "john.doe@example.com",
      "phone": "+15551234567",
      "time_zone": "America/New_York"
    },
    "correlation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
]
```

## Option B: Retrieve a specific client

Send `GET /v1/clients/{id}` to get the full details of a single client account.

curl
```shell
curl https://api.dev.paradisegateway.net/v1/clients/CLIENT-3MtwBwLkdIwHu7ix28a3tqPa \
  -H "APIKEY: YOUR-API-KEY"
```

Python
```python
client_id = "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa"
resp = requests.get(
    f"https://api.dev.paradisegateway.net/v1/clients/{client_id}",
    headers={"APIKEY": "YOUR-API-KEY"},
)
print(resp.json())
```

JavaScript
```javascript
const clientId = "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa";
const resp = await fetch(
  `https://api.dev.paradisegateway.net/v1/clients/${clientId}`,
  { headers: { "APIKEY": "YOUR-API-KEY" } }
);
console.log(await resp.json());
```

C#
```csharp
var clientId = "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa";
var resp = await client.GetAsync(
    $"https://api.dev.paradisegateway.net/v1/clients/{clientId}");
Console.WriteLine(await resp.Content.ReadAsStringAsync());
```

Java
```java
String clientId = "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa";
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create(
        "https://api.dev.paradisegateway.net/v1/clients/" + clientId))
    .header("APIKEY", "YOUR-API-KEY")
    .GET().build();
HttpResponse<String> resp = client.send(request,
    HttpResponse.BodyHandlers.ofString());
System.out.println(resp.body());
```

Go
```go
clientId := "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa"
req, _ := http.NewRequest("GET",
    "https://api.dev.paradisegateway.net/v1/clients/"+clientId, nil)
req.Header.Set("APIKEY", "YOUR-API-KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
```

PHP
```php
$clientId = "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa";
$ch = curl_init("https://api.dev.paradisegateway.net/v1/clients/$clientId");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ["APIKEY: YOUR-API-KEY"],
]);
echo curl_exec($ch); curl_close($ch);
```

Ruby
```ruby
client_id = "CLIENT-3MtwBwLkdIwHu7ix28a3tqPa"
uri = URI("https://api.dev.paradisegateway.net/v1/clients/#{client_id}")
req = Net::HTTP::Get.new(uri, { "APIKEY" => "YOUR-API-KEY" })
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts resp.body
```

### Key client fields

| Field | Description |
|  --- | --- |
| `id` | Unique client identifier |
| `dba` | Doing-business-as name |
| `type` | `merchant` or `reseller` |
| `parent_id` | Parent account in the hierarchy |
| `admin_contact_details` | Primary admin contact information |


## Visibility rules

The list of clients you see depends on your API key's position in the account hierarchy:

| Your account type | Clients visible |
|  --- | --- |
| Top-level reseller | All merchants and sub-resellers in your hierarchy |
| Sub-reseller | Only merchants under your account |
| Merchant | Only your own client record |


## Next steps

* [Onboard a new client](/docs/how-tos/clients-users/onboard-client)
* [About clients and resellers](/docs/concepts/account-hierarchy/clients-and-resellers)
* [Generate a user report](/docs/how-tos/reports/user-reports)