Create Wishlist
/api/v1/wishlists/
Create a new wishlist for the authenticated user.
Authentication
This endpoint requires authentication. Include a valid bearer token in the Authorization header.Request Body
Name of the wishlist. Must be unique for the user.
Visibility setting for the wishlist. Options:
private: Only you can view your wishlistpublic: Anyone can view this wishlistshared: Only users with the URL can view the wishlist
Optional notes or description for the wishlist
Example Request
Create Private Wishlist
Create Shared Wishlist
Example Response
201 - Created
400 - Bad Request
Update Wishlist
/api/v1/wishlists/{id}/
Update wishlist details such as name, audience, or notes.
Path Parameters
The unique identifier of the wishlist to update
Request Body
Updated name for the wishlist
Updated visibility setting. Changing to
shared automatically generates a sharing token.Updated notes for the wishlist
Example Request
Update Audience to Shared
Example Response
201 - Updated
When changing the audience from
private to shared, a unique sharing token is automatically generated and included in the sharing_url field.Add Product to Wishlist
/api/v1/wishlists/{id}/
Add a product to an existing wishlist.
Path Parameters
The unique identifier of the wishlist
Request Body
The ID of the product to add to the wishlist
Example Request
Add Product
Example Response
201 - Product Added
400 - Bad Request
404 - Not Found
If the product is already in the wishlist, the request will succeed without creating a duplicate entry.
Remove Product from Wishlist
/api/v1/wishlists/{id}/
Remove a specific product from a wishlist or delete the entire wishlist.
Path Parameters
The unique identifier of the wishlist
Request Body
The ID of the product to remove. If omitted, the entire wishlist will be deleted.
Example Request
- Remove Product
- Delete Wishlist
Example Response
204 - No Content
404 - Not Found
Wishlist Item Management
Add Multiple Items
To add multiple products at once, make separate API calls for each product. Consider implementing batch operations on your client for better user experience.
Item Ordering
Items are ordered by the
added_at timestamp by default. The most recently added items appear last in the items array.Duplicate Prevention
The API automatically prevents duplicate products in a wishlist. Adding the same product twice will not create duplicate entries.
Product Availability
Products in wishlists retain their current availability status. Check the product’s
in_stock field when displaying wishlist items.Best Practices
Unique Wishlist Names
Unique Wishlist Names
Each user must have unique wishlist names. Before creating a wishlist, consider checking existing names or handle the validation error gracefully in your UI.
Sharing Tokens Security
Sharing Tokens Security
Managing Public Wishlists
Managing Public Wishlists
Public wishlists are discoverable by their ID. Consider:
- Adding a confirmation step before making a wishlist public
- Allowing users to revert to private at any time
- Clearly communicating the visibility level in your UI
Handling Deleted Products
Handling Deleted Products
If a product is deleted from your catalog, the wishlist item’s product field becomes
null. Handle this gracefully in your UI by:- Showing “Product no longer available” messages
- Providing an option to remove unavailable items
- Filtering out null products when displaying wishlists