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

# Get Customer

> Retrieve a single customer by ID

# Get Customer

Returns a single customer with full details including addresses and order history summary.

## Request

```bash theme={null}
curl -X GET "https://api.launchmystore.io/api/v1/customers/cust_abc123.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
```

## Parameters

<ParamField path="id" type="string" required>
  The unique customer ID
</ParamField>

## Response

Returns a top-level `customer` object.

<ResponseField name="customer" type="object">
  The customer object

  <Expandable title="Customer Object">
    <ResponseField name="id" type="string">
      Unique customer ID
    </ResponseField>

    <ResponseField name="email" type="string">
      Customer email
    </ResponseField>

    <ResponseField name="first_name" type="string">
      First name (parsed from the full name)
    </ResponseField>

    <ResponseField name="last_name" type="string">
      Last name (parsed from the full name)
    </ResponseField>

    <ResponseField name="name" type="string">
      Full name
    </ResponseField>

    <ResponseField name="phone" type="string">
      Phone number
    </ResponseField>

    <ResponseField name="accepts_marketing" type="boolean">
      Marketing opt-in status
    </ResponseField>

    <ResponseField name="addresses" type="array">
      Array of customer addresses
    </ResponseField>

    <ResponseField name="addresses_count" type="integer">
      Number of saved addresses
    </ResponseField>

    <ResponseField name="default_address" type="object">
      Default address (or `null`)
    </ResponseField>

    <ResponseField name="orders" type="array">
      Array of the customer's orders
    </ResponseField>

    <ResponseField name="orders_count" type="integer">
      Total number of orders
    </ResponseField>

    <ResponseField name="last_order" type="object">
      Most recent order (or `null`)
    </ResponseField>

    <ResponseField name="total_spent" type="string">
      Total amount spent, as a decimal string
    </ResponseField>

    <ResponseField name="tags" type="array">
      Customer tags
    </ResponseField>

    <ResponseField name="tax_exempt" type="boolean">
      Whether customer is tax exempt
    </ResponseField>

    <ResponseField name="has_account" type="boolean">
      Whether the customer has a registered account
    </ResponseField>

    <ResponseField name="metafields" type="object">
      Custom data attached to the customer
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Creation timestamp (ISO 8601)
    </ResponseField>

    <ResponseField name="updated_at" type="string">
      Last update timestamp (ISO 8601)
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Response

```json theme={null}
{
  "customer": {
    "id": "cust_abc123",
    "email": "john.doe@example.com",
    "first_name": "John",
    "last_name": "Doe",
    "name": "John Doe",
    "phone": "+1-555-123-4567",
    "accepts_marketing": true,
    "addresses": [
      {
        "id": "addr_123",
        "first_name": "John",
        "last_name": "Doe",
        "company": "Acme Inc",
        "address1": "123 Main St",
        "address2": "Suite 100",
        "city": "New York",
        "province": "NY",
        "province_code": "NY",
        "country": "United States",
        "country_code": "US",
        "zip": "10001",
        "phone": "+1-555-123-4567",
        "default": true
      }
    ],
    "addresses_count": 1,
    "default_address": {
      "id": "addr_123",
      "first_name": "John",
      "last_name": "Doe",
      "address1": "123 Main St",
      "city": "New York",
      "province": "NY",
      "country": "United States",
      "country_code": "US",
      "zip": "10001",
      "default": true
    },
    "orders": [],
    "orders_count": 5,
    "last_order": null,
    "total_spent": "250.00",
    "tags": [],
    "tax_exempt": false,
    "has_account": true,
    "metafields": {},
    "created_at": "2023-06-15T10:30:00.000Z",
    "updated_at": "2024-01-20T14:45:00.000Z"
  }
}
```

## Errors

On failure an `errors` object is returned with the failure messages under `base`:

```json theme={null}
{
  "errors": {
    "base": ["Customer not found"]
  }
}
```

| Status | Condition                                     |
| ------ | --------------------------------------------- |
| `401`  | Invalid or missing access token               |
| `403`  | App doesn't have `read_customers` scope       |
| `404`  | Customer with the specified ID does not exist |
