curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/wishlists/{token}{
"data": {
"id": "28",
"type": "wishlist",
"attributes": {
"token": "1inBHcJnxBrVEMAZb9esRqZP",
"name": "My Wishlist",
"is_private": false,
"is_default": true,
"variant_included": false
},
"relationships": {
"wished_items": {
"data": [
{
"id": "14",
"type": "wished_item"
}
]
}
}
}
}Retrieves a wishlist using the wishlist token.
If the wishlist is publicly viewable, the endpoint will return the requested wishlist regardless of the user. If the wishlist is private, only the wishlist owner can access the wishlist.
curl --request GET \
--url https://demo.spreecommerce.org/api/v2/storefront/wishlists/{token}{
"data": {
"id": "28",
"type": "wishlist",
"attributes": {
"token": "1inBHcJnxBrVEMAZb9esRqZP",
"name": "My Wishlist",
"is_private": false,
"is_default": true,
"variant_included": false
},
"relationships": {
"wished_items": {
"data": [
{
"id": "14",
"type": "wished_item"
}
]
}
}
}
}The token is a unique string used to identify the target resource.
Specify the related resources you would like to receive in the included section of the response body. You can also retrieve related resources of included resources by using the dot notation, eg. wished_items.variant. More information.
Specify the fields you would like returned in the response body. More information.
Check for the presence of a variant in a wishlist by passing the variant ID, if the variant is present in the wishlist, the variant_included attribute will return true
Was this page helpful?