> For the complete documentation index, see [llms.txt](https://docs-58.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-58.gitbook.io/docs/api-methods/review.md).

# Review

member 관련 api method를 설명한 페이지

## review를 등록하기 위한 메서드

<mark style="color:green;">`POST`</mark> `/review/regist`

#### Headers

| Name          | Type   | Description             |
| ------------- | ------ | ----------------------- |
| Authorization | String | login시 생성 된 accessToken |

#### Request Body

| Name                                                                | Type | Description |
| ------------------------------------------------------------------- | ---- | ----------- |
| productId, rating, title, content<mark style="color:red;">\*</mark> | json |             |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}

{% tab title="404: Not Found 해당 id의 post가 없는 경우 발생" %}

{% endtab %}
{% endtabs %}

## review 조회를 위한 method

<mark style="color:blue;">`GET`</mark> `/review`

#### Query Parameters

| Name                                     | Type | Description       |
| ---------------------------------------- | ---- | ----------------- |
| postId<mark style="color:red;">\*</mark> | Long |                   |
| page                                     | int  | defaultValue -> 0 |
| size                                     | int  | defaultValue -> 5 |

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

```json
{
    "content": [
        {
            "rating": 4.9,
            "productId": 1.0,
            "writerName": "user",
            "title": "안녕하세요",
            "content": "반갑습니다."
        },
        {
            "rating": 4.9,
            "productId": 1.0,
            "writerName": "user",
            "title": "안녕하세요",
            "content": "반갑습니다."
        },
        {
            "rating": 4.9,
            "productId": 1.0,
            "writerName": "user",
            "title": "안녕하세요",
            "content": "반갑습니다."
        },
        {
            "rating": 4.9,
            "productId": 1.0,
            "writerName": "user",
            "title": "안녕하세요",
            "content": "반갑습니다."
        },
        {
            "rating": 4.9,
            "productId": 1.0,
            "writerName": "user",
            "title": "안녕하세요",
            "content": "반갑습니다."
        }
    ],
    "pageable": {
        "sort": {
            "sorted": false,
            "unsorted": true,
            "empty": true
        },
        "pageNumber": 0,
        "pageSize": 5,
        "offset": 0,
        "paged": true,
        "unpaged": false
    },
    "last": true,
    "totalElements": 5,
    "totalPages": 1,
    "number": 0,
    "sort": {
        "sorted": false,
        "unsorted": true,
        "empty": true
    },
    "first": true,
    "numberOfElements": 5,
    "size": 5,
    "empty": false
}
```

{% endtab %}

{% tab title="404: Not Found 해당 id의 post가 없는 경우 발생" %}

{% endtab %}
{% endtabs %}
