Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

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
Activity status Status of shipment. Permissible values are {Pending, Shipped , Received }
sender
 Sender of the shipment
shipmentItemshipmentItems

Collection of specimens

Response :

Response of this event contains details of newly created shipment.

 

...

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>/catissuecoreopenspecimen/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"
}

 

...