Add Product to Wishlist
PUT/api/portal/wishlist/items/:product
Add a product to the account wishlist, creating the wishlist on first use. Idempotent: adding a product that is already on it changes nothing. Returns the wishlist state: list_id, count (products on the wishlist) and in_wishlist (true).
Called by a B2B portal buyer with the bearer token POST /api/portal/auth/login returns (or the buyer's feed key) — not with a staff Personal Access Token.
Returns 404 when the product is not in the account's catalog. Refused with 403 during a merchant staff view-as session, and for a buyer with the Viewer role.
Authentication: Requires a portal Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not Found
Response Headers
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.