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

# Search Customer By Email

> Endpoint to retrieve customer details by email

<RequestExample>
  ```bash Request Example theme={null}
  curl --request GET `https://api.mayar.id/hl/v1/customer/detail?email=testingmayar@gmail.com` \
    --header 'Authorization: Bearer Paste-Your-API-Key-Here'
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example 200 theme={null}
  {
      "statusCode": 200,
      "messages": "success",
      "data": {
          "id": "22eb6224-c20a-4bc2-9b99-13b21e7048c6",
          "createdAt": 1730782544663,
          "email": "testingmayar@gmail.com",
          "mobile": "08112280103422",
          "name": "Test Mayar",
          "status": "active",
          "updatedAt": 1730782544663,
          "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413",
          "user": {
              "id": "348e083d-315a-4e5c-96b1-5a2a98c48413",
              "name": "GlazerOut",
              "urlHook": "https://qtwxxqfulqrpuerjmtya.supabase.co/functions/v1/payment-webhook",
              "email": "aldodwrzy@gmail.com",
              "paymeLink": "testingmayar",
              "isSelfDomain": false,
              "accountId": "be305ea4-5fe1-4bb9-a5c8-6bc1d0bfd279",
              "account": {
                  "id": "be305ea4-5fe1-4bb9-a5c8-6bc1d0bfd279",
                  "name": "Mayar Team",
                  "imageId": "efeecb5d-acac-45f8-8249-396f8a5b6a95",
                  "logo": {
                      "id": "efeecb5d-acac-45f8-8249-396f8a5b6a95",
                      "fileType": "jpeg",
                      "url": "https://media.mayar.id/images/efeecb5d-acac-45f8-8249-396f8a5b6a95.jpeg"
                  }
              }
          }
      }
  }
  ```
</ResponseExample>

Endpoint:

<CodeGroup>
  ```Production Production theme={null}
  https://api.mayar.id/hl/v1/customer/detail?email={inputyourcustomeremail}
  ```

  ```Sandbox Sandbox theme={null}
  https://api.mayar.club/hl/v1/customer/detail?email={inputyourcustomeremail}
  ```
</CodeGroup>

## Authorization

<ResponseField name="Authorization" type="string" required>
  Example:

  `Authorization | Bearer Paste-Your-Api-Key-Here`
</ResponseField>

## Query Parameters

<ParamField query="email" type="string" required>
  Customer email address used to search customer details.
</ParamField>

## Response

Successful Response

## Main Structure (Root)

<ResponseField name="statusCode" type="integer">
  Status code returned by the API.
</ResponseField>

<ResponseField name="messages" type="string">
  Status message that describes the API response.
</ResponseField>

<ResponseField name="data" type="object">
  Customer detail object.
</ResponseField>

### data Structure (Object)

<ResponseField name="data.id" type="string">
  Unique customer ID.
</ResponseField>

<ResponseField name="data.createdAt" type="number">
  Unix timestamp in milliseconds indicating when the customer was created.
</ResponseField>

<ResponseField name="data.email" type="string">
  Customer email address.
</ResponseField>

<ResponseField name="data.mobile" type="string">
  Customer phone number.
</ResponseField>

<ResponseField name="data.name" type="string">
  Customer full name.
</ResponseField>

<ResponseField name="data.status" type="string">
  Current customer status.
</ResponseField>

<ResponseField name="data.updatedAt" type="number">
  Unix timestamp in milliseconds indicating when the customer was last updated.
</ResponseField>

<ResponseField name="data.userId" type="string">
  Unique user ID associated with the customer.
</ResponseField>

<ResponseField name="data.user" type="object">
  User information object associated with the customer.
</ResponseField>

<ResponseField name="data.user.id" type="string">
  Unique user ID.
</ResponseField>

<ResponseField name="data.user.name" type="string">
  User full name.
</ResponseField>

<ResponseField name="data.user.urlHook" type="string">
  Webhook URL configured by the user.
</ResponseField>

<ResponseField name="data.user.email" type="string">
  User email address.
</ResponseField>

<ResponseField name="data.user.paymeLink" type="string">
  User payment link identifier.
</ResponseField>

<ResponseField name="data.user.isSelfDomain" type="boolean">
  Indicates whether the user uses a custom domain.
</ResponseField>

<ResponseField name="data.user.accountId" type="string">
  Unique account ID associated with the user.
</ResponseField>

<ResponseField name="data.user.account" type="object">
  Account information object.
</ResponseField>

<ResponseField name="data.user.account.id" type="string">
  Unique account ID.
</ResponseField>

<ResponseField name="data.user.account.name" type="string">
  Account name.
</ResponseField>

<ResponseField name="data.user.account.imageId" type="string">
  Unique image ID associated with the account logo.
</ResponseField>

<ResponseField name="data.user.account.logo" type="object">
  Account logo object.
</ResponseField>

<ResponseField name="data.user.account.logo.id" type="string">
  Unique logo image ID.
</ResponseField>

<ResponseField name="data.user.account.logo.fileType" type="string">
  Logo file type.
</ResponseField>

<ResponseField name="data.user.account.logo.url" type="string">
  Public URL of the account logo image.
</ResponseField>
