Skip to main content
All wishlist endpoints require customer authentication.

GET /wishlist

Get the authenticated customer’s wishlist.

Authentication

Requires Bearer token (auth:customer_api).

Headers

HeaderValueRequired
AuthorizationBearer Yes

Example Request

curl "https://front.rmz.gg/api/wishlist" \
  -H "Authorization: Bearer 1|abc123xyz..."

Response

Success (200)

Each item in the items array uses the full ProductResource format (see List Products for the complete schema). Abbreviated example:
{
  "success": true,
  "data": {
    "items": [
      {
        "id": 101,
        "name": "Premium Game Key",
        "slug": "premium-game-key",
        "type": "code",
        "price": {
          "original": 199.99,
          "actual": 199.99,
          "formatted": "199.99 ر.س",
          "currency": "SAR"
        },
        "stock": {
          "is_in_stock": true
        },
        "image": { "url": "https://..." },
        "categories": [
          { "id": 1, "name": "Games", "slug": "games" }
        ]
      }
    ],
    "count": 1
  }
}

POST /wishlist

Add a product to the wishlist.

Authentication

Requires Bearer token (auth:customer_api).

Headers

HeaderValueRequired
AuthorizationBearer Yes
Content-Typeapplication/jsonYes

Body Parameters

ParameterTypeRequiredDescription
product_idintegerYesProduct ID (must belong to the current store)

Example Request

curl -X POST "https://front.rmz.gg/api/wishlist" \
  -H "Authorization: Bearer 1|abc123xyz..." \
  -H "Content-Type: application/json" \
  -d '{"product_id": 101}'

Response

Success (200)

{
  "success": true,
  "data": null,
  "message": "Product added to wishlist successfully"
}

Error Responses

StatusDescription
400Product already in wishlist
401Not authenticated
422Validation error (invalid product_id)

DELETE /wishlist/

Remove a product from the wishlist.

Authentication

Requires Bearer token (auth:customer_api).

Path Parameters

ParameterTypeDescription
productIdintegerProduct ID to remove

Example Request

curl -X DELETE "https://front.rmz.gg/api/wishlist/101" \
  -H "Authorization: Bearer 1|abc123xyz..."

Response

Success (200)

{
  "success": true,
  "data": null,
  "message": "Product removed from wishlist successfully"
}

Error Responses

StatusDescription
401Not authenticated
404Product not found in wishlist

GET /wishlist/check/

Check if a specific product is in the customer’s wishlist.

Authentication

Requires Bearer token (auth:customer_api).

Path Parameters

ParameterTypeDescription
productIdintegerProduct ID to check

Example Request

curl "https://front.rmz.gg/api/wishlist/check/101" \
  -H "Authorization: Bearer 1|abc123xyz..."

Response

Success (200)

{
  "success": true,
  "data": {
    "in_wishlist": true
  }
}

GET /wishlist/count

Get the total number of items in the customer’s wishlist.

Authentication

Requires Bearer token (auth:customer_api).

Example Request

curl "https://front.rmz.gg/api/wishlist/count" \
  -H "Authorization: Bearer 1|abc123xyz..."

Response

Success (200)

{
  "success": true,
  "data": {
    "count": 5
  }
}

DELETE /wishlist/clear

Remove all items from the wishlist.

Authentication

Requires Bearer token (auth:customer_api).

Example Request

curl -X DELETE "https://front.rmz.gg/api/wishlist/clear" \
  -H "Authorization: Bearer 1|abc123xyz..."

Response

Success (200)

{
  "success": true,
  "data": null,
  "message": "Wishlist cleared successfully"
}