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.
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 |
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" |
{
"Barcode":"0000100261148",
"NewBarcode":"39876000009926",
"IgnoreFormat":"true"
}
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"
}
Code | Description |
---|---|
200 | OK. Success |
400 | FAILURE. Bad request
|
403 | FAILURE. Bad request
|
404 | FAILURE. Bad request
|
409 | FAILURE. Bad request
|
409 | FAILURE. Bad request
|
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. |