Cart V2

Get user's cart with variant-specific items

Retrieves all cart items for the authenticated user with:

  1. Variant details (quality tier, attributes, display name)
  2. Listing information (title, seller, status)
  3. Real-time availability check for each variant
  4. Price change detection (compare snapshot vs current price)
  5. Calculated subtotals and cart total

Availability is checked by querying listed stock lots for each variant. Price changes are detected by comparing cart's price_per_unit with current variant pricing from the listing.

Requirements:

  • 29.1: GET /api/v2/cart endpoint
  • 29.2: Return array of cart items with variant details
  • 29.3: Include listing information for each cart item
  • 29.4: Include variant attributes (quality_tier, display_name)
  • 29.5: Include quantity and price_per_unit snapshot
  • 29.6: Calculate subtotal for each item
  • 29.7: Calculate total_price for entire cart
  • 29.8: Include availability indicator for each item
  • 29.9: Include price_changed indicator for each item
  • 29.10: Return current_price if price has changed
  • 29.11: Return item_count (total number of items)
  • 29.12: Filter cart items by authenticated user
get/cart

Request

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

Response

Cart contents with variant details and availability

total_pricenumber double required

Total price of all items in cart

item_countnumber double required

Total number of items in cart

Changes

    • ○

      the endpoint scheme security loggedin was added to the API

    • ○

      the endpoint scheme security jwt was removed from the API

    • ○

      added the required property /// to the response with the status

    • ○

      added the required property // to the response with the status