프로필 조회
curl --request GET \
--url https://sajuapi.dev/v1/profiles/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/profiles/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/profiles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/profiles/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/profiles/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sajuapi.dev/v1/profiles/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body프로필
프로필 조회
GET
/
v1
/
profiles
/
{id}
프로필 조회
curl --request GET \
--url https://sajuapi.dev/v1/profiles/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://sajuapi.dev/v1/profiles/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://sajuapi.dev/v1/profiles/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sajuapi.dev/v1/profiles/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sajuapi.dev/v1/profiles/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sajuapi.dev/v1/profiles/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sajuapi.dev/v1/profiles/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyv1 Enterprise API (Coming Soon)이 엔드포인트는 Enterprise 버전에서 제공될 예정입니다.
현재는 v0 API를 사용하세요.
마스킹되지 않은 원본 데이터가 필요한 경우 프로필 복호화 조회 엔드포인트를 사용하세요.
Path 파라미터
string
required
조회할 프로필의 ID입니다.
prf_ 접두사로 시작합니다.Response
성공
프로필 조회에 성공하면 Profile 객체가 반환됩니다. 민감한 정보는 마스킹되어 반환됩니다.실패
| 상태 코드 | 에러 타입 | 설명 |
|---|---|---|
| 401 | authentication_error | API 키가 유효하지 않음 |
| 404 | not_found | 프로필을 찾을 수 없음 |
| 429 | rate_limited | 요청 한도 초과 |
요청 예시
curl -X GET https://api.sajuapi.dev/v1/profiles/prf_abc123def456 \
-H "X-API-Key: bs_live_xxx"
const response = await fetch(
'https://api.sajuapi.dev/v1/profiles/prf_abc123def456',
{
headers: {
'X-API-Key': 'bs_live_xxx'
}
}
);
const profile = await response.json();
import requests
response = requests.get(
'https://api.sajuapi.dev/v1/profiles/prf_abc123def456',
headers={'X-API-Key': 'bs_live_xxx'}
)
profile = response.json()
응답 예시
{
"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 형식입니다. |
⌘I