Managing wishlist items
Edit on GitHubThis endpoint allows to add and remove items from wishlists.
Installation
For detailed information on the modules that provide the API functionality and related installation instructions, see Wishlist API Feature Integration.
Add an item to a wishlist
To add an item to a wishlist, send the request:
POST
/wishlists/{{wishlist_id}}/wishlist-items
PATH PARAMETER | DESCRIPTION |
---|---|
{{wishlist_id}} | Unique identifier of the wishlist to add the items to. Create a wishlist or retrieve all wishlists to get it. |
Request
Request sample: add an item to a wishlist
POST https://glue.mysprykershop.com/wishlists/09264b7f-1894-58ed-81f4-d52d683e910a/wishlist-items
{
"data": {
"type": "wishlist-items",
"attributes": {
"sku": "064_18404924"
}
}
}
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
sku | String | SKU of a concrete product to add. |
Response
Response sample: add an item to a wishlist
{
"data": {
"type": "wishlist-items",
"id": "064_18404924",
"attributes": {
"sku": "064_18404924"
},
"links": {
"self": "https://glue.mysprykershop.com/wishlists/c917e65b-e8c3-5c8b-bec6-892529c64b30/wishlist-items/064_18404924"
}
}
}
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
sku | String | SKU of the concrete product in the wishlist. |
Delete a wishlist item
To delete wishlist item, send the request:
DELETE
/wishlists/{{wishlist_id}}/wishlist-items/{{item_sku}}
PATH PARAMETER | DESCRIPTION |
---|---|
{{wishlist_id}} | Unique identifier of the wishlist to delete an item from. Create a wishlist or retrieve all wishlists to get it. |
{{item_sku}} | Unique identifier of the product to delete. |
Request
Request sample: delete a wishlist item
DELETE https://glue.mysprykershop.com/wishlists/09264b7f-1894-58ed-81f4-d52d683e910a/wishlist-items/064_18404924
Response
If the item is removed successfully, the endpoint returns the 204 No Content
status code.
Possible errors
CODE | REASON |
---|---|
001 | Access token is invalid. |
002 | Access token is missing. |
201 | Wishlist with the specified ID is not found. |
206 | Item with the specified ID cannot be added to the wishlist. |
207 | Cannot remove the item. |
208 | Item with the provided SKU does not exist in the wishlist. |
209 | ID is not specified. |
901 | sku field is empty. |
To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.
Thank you!
For submitting the form