Buyer Endpoints

Endpoints for Buyers to manage their relationships with Sellers

GET
/customers/buyer/{buyerId}
Get Relationships by Buyer
Get all customer relationships for a specific buyer

Response

Response (200 OK)
{
  "data": {
    "relationships": [
      {
        "id": "cus_123456",
        "sellerName": "Jane Smith",
        "status": "Active",
        "isFollowing": true,
        "totalBookings": 5,
        "totalSpent": 500.00
      }
    ],
    "total": 10
  },
  "message": "Relationships retrieved successfully",
  "success": true
}
GET
/customers/buyer/{buyerId}/following
Get Following Relationships
Get all sellers that a buyer follows

Response

Response (200 OK)
{
  "data": {
    "following": [
      {
        "id": "cus_123456",
        "sellerName": "Jane Smith",
        "sellerCategory": "Fitness",
        "followedAt": "2025-09-15T10:00:00Z",
        "totalBookings": 5
      }
    ],
    "total": 8
  },
  "message": "Following list retrieved successfully",
  "success": true
}
GET
/customers/buyer/{buyerId}/customers
Get Customer Relationships
Get customer relationships where buyer has made bookings

Response

Response (200 OK)
{
  "data": {
    "customers": [
      {
        "id": "cus_123456",
        "sellerName": "Jane Smith",
        "totalBookings": 5,
        "totalSpent": 500.00,
        "lastBooking": "2025-10-07T15:30:00Z"
      }
    ],
    "total": 6
  },
  "message": "Customer relationships retrieved successfully",
  "success": true
}