Skip to content

Bulk Delete Recurring Blocks

Delete all occurrences of a recurring block series identified by its block_identifier. Supports deleting the full series, or only occurrences within a specific date range.

Endpoint

DELETE /v1/doctor-block/bulk-delete/{blockIdentifier}

Path Parameters

Parameter Type Required Description
blockIdentifier string Yes UUID shared by all occurrences of the recurring block

Query Parameters

Parameter Type Required Description
date_time string (date) Yes Reference date for the deletion (YYYY-MM-DD)
startDate_time string (date) No If provided, only delete occurrences on or after this date
endDate_time string (date) No If provided, only delete occurrences on or before this date

Request

# Delete the full series
curl --location --request DELETE \
  '{base_url}/v1/doctor-block/bulk-delete/uuid-abc-123?date_time=2025-07-28' \
  --header 'Authorization: Bearer JWT_TOKEN'
# Delete only occurrences in a date range
curl --location --request DELETE \
  '{base_url}/v1/doctor-block/bulk-delete/uuid-abc-123?date_time=2025-07-28&startDate_time=2025-08-01&endDate_time=2025-08-31' \
  --header 'Authorization: Bearer JWT_TOKEN'

Response

Success Response

Code: 200 OK

{
  "code": 2000,
  "data": "Blocks deleted successfully",
  "message": "Success"
}

Response Fields

Field Type Description
data string Confirmation message

Error Response

Code: 400 Bad Request

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

Notes

  • The block_identifier is returned when creating a recurring block via Add Block Time.
  • Omitting startDate_time and endDate_time deletes the entire series.
  • To delete a single occurrence only, use Delete Block Time.