Replace Item Record Barcode

Replace item record barcode from check in view

PUT /api/.../itemrecords/{id}?actiontype=replacebarcode

Replace item record barcode with a new barcode. The barcode validation rules will be run against the new barcode.

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the item record.
dto ExpandoObject Yes Define this parameter in the request body.
actiontype String Yes Define this parameter in the request query string to replace item record barcode. Possible Values: replacebarcode
dto
Property Type Nullable Description
Barcode String No The current barcode of the item record. This is required to detect whether or not item is an Ephemeral item.
NewBarcode String No The new barcode that will be assigned to the item record.
IgnoreFormat Boolean Yes Define this parameter in the request query string to indicate whether or not to check the new item barcode format. Possible Values: "True" or "False"
Example
application/json, text/json
{
    "Barcode":"0000100261148",
    "NewBarcode":"39876000009926",
    "IgnoreFormat":"true"
} 

Response Information

Example - 200 OK
application/json, text/json

Replace barcode succeeded

{
  "PAPIProcedure": 0,
  "PAPIProcedureStep": 0,
  "PAPIAction": 0,
  "PAPIActionProcedure": 0,
  "PAPIPromptType": 0,
  "PAPIStopType": 0,
  "PAPIReturnCode": 0,
  
  "Success": true,
  "Message": ""
} 

Barcode format validation failed

{
  "PAPIProcedure": 0,
  "PAPIProcedureStep": 0,
  "PAPIAction": 2,
  "PAPIActionProcedure": 0,
  "PAPIPromptType": 4,
  "PAPIStopType": 0,
  "PAPIReturnCode": -2002,

  "Success": false,
  "Message": "This barcode [abcdxxxx] format is not defined. Do you want to use this barcode for this item?"
}

Barcode duplicate detection failed

{
  "PAPIProcedure": 0,
  "PAPIProcedureStep": 0,
  "PAPIAction": 1,
  "PAPIActionProcedure": 0,
  "PAPIPromptType": 1,
  "PAPIStopType": 0,
  "PAPIReturnCode": 0,

  "Success": false,
  "Message": "Item barcode [39876000009926] already exists in the database, or is used as a quick-circ barcode. "
}

Barcode duplicate detection failed

{
  "PAPIProcedure": 0,
  "PAPIProcedureStep": 0,
  "PAPIAction": 1,
  "PAPIActionProcedure": 0,
  "PAPIPromptType": 1,
  "PAPIStopType": 0,
  "PAPIReturnCode": 0,

  "Success": false,
  "Message": "A patron record exists for this barcode [123]."
}

Barcode already assigned to this item.

{
  "PAPIProcedure": 0,
  "PAPIProcedureStep": 0,
  "PAPIAction": 1,
  "PAPIActionProcedure": 0,
  "PAPIPromptType": 1,
  "PAPIStopType": 0,
  "PAPIReturnCode": 0,

  "Success": false,
  "Message": "Item barcode [0000100211580] is already assigned to this item."
}

Barcode is either empty or exceeds database column size

{
  "PAPIProcedure": 0,
  "PAPIProcedureStep": 0,
  "PAPIAction": 1,
  "PAPIActionProcedure": 0,
  "PAPIPromptType": 2,
  "PAPIStopType": 0,
  "PAPIReturnCode": 0,

  "Success": false,
  "Message": "A valid item barcode must be supplied. Maximum length is 20"
}

HTTP Response Codes

Code Description
200 OK. Success
400 FAILURE. Bad request
  • All items must be in and from this branch
  • Item ID is invalid
  • Quick-circ items cannot be modified during check in.
  • ILL items cannot be modified during check in.
  • EContent items cannot be modified during check in.
403 FAILURE. Bad request
  • User or workstation is not privileged.
404 FAILURE. Bad request
  • Item not found with ID {0}.
409 FAILURE. Bad request
  • Operation cancelled because Item Record [{0}] is locked.
409 FAILURE. Bad request
  • Operation cancelled because Item Record [{0}] is locked.

Required Permissions

Permission IDs found here.

    
CR_ManageItemDialogs_ModifyBarcode
CR_OverrideInvalidItemBarcodeMsg_Allow Required only if IgnoreFormat is set to True and new item barcode isn't well formatted.