The specimens reserved for distribution to a specific project/distribution protocol can be cancelled using the below API. On cancellation, the specimens will become eligible for distribution to any project/DP satisfying the distribution criteria.
API | http[s]://<host>:<port>/openspecimen/rest/ng/distribution-protocols/{dp-id}/reserved-specimens |
---|---|
Method | POST |
Body | { "cancelOp": true, "specimens": [ { "id": <spmn-id-1>, "cpShortTitle": <spmn-cp-1>, "label": <spmn-label-1>, "barcode": <spmn-barcode-1> }, { "id": <spmn-id-2>, "cpShortTitle": <spmn-cp-2>, "label": <spmn-label-2>, "barcode": <spmn-barcode-2> }, ... many more specimens ... ] } |
cancelOp attribute value should be true. Not including this attribute or using false or null will result in the reverse op i.e. reserving the specimens.
{dp-id} is placeholder for the ID of distribution protocol for which the specimens are to be reserved.
The specimens to be unreserved can be identified by any of the following mechanism:
Unique specimen ID <spmn-id-1>, <spmn-id-2>
CP short title and label tuple {<spmn-cp-1>, <spmn-label-1>}
CP short title and barcode tuple {<spmn-cp-1>, <spmn-barcode-1>}