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 | Status of shipment. Permissible values are {Pending, Shipped } |
sender | Sender of the shipment |
shipmentItems | Collection of specimens label: specimen label |
http[s]:<host>:<port>/openspecimen/rest/ng/shipments
Use this URL to create shipment in the OpenSpecimen application.
Result:
The response of this request will contains the details of the created shipment
Below is the example of the create shipment
URL | http://<host>:<port>/openspecimen/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. |