Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

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:

 

ParameterDetails
nameName 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

URLhttp://<host>:<port>/openspecimen/rest/ng/shipments
MethodPOST
Content-Typeapplication/json
Request

{
"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"
}

Response


{
"id" : 1,
"label" : "Brain Cancer Specimen Lists",
"barcode" : "11111",
"specimenListDetails" : 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
200All resourcesShipment has been created successfully.
400All requestsInvalid parameters, e.g Invalid Users , Invalid Specimen-List id, Null or empty label,barcode.
401All requestsAuthorization failed, User doesn’t have Authority.
500All requestsInternal server error, Encountered server error while performing operations.
  • No labels