Listings V2

Update an existing listing

Updates listing metadata (title, description), pricing (base_price or per-variant prices), and stock lot details (quantities, listed status, locations). Validates ownership before allowing updates and prevents editing sold or cancelled listings.

Requirements:

  • 17.1: PUT /api/v2/listings/:id endpoint
  • 17.2: Allow updating title and description
  • 17.3: Allow updating base_price for unified pricing mode
  • 17.4: Allow updating per-variant prices for per_variant pricing mode
  • 17.5: Allow updating stock lot quantities
  • 17.6: Allow updating stock lot listed status
  • 17.7: Prevent editing sold or cancelled listings
  • 17.8: Validate ownership before allowing updates
  • 17.9: Return updated listing with variant breakdown
  • 17.10: Log all modifications to Audit_Trail
  • 17.11: Use database transaction for atomicity
  • 17.12: Invalidate cache after updates
get/listings/mine

Request

  • Base URL: /api/v2 (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/v2/listings/mine
  • Auth: loggedin (a scheme the document does not define)

Query parameters

status'active' | 'inactive' | 'sold' | 'expired' | 'cancelled'

Filter by listing status

pagenumber double

Page number for pagination (default: 1)

page_sizenumber double

Number of results per page (default: 20, max: 100)

sort_by'created_at' | 'updated_at' | 'price' | 'quantity'

Sort field (default: created_at)

sort_order'asc' | 'desc'

Sort order (default: desc)

spectrum_idstring
shop_idstring

Response

Updated listing with variant breakdown

totalnumber double required

Total number of listings matching filters

pagenumber double required

Current page number

page_sizenumber double required

Number of results per page

Changes