{ "info": { "_postman_id": "buysellservice-api-collection", "name": "BuySellService API", "description": "Complete API collection for Livestock Marketplace - BuySellService", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Users", "item": [ { "name": "Create User", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"id\": \"aaf295cb-a19e-4179-a2df-31c0c64ea9f4\",\n \"name\": \"Test User\",\n \"phone_number\": \"+919876543210\",\n \"avatar_url\": null,\n \"language\": \"en\",\n \"timezone\": \"Asia/Kolkata\",\n \"country_code\": \"+91\"\n}" }, "url": { "raw": "http://localhost:3200/users", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "users" ] }, "description": "Create a new user. You can provide a specific UUID or let the system generate one." } }, { "name": "Get All Users", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/users?limit=100&offset=0", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "users" ], "query": [ { "key": "limit", "value": "100" }, { "key": "offset", "value": "0" } ] }, "description": "Get a list of all users" } }, { "name": "Get User by ID", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/users/:userId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "users", ":userId" ], "variable": [ { "key": "userId", "value": "aaf295cb-a19e-4179-a2df-31c0c64ea9f4" } ] }, "description": "Get a single user by UUID" } }, { "name": "Update User", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"name\": \"Updated User Name\",\n \"phone_number\": \"+919876543210\"\n}" }, "url": { "raw": "http://localhost:3200/users/:userId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "users", ":userId" ], "variable": [ { "key": "userId", "value": "aaf295cb-a19e-4179-a2df-31c0c64ea9f4" } ] }, "description": "Update user information" } } ] }, { "name": "Listings", "item": [ { "name": "Get All Listings", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/listings?status=active&limit=20&offset=0", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings" ], "query": [ { "key": "status", "value": "active" }, { "key": "limit", "value": "20" }, { "key": "offset", "value": "0" } ] }, "description": "Get all active listings" } }, { "name": "Get Listing by ID", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/listings/:listingId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings", ":listingId" ], "variable": [ { "key": "listingId", "value": "your-listing-uuid-here" } ] }, "description": "Get a single listing with full details" } }, { "name": "Create Listing", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"seller_id\": \"aaf295cb-a19e-4179-a2df-31c0c64ea9f4\",\n \"title\": \"High-yield Gir cow for sale\",\n \"price\": 55000,\n \"currency\": \"INR\",\n \"is_negotiable\": true,\n \"listing_type\": \"sale\",\n \"animal\": {\n \"species_id\": \"your-species-uuid\",\n \"breed_id\": \"your-breed-uuid\",\n \"sex\": \"F\",\n \"age_months\": 36,\n \"weight_kg\": 450,\n \"color_markings\": \"Brown with white patches\",\n \"quantity\": 1,\n \"purpose\": \"dairy\",\n \"health_status\": \"healthy\",\n \"vaccinated\": true,\n \"dewormed\": true,\n \"pregnancy_status\": \"pregnant\",\n \"milk_yield_litre_per_day\": 15,\n \"ear_tag_no\": \"TAG-12345\",\n \"description\": \"Calm nature, easy to handle.\"\n },\n \"media\": [\n {\n \"media_url\": \"https://cdn.app.com/listings/abc1.jpg\",\n \"media_type\": \"image\",\n \"is_primary\": true,\n \"sort_order\": 1\n }\n ]\n}" }, "url": { "raw": "http://localhost:3200/listings", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings" ] }, "description": "Create a new listing with animal details" } }, { "name": "Update Listing", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"title\": \"Updated title\",\n \"price\": 52000,\n \"status\": \"active\"\n}" }, "url": { "raw": "http://localhost:3200/listings/:listingId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings", ":listingId" ], "variable": [ { "key": "listingId", "value": "your-listing-uuid-here" } ] }, "description": "Update listing information" } }, { "name": "Search Listings", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/listings/search?q=cow&limit=20&offset=0", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings", "search" ], "query": [ { "key": "q", "value": "cow" }, { "key": "limit", "value": "20" }, { "key": "offset", "value": "0" } ] }, "description": "Search listings by text query" } }, { "name": "Near Me Search", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/listings/near-me?lat=18.5204&lng=73.8567&radius_meters=100000&limit=20", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings", "near-me" ], "query": [ { "key": "lat", "value": "18.5204" }, { "key": "lng", "value": "73.8567" }, { "key": "radius_meters", "value": "100000" }, { "key": "limit", "value": "20" } ] }, "description": "Find listings near a specific location" } }, { "name": "Get Species", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/listings/species", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings", "species" ] }, "description": "Get all available species" } }, { "name": "Get Breeds", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/listings/breeds?species_id=your-species-uuid", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "listings", "breeds" ], "query": [ { "key": "species_id", "value": "your-species-uuid", "description": "Optional: Filter breeds by species" } ] }, "description": "Get all available breeds (optionally filtered by species)" } } ] }, { "name": "Locations", "item": [ { "name": "Create Location", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"user_id\": \"aaf295cb-a19e-4179-a2df-31c0c64ea9f4\",\n \"lat\": 18.15,\n \"lng\": 74.5833,\n \"country\": \"India\",\n \"state\": \"Maharashtra\",\n \"district\": \"Pune\",\n \"city_village\": \"Baramati\",\n \"pincode\": \"413102\",\n \"location_type\": \"farm\",\n \"is_saved_address\": true,\n \"source_type\": \"manual\",\n \"source_confidence\": \"high\"\n}" }, "url": { "raw": "http://localhost:3200/locations", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "locations" ] }, "description": "Create a new location. user_id is optional for captured locations but required for saved addresses." } }, { "name": "Get User Locations", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/locations/user/:userId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "locations", "user", ":userId" ], "variable": [ { "key": "userId", "value": "aaf295cb-a19e-4179-a2df-31c0c64ea9f4" } ] }, "description": "Get all locations for a specific user" } }, { "name": "Get Location by ID", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/locations/:locationId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "locations", ":locationId" ], "variable": [ { "key": "locationId", "value": "your-location-uuid-here" } ] }, "description": "Get a single location by ID" } }, { "name": "Update Location", "request": { "method": "PUT", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"city_village\": \"Updated City Name\",\n \"pincode\": \"413103\"\n}" }, "url": { "raw": "http://localhost:3200/locations/:locationId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "locations", ":locationId" ], "variable": [ { "key": "locationId", "value": "your-location-uuid-here" } ] }, "description": "Update location information" } } ] }, { "name": "Chat", "item": [ { "name": "Create/Get Conversation", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"buyer_id\": \"buyer-uuid-here\",\n \"seller_id\": \"seller-uuid-here\"\n}" }, "url": { "raw": "http://localhost:3200/chat/conversations", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "chat", "conversations" ] }, "description": "Create a new conversation or get existing one between buyer and seller" } }, { "name": "Get User Conversations", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/chat/conversations/user/:userId", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "chat", "conversations", "user", ":userId" ], "variable": [ { "key": "userId", "value": "aaf295cb-a19e-4179-a2df-31c0c64ea9f4" } ] }, "description": "Get all conversations for a specific user" } }, { "name": "Get Messages", "request": { "method": "GET", "header": [], "url": { "raw": "http://localhost:3200/chat/conversations/:conversationId/messages?limit=50&offset=0", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "chat", "conversations", ":conversationId", "messages" ], "query": [ { "key": "limit", "value": "50" }, { "key": "offset", "value": "0" } ], "variable": [ { "key": "conversationId", "value": "your-conversation-uuid-here" } ] }, "description": "Get messages for a conversation" } }, { "name": "Send Message", "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"conversation_id\": \"conversation-uuid-here\",\n \"sender_id\": \"sender-uuid-here\",\n \"receiver_id\": \"receiver-uuid-here\",\n \"content\": \"Hello, I'm interested in your listing.\",\n \"message_type\": \"text\"\n}" }, "url": { "raw": "http://localhost:3200/chat/messages", "protocol": "http", "host": [ "localhost" ], "port": "3200", "path": [ "chat", "messages" ] }, "description": "Send a message in a conversation" } } ] } ], "variable": [ { "key": "baseUrl", "value": "http://localhost:3200", "type": "string" } ] }