Listings API

Manage the listings sellers offer to buyers on the trade platform.

Endpoints

MethodPathDescription
GET/v1/listingsList listings (all listings for buyers, own listings for sellers).
POST/v1/listingsCreate a listing (seller accounts).
GET/v1/listings/:idGet a single listing by ID.
PATCH/v1/listings/:idUpdate a listing’s details or availability (seller accounts).

The Listing Object

Listing object
{
  "id": "lst_1a4f22",
  "sellerId": "usr_3d7b90",
  "title": "Grade A Basmati Rice",
  "availableQuantity": 12000,
  "unit": "kg",
  "pricePerUnit": 1.42,
  "currency": "USD",
  "status": "active"
}

Create a Listing

Request
curl -X POST https://api.baalvion.com/v1/listings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Grade A Basmati Rice",
    "availableQuantity": 12000,
    "unit": "kg",
    "pricePerUnit": 1.42,
    "currency": "USD"
  }'
Seller accounts only
Creating and updating listings requires an API key belonging to a seller account.