Booking Management

Create, manage, and track consultation bookings

POST
/consultations/bookings
Create Booking
Create a new consultation booking

Request Body

Request
{
  "SellerId": "inf_123456",
  "consultationId": "con_789012",
  "ruleSetId": "ars_345678",
  "date": "2024-01-15T00:00:00Z",
  "startTime": "10:00",
  "endTime": "11:00",
  "participants": [
    {
      "fullName": "John Doe",
      "email": "john.doe@example.com",
      "phone": "+1234567890"
    }
  ],
  "subTotal": 100.00,
  "totalAmount": 115.00,
  "currency": "USD",
  "notes": "First-time client"
}

Response

Response (200 OK)
{
  "data": {
    "bookingId": "bk_123456",
    "referenceId": "BK_123456",
    "status": "Confirmed",
    "consultationTitle": "Fitness Consultation",
    "date": "2024-01-15",
    "startTime": "10:00",
    "endTime": "11:00",
    "totalAmount": 115.00,
    "currency": "USD"
  },
  "message": "Booking created successfully",
  "success": true
}
GET
/consultations/bookings
List Bookings
Get all bookings with filtering

Query Parameters

Query Parameters
page=1&limit=20&status=Confirmed

Response

Response (200 OK)
{
  "data": {
    "bookings": [
      {
        "id": "bk_123456",
        "referenceId": "BK_123456",
        "consultationTitle": "Fitness Consultation",
        "status": "Confirmed",
        "date": "2024-01-15",
        "startTime": "10:00",
        "totalAmount": 115.00
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "total": 1
    }
  },
  "message": "Bookings retrieved successfully",
  "success": true
}
POST
/consultations/bookings/cancel
Cancel Booking
Cancel an existing booking with refund request

Request Body

Request
{
  "bookingId": "BK_123456",
  "reason": "Schedule conflict",
  "refundRequested": true,
  "notes": "Please process full refund",
  "cancellationType": "Client Request",
  "refundAmount": 115.00
}

Response

Response (200 OK)
{
  "data": {
    "bookingId": "bk_123456",
    "status": "Cancelled",
    "refundStatus": "Pending",
    "refundAmount": 115.00,
    "cancelledAt": "2024-01-10T15:30:00Z"
  },
  "message": "Booking cancelled successfully",
  "success": true
}