# User

&#x20;Login

## - 로그인, 점주 로그인

<mark style="color:green;">`POST`</mark> `/users/v1/login`

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| email<mark style="color:red;">\*</mark>    | String |             |
| password<mark style="color:red;">\*</mark> | String |             |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "로그인에 성공하였습니다.",
    "data":{
            "accessToken": ""
            "refreshToken" ""
        },
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## - 로그아웃, 점주 로그아웃

<mark style="color:green;">`POST`</mark> `/users/v1/logout`

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT token   |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "로그아웃 되었습니다.",
    "data":{},
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "잘못된 요청입니다.",
    "data":{},
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## - 개인 회원가입

<mark style="color:green;">`POST`</mark> `/users/v1/join`

#### Request Body

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| email<mark style="color:red;">\*</mark>         | String |             |
| password<mark style="color:red;">\*</mark>      | String |             |
| nickname<mark style="color:red;">\*</mark>      | String |             |
| phone\_number<mark style="color:red;">\*</mark> | String |             |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "회원가입에 성공했습니다.",
    "data":{
        "username": "",
        "email": "",
        "phone_num": "",
        "bno": ""
    },
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "이미 가입되어 있는 유저입니다.",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## - 점주 회원가입

<mark style="color:green;">`POST`</mark> `/users/v1/managers/join`

#### Request Body

| Name                                            | Type    | Description |
| ----------------------------------------------- | ------- | ----------- |
| email<mark style="color:red;">\*</mark>         | String  |             |
| nickname<mark style="color:red;">\*</mark>      | String  |             |
| password<mark style="color:red;">\*</mark>      | String  |             |
| phone\_number<mark style="color:red;">\*</mark> | String  |             |
| b\_number<mark style="color:red;">\*</mark>     | integer | 사업자 등록 번호   |
| start\_date<mark style="color:red;">\*</mark>   | String  | 개업일         |
| p\_name<mark style="color:red;">\*</mark>       | String  | 대표자성명       |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "회원가입에 성공했습니다.",
    "data":{
        "username": "",
        "email": "",
        "phone_num": "",
        "bno": ""
    },
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "이미 가입되어 있는 유저입니다.",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## - 회원정보 조회

<mark style="color:blue;">`GET`</mark> `/users/v1/mypage`

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT token   |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "",
    "data":{
        "username":""
    },
    "error":[]
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "state": 401,
    "result": "fail",
    "message": "",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## - 회원정보 수정

<mark style="color:purple;">`PATCH`</mark> `/users/v1/mypage/name`

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT token   |

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| nickname | String |             |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "닉네임 수정이 완료되었습니다.",
    "data":{
        "username": ""
    },
    "error":[]
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "state": 401,
    "result": "fail",
    "message": "",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## - 회원정보 수정

<mark style="color:purple;">`PATCH`</mark> `/users/v1/mypage/pw`

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT token   |

#### Request Body

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| nickname    | String |             |
| password    | String |             |
| phoneNumber | String |             |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "비밀번호 변경이 완료되었습니다.",
    "data":[],
    "error":[]
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "state": 401,
    "result": "fail",
    "message": "",
    "data":[],
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## - 회원정보 삭제

<mark style="color:red;">`DELETE`</mark> `/users/v1/mypage`

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT token   |

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| password<mark style="color:red;">\*</mark> | String |             |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "",
    "data":{},
    "error":[]
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "state": 401,
    "result": "fail",
    "message": "",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## 이메일 중복 검증

<mark style="color:green;">`POST`</mark> `/users/v1/validation/email`

#### Request Body

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| email<mark style="color:red;">\*</mark> | String | email       |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "이메일 중복 검증되었습니다.",
    "data":[],
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "이일이메일이 중복되었습니다.이메일이 중복되었습니다. ",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## 닉네임 중복 검증

<mark style="color:green;">`POST`</mark> `/users/v1/validation/name`

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| username<mark style="color:red;">\*</mark> | String | nickname    |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "닉네임 중복 검증되었습니다.",
    "data":{},
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "닉네임이 중복되었습니다.",
    "data":[],
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## access token 갱신

<mark style="color:green;">`POST`</mark> `/users/v1/refresh`

#### Request Body

| Name                                           | Type   | Description  |
| ---------------------------------------------- | ------ | ------------ |
| accessToken<mark style="color:red;">\*</mark>  | String | accessToken  |
| refreshToken<mark style="color:red;">\*</mark> | String | refreshToken |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "",
    "data":{},
    "error":[]
}
```

{% endtab %}
{% endtabs %}

## 사업자등록번호 상태 조회

<mark style="color:green;">`POST`</mark> `/users/v1/managers/status`

#### Request Body

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| b\_no<mark style="color:red;">\*</mark> | String | 사업자등록번호     |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "인증 성곰",
    "data":[],
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "인증 실패",
    "data": [],
    "error": []
}
```

{% endtab %}
{% endtabs %}

## 사업자등록번호 진위 여부

<mark style="color:green;">`POST`</mark> `/users/v1/managers/validate`

#### Request Body

| Name                                    | Type   | Description |
| --------------------------------------- | ------ | ----------- |
| b\_no<mark style="color:red;">\*</mark> | String | 사업자등록번호     |

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

```javascript
{
    "state": 200,
    "result": "success",
    "message": "인증 성곰",
    "data":[],
    "error":[]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "state": 400,
    "result": "fail",
    "message": "인증 실패",
    "data": [],
    "error": []
}
```

{% 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://foodtruckaroundme.gitbook.io/api-reference/user.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.
