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

# 찜하기

## &#x20;찜 해

<mark style="color:red;">`DELETE`</mark> `https://api.elegantsiblings.xyz/members/like-item/`

#### Path Parameters

| Name          | Type   | Description        |
| ------------- | ------ | ------------------ |
| Authorization | string | Token \<token key> |

#### Request Body

| Name     | Type   | Description     |
| -------- | ------ | --------------- |
| item\_pk | number | 찜 해제 할 item\_pk |

{% tabs %}
{% tab title="204  삭제 성공" %}

```
```

{% endtab %}

{% tab title="404 " %}

```
1. 없는 item을 삭제하려고 할
{
    "detail": "찾을 수 없습니다."
}
```

{% endtab %}
{% endtabs %}

## 찜하기

<mark style="color:green;">`POST`</mark> `https://api.elegantsiblings.xyz/members/like-item/`

#### Headers

| Name          | Type   | Description        |
| ------------- | ------ | ------------------ |
| Authorization | string | Token \<token key> |

#### Request Body

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| item\_pk | number | 찜할 item\_pk |

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

```
```

{% endtab %}

{% tab title="400  이미있는 item pk를 추가하려고 할 " %}

```
{
    "non_field_errors": [
        "필드 user, item 는 반드시 고유(unique)해야 합니다."
    ]
}
```

{% endtab %}
{% endtabs %}

## &#x20;찜한 것 조회하

<mark style="color:blue;">`GET`</mark> `https://api.elegantsiblings.xyz/members/like-item/`

This endpoint allows you to get free cakes.

#### Headers

| Name          | Type   | Description        |
| ------------- | ------ | ------------------ |
| Authorization | string | Token \<token key> |

{% tabs %}
{% tab title="200 item, created\_at (생성 시간)" %}

```javascript
[
    {
        "item": {
            "item_pk": "1",
            "company": "집반찬연구소",
            "item_name": "굴생채무침(2~3인분) 220g",
            "origin_price": 9800,
            "sale_price": 9800,
            "discount_rate": 0,
            "list_thumbnail": null
        },
        "created_at": "2018-12-14T16:08:23.502317+09:00"
    },
    {
        "item": {
            "item_pk": "2",
            "company": "집밥의완성",
            "item_name": "고깃집 그 참기름 묵은지무침 (1~2인분) 200g",
            "origin_price": 3300,
            "sale_price": 2450,
            "discount_rate": 0.25,
            "list_thumbnail": "https://wps-9th-chajeehyung-practice.s3.amazonaws.com/media/Item/cat7.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIG4DIK7WJ5QD5WAA%2F20181214%2Fap-northeast-2%2Fs3%2Faws4_request&X-Amz-Date=20181214T070848Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=24b7a43c61aa428cd8e20f1693298b15ce27383475533b1f255a779a5a20fe44"
        },
        "created_at": "2018-12-14T16:08:23.502317+09:00"
    },
    {
        "item": {
            "item_pk": "3",
            "company": "탐나는밥상",
            "item_name": "표고버섯 무나물 (1인분) 150g",
            "origin_price": 4500,
            "sale_price": 4050,
            "discount_rate": 0.1,
            "list_thumbnail": null
        },
        "created_at": "2018-12-14T16:08:23.502317+09:00"
    },
    {
        "item": {
            "item_pk": "4",
            "company": "진가네반찬",
            "item_name": "묵나물볶음 (2~3인분) 150g",
            "origin_price": 5000,
            "sale_price": 5000,
            "discount_rate": 0,
            "list_thumbnail": null
        },
        "created_at": "2018-12-14T16:08:23.502317+09:00"
    }
]
```

{% endtab %}

{% tab title="401 Could not find a cake matching this query." %}

```javascript
1.
{
    "detail": "토큰이 유효하지 않습니다."
}
2.
{
    "detail": "자격 인증데이터(authentication credentials)가 제공되지 않았습니다."
}
```

{% endtab %}
{% endtabs %}
