Skip to content

Listings API

Create, read, update, and delete vehicle listings programmatically.

Endpoints Overview

Public Endpoints (No Auth Required)

MethodEndpointDescription
GET/api/listingsList all active listings
GET/api/listings/trendingGet trending listings
GET/api/listings/featuredGet featured listings
GET/api/listings/:slugGet single listing by slug
GET/api/listings/:slug/relatedGet related listings

Seller Endpoints (SELLER Role Required)

MethodEndpointDescription
GET/api/seller/listingsList seller's own listings
GET/api/seller/listings/:idGet listing by ID
POST/api/seller/listingsCreate new listing
PUT/api/seller/listings/:idUpdate listing
DELETE/api/seller/listings/:idSoft delete listing
POST/api/seller/listings/:id/publishSubmit for review
POST/api/seller/listings/:id/mark-soldMark as sold
POST/api/seller/listings/:id/renewExtend listing expiry
POST/api/seller/listings/:id/duplicateClone as draft
POST/api/seller/listings/:id/imagesUpload images
PUT/api/seller/listings/:id/images/reorderReorder images
DELETE/api/seller/listings/:id/images/:imageIdDelete image

Bulk Operations (SELLER Role Required)

MethodEndpointDescription
POST/api/seller/listings/bulk/pausePause multiple listings
POST/api/seller/listings/bulk/activateRe-activate listings
POST/api/seller/listings/bulk/deleteDelete multiple listings
GET/api/seller/bulk-import/templateDownload CSV template
POST/api/seller/bulk-import/uploadUpload CSV import
GET/api/seller/bulk-import/xml-schemaDownload XSD schema
POST/api/seller/bulk-import/xmlUpload XML import
GET/api/seller/bulk-import/historyGet import history

List Listings

Retrieve a paginated list of listings.

Request

bash
GET /v1/listings
Authorization: Bearer YOUR_API_KEY

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20, max: 100)
statusstringFilter by status: active, draft, sold
categorystringFilter by category slug
sortstringSort field: created_at, price, year
orderstringSort order: asc, desc

Response

json
{
  "success": true,
  "data": {
    "listings": [
      {
        "id": "lst_abc123",
        "title": "2021 Volvo FH 500 Euro 6",
        "slug": "2021-volvo-fh-500-euro-6",
        "price": 85000,
        "currency": "EUR",
        "status": "active",
        "category": {
          "id": "cat_trucks",
          "name": "Trucks"
        },
        "brand": {
          "id": "brd_volvo",
          "name": "Volvo"
        },
        "year": 2021,
        "mileage": 245000,
        "images": [
          {
            "url": "https://cdn.menonmobility.com/img1.jpg",
            "thumbnail": "https://cdn.menonmobility.com/img1_thumb.jpg"
          }
        ],
        "location": {
          "country": "Germany",
          "city": "Munich"
        },
        "created_at": "2024-01-15T10:30:00Z",
        "updated_at": "2024-01-15T10:30:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 45,
      "total_pages": 3
    }
  }
}

Get Single Listing

Retrieve detailed information about a specific listing.

Request

bash
GET /v1/listings/lst_abc123
Authorization: Bearer YOUR_API_KEY

Response

json
{
  "success": true,
  "data": {
    "id": "lst_abc123",
    "title": "2021 Volvo FH 500 Euro 6",
    "slug": "2021-volvo-fh-500-euro-6",
    "description": "Full vehicle description...",
    "price": 85000,
    "currency": "EUR",
    "price_negotiable": true,
    "status": "active",
    "category": {
      "id": "cat_trucks",
      "name": "Trucks",
      "slug": "trucks"
    },
    "subcategory": {
      "id": "sub_semi",
      "name": "Semi Trucks",
      "slug": "semi-trucks"
    },
    "brand": {
      "id": "brd_volvo",
      "name": "Volvo"
    },
    "model": "FH 500",
    "year": 2021,
    "mileage": 245000,
    "mileage_unit": "km",
    "condition": "used",
    "specifications": {
      "fuel_type": "diesel",
      "transmission": "automatic",
      "engine_power": 500,
      "engine_power_unit": "hp",
      "euro_standard": "euro6",
      "drive_type": "4x2",
      "axles": 2
    },
    "features": [
      "air_conditioning",
      "cruise_control",
      "sleeper_cab",
      "navigation"
    ],
    "images": [
      {
        "id": "img_1",
        "url": "https://cdn.menonmobility.com/img1.jpg",
        "thumbnail": "https://cdn.menonmobility.com/img1_thumb.jpg",
        "order": 1
      }
    ],
    "location": {
      "country": "Germany",
      "country_code": "DE",
      "region": "Bavaria",
      "city": "Munich",
      "coordinates": {
        "lat": 48.1351,
        "lng": 11.5820
      }
    },
    "seller": {
      "id": "usr_seller123",
      "name": "ABC Trucks GmbH",
      "type": "business",
      "verified": true
    },
    "views": 1250,
    "favorites": 45,
    "featured": true,
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "published_at": "2024-01-15T10:30:00Z"
  }
}

Create Listing

Create a new vehicle listing.

Request

bash
POST /v1/listings
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Body

json
{
  "title": "2021 Volvo FH 500 Euro 6",
  "description": "Well-maintained truck with full service history...",
  "price": 85000,
  "currency": "EUR",
  "price_negotiable": true,
  "category_id": "cat_trucks",
  "subcategory_id": "sub_semi",
  "brand_id": "brd_volvo",
  "model": "FH 500",
  "year": 2021,
  "mileage": 245000,
  "mileage_unit": "km",
  "condition": "used",
  "specifications": {
    "fuel_type": "diesel",
    "transmission": "automatic",
    "engine_power": 500,
    "engine_power_unit": "hp",
    "euro_standard": "euro6",
    "drive_type": "4x2"
  },
  "features": ["air_conditioning", "cruise_control", "sleeper_cab"],
  "location": {
    "country_code": "DE",
    "city": "Munich",
    "address": "123 Example Street"
  },
  "publish": false
}

Required Fields

FieldTypeDescription
titlestringListing title
category_idstringCategory ID
brand_idstringBrand ID
pricenumberPrice amount
currencystringCurrency code (EUR, USD, etc.)
yearintegerManufacturing year
conditionstringnew, used, certified

Response

json
{
  "success": true,
  "data": {
    "id": "lst_new123",
    "title": "2021 Volvo FH 500 Euro 6",
    "status": "draft",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Update Listing

Update an existing listing.

Request

bash
PUT /v1/listings/lst_abc123
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Body

Send only the fields you want to update:

json
{
  "price": 82000,
  "price_negotiable": false,
  "description": "Updated description..."
}

Response

json
{
  "success": true,
  "data": {
    "id": "lst_abc123",
    "title": "2021 Volvo FH 500 Euro 6",
    "price": 82000,
    "updated_at": "2024-01-16T14:20:00Z"
  }
}

Delete Listing

Delete a listing.

Request

bash
DELETE /v1/listings/lst_abc123
Authorization: Bearer YOUR_API_KEY

Response

json
{
  "success": true,
  "data": {
    "id": "lst_abc123",
    "deleted": true
  }
}

Publish/Unpublish

Publish Listing

bash
POST /v1/listings/lst_abc123/publish
Authorization: Bearer YOUR_API_KEY

Unpublish Listing

bash
POST /v1/listings/lst_abc123/unpublish
Authorization: Bearer YOUR_API_KEY

Upload Images

Request

bash
POST /v1/listings/lst_abc123/images
Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data

Form Data

FieldTypeDescription
images[]fileImage files (multiple)
order[]integerDisplay order

Response

json
{
  "success": true,
  "data": {
    "images": [
      {
        "id": "img_new1",
        "url": "https://cdn.menonmobility.com/new1.jpg",
        "thumbnail": "https://cdn.menonmobility.com/new1_thumb.jpg",
        "order": 1
      }
    ]
  }
}

Delete Image

bash
DELETE /v1/listings/lst_abc123/images/img_1
Authorization: Bearer YOUR_API_KEY

Bulk Operations

Bulk Update Status

bash
POST /v1/listings/bulk/status
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "listing_ids": ["lst_1", "lst_2", "lst_3"],
  "status": "sold"
}

Bulk Update Price

bash
POST /v1/listings/bulk/price
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "listing_ids": ["lst_1", "lst_2"],
  "adjustment_type": "percentage",
  "adjustment_value": -10
}

Error Codes

CodeDescription
LISTING_NOT_FOUNDListing does not exist
LISTING_LIMIT_EXCEEDEDPlan listing limit reached
INVALID_CATEGORYCategory ID is invalid
INVALID_BRANDBrand ID is invalid
VALIDATION_ERRORRequest validation failed

Commercial Vehicle Marketplace