Bulk Change of Contents

Overview

General processing of bulk change uses the following order of operations:

  • Validate changes and create a summary.
  • Insert change data into the database.
  • Process change data using bulk change ID.
  • Delete change data from the database.

Create Summary of Bulk Changes

POST /api/.../recordsets/{id}/records/bulkchangesummary

In preparation for a bulk change operation the user may want to see a summary of the changes. Use this method to validate the bulk change data object and return a list of changes to be applied.

"Change" Values:

  • 0 = do not change
  • non-zero = change
"Mode" Values:
  • 0 = Replace
  • 1 = Prepend
  • 2 = Append
General values:
  • null = do not change
  • "" = Set to clear/none/empty
Clear IDs ParentItemRecordID by passing in a -1.

Request Information

Parameters
Name Type Required Description
id Integer Yes ID of the record set.
DtoBulkItemChange
Property Type Nullable Description
BulkChangeReportName StringNoRequired
ErrorRecordSetName StringYes
ErrorRecordSetOwnerID StringYesRequired if ErrorRecordSetName supplied.
Examples: user:1 or org:1
OwningBranchID Int32Yes
AssignedBranchID Int32Yes
AssignedCollectionName StringYes
AssignedCollectionAbbreviationStringYes
ShelfLocationName StringYes
TemporaryShelfLocationChange Int32 No0 = do not change, non-zero = change
TemporaryShelfLocation StringYes
CirculationStatusID Int32Yes
MaterialTypeID Int32Yes
LoanPeriodCodeID Int32Yes
FineCodeID Int32Yes
StatisticalCodeName StringYes
RenewalLimit Int32Yes
Holdable Int32Yes
HoldableByPickup Int32Yes
HoldPickupBranchID Int32Yes
HoldableByLibrary Int32Yes
HoldableByBranch Int32Yes
HoldableByPrimaryLender Int32Yes
LoanableOutsideSystem Int32Yes
NonCirculating Int32Yes
ShelvingSchemeID Int32Yes
CallNumberPrefixChange Int32 No0 = do not change, non-zero = change
CallNumberPrefix StringYes
ClassificationNumberChange Int32 No0 = do not change, non-zero = change
ClassificationNumber StringYes
CutterNumberChange Int32 No0 = do not change, non-zero = change
CutterNumber StringYes
CallNumberSuffixChange Int32 No0 = do not change, non-zero = change
CallNumberSuffix StringYes
VolumeNumberChange Int32 No0 = do not change, non-zero = change
VolumeNumber StringYes
CopyNumberChange Int32 No0 = do not change, non-zero = change
CopyNumber StringYes
PullCallNumberFromBibChange Int32 No0 = do not change, non-zero = change
PublicNoteMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
PublicNote StringYes
NonPublicNoteMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
NonPublicNote StringYes
PhysicalConditionMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
PhysicalCondition StringYes
ItemBlockName StringYes
FreeTextBlockMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
FreeTextBlock StringYes
AssociatedBibRecordID Int32Yes
DisplayInPAC Int32Yes
ParentItemRecordID Int32YesPass in a -1 to clear the ParentItemRecordID from the item record.
NameOfPieceChange Int32 No0 = do not change, non-zero = change
NameOfPiece StringYes
FundingSourceChange Int32 No0 = do not change, non-zero = change
FundingSource StringYes
PriceChange Int32 No0 = do not change, non-zero = change
Price DecimalYes
HomeBranchID Int32Yes
ItemDoesNotFloat Int32Yes
DoNotMailToPatron Int32Yes
ItemBarcodes Array of stringYes
UseSystemBarcodes BoolYes
Example body to change the OwningBranchID, AssignedBranchID, HomeBranchID, Holdable and Price properties.
application/json, text/json
{ 
    BulkChangeReportName: "bulkName",
    ErrorRecordSetName: "error record set name",
    ErrorRecordSetOwnerID: "user:1",
    OwningBranchID: 3,
    AssignedBranchID: 3,
    AssignedCollectionName: null,
    AssignedCollectionAbbreviation: null,
    ShelfLocationName: null,
    TemporaryShelfLocationChange: 0,
    TemporaryShelfLocation: null,
    CirculationStatusID: null,
    MaterialTypeID: null,
    LoanPeriodCodeID: null,
    FineCodeID: null,
    StatisticalCodeName: null,
    RenewalLimit: null,
    Holdable: 1,
    HoldableByPickup: 1,
    HoldPickupBranchID: 3,
    HoldableByLibrary: null,
    HoldableByBranch: null,
    HoldableByPrimaryLender: 0,
    LoanableOutsideSystem: null,
    NonCirculating: null,
    ShelvingSchemeID: null,
    CallNumberPrefixChange: 0,
    CallNumberPrefix: null,
    ClassificationNumberChange: 0,
    ClassificationNumber: null,
    CutterNumberChange: 0,
    CutterNumber: null,
    CallNumberSuffixChange: 0,
    CallNumberSuffix: null,
    VolumeNumberChange: 0,
    VolumeNumber: null,
    CopyNumberChange: 0,
    CopyNumber: null,
    PullCallNumberFromBibChange: 0,
    PublicNoteMode: 1,
    PublicNote: 'Note: ',
    NonPublicNoteMode: 0,
    NonPublicNote: null,
    PhysicalConditionMode: 0,
    PhysicalCondition: null,
    ItemBlockName: null,
    FreeTextBlockMode: 0,
    FreeTextBlock: null,
    AssociatedBibRecordID: null,
    DisplayInPAC: null,
    ParentItemRecordID: null,
    NameOfPieceChange: 0,
    NameOfPiece: null,
    FundingSourceChange: 0,
    FundingSource: null,
    PriceChange: 1,
    Price: 2.25,
    HomeBranchID: 3,
    ItemDoesNotFloat: null,
    DoNotMailToPatron: null,
    ItemBarcodes: null,
    UseSystemBarcodes: null
}

Response Information

Example Response
application/json, text/json
[
  "Owner: Amsterdam Free Library (br)",
  "Assigned branch: Amsterdam Free Library (AMS)",
  "Home branch: Amsterdam Free Library (AMS)",
  "Holdable: Yes",
  "Pickup at Amsterdam Free Library (AMS): Yes",
  "Preferred borrowers: No",
  "Public note (Prepend): 'Note:  '",
  "Price: 2.25"
]

HTTP Response Codes

Code Description
200 Success
400 Bad request
403 Permission(s) not granted.

Add Bulk Change Data For Processing

POST /api/.../recordsets/{id}/records/bulkchange

Insert change data for a bulk change operation and return the bulk change ID.

For ad-hoc bulk changes, pass in a record set ID of '0' and a list of IDs using AdHocItemRecordIDs.

"Change" Values:

  • 0 = do not change
  • non-zero = change
"Mode" Values:
  • 0 = Replace
  • 1 = Prepend
  • 2 = Append
General values:
  • null = do not change
  • "" = Set to clear/none/empty
Clear IDs for ParentItemRecordID by passing in a -1.

Request Information

Parameters
Name Type Required Description
id Integer Yes ID of the record set. For ad-hoc bulk changes, pass in a record set ID of '0'
DtoBulkItemChange
Property Type Nullable Description
BulkChangeReportName StringNoRequired
ErrorRecordSetName StringYes
ErrorRecordSetOwnerID StringYesRequired if ErrorRecordSetName supplied.
Examples: user:1 or org:1
OwningBranchID Int32Yes
AssignedBranchID Int32Yes
AssignedCollectionName StringYes
AssignedCollectionAbbreviationStringYes
ShelfLocationName StringYes
TemporaryShelfLocationChange Int32 No0 = do not change, non-zero = change
TemporaryShelfLocation StringYes
CirculationStatusID Int32Yes
MaterialTypeID Int32Yes
LoanPeriodCodeID Int32Yes
FineCodeID Int32Yes
StatisticalCodeName StringYes
RenewalLimit Int32Yes
Holdable Int32Yes
HoldableByPickup Int32Yes
HoldPickupBranchID Int32Yes
HoldableByLibrary Int32Yes
HoldableByBranch Int32Yes
HoldableByPrimaryLender Int32Yes
LoanableOutsideSystem Int32Yes
NonCirculating Int32Yes
ShelvingSchemeID Int32Yes
CallNumberPrefixChange Int32 No0 = do not change, non-zero = change
CallNumberPrefix StringYes
ClassificationNumberChange Int32 No0 = do not change, non-zero = change
ClassificationNumber StringYes
CutterNumberChange Int32 No0 = do not change, non-zero = change
CutterNumber StringYes
CallNumberSuffixChange Int32 No0 = do not change, non-zero = change
CallNumberSuffix StringYes
VolumeNumberChange Int32 No0 = do not change, non-zero = change
VolumeNumber StringYes
CopyNumberChange Int32 No0 = do not change, non-zero = change
CopyNumber StringYes
PullCallNumberFromBibChange Int32 No0 = do not change, non-zero = change
PublicNoteMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
PublicNote StringYes
NonPublicNoteMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
NonPublicNote StringYes
PhysicalConditionMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
PhysicalCondition StringYes
ItemBlockName StringYes
FreeTextBlockMode Int32Yes0 = Replace, 1 = Prepend, 2 = Append
FreeTextBlock StringYes
AssociatedBibRecordID Int32Yes
DisplayInPAC Int32Yes
ParentItemRecordID Int32YesPass in a -1 to clear the ParentItemRecordID from the item record.
NameOfPieceChange Int32 No0 = do not change, non-zero = change
NameOfPiece StringYes
FundingSourceChange Int32 No0 = do not change, non-zero = change
FundingSource StringYes
PriceChange Int32 No0 = do not change, non-zero = change
Price DecimalYes
HomeBranchID Int32Yes
ItemDoesNotFloat Int32Yes
DoNotMailToPatron Int32Yes
ItemBarcodes Array of stringYes
UseSystemBarcodes BoolYes
AdHocItemRecordIDs List of IDsNoList of item record IDs. Used for ad-hoc bulk changes. Record set ID must be 0.
Example body to change the OwningBranchID, AssignedBranchID, HomeBranchID, Holdable and Price properties.
application/json, text/json
{ 
    BulkChangeReportName: "bulkName",
    ErrorRecordSetName: "error record set name",
    ErrorRecordSetOwnerID: "user:1",
    OwningBranchID: 3,
    AssignedBranchID: 3,
    AssignedCollectionName: null,
    AssignedCollectionAbbreviation: null,
    ShelfLocationName: null,
    TemporaryShelfLocationChange: 0,
    TemporaryShelfLocation: null,
    CirculationStatusID: null,
    MaterialTypeID: null,
    LoanPeriodCodeID: null,
    FineCodeID: null,
    StatisticalCodeName: null,
    RenewalLimit: null,
    Holdable: 1,
    HoldableByPickup: 1,
    HoldPickupBranchID: 3,
    HoldableByLibrary: null,
    HoldableByBranch: null,
    HoldableByPrimaryLender: 0,
    LoanableOutsideSystem: null,
    NonCirculating: null,
    ShelvingSchemeID: null,
    CallNumberPrefixChange: 0,
    CallNumberPrefix: null,
    ClassificationNumberChange: 0,
    ClassificationNumber: null,
    CutterNumberChange: 0,
    CutterNumber: null,
    CallNumberSuffixChange: 0,
    CallNumberSuffix: null,
    VolumeNumberChange: 0,
    VolumeNumber: null,
    CopyNumberChange: 0,
    CopyNumber: null,
    PullCallNumberFromBibChange: 0,
    PublicNoteMode: 1,
    PublicNote: 'Note: ',
    NonPublicNoteMode: 0,
    NonPublicNote: null,
    PhysicalConditionMode: 0,
    PhysicalCondition: null,
    ItemBlockName: null,
    FreeTextBlockMode: 0,
    FreeTextBlock: null,
    AssociatedBibRecordID: null,
    DisplayInPAC: null,
    ParentItemRecordID: null,
    NameOfPieceChange: 0,
    NameOfPiece: null,
    FundingSourceChange: 0,
    FundingSource: null,
    PriceChange: 1,
    Price: 2.25,
    HomeBranchID: 3,
    ItemDoesNotFloat: null,
    DoNotMailToPatron: null,
    ItemBarcodes: null,
    UseSystemBarcodes: null,
    AdHocItemRecordIDs: null
}

Response Information

Example Response. Returns the bulk change ID.
application/json, text/json
1007

HTTP Response Codes

Code Description
200 Success
400 Bad request
403 Permission(s) not granted.

Process Bulk Change

PUT /api/.../recordsets/{id}/records/bulkchange/{bulkChangeID}

Schedule bulk change job to run in the background.

For ad-hoc bulk changes, pass in a record set ID of '0'.

Request Information

Parameters
Name Type Required Description
id Integer Yes ID of the record set. For ad-hoc bulk changes, pass in a record set ID of '0'
bulkChangeID Integer Yes ID of the bulk change ID returned from POST operation.
DtoPerformBulkChangeData
Property Type Nullable Required Description
ModifierIDInt32NoYes
OrganizationIDInt32NoYes
WorkstationIDInt32NoYes
ErrorRecordSetNameStringYesNoName of error record set.
ErrorRecordSetOrgOwnerIDStringYesNoRequired if ErrorRecordSetName supplied. Use '0' to set owner to the record set's creator ID.
Example body
application/json, text/json
{
    ModifierID: 1001,
    OrganizationID: 3,
    WorkstationID: 1233,
    ErrorRecordSetName: "",
    ErrorRecordSetOrgOwnerID: null
}

HTTP Response Codes

Code Description
204 No Content. Item bulk change job has been scheduled to run in the background.
400 Bad request
403 Permission(s) not granted.

Purge Bulk Change

DELETE /api/.../recordsets/{id}/records/bulkchange/{bulkChangeID}

Used to purge a bulk change entry from the database.

For ad-hoc bulk changes, pass in a record set ID of '0'.

Request Information

Parameters
Name Type Required Description
id Integer Yes ID of the record set. For ad-hoc bulk changes, pass in a record set ID of '0'
bulkChangeID Integer Yes ID of the bulk change ID returned from POST operation.

Response Information

Example Response.
application/json, text/json
true

HTTP Response Codes

Code Description
200 Success
400 Bad request
403 Permission(s) not granted.