> Read a customer's details by the id Plandalf sends in webhook payloads. A key only reads its own organization's customers.

Source: https://plandalf.com/docs/api/customers

API and webhooks

# Customers

Read a customer's details by their Plandalf id, the `customer.id` in [webhook](https://plandalf.com/docs/api/webhooks) payloads. The dashboard's view of customers is in [Customers](https://plandalf.com/docs/customers/customers).

## Example

```bash
curl https://admin.plandalf.dev/api/v1/customers/1 \
  -H "Authorization: Bearer $PLANDALF_API_KEY"
```

A key only reads its own organization's customers. Any other id returns `404`.

## Endpoint

### Retrieve a customer

GET `/api/v1/customers/{customer}`

`customer` is the customer's numeric id, as sent in webhook payloads.

#### Parameters

Name

In

Type

What it is

`customer`

path

`integer`

The customer ID

```bash
curl https://admin.plandalf.dev/api/v1/customers/:customer \
  -H "Authorization: Bearer $PLANDALF_API_KEY"
```

#### Response

```json
{
  "id": "string",
  "reference_id": "string",
  "name": "string",
  "email": "string",
  "currency": "string",
  "timezone": "string",
  "has_default_payment_method": true,
  "is_new_customer": true,
  "created_at": "string"
}
```

#### Errors

Status

When

`401`

The API key or OAuth token is missing or invalid.

`404`

Nothing with that id or code exists in this organization.

Something wrong or missing? Email [hello@plandalf.com](mailto:hello@plandalf.com).
