Retrieve list of Orders
Got feedback or spotted a mistake?

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

Retrieve list of Orders

This API is used to retrieve a list of summary of all orders created in the system that satisfy the search criteria.

URL

/openspecimen/rest/ng/distribution-orders

Method

GET

Response

[ { "id": 1, "name": "Test Order", "distributionProtocol": { "id": 1, "shortTitle": "Test DP", "title": "Test Distribution Protocol", /* * Other details of DP */ }, "instituteName": "Institute of Medical Sciences", "siteName": "Pathology Lab", "requester": { "id: 7, "firstName": "John", "lastName": "Doe", /* * Other user details */ }, "creationDate": 1526274984066, "executionDate": 1526274984066, "status": "EXECUTED", "specimenCnt": 100 /* Count is included only when explicitly requested */ }, /* summary of other orders that satisfy the search criteria */ ]

 

The search criteria can be specified in form of query params. The following are the valid query params that can be specified when invoking the API. When one or more criteria is specified, they are all ANDed

Parameter

Description

query

List of orders whose name contains the query parameter value.

dpShortTitle

List of orders whose DP short title contains the dpShortTitle parameter value.

requester

List of orders requested by users whose first name or last name contains the requester parameter value.

receivingSite

List of orders that have been distributed to sites whose name contains receivingSite parameter value.

receivingInstitute

List of orders that have been distributed to institutes whose name contains receivingInstitute parameter value.

includeStats

When set to true, the API response includes useful metrics related for each order like the count of specimens in the order etc.

startAt

startAt and maxResults are used for implementing pagination of orders list. When not specified, startAt defaults to 0 and the first element of the response is the first order in the list. When startAt = n, the first element of the response is (n + 1)th order in the list.

maxResults

startAt and maxResults are used for implementing pagination of orders list. This specifies how many order records should be included in the API response. When not specified, maxResults defaults to 100. 

When startAt = n and maxResults = 25, then the API response includes orders (n + 1), (n + 2), ... (n + 25) of the orders list sorted by their names.

Got feedback or spotted a mistake?

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