Delete Location

Deletes a location library entry by its ID. The entry is permanently removed from the library and will no longer appear in dropdown lists for step location configuration.

Deleting a library entry does not affect any existing steps that use the same location name. Library entries are reference data for future data entry — they have no foreign key relationship to steps. A step with location "Bay 1" will continue to display that location even if the "Bay 1" library entry is deleted.

Request

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe location library entry ID to delete (e.g. "lloc_a1b2c3").

Response

200 OK

Returns a success confirmation.

FieldTypeDescription
successbooleanAlways true on successful deletion

404 Not Found

ConditionMessage
No location library entry exists with the given ID"LocationLibraryEntry not found: {id}"

500 Internal Server Error

ConditionMessage
Database delete failure"Internal Server Error"

Examples

Request

curl -X DELETE http://localhost:3000/api/library/locations/lloc_a1b2c3

Response — Deleted successfully

{
  "success": true
}

Error — Not found

curl -X DELETE http://localhost:3000/api/library/locations/lloc_nonexistent
# 404: { "message": "LocationLibraryEntry not found: lloc_nonexistent" }

Notes

  • Deletion is permanent. There is no soft delete or undo mechanism for library entries.
  • The deleted entry's name can be re-created later via POST /api/library/locations.
  • Existing steps with the deleted location name are unaffected. The library is a convenience for dropdown population, not a constraint.
  • No audit trail entry is created for library deletions.
  • If the deleted location contained the substring "vendor", the vendorPartsCount in the Parts View endpoint is unaffected because that metric reads from the step's location field, not the library.