Delete Shed

Delete a supply shed and its plots from your organization's view.

This is a visibility delete, not a data delete (see Delete Facility for the full semantics โ€” preservation, revival-on-re-upload, and cross-org behavior all apply identically).

Cascade

Deletion cascades downward only: a shed delete removes the shed and its plots. The parent facility and any sibling sheds are left intact โ€” removing one shed leaves the facility with its remaining sheds. (An uploaded shed has no parent facility, so there is nothing to cascade up to anyway.)

Request

Method & Path

DELETE /locations/sheds/:id

:id is the shed's public location id (as returned by GET /locations/:id).

Query parameters

  • detach_from_pending_dds (boolean, default true) โ€” same behavior as on Delete Facility: pending (unfrozen) DDS versions pinning a plot in the cascade are detached (true) or block the delete with 409 (false); frozen (submitted / version-cut) versions are never touched.

Response

  • 204 No Content โ€” deleted.
  • 403 โ€” the key lacks the locations:delete scope.
  • 404 โ€” no shed with that id is visible to your organization.
  • 409 CONFLICT โ€” detach_from_pending_dds=false and a cascade plot is pinned by a pending DDS version (details.pending_dds_version_ids).

See error-codes.md for the shared error envelope.

Required scope: locations:delete