Skip to content

Get Block Time

Retrieve a single block time entry by its ID.

Endpoint

GET /v1/doctor-block/{doctorBlockingScheduleId}

Path Parameters

Parameter Type Required Description
doctorBlockingScheduleId integer Yes Unique ID of the block time entry

Request

curl --location '{base_url}/v1/doctor-block/10045' \
  --header 'Authorization: Bearer JWT_TOKEN'

Response

Success Response

Code: 200 OK

{
  "code": 2000,
  "data": {
    "doctor_blocking_schedule_id": 10045,
    "doctor_id": 485195,
    "clinic_id": 44,
    "block_reason": "LUNCH",
    "starts_at": "2025-07-24T09:00:00",
    "ends_at": "2025-07-24T10:00:00",
    "block_date": "2025-07-24",
    "slot_start_time": "09:00",
    "slot_end_time": "10:00",
    "recurrence_frequency": "NON_RECURRENT",
    "days_of_occurrence": null,
    "interval_count": 1,
    "block_identifier": "uuid-abc-123",
    "block_status": "ACTIVE",
    "comments": "Team lunch",
    "created_at": "2025-05-19T08:00:00",
    "auto_delete_block_after": null
  },
  "message": "Success"
}

Response Fields

Field Type Description
doctor_blocking_schedule_id integer Unique ID of this block entry
doctor_id integer Doctor the block applies to
clinic_id integer Clinic the block applies to
block_reason string Reason code
starts_at string (datetime) Block start datetime (UTC)
ends_at string (datetime) Block end datetime (UTC)
block_date string (date) Calendar date of this block
slot_start_time string Slot start time (HH:mm)
slot_end_time string Slot end time (HH:mm)
recurrence_frequency string Recurrence pattern
days_of_occurrence array Weekday integers for recurring blocks
interval_count integer Interval between occurrences
block_identifier string UUID shared by all occurrences of a recurring block
block_status string ACTIVE or DELETED
comments string Free-text note
created_at string (datetime) Creation timestamp
auto_delete_block_after string (datetime) If set, the block is automatically removed after this datetime

Error Response

Code: 400 Bad Request

{
  "code": 4000,
  "message": "Block not found",
  "data": null
}