# Memo

## 특정 유저의 특정 이미지의 메모를 생성합니다.

<mark style="color:green;">`POST`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

#### Request Body

| Name                                         | Type   | Description                                          |
| -------------------------------------------- | ------ | ---------------------------------------------------- |
| message<mark style="color:red;">\*</mark>    | String | <p>메모 메시지</p><p>ex)테스트 메시지</p>                       |
| is\_client<mark style="color:red;">\*</mark> | String | <p>해당 메모의  클라이언트 여부 \[True, False]</p><p>ex)True</p> |

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

```json
{
    "status_code": 200,
    "message": "성공",
    "result": {
        "id": "865d2610-24ba-46ba-958c-3059769477eb",
        "user_id": "EabHTVpYYm",
        "folder_id": null,
        "filename": "20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG",
        "org_path_url": "https://pillo-app-dev.s3.amazonaws.com/EabHTVpYYm/images/edit/20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZEHAPJW7UBG2TATL%2F20240313%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20240313T062146Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=75b30f8f54f5234dc2c7f60a86c0ff30cae98fb40303851b176abfa7349962c7",
        "path_url": "https://pillo-app-dev.s3.amazonaws.com/EabHTVpYYm/images/edit/20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZEHAPJW7UBG2TATL%2F20240313%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20240313T062146Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=75b30f8f54f5234dc2c7f60a86c0ff30cae98fb40303851b176abfa7349962c7",
        "lat": 37.500277,
        "lng": 127.096944,
        "address_road": "서울 강서구 마곡중앙6로 10",
        "address_land": "서울 강서구 마곡동 773-1",
        "address_land_number": null,
        "building_name": "마곡역센트럴푸르지오시티오피스텔",
        "address_det": "102동 102호",
        "created_at": "20231129_160402",
        "updated_at": "20231129_160402",
        "delete_at": null,
        "filedata_total": 0,
        "is_signed": true,
        "is_shared": false,
        "has_det": null,
        "filesize_mb": 0.12,
        "image_resource_type": "JPEG",
        "resolution": null,
        "memos": [
            {
                "id": "3seYJCmxFZ",
                "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
                "message": "테스트입니다",
                "is_client": false,
                "created_at": "20240312_140647",
                "updated_at": "20240312_140647"
            },
            {
                "id": "ACpbAGdoYt",
                "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
                "message": "테스트입니다",
                "is_client": true,
                "created_at": "20240313_152146",
                "updated_at": "20240313_152146"
            }
        ],
        "customs": [],
        "filedatas": []
    }
}
```

{% endtab %}

{% tab title="400: Bad Request 메모 생성 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request POST 'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos' \
--header 'Authorization: User {YOUR_TOKEN}' \
--form 'message="{YOUR_MESSAGE}"' \
--form 'is_client="{YOUR_IS_CLIENT}"'
```

{% endtab %}
{% endtabs %}

## 특정 유저의 특정 이미지의 메모를 조회합니다.

<mark style="color:blue;">`GET`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

{% tabs %}
{% tab title="200: OK 메모 조회 성공" %}

```json
{
    "status_code": 200,
    "message": "성공",
    "result": [
        {
            "id": "JV29NEKp7J",
            "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
            "message": "테스트입니다",
            "is_client": true,
            "created_at": "20240304_104537",
            "updated_at": "20240304_104537"
        },
        {
            "id": "62NZCS2SMk",
            "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
            "message": "테스트입니다",
            "is_client": False,
            "created_at": "20240304_103702",
            "updated_at": "20240304_103702"
        }
    ]
}
```

{% endtab %}

{% tab title="400: Bad Request 메모 조회 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}

```bash
curl --location --request GET'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos' \
--header 'Authorization: User {YOUR_TOKEN}' 
```

{% endtab %}
{% endtabs %}

## 특정 유저의 특정 이미지의 메모를 수정합니다.

<mark style="color:orange;">`PUT`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos/{memo_id}`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |
| memo\_id<mark style="color:red;">\*</mark>  | String | <p>메모의 id</p><p>ex) A7iumwbv7s</p>                            |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

#### Request Body

| Name       | Type   | Description                                          |
| ---------- | ------ | ---------------------------------------------------- |
| message    | String | <p>메모 메시지</p><p>ex)테스트 메시지</p>                       |
| is\_client | String | <p>해당 메모의  클라이언트 여부 \[True, False]</p><p>ex)True</p> |

{% tabs %}
{% tab title="200: OK 메모 수정 성공" %}

```json
{
    "status_code": 200,
    "message": "성공",
    "result": {
        "id": "865d2610-24ba-46ba-958c-3059769477eb",
        "user_id": "EabHTVpYYm",
        "folder_id": null,
        "filename": "20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG",
        "org_path_url": "https://pillo-app-dev.s3.amazonaws.com/EabHTVpYYm/images/edit/20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZEHAPJW7UBG2TATL%2F20240313%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20240313T062227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=765f82317535d65132455288a4b0a541257903d3411fabf911fd5e6f9ff26ac0",
        "path_url": "https://pillo-app-dev.s3.amazonaws.com/EabHTVpYYm/images/edit/20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZEHAPJW7UBG2TATL%2F20240313%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20240313T062227Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=765f82317535d65132455288a4b0a541257903d3411fabf911fd5e6f9ff26ac0",
        "lat": 37.500277,
        "lng": 127.096944,
        "address_road": "서울 강서구 마곡중앙6로 10",
        "address_land": "서울 강서구 마곡동 773-1",
        "address_land_number": null,
        "building_name": "마곡역센트럴푸르지오시티오피스텔",
        "address_det": "102동 102호",
        "created_at": "20231129_160402",
        "updated_at": "20231129_160402",
        "delete_at": null,
        "filedata_total": 0,
        "is_signed": true,
        "is_shared": false,
        "has_det": null,
        "filesize_mb": 0.12,
        "image_resource_type": "JPEG",
        "resolution": null,
        "memos": [
            {
                "id": "3seYJCmxFZ",
                "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
                "message": "테스트입니다",
                "is_client": false,
                "created_at": "20240312_140647",
                "updated_at": "20240312_140647"
            },
            {
                "id": "ACpbAGdoYt",
                "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
                "message": "테스트입니다요",
                "is_client": true,
                "created_at": "20240313_152146",
                "updated_at": "20240313_152227"
            }
        ],
        "customs": [],
        "filedatas": []
    }
}
```

{% endtab %}

{% tab title="400: Bad Request 메모 수정 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="First Tab" %}

```bash
curl --location --request PUT 'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos/{memo_id}' \
--header 'Authorization: User {YOUR_TOKEN}' \
--form 'message="{YOUR_MESSAGE}"' \
--form 'is_client="{YOUR_IS_CLIENT}"'
```

{% endtab %}
{% endtabs %}

## 특정 유저의 특정 이미지의 메모를 삭제합니다.

<mark style="color:red;">`DELETE`</mark> `https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos/{memo_id}`

#### Path Parameters

| Name                                        | Type   | Description                                                   |
| ------------------------------------------- | ------ | ------------------------------------------------------------- |
| user\_id<mark style="color:red;">\*</mark>  | String | <p>유저의 id</p><p>ex)8BfE96V8Xc</p>                             |
| image\_id<mark style="color:red;">\*</mark> | String | <p>이미지의 id</p><p>ex) d06054b8-9bee-4f41-84c1-8154731094bd</p> |
| memo\_id<mark style="color:red;">\*</mark>  | String | <p>메모의 id</p><p>ex) A7iumwbv7s</p>                            |

#### Headers

| Name                                            | Type   | Description   |
| ----------------------------------------------- | ------ | ------------- |
| Authorization<mark style="color:red;">\*</mark> | String | User ${Token} |

{% tabs %}
{% tab title="200: OK 메모 삭제 성공" %}

```json
{
    "status_code": 200,
    "message": "성공",
    "result": {
        "id": "865d2610-24ba-46ba-958c-3059769477eb",
        "user_id": "EabHTVpYYm",
        "folder_id": null,
        "filename": "20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG",
        "org_path_url": "https://pillo-app-dev.s3.amazonaws.com/EabHTVpYYm/images/edit/20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZEHAPJW7UBG2TATL%2F20240313%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20240313T062246Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=9c548999a20b24c73fec5c7cc42151c06533dfcc7f115dd182cb46a9ecbf99bd",
        "path_url": "https://pillo-app-dev.s3.amazonaws.com/EabHTVpYYm/images/edit/20231129_160402_1a306bbbdd96228a75600f0d9ad37dd7_V00.JPEG?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZEHAPJW7UBG2TATL%2F20240313%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20240313T062246Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=9c548999a20b24c73fec5c7cc42151c06533dfcc7f115dd182cb46a9ecbf99bd",
        "lat": 37.500277,
        "lng": 127.096944,
        "address_road": "서울 강서구 마곡중앙6로 10",
        "address_land": "서울 강서구 마곡동 773-1",
        "address_land_number": null,
        "building_name": "마곡역센트럴푸르지오시티오피스텔",
        "address_det": "102동 102호",
        "created_at": "20231129_160402",
        "updated_at": "20231129_160402",
        "delete_at": null,
        "filedata_total": 0,
        "is_signed": true,
        "is_shared": false,
        "has_det": null,
        "filesize_mb": 0.12,
        "image_resource_type": "JPEG",
        "resolution": null,
        "memos": [
            {
                "id": "3seYJCmxFZ",
                "image_id": "865d2610-24ba-46ba-958c-3059769477eb",
                "message": "테스트입니다",
                "is_client": false,
                "created_at": "20240312_140647",
                "updated_at": "20240312_140647"
            }
        ],
        "customs": [],
        "filedatas": []
    }
}
```

{% endtab %}

{% tab title="400: Bad Request 메모 삭제 실패" %}

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="First Tab" %}

```bash
curl --location --request DELETE 'https://service-stage.pic-origin.com/api/v1/users/{user_id}/images/{image_id}/memos/{memo_id}' \
--header 'Authorization: User {YOUR_TOKEN}' 
```

{% endtab %}
{% endtabs %}
