Create Item Record Bulk

Start Create Item Record Bulk Process

POST /api/.../workflow

This method allows the caller to create multiple item records from the same bibliographic record for different branches, collections, material types, etc., or using different templates in bulk.

If encounters any error during the process, it will stop the process and report the error in the response. But any item records that were successfully created before the error occurred will still be created.

Request Information

Parameters
Name Type Required Description
WorkflowRequest DtoWorkflowRequest Yes Define this parameter in the request body.
DtoWorkflowRequest
Property Type Nullable Description
WorkflowRequestType Int No Required. For create item record bulk, this must be set to 42 (WorkflowRequestTypes.CreateItemRecordBulk).
TxnBranchID Int No Transacting branch ID.
TxnUserID Int No Transacting Polaris user ID.
TxnWorkstationID Int No Transacting workstation ID.
RequestExtension DtoWorkflowRequestExtension No Requires a RequestExtension.Data object which must be list of DtoItemRecordBulkData objects and RequestExtension.WorkflowRequestExtensionType be 35 (WorkflowRequestExtensionType.ItemRecordBulkExtensionData).
RequestExtension.WorkflowRequestExtensionType WorkflowRequestExtensionType No Must be 35. (WorkflowRequestExtensionType.ItemRecordBulkExtensionData).
WorkflowReplies List of DtoWorkflowReply Yes It is possible to pass in a list of replies for automated processing.
DtoItemRecordBulkData
Property Type Nullable Description
RowId Int No ID of each row.
NumberOfCopies Int No Number of item records to create for each row. Must be greater than 0 and less than or equal to 500.
ItemRecordData DtoUpdateItemRecordExtensionData No Data for each item record to create except barcodes. See DtoUpdateItemRecordExtensionData
Barcodes String[] Yes List of barcodes provided for each item record.
UseSystemAssignedBarcode Boolean Yes Indicates whether to use system-assigned barcodes for each item record.
SystemAssignedBarcode DtoSystemAssignedBarcode Yes Data required to generate system-assigned barcodes for each item record. Required if UseSystemAssignedBarcode is true.
SA_CATPROFITEMPROMPTBRANCH_ACK Boolean Yes Indicates API customer's acknowledgment of SA "CATPROFITEMPROMPTBRANCH" check. If true, API will skip the check.
SA_CATPROFWARNITEMNOBARCODE_ACK Boolean Yes Indicates API customer's acknowledgment of SA "CATPROFWARNITEMNOBARCODE" check. If true, API will skip the check.
DtoSystemAssignedBarcode
Property Type Nullable Description
StartingBarcode String No The starting barcode for system-assigned barcodes.
EndingBarcode String No The ending barcode for system-assigned barcodes.
TypeOfBarcodeRange String No The type of barcode range for system-assigned barcodes. The valid values are 0 (CLSI), 1 (Gaylord), and 2 (Sequential).

Request Information

Example: POST request body
application/json, text/json
{
    "WorkflowRequestType": 42, //WorkflowRequestType.CreateItemRecordBulk
    "TxnBranchID": "7",
    "TxnUserID": "1018",
    "TxnWorkstationID": "1234",
    "WorkflowReplies": null,
    "RequestExtension": {
        "WorkflowRequestExtensionType": 35, //WorkflowRequestExtensionType.ItemRecordBulkExtensionData
        "Data": [
        {
            "RowId": 1,
            "NumberOfCopies": 2,
            "Barcodes": ["barcode_1", "barcode_2"],
            "ItemRecordData": {
                "IsNew": true,
                "ItemTemplateID": 853,
                "UseTemplateValues": false,
                "ItemRecordHistoryActionID": 6,
                "LockRecordAfterInsert": true,
                "AssociatedBibRecordID": 796262,
                "RecordStatusID": 1,
                "ItemStatusID": 15,
                "HomeBranchID": 68,
                "DisplayInPAC": true,
                "Holdable": true,
                "NonCirculating": false,
                "LoanableOutsideSystem": true,
                "HoldableByPrimaryLender": false,
                "RenewalLimit": 0,
                "ShelvingSchemeID": 3,
                "Barcode": "",
                "Price": "24.99",
                "ClassificationNumber": "813/.54",
                "CallNumberPrefix": "",
                "CutterNumber": "",
                "CallNumberSuffix": "",
                "VolumeNumber": "",
                "CopyNumber": "",
                "ShowLanguages": false,
                "LanguageID": null,
                "AssignedBranchID": 68,
                "AssignedCollectionID": 70,
                "ShelfLocationID": null,
                "StatisticalCodeID": 2,
                "MaterialTypeID": 1,
                "LoanPeriodCodeID": 9,
                "FineCodeID": 3,
                "OwningBranchID": 68
            }
        },
        {
            "RowId": 2,
            "NumberOfCopies": 1,
            "SA_CATPROFITEMPROMPTBRANCH_ACK": true,
            "SA_CATPROFWARNITEMNOBARCODE_ACK": true,
            "ItemRecordData": {
                "IsNew": true,
                "ItemTemplateID": 953,
                "UseTemplateValues": false,
                "ItemRecordHistoryActionID": 6,
                "LockRecordAfterInsert": true,
                "AssociatedBibRecordID": 796262,
                "RecordStatusID": 1,
                "ItemStatusID": 15,
                "HomeBranchID": 75,
                "DisplayInPAC": true,
                "Holdable": true,
                "NonCirculating": false,
                "LoanableOutsideSystem": true,
                "HoldableByPrimaryLender": false,
                "RenewalLimit": 0,
                "ShelvingSchemeID": 3,
                "Barcode": "",
                "Price": "24.99",
                "ClassificationNumber": "813/.54",
                "CallNumberPrefix": "",
                "CutterNumber": "",
                "CallNumberSuffix": "",
                "VolumeNumber": "",
                "CopyNumber": "",
                "ShowLanguages": false,
                "LanguageID": null,
                "AssignedBranchID": 75,
                "AssignedCollectionID": 70,
                "ShelfLocationID": null,
                "StatisticalCodeID": 2,
                "MaterialTypeID": 1,
                "LoanPeriodCodeID": 9,
                "FineCodeID": 3,
                "OwningBranchID": 75
            }
        },
        {
            "RowId": 3,
            "NumberOfCopies": 5,
            "UseSystemAssignedBarcode": true,
            "SystemAssignedBarcode": {
                "StartingBarcode": "30000990101812",
                "EndingBarcode": "33412000533594",
                "TypeOfBarcodeRange": 0
            },
            "SA_CATPROFITEMPROMPTBRANCH_ACK": true,
            "SA_CATPROFWARNITEMNOBARCODE_ACK": false,
            "ItemRecordData": {
                "IsNew": true,
                "ItemTemplateID": 953,
                "UseTemplateValues": false,
                "ItemRecordHistoryActionID": 6,
                "LockRecordAfterInsert": true,
                "AssociatedBibRecordID": 796262,
                "RecordStatusID": 1,
                "ItemStatusID": 15,
                "HomeBranchID": 75,
                "DisplayInPAC": true,
                "Holdable": true,
                "NonCirculating": false,
                "LoanableOutsideSystem": true,
                "HoldableByPrimaryLender": false,
                "RenewalLimit": 0,
                "ShelvingSchemeID": 3,
                "Barcode": "",
                "Price": "24.99",
                "ClassificationNumber": "813/.54",
                "CallNumberPrefix": "",
                "CutterNumber": "",
                "CallNumberSuffix": "",
                "VolumeNumber": "",
                "CopyNumber": "",
                "ShowLanguages": false,
                "LanguageID": null,
                "AssignedBranchID": 70,
                "AssignedCollectionID": 70,
                "ShelfLocationID": null,
                "StatisticalCodeID": 2,
                "MaterialTypeID": 1,
                "LoanPeriodCodeID": 9,
                "FineCodeID": 3,
                "OwningBranchID": 70
            }
          }
        ]
    }
}
Example: PUT request body
application/json, text/json
{
  "WorkflowPromptID": 67,
  "WorkflowPromptResult": 4,
  "WorkflowRequestGuid": "d614b604-dc93-4cf7-b27d-17aee7ded0db",
  "WorkflowRequestType": 42,
}

Response Information

Example: DtoWorkflowAnswer - Item records have been created successfully.
application/json, text/json
{
  "WorkflowRequestGuid": "00000000-0000-0000-0000-000000000000",
  "WorkflowRequestType": 42, //WorkflowRequestType.CreateItemRecordBulk
  "WorkflowStatus": 1, //WorkflowStatus.CompletedSuccessfully
  "Prompt": null,
  "InformationMessages": [],
  "AnswerExtension": {
    "WorkflowAnswerExtensionType": 17, //WorkflowAnswerExtensionType.ItemRecordBulkCreateCompleteData
    "Data": {
      "NewItemRecordIds": [
        12944919,
        12944920,
        12944921
      ],
      "RowsSucceeded": [
        1,
        2
      ],
      "RowsFailed": [],
      "RowsSkipped": []
    }
  },
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false,
  "ErrorCode": null
}
Example: Prompt - Requires for input.
application/json, text/json
{
  "WorkflowRequestGuid": "d614b604-dc93-4cf7-b27d-17aee7ded0db",
  "WorkflowRequestType": 42,
  "WorkflowStatus": -3,
  "Prompt": {
    "WorkflowPromptID": 67,
    "Name": null,
    "Description": null,
    "WorkflowPromptType": 1,
    "WorkflowPromptOptions": 6,
    "DefaultPromptOption": 4,
    "Title": "Verify assigned / home branch settings",
    "Message": "The Assigned Branch and Home Branch fields are different.  
If you want to make Assigned and Home branch the same, click Cancel to stop and re-set the values.", "AlternateMessage": "", "AlternateYesText": "", "AlternateNoText": "", "AlternateCancelText": "", "AlternateContinueText": "", "PromptExtension": null }, "InformationMessages": [], "AnswerExtension": null, "CircTranType": 0, "ReceiptType": 0, "ReceiptUrl": "", "FineEReceiptSent": false, "ErrorCode": null }
Example: DtoWorkflowAnswer - Succeeded with rows being skipped.
application/json, text/json
{
  "WorkflowRequestGuid": "d614b604-dc93-4cf7-b27d-17aee7ded0db",
  "WorkflowRequestType": 42,
  "WorkflowStatus": 1,
  "Prompt": null,
  "InformationMessages": [
    {
      "Type": 4,
      "Title": "",
      "Message": "Update item record procedure canceled."
    },
    {
      "Type": 4,
      "Title": null,
      "Message": "Not all items were assigned a barcode because not enough valid barcodes were specified."
    },
    {
      "Type": 4,
      "Title": null,
      "Message": "Not all items were assigned a barcode because of incorrect item barcode format."
    }    {
      "Type": 4,
      "Title": null,
      "Message": "Not all items were assigned a barcode because duplicate barcodes were found."
    }
  ],
  "AnswerExtension": {
    "WorkflowAnswerExtensionType": 17,
    "Data": {
      "NewItemRecordIds": [
        12945460,
        12945461,
        12945462
      ],
      "RowsSucceeded": [
        1
      ],
      "RowsFailed": [],
      "RowsSkipped": [
        2
      ]
    }
  },
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false,
  "ErrorCode": null
}
Example: Errors - Failed with rows being processed.
application/json, text/json
{
  "WorkflowRequestGuid": "00000000-0000-0000-0000-000000000000",
  "WorkflowRequestType": 42,
  "WorkflowStatus": 2,
  "Prompt": null,
  "InformationMessages": [
    {
      "Type": 2,
      "Title": "",
      "Message": "Assigned collection not allowed for assigned branch."
    }
  ],
  "AnswerExtension": {
    "WorkflowAnswerExtensionType": 17,
    "Data": {
      "NewItemRecordIds": [
        12944919,
        12944920,
        12944921
      ],
      "RowsSucceeded": [
        1
      ],
      "RowsFailed": [
        3
      ],
      "RowsSkipped": [
        2
      ]
    }
  },
  "CircTranType": 0,
  "ReceiptType": 0,
  "ReceiptUrl": "",
  "FineEReceiptSent": false,
  "ErrorCode": null
}

HTTP Response Codes

Code Description
200 OK. Success
400 Bad Request. The request was invalid or cannot be served.
403 Forbidden. The request was valid, but the server is refusing action. The user might not have the necessary permissions.

Required Permissions

Permission IDs found here.

    AccessCatalogingSubsystem_Allow
    ItemRecords_Create