IMS's PWD and PWI API's are used during deaccessioning an item.
When an item to be deaccessioned is available in SCSB database then PWD api is called otherwise PWI api is called to perform deaccession.
PERMANENT WITHDRAWAL - DIRECT
IMS will accept JSON-encoded REST calls to permanently retrieve items from the storage facility. The required fields are the owner code (CustomerCode), the item barcode (itemBarcode) and the stop code (destination).
{ "dsitem": { "ttitem": [ { // required fields "CustomerCode": "string" "itemBarcode": "string" "destination": "string" "requestorName": "string" // or at least one of "requestorFirstName": "string" "requestorMiddleName": "string" "requestorLastName": "string" } , { "CustomerCode": "string" ... } ... ] } // end of ttitem array }
{ "dsitem": { "ttitem": [ { // required fields "CustomerCode": "string" "itemBarcode": "string" "destination": "string" "requestorName": "string" // or at least one of "requestorFirstName": "string" "requestorMiddleName": "string" "requestorLastName": "string" “errorCode”: “string” “errorNote”: “string” } , { "CustomerCode": "string" ... } ... ] } // end}
- The CustomerCode and destination fields must either match the owner and stop codes in the Storage Location IMS system.
- The owner code is used only for verification purposes. It is compared to the code stored in the Storage Location IMS system, and an error is returned if it does not match
- Storage Location IMS does not separately store the first, middle, and last names of the requestor. If the requestor is blank or missing, it will be constructed from the requestorFirstName, requestorMiddleName, and requestorLastName. If the requestor field contains data, the other three fields are ignored.
Error codes for permanentlyRetrieveItem
errorCode | errorNote | Description |
---|---|---|
itemNotOnFile | Item barcode not found in Storage Location IMS System | |
wrongCustCode | CustomerCode: XX | The supplied customer code does not match the one stored in Storage Location IMS System. The correct code is returned in the errorNote. |
itemWithdrawn | item status, if available. Otherwise, the message "Status unknown - possible reaccession" is returned. | The item has been permanently withdrawn from Storage Location IMS System. |
missingReqData | Comma-delimited list of required fields that were not supplied. If requestor data is missing, the field “requestor” is reported. | One or more required fields were empty |
InternalErr | The nature of the error that occurred. | Storage Location IMS System consistency error. These should never occur – but best practice requires they be tested for |
curl -i -X POST -H "Content-Type:application/json" \ http://$HOST/lasapi/rest/lasapiSvc/permanentlyRetrieveItem \ $HOST/permanentlyRetrieveItem -d \ '{ "dsitem":{ "ttitem": [ { "CustomerCode":"AR", "itemBarcode":"AR00000612", "destination":"AR", "requestor":"requestorName" }, ] }'
Field Descriptions for permanentlyRetrieveItem
JSON field | Description / Typical usage | Data Type | Field width |
---|---|---|---|
CustomerCode | Owner code | alphanum | 3 |
itemBarcode | Item barcode | alphanum | 20 |
destination | Delivery stop | alphanum | 8 |
requestor | Item requestor | string | 70 |
requestorFirstName | First name of requestor | string | 28 |
requestorLastName | Last name of requestor | string | 28 |
requestorMiddleName | Middle name of requestor | string | 16 |
errorCode | Error code (output only) | alphanum | 16 |
errorNote | Additional detail (output only) | string | 60 |