Skip to content

submitStockReceived ​

Submits sample stock received to SAM

Request ​

http
POST /rest/sample/stockReceived

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth token returned from loginUser

Parameters ​

An array of StockReceivedJSON objects i.e.

json
[
  {
    "userId": 3,
    "sampleId": 1,
    "sampleBatchNumber": "Batch#1",
    "sampleQuantity": 24,
    "stockDateReceived": 1405377705268,
    "deliveryDocketNumber": "DeliveryDocket-#1"
  },
  {
    "userId": 3,
    "sampleId": 2,
    "sampleBatchNumber": "Batch#2",
    "sampleQuantity": 12,
    "stockDateReceived": 1405377705268,
    "deliveryDocketNumber": "DeliveryDocket-#2"
  }
]

Response ​

200 OK ​

Returns the number of records successfully saved to SAM. The above example would return 2 in the response body OTHERWISE an exception should be thrown

Errors ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSDuplicateSampleSubmittedExceptionSee Error Definitions
WSSampleServiceExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions