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

# Get birthday

> Get a customer's date of birth.

Get the customer's date of birth. The `identifier` can be a Shopify customer ID or email.

## Response

`date_of_birth` will be `null` if the customer has not provided their date of birth.

## Errors

| Status | Scenario                                                              |
| ------ | --------------------------------------------------------------------- |
| `404`  | Customer not found                                                    |
| `429`  | [Rate limit](/api-reference/rate-limits) exceeded (6 requests/second) |

<RequestExample>
  ```bash cURL (Shopify ID) theme={null}
  curl --request GET \
    --url https://api.mageloyalty.com/v1/customers/6789012345/birthday \
    --header 'Authorization: <api-key>'
  ```

  ```bash cURL (email) theme={null}
  curl --request GET \
    --url https://api.mageloyalty.com/v1/customers/jane@example.com/birthday \
    --header 'Authorization: <api-key>'
  ```

  ```javascript Node theme={null}
  const response = await fetch(
    "https://api.mageloyalty.com/v1/customers/6789012345/birthday",
    {
      method: "GET",
      headers: { Authorization: "<api-key>" },
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.mageloyalty.com/v1/customers/6789012345/birthday",
      headers={"Authorization": "<api-key>"},
  )

  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init("https://api.mageloyalty.com/v1/customers/6789012345/birthday");
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => ["Authorization: <api-key>"],
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "type": "customer_birthday",
      "id": "6789012345",
      "attributes": {
        "shopify_customer_id": "6789012345",
        "email": "jane@example.com",
        "date_of_birth": "1990-05-15T00:00:00.000Z"
      }
    }
  }
  ```

  ```json 200 OK (no birthday on file) theme={null}
  {
    "data": {
      "type": "customer_birthday",
      "id": "6789012345",
      "attributes": {
        "shopify_customer_id": "6789012345",
        "email": "jane@example.com",
        "date_of_birth": null
      }
    }
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "errors": [
      {
        "status": "404",
        "title": "Not Found",
        "detail": "Customer '6789012345' not found"
      }
    ]
  }
  ```
</ResponseExample>
