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

# 프로필 조회

<Info>
  **v1 Enterprise API (Coming Soon)**

  이 엔드포인트는 Enterprise 버전에서 제공될 예정입니다.
  현재는 [v0 API](/api-reference/v0/overview)를 사용하세요.
</Info>

특정 프로필의 정보를 조회합니다. 민감한 정보(이름, 생년월일)는 마스킹 처리되어 반환됩니다.

<Note>
  마스킹되지 않은 원본 데이터가 필요한 경우 [프로필 복호화 조회](/api-reference/profiles/unmasked) 엔드포인트를 사용하세요.
</Note>

***

## Path 파라미터

<ParamField path="id" type="string" required>
  조회할 프로필의 ID입니다. `prf_` 접두사로 시작합니다.
</ParamField>

***

## Response

### 성공

프로필 조회에 성공하면 Profile 객체가 반환됩니다. 민감한 정보는 마스킹되어 반환됩니다.

### 실패

| 상태 코드 | 에러 타입                  | 설명             |
| ----- | ---------------------- | -------------- |
| 401   | `authentication_error` | API 키가 유효하지 않음 |
| 404   | `not_found`            | 프로필을 찾을 수 없음   |
| 429   | `rate_limited`         | 요청 한도 초과       |

***

## 요청 예시

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET https://api.sajuapi.dev/v1/profiles/prf_abc123def456 \
    -H "X-API-Key: bs_live_xxx"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.sajuapi.dev/v1/profiles/prf_abc123def456',
    {
      headers: {
        'X-API-Key': 'bs_live_xxx'
      }
    }
  );

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

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

  response = requests.get(
      'https://api.sajuapi.dev/v1/profiles/prf_abc123def456',
      headers={'X-API-Key': 'bs_live_xxx'}
  )

  profile = response.json()
  ```
</CodeGroup>

***

## 응답 예시

```json theme={null}
{
  "id": "prf_abc123def456",
  "external_id": "user_12345",
  "name": "김**",
  "birth_year": "19**",
  "gender": "male",
  "day_master": "병화",
  "day_master_element": "fire",
  "weakest_element": "water",
  "created_at": "2025-01-15T09:00:00Z",
  "updated_at": "2025-01-15T09:00:00Z"
}
```

***

## Profile 객체

| 필드                   | 타입     | 설명                                                            |
| -------------------- | ------ | ------------------------------------------------------------- |
| `id`                 | string | 프로필 ID입니다. `prf_` 접두사로 시작합니다.                                 |
| `external_id`        | string | 클라이언트 시스템의 사용자 ID입니다.                                         |
| `name`               | string | 사용자 이름입니다. 마스킹되어 반환됩니다. (예: 김\*\*)                            |
| `birth_year`         | string | 출생 연도입니다. 마스킹되어 반환됩니다. (예: 19\*\*)                            |
| `gender`             | string | 성별입니다. `male` 또는 `female` 중 하나입니다.                            |
| `day_master`         | string | 일주(日柱)입니다. 갑목, 을목, 병화, 정화, 무토, 기토, 경금, 신금, 임수, 계수 중 하나입니다.    |
| `day_master_element` | string | 일주의 오행입니다. `wood`, `fire`, `earth`, `metal`, `water` 중 하나입니다. |
| `weakest_element`    | string | 가장 약한 오행입니다. 사주에서 가장 부족한 원소를 나타냅니다.                           |
| `created_at`         | string | 프로필 생성 시간입니다. ISO 8601 형식입니다.                                 |
| `updated_at`         | string | 프로필 수정 시간입니다. ISO 8601 형식입니다.                                 |
