http[s]:<host>:<port>/openspecimen/rest/ng/sites
Use this resource to create shipment in the openSpecimen application. Use HTTP POST method to call this API by passing the below details in JSON format.
Below are the attributes which need to be sent in the request body:
Parameter | Details |
---|---|
name | Name of the shipment |
courierName | Courier name of which shipping sent |
trackingNumber | Courier tracking number for a shipment. |
trackingUrl | Courier tracking URL |
sendingSite | Sender site name. |
receivingSite | Receiver site name. |
notifyUsers | Collection of users to be notified |
shippedDate | Date of shipping |
senderComments | Sender comments |
status | Activity status of shipment. Permissible values are {Pending, Shipped, Received } |
sender | Sender of the shipment |
shipmentItem | Collection of specimens |
Response :
Response of this event contains details of newly created shipment.
Example :
URL | http://<host>:<port>/ catissuecore/rest/ng/shipments |
Method | POST |
Content-Type | application/json |
Request | { |
Response |
|
Error Cases
code | Applies to | Status Message |
---|---|---|
200 | All resources | Shipment has been created successfully. |
400 | All requests | Invalid parameters, e.g Invalid Users , Invalid Specimen-List id, Null or empty label,barcode. |
401 | All requests | Authorization failed, User doesn’t have Authority. |
500 | All requests | Internal server error, Encountered server error while performing operations. |