Skip to content

Favorites API

Manage user favorite listings and vehicle comparisons.

Favorites Endpoints

MethodEndpointDescriptionAuth
GET/api/favoritesList favoritesRequired
GET/api/favorites/checkCheck if listings are favoritedRequired
POST/api/favoritesToggle favorite (add/remove)Required

Comparison Endpoints

MethodEndpointDescriptionAuth
GET/api/comparisonsGet comparison listRequired
POST/api/comparisons/addAdd to comparison (max 4)Required
POST/api/comparisons/syncSync guest localStorage after loginRequired
DELETE/api/comparisonsClear all comparisonsRequired
DELETE/api/comparisons/:listingIdRemove from comparisonRequired

List Favorites

Get the authenticated user's favorite listings.

Request

bash
GET /v1/favorites
Authorization: Bearer YOUR_JWT_TOKEN

Query Parameters

ParameterTypeDescription
pageintegerPage number
limitintegerItems per page
list_idstringFilter by favorites list
sortstringdate_added, price, year

Response

json
{
  "success": true,
  "data": {
    "favorites": [
      {
        "id": "fav_123",
        "listing": {
          "id": "lst_abc123",
          "title": "2021 Volvo FH 500",
          "price": 85000,
          "currency": "EUR",
          "thumbnail": "https://cdn.menonmobility.com/thumb.jpg",
          "year": 2021,
          "mileage": 245000,
          "status": "active",
          "seller": {
            "name": "ABC Trucks",
            "verified": true
          }
        },
        "notes": "Good price, contact Monday",
        "list": {
          "id": "list_default",
          "name": "My Favorites"
        },
        "added_at": "2024-01-15T10:30:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 15
    }
  }
}

Add to Favorites

Add a listing to favorites.

Request

bash
POST /v1/favorites
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

Body

json
{
  "listing_id": "lst_abc123",
  "list_id": "list_default",
  "notes": "Good price, contact Monday"
}

Response

json
{
  "success": true,
  "data": {
    "id": "fav_123",
    "listing_id": "lst_abc123",
    "list_id": "list_default",
    "notes": "Good price, contact Monday",
    "added_at": "2024-01-15T10:30:00Z"
  }
}

Remove from Favorites

Remove a listing from favorites.

Request

bash
DELETE /v1/favorites/lst_abc123
Authorization: Bearer YOUR_JWT_TOKEN

Response

json
{
  "success": true,
  "data": {
    "removed": true,
    "listing_id": "lst_abc123"
  }
}

Check Favorite Status

Check if a listing is in favorites.

Request

bash
GET /v1/favorites/check/lst_abc123
Authorization: Bearer YOUR_JWT_TOKEN

Response

json
{
  "success": true,
  "data": {
    "is_favorite": true,
    "favorite_id": "fav_123",
    "list_id": "list_default",
    "added_at": "2024-01-15T10:30:00Z"
  }
}

Bulk Check

Check multiple listings at once.

Request

bash
POST /v1/favorites/check
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

Body

json
{
  "listing_ids": ["lst_1", "lst_2", "lst_3", "lst_4"]
}

Response

json
{
  "success": true,
  "data": {
    "favorites": {
      "lst_1": true,
      "lst_2": false,
      "lst_3": true,
      "lst_4": false
    }
  }
}

Favorite Lists

Create List

bash
POST /v1/favorites/lists
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

{
  "name": "Top Choices",
  "description": "My best options"
}

Get Lists

bash
GET /v1/favorites/lists
Authorization: Bearer YOUR_JWT_TOKEN

Response

json
{
  "success": true,
  "data": {
    "lists": [
      {
        "id": "list_default",
        "name": "My Favorites",
        "description": null,
        "count": 12,
        "is_default": true
      },
      {
        "id": "list_123",
        "name": "Top Choices",
        "description": "My best options",
        "count": 5,
        "is_default": false
      }
    ]
  }
}

Update List

bash
PUT /v1/favorites/lists/list_123
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

{
  "name": "Updated Name"
}

Delete List

bash
DELETE /v1/favorites/lists/list_123
Authorization: Bearer YOUR_JWT_TOKEN

Move to List

Move favorite to different list.

Request

bash
PUT /v1/favorites/fav_123
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

{
  "list_id": "list_456"
}

Update Notes

Update favorite notes.

Request

bash
PUT /v1/favorites/fav_123
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

{
  "notes": "Updated notes..."
}

Price Alerts

Enable Price Alert

bash
POST /v1/favorites/fav_123/alert
Authorization: Bearer YOUR_JWT_TOKEN
Content-Type: application/json

{
  "enabled": true,
  "threshold": "any"
}

Threshold Options

ValueDescription
anyAny price change
55% or more drop
1010% or more drop
customCustom percentage

Export Favorites

Export as CSV

bash
GET /v1/favorites/export?format=csv
Authorization: Bearer YOUR_JWT_TOKEN

Export as PDF

bash
GET /v1/favorites/export?format=pdf
Authorization: Bearer YOUR_JWT_TOKEN

Share Favorites

bash
POST /v1/favorites/lists/list_123/share
Authorization: Bearer YOUR_JWT_TOKEN

Response

json
{
  "success": true,
  "data": {
    "share_url": "https://menonmobility.com/shared/favorites/abc123",
    "expires_at": "2024-02-15T10:30:00Z"
  }
}

Commercial Vehicle Marketplace