# Get

## 전체 여행 조회

<mark style="color:blue;">`GET`</mark> `https://localhost:8080/trips`

모든 여행의 정보와 각 여행의 여정 이름들을 조회합니다.

{% tabs %}
{% tab title="200: OK 성공" %}

```json
[
  {
    "id": 2,
    "start_date": "2023-12-21",
    "end_date": "2023-12-22",
    "itinerary_name_list": [
      "강남으로 이동",
      "ㅇㅇ호텔 1박",
      "남산 케이블카 타기"
    ],
    "is_domestic": true
  },
  {
    "id": 4,
    "start_date": "2023-12-25",
    "end_date": "2023-12-26",
    "itinerary_name_list": [],
    "is_domestic": true
  },
  {
    "id": 5,
    "start_date": "2023-12-25",
    "end_date": "2023-12-26",
    "itinerary_name_list": [],
    "is_domestic": true
  },
  {
    "id": 6,
    "start_date": "2023-12-25",
    "end_date": "2023-12-26",
    "itinerary_name_list": [],
    "is_domestic": true
  }
]
```

{% endtab %}
{% endtabs %}

## 여행 단건 조회

<mark style="color:blue;">`GET`</mark> `https://localhost:8080/trips/{id}`

여행 하나의 정보와 해당 여행의 여정들을 조회합니다.

#### Path Parameters

| Name                                 | Type | Description |
| ------------------------------------ | ---- | ----------- |
| id<mark style="color:red;">\*</mark> | 1    | 여행 id       |

{% tabs %}
{% tab title="200: OK 성공" %}

```json
{
    "id": 3
    "name": "서울 여행"
    "start_date": "2022-01-01"
    "end_date": "2022-01-05"
    "is_domestic": "true"
    "itinerary_list": [
     {
      "name": "강남 이동"
      "transportation": "지하철"
      "departure_location": "서울역"
      "arrival_location": "강남"
      "departure_date_time": "2022-01-01T12:00"
      "arrival_date_time": "2022-01-01T13:00"
     }, 
     {
      "accommodation_name": "신라스테이 삼성"
      "check_in_time": "2022-01-01T16:00"
      "check_out_time": "2022-02-01T13:00"
     },
     {
      "location": "남산 타워"
      "arrival_date_time": "2022-02-01T15:00"
      "leave_date_time": "2022-02-01T18:00"
     }
    ]
}
```

{% endtab %}

{% tab title="404: Not Found id로 여행을 찾을 수 없음" %}

```json
{
    "error_code": "TRIP_NOT_FOUND",
    "message": "찾는 여행이 존재하지 않습니다.",
    "status": 404
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kwonminwoos-organization.gitbook.io/trip-itinerary-project-api/get.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
