---
description: Fire this api to add item in wishlist.
---

# Add item in wishlist (09/02)

## /This endpoint allows you to get free cakes

<mark style="color:blue;">`GET`</mark> `https://castleindia.in/emart/public /api/wishlist/add/{variantid} /api/wishlist/add/{variantid}`

#### Path Parameters

| Name      | Type   | Description        |
| --------- | ------ | ------------------ |
| variantid | String | ID of the variant. |

#### Headers

| Name          | Type   | Description                               |
| ------------- | ------ | ----------------------------------------- |
| Accept        | String | application/json                          |
| Authorization | String | Bearer { bearer\_token without brackets } |

#### Request Body

| Name         | Type    | Description                                                     |
| ------------ | ------- | --------------------------------------------------------------- |
| collectionid | Integer | ID of the collection if you want to add item in collection too. |

{% tabs %}
{% tab title="200: OK Upon successful response you will get the following" %}
```javascript
{
    "msg": "Item is added to your wishlist !",
    "status": "fail"
}
```
{% endtab %}

{% tab title="401: Unauthorized " %}
```javascript
{
    "message": "Unauthenticated."
}
```
{% endtab %}
{% endtabs %}

### IF response fail

```
{
    "msg": "Item is already in your wishlist !",
    "status": "fail"
}

{
    "msg": "You're not logged in !",
    "status": "fail"
}
```
