본문으로 건너뛰기

궁합 조회

1단계: 파트너 등록

POST /api/partners

Headers

Authorization: Bearer {accessToken}
Content-Type: application/json

Request Body

필드타입필수설명
namestring (max 30)Y파트너 이름/닉네임
birthDatestring (YYYY-MM-DD)Y생년월일
birthTimestring (HH:mm)N출생 시간. 모르면 null
genderstringYMALE | FEMALE
calendarTypestringYSOLAR | LUNAR
citystringN출생 도시
{
"name": "김철수",
"birthDate": "1993-07-20",
"birthTime": null,
"gender": "MALE",
"calendarType": "SOLAR",
"city": "부산"
}

응답 201 Created

{
"status": 201,
"message": "created",
"data": {
"partnerId": 3001,
"name": "김철수",
"birthDate": "1993-07-20",
"gender": "MALE"
}
}

2단계: 궁합 조회

GET /api/saju/me/compatibility/{partnerId}

Ablecity의 궁합 분석은 비동기 웹훅 방식으로 처리됩니다. 응답은 COMPLETE 또는 PENDING 상태로 반환됩니다.

성공 응답 — COMPLETE 200 OK

{
"status": 200,
"message": "success",
"data": {
"status": "COMPLETE",
"totalScore": 78,
"sections": [
{
"category": "성격 궁합",
"score": 82,
"description": "두 분은 서로 보완적인 성격을 가지고 있습니다..."
},
{
"category": "소통 궁합",
"score": 75,
"description": "대화 스타일이 달라 처음에는 어색할 수 있으나..."
},
{
"category": "감성 궁합",
"score": 80,
"description": "감정 표현 방식에서 공통점이 많습니다..."
}
],
"overallMessage": "두 분의 오행이 상생하는 좋은 조합입니다."
}
}

타임아웃 응답 — PENDING 200 OK

Ablecity 연산이 타임아웃 내에 완료되지 않으면 PENDING을 반환합니다. 클라이언트는 재요청합니다.

{
"status": 200,
"message": "success",
"data": {
"status": "PENDING"
}
}

에러

상황HTTPerrorCode
내 사주 미등록404SAJU_NOT_FOUND
파트너 없음404PARTNER_NOT_FOUND