Base URL:
http://localhost:8082(로컬) /https://api.sofly.com(운영)
서비스:
travel-supply-service(포트 8082) · 공통 prefix:/supply/hotels
목적지 입력창 자동완성 → GET /supply/hotels/destinations
검색하기 버튼 클릭 → GET /supply/hotels/offers
정렬 옵션 드롭다운 로드 → GET /supply/hotels/sort-options
필터 패넬 로드 → GET /supply/hotels/filter-options
권장 호출 순서: (1) 목적지 입력 시 destinations 호출 → destId, searchType 획득 (2) 검색 버튼 클릭 시 sort-options + filter-options + offers 동시 호출 (3) 정렬/필터 변경 시 offers 재호출
GET /supply/hotels/destinations?query={검색어}
| 파라미터 | 타입 | 필수 | 설명 | 예시 |
|---|---|---|---|---|
query |
String | ✅ | 도시명, 지역명 등 | "seoul", "tokyo" |
[
{
"destId": "-716357", "destType": "CITY", "name": "Seoul",
"label": "Seoul, Seoul, South Korea", "cityName": "Seoul",
"country": "South Korea", "region": "Seoul",
"latitude": 37.5665, "longitude": 126.9780,
"imageUrl": "https://...", "hotels": 1200
}
]
| 필드 | 타입 | 설명 |
|---|---|---|
destId |
String | 목적지 ID — 이후 검색에 필수 |
destType |
String | 목적지 타입 (CITY, LANDMARK, DISTRICT 등) |
name / label / cityName / country / region |
String | 표시용 텍스트 필드들 |
latitude / longitude |
Double | 위경도 |
imageUrl |
String | 대표 이미지 URL |
hotels |
Integer | 해당 목적지 내 호텔 수 |
// 디바운스 300ms 권장
const results = await fetch(`/supply/hotels/destinations?query=${encodeURIComponent(query)}`);
const selected = { destId: item.destId, searchType: item.destType };
GET /supply/hotels/offers
| 파라미터 | 타입 | 필수 | 기본값 | 설명 |
|---|---|---|---|---|
destId |
String | ✅ | — | destinations에서 획득한 목적지 ID |
searchType |
String | ✅ | — | destinations에서 획득한 목적지 타입 |
arrivalDate |
LocalDate | ✅ | — | 체크인 날짜 (YYYY-MM-DD) |
departureDate |
LocalDate | ✅ | — | 체크아웃 날짜 |
adults |
Integer | ❌ | 1 |
성인 수 |
roomQty |
Integer | ❌ | 1 |
객실 수 |
childrenAge |
String | ❌ | "0" |
어린이 나이 (쉼표 구분) |
pageNumber |
Integer | ❌ | 1 |
페이지 번호 |
sortBy |
String | ❌ | "price" |
정렬 기준 (sort-options의 id 값) |
priceMin / priceMax |
Float | ❌ | 0 |
가격 필터 |
categoriesFilter |
String | ❌ | "popular" |
카테고리 필터 |
currencyCode |
String | ❌ | "KRW" |
통화 코드 |
languageCode |
String | ❌ | "ko" |
언어 코드 |
units / temperatureUnit |
String | ❌ | METRIC/CELSIUS |
단위 설정 |
supplier |
String | ❌ | "booking" |
공급자 키 |
{
"data": {
"hotels": [
{
"hotel_id": 123456, "name": "호텔 이름", "review_score": 8.5,
"review_score_word": "Very Good", "review_nr": 2341, "class": 4,
"main_photo_url": "https://...", "url": "https://www.booking.com/hotel/...",
"min_total_price": 150000,
"composite_price_breakdown": { "gross_amount": { "value": 150000, "currency": "KRW" } },
"latitude": 37.5665, "longitude": 126.9780, "distance_to_cc": "1.2",
"checkin": { "from": "15:00" }, "checkout": { "until": "11:00" },
"is_free_cancellable": true,
"badges": [{ "id": "free_cancellation", "text": "무료 취소" }]
}
],
"count": 150, "primary_count": 50
}
}