Skip to content

Add to the wishlist

POST
/wishlists
curl --request POST \
--url https://acme.mykreezalid.com/front_api/v1/wishlists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "item_id": 4242, "listing_id": 1, "type": "listing" }'

Saves a listing (by default) or a vendor (type=vendor) in the signed-in member’s wishlist. The response is always 200: check success, and read message to know why an item was not added.

Media typeapplication/json
object
item_id

Identifier of the listing or of the vendor to save.

integer

Example

4242
listing_id

Accepted instead of item_id.

integer
type

Kind of item to save. With any other value, nothing is saved.

string
default: listing
Allowed values: listing vendor

The outcome. success is true when the item is saved.

Media typeapplication/json
object
success
boolean
message

On success, Listing added successfully or Vendor added successfully. Otherwise listing_not_found, vendor_not_found, listing_already_in_user_wishlist, vendor_already_in_user_wishlist or unable_to_save; null when type is neither listing nor vendor.

string

Example

{
"success": true,
"message": "Listing added successfully"
}

No valid access token was sent.

Media typeapplication/json

Error body returned by the Front API when it refuses a request.

object
code

HTTP status code, repeated in the body.

integer
status
string
message

Human-readable reason.

string

Example

{
"code": 403,
"status": "error",
"message": "Token not found in request"
}