Delete a document
Un-tags a document from the case (metadata only); the stored blob is left for history. Scoped to the case so a widget can only remove its own files.
While an information request is open this accepts ONLY a file the applicant uploaded during the round, into a document group that request asked to be re-uploaded. Any other group, every owner government ID, and the files the group already held when the request was sent are a 409 not_requested: those are what the checks ran on, and removing one would answer the request by emptying the group. So an upload can always be taken back here, and the document being replaced cannot be.
The upload endpoint (POST /api/v4/upload/kyb//documents, served by docver-upload) applies the group half of the rule with the same code, but NOT the per-file half: a single-file group replaces rather than accumulates, so uploading into one un-tags whatever it held, the requested document included.