...
...
...
...
This page contains documentation of update shipment REST API.You can use URL: http[s]:<host>:<port>/catissuecoreopenspecimen/rest/ng/shipments/{label} url id}
Use this URL to update a shipment .
Request Detailsin the OpenSpecimen application. Use HTTP PUT 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. |
type |
Type of the shipment |
(Optional). Permissible values are {'SPECIMEN', 'CONTAINER'} | |
courierName | Courier name of which shipping sent (Optional). |
trackingNumber | Courier tracking number for a shipment (Optional). |
trackingUrl | Courier tracking URL (Optional). |
sendingSite | Sender site name. |
receivingInstitute | Receiving institute name (Optional). |
receivingSite | Receiver site name. |
notifyUsers | Collection of users to be notified (Optional). |
shippedDate | Date of shipping (Optional). |
senderComments | Sender comments (Optional). |
status | Status of shipment. Permissible values are { |
Response :
Response of this event contains details of updated shipment.
Example :
'Pending', 'Shipped'} | |
senderComments | Comments from the sender of the shipment (Optional). |
shipmentSpmns | Collection of specimens to be shipped. When the shipment type is 'SPECIMEN'. |
shipmentContainers | Collection of shipments to be shipped. When the shipment type is 'CONTAINER'. |
Example:
Below is an example of updating a shipment:
Expand | ||
---|---|---|
| ||
|
...
|
...
|
...
|
...
{
"label" : "Brain Cancer Specimen Lists",
"barcode" : "11111",
"specimenListIdentifier" :1,
"senderSite" : "Site A",
"receiverSite" : "Site B",
"senderContactPerson" : "siteA.admin@admin.com",
"receiverContactPerson" : "siteB.admin@admin.com"
"senderComments" : "comments",
"sendDate" : "2014-01-01",
"courierName" : "xyz",
"courierTrackingId" : "CT123",
"courierTrackingUrl" : "xyz.com"
}
...
|
Error Cases
code | Applies to | Status Message |
---|---|---|
200 | All resources | The Shipment has been |
...
updated 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. |