Availability Management

Create and manage availability rule sets, templates, and calendar events

POST
/consultations/availability-rule-sets/rule-sets
Create Availability Rule Set
Create a new availability rule set with weekly rules and time intervals

Request Body

Request
{
  "name": "Weekday Availability",
  "description": "Monday to Friday availability",
  "timezone": "America/New_York",
  "durationType": "Indefinite",
  "isDefault": false,
  "metaData": {
    "autoAccept": true,
    "bufferTime": 15,
    "maxBookingsPerDay": 8
  },
  "availabilityRules": [
    {
      "type": "weekly",
      "weekday": "monday",
      "intervals": [
        {
          "start_time": "09:00:00",
          "end_time": "17:00:00",
          "enabled": true
        }
      ]
    }
  ]
}

Response

Response (200 OK)
{
  "data": {
    "id": "57565745-d5c9-4ba1-b98b-da6bb31c5f6f",
    "referenceId": "ByF-AVL-RST-922C58",
    "name": "Weekday Availability",
    "status": "Active",
    "timezone": "America/New_York",
    "createdAt": "2025-09-29T20:01:26.904Z"
  },
  "message": "Availability rule set created successfully",
  "success": true
}
GET
/consultations/availability-rule-sets/rule-sets
List Availability Rule Sets
Get all availability rule sets with pagination

Query Parameters

Query Parameters
page=1&limit=20

Response

Response (200 OK)
{
  "data": [
    {
      "id": "57565745-d5c9-4ba1-b98b-da6bb31c5f6f",
      "referenceId": "ByF-AVL-RST-922C58",
      "name": "Weekday Availability",
      "status": "Active",
      "bookings": 0,
      "utilization": 0,
      "timezone": "America/New_York"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1
  },
  "message": "Rule sets retrieved successfully",
  "success": true
}
GET
/consultations/availability-rule-sets/rule-sets/{id}
Get Availability Rule Set
Get detailed information about a specific rule set

Response

Response (200 OK)
{
  "data": {
    "id": "57565745-d5c9-4ba1-b98b-da6bb31c5f6f",
    "referenceId": "ByF-AVL-RST-922C58",
    "name": "Weekday Availability",
    "description": "Monday to Friday availability",
    "status": "Active",
    "timezone": "America/New_York",
    "availabilityRules": [
      {
        "type": "weekly",
        "weekday": "monday",
        "intervals": [
          {
            "start_time": "09:00:00",
            "end_time": "17:00:00",
            "enabled": true
          }
        ]
      }
    ]
  },
  "message": "Rule set retrieved successfully",
  "success": true
}