foliolib.folio.api.inventoryUpdate.InventoryUpdate
- class foliolib.folio.api.inventoryUpdate.InventoryUpdate(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiInventory update APIs
Provides various schemes for creating, updating and deleting instances, holdings records and items in Inventory storage
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
delete_inventoryUpsertHrids(inventoryUpsertHrid)DELETE /inventory-upsert-hridDELETE /shared-inventory-upsert-matchkeyget_fetch(fetchId)GET /shared-inventory-upsert-matchkey/fetch/{fetchId}get_fetch_by_fetchId(fetchId)GET /inventory-upsert-hrid/fetch/{fetchId}PUT /inventory-batch-upsert-hridmodify_inventoryUpsertHrid(inventoryUpsertHrid)PUT /inventory-upsert-hridPUT /shared-inventory-batch-upsert-matchkeyPUT /shared-inventory-upsert-matchkey- delete_inventoryUpsertHrids(inventoryUpsertHrid: dict)
DELETE /inventory-upsert-hrid- Parameters
inventoryUpsertHrid (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Deletion record for deletion by HRID", "type": "object", "properties": { "hrid": { "type": "string", "description": "The legacy ID for the bibliographic record, as stored in the HRID of the Instance to be deleted." } }, "required": [ "hrid" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Response on a successful upsert request", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set as it was pushed to Inventory storage", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items as it was pushed to Inventory storage", "items": { "type": "object", "$ref": "holdings-record.json" } }, "instanceRelations": { "type": "object", "description": "Collection of the Instance's relations to other instances, like parent-child relations or title successions", "parentInstances": { "type": "array", "description": "The Instance's relations to parent instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "childInstances": { "type": "array", "description": "The Instance's relations to child instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "precedingTitles": { "type": "array", "description": "The Instance's relation to preceding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title (this Instance)" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "succeedingTitles": { "type": "array", "description": "The Instance's relation to succeeding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title (this Instance)" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } } }, "metrics": { "type": "object", "description": "Reports the number of operations performed by record type, transaction type, and outcome", "$ref": "metrics.json" } } }
DELETE /shared-inventory-upsert-matchkey- Parameters
sharedInventoryUpsertMatchkey (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestNotFound – Not Found
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Deletion record for deleting a library's contributions to an Instance in a shared index", "type": "object", "properties": { "institutionId": { "type": "string", "description": "UUID representing the institution who's contributions to a shared Instance should be removed", "$ref": "raml-util/schemas/uuid.schema" }, "localIdentifier": { "type": "string", "description": "A library's legacy identifier for a bibliographic record that is to be removed from a shared Instance" }, "oaiIdentifier": { "type": "string", "description": "The record identifier of an OAI-PMH feed, for a bibliographic record that is to be removed from a shared Instance" }, "identifierTypeId": { "type": "string", "description": "ID for the identifier type attached to all identifier values from the institution who's contributions to a shared Instance should be removed", "$ref": "raml-util/schemas/uuid.schema" } }, "oneOf": [ { "required": [ "institutionId", "localIdentifier", "identifierTypeId" ] }, { "required": [ "institutionId", "oaiIdentifier", "identifierTypeId" ] } ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Response on a successful upsert request", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set as it was pushed to Inventory storage", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items as it was pushed to Inventory storage", "items": { "type": "object", "$ref": "holdings-record.json" } }, "instanceRelations": { "type": "object", "description": "Collection of the Instance's relations to other instances, like parent-child relations or title successions", "parentInstances": { "type": "array", "description": "The Instance's relations to parent instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "childInstances": { "type": "array", "description": "The Instance's relations to child instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "precedingTitles": { "type": "array", "description": "The Instance's relation to preceding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title (this Instance)" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "succeedingTitles": { "type": "array", "description": "The Instance's relation to succeeding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title (this Instance)" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } } }, "metrics": { "type": "object", "description": "Reports the number of operations performed by record type, transaction type, and outcome", "$ref": "metrics.json" } } }
- get_fetch(fetchId: str)
GET /shared-inventory-upsert-matchkey/fetch/{fetchId}- Parameters
fetchId (str) –
- Returns
See Schema below
- Return type
dict
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Response on a successful upsert request", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set as it was pushed to Inventory storage", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items as it was pushed to Inventory storage", "items": { "type": "object", "$ref": "holdings-record.json" } }, "instanceRelations": { "type": "object", "description": "Collection of the Instance's relations to other instances, like parent-child relations or title successions", "parentInstances": { "type": "array", "description": "The Instance's relations to parent instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "childInstances": { "type": "array", "description": "The Instance's relations to child instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "precedingTitles": { "type": "array", "description": "The Instance's relation to preceding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title (this Instance)" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "succeedingTitles": { "type": "array", "description": "The Instance's relation to succeeding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title (this Instance)" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } } } } }
- get_fetch_by_fetchId(fetchId: str)
GET /inventory-upsert-hrid/fetch/{fetchId}- Parameters
fetchId (str) –
- Returns
See Schema below
- Return type
dict
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Response on a successful upsert request", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set as it was pushed to Inventory storage", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items as it was pushed to Inventory storage", "items": { "type": "object", "$ref": "holdings-record.json" } }, "instanceRelations": { "type": "object", "description": "Collection of the Instance's relations to other instances, like parent-child relations or title successions", "parentInstances": { "type": "array", "description": "The Instance's relations to parent instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "childInstances": { "type": "array", "description": "The Instance's relations to child instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "precedingTitles": { "type": "array", "description": "The Instance's relation to preceding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title (this Instance)" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "succeedingTitles": { "type": "array", "description": "The Instance's relation to succeeding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title (this Instance)" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } } } } }
- modify_inventoryBatchUpsertHrid(inventoryBatchUpsertHrid: dict)
PUT /inventory-batch-upsert-hrid- Parameters
inventoryBatchUpsertHrid (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A collection of inventory records sets (instances, holdings and items, etc)", "type": "object", "properties": { "inventoryRecordSets": { "description": "List of inventory record sets", "id": "inventoryRecordSets", "type": "array", "items": { "type": "object", "$ref": "inventory-record-set.json" } } }, "required": [ "inventoryRecordSets" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Reports the number of operations performed by record type, transaction type, and outcome", "properties": { "INSTANCE": { "type": "object", "description": "Reports the number of operations performed on Instance records by transaction type and outcome", "properties": { "CREATED": { "type": "object", "description": "Reports the number of Instance create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Instance create operations." }, "FAILED": { "type": "integer", "description": "Number of failed Instance create operations." }, "SKIPPED": { "type": "integer", "description": "Number of Instance create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Instance create operations not completed (0 unless there is a logical error in MIU)" } } }, "UPDATED": { "type": "object", "description": "Reports the number of Instance update operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Instance update operations" }, "FAILED": { "type": "integer", "description": "Number of failed Instance update operations" }, "SKIPPED": { "type": "integer", "description": "Number of Instance update operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Instance update operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of Instance delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Instance delete operations (0 or 1)" }, "FAILED": { "type": "integer", "description": "Number of failed Instance delete operations (0 or 1)" }, "SKIPPED": { "type": "integer", "description": "Number of Instance delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Instance delete operations not completed (0 unless there is a logical error in MIU)" } } } } }, "HOLDINGS_RECORD": { "type": "object", "description": "Reports the number of operations performed on holdings records by transaction type and outcome", "properties": { "CREATED": { "type": "object", "description": "Reports the number of HoldingsRecord create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed HoldingsRecord create operations" }, "FAILED": { "type": "integer", "description": "Number of failed HoldingsRecord create operations" }, "SKIPPED": { "type": "integer", "description": "Number of HoldingsRecord create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of HoldingsRecord create operations not completed (0 unless there is a logical error in MIU)" } } }, "UPDATED": { "type": "object", "description": "Reports the number of HoldingsRecord update operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed HoldingsRecord update operations" }, "FAILED": { "type": "integer", "description": "Number of failed HoldingsRecord update operations" }, "SKIPPED": { "type": "integer", "description": "Number of HoldingsRecord update operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of HoldingsRecord update operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of HoldingsRecord delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed HoldingsRecord delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed HoldingsRecord delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of HoldingsRecord delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of HoldingsRecord delete operations not completed (0 unless there is a logical error in MIU)" } } } } }, "ITEM": { "type": "object", "description": "Reports the number of operations performed on Items by transaction type and outcome", "properties": { "CREATED": { "type": "object", "description": "Reports the number of Item create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Item create operations" }, "FAILED": { "type": "integer", "description": "Number of failed Item create operations" }, "SKIPPED": { "type": "integer", "description": "Number of Item create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item create operations not completed (0 unless there is a logical error in MIU)" } } }, "UPDATED": { "type": "object", "description": "Reports the number of Item update operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Item update operations" }, "FAILED": { "type": "integer", "description": "Number of failed Item update operations" }, "SKIPPED": { "type": "integer", "description": "Number of Item update operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item update operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of Item delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Item delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed Item delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of Item delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item delete operations not completed (0 unless there is a logical error in MIU)" } } } } }, "INSTANCE_RELATIONSHIP": { "type": "object", "description": "Reports the number of operations performed for the Instance's parent-child relationships", "properties": { "CREATED": { "type": "object", "description": "Reports the number of relationship create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed relationship create operations" }, "FAILED": { "type": "integer", "description": "Number of failed relationship create operations" }, "SKIPPED": { "type": "integer", "description": "Number of relationship create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item relationship operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of relationship delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed relationship delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed relationship delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of relationship delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of relationship delete operations not completed (0 unless there is a logical error in MIU)" } } }, "PROVISIONAL_INSTANCE": { "type": "object", "description": "If the parent or child didn't exist in Inventory yet, this will report on operation for creating a provisional Instance", "properties": { "COMPLETED": { "type": "integer", "description": "1 if the other Instance was successfully created" }, "FAILED": { "type": "integer", "description": "1 if the creation of the other Instance failed" }, "SKIPPED": { "type": "integer", "description": "1 if creation of the other Instance was skipped (should always be 0)" }, "PENDING": { "type": "integer", "description": "1 if creation was required but not completed (0 unless there is a logical error in MIU)" } } } } }, "INSTANCE_TITLE_SUCCESSION": { "type": "object", "description": "Reports the number of operations performed for the Instance's parent-child relationships", "properties": { "CREATED": { "type": "object", "description": "Reports the number of title succession create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed title succession create operations" }, "FAILED": { "type": "integer", "description": "Number of failed title succession create operations" }, "SKIPPED": { "type": "integer", "description": "Number of title succession create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of title succession create operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of title succession delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed title succession delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed title succession delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of title succession delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of title succession delete operations not completed (0 unless there is a logical error in MIU)" } } }, "PROVISIONAL_INSTANCE": { "type": "object", "description": "If the successive title didn't exist in Inventory yet, this will report on operation for creating a provisional title", "properties": { "COMPLETED": { "type": "integer", "description": "1 if the other title was successfully created" }, "FAILED": { "type": "integer", "description": "1 if the creation of the other title failed" }, "SKIPPED": { "type": "integer", "description": "1 if creation of the other title was skipped (should always be 0)" }, "PENDING": { "type": "integer", "description": "1 if creation was required but not completed (0 unless there is a logical error in MIU)" } } } } } } }
- modify_inventoryUpsertHrid(inventoryUpsertHrid: dict)
PUT /inventory-upsert-hrid- Parameters
inventoryUpsertHrid (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "An instance record and an array of holdings records with embedded items", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set", "$ref": "instance-with-hrid.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items", "items": { "type": "object", "$ref": "holdings-record-with-hrid.json" } }, "instanceRelations": { "description": "Object holding information of different types of Instance-to-Instance relationships to create", "properties": { "parentInstances": { "type": "array", "description": "Collection of objects with information required for finding and linking to parent Instances", "items": { "type": "object", "properties": { "instanceIdentifier": { "type": "object", "description": "Object with information required for finding the parent Instance to link to", "properties": { "hrid": { "type": "string", "description": "A unique ID for the parent instance to link to" } } }, "provisionalInstance": { "type": "object", "description": "Object with at least the mandatory Instance properties required for creating a provisional Instance if the parent does not yet exist. Other valid Instance properties allowed.", "properties": { "title": { "type": "string", "description": "The parent record\u2019s title" }, "source": { "type": "string", "description": "The parent record\u2019s source" }, "instanceTypeId": { "type": "string", "description": "The parent record\u2019s resource type ID (UUID) " } }, "required": [ "title", "source", "instanceTypeId" ] }, "instancesRelationshipTypeId": { "type": "string", "description": "UUID for the type of relationship to establish to a parent instance (article, volume, multipart, series)" } }, "required": [ "instanceIdentifier", "instanceRelationshipTypeId" ] } }, "childInstances": { "type": "array", "description": "Collection of objects with information required for finding and linking to child Instances", "items": { "type": "object", "properties": { "instanceIdentifier": { "type": "object", "description": "Object with information required for finding the child Instance to link to", "properties": { "hrid": { "type": "string", "description": "A unique ID for the child instance to link to" } }, "provisionalInstance": { "type": "object", "description": "Object with at least the mandatory Instance properties required for creating a provisional Instance if the child does not yet exist. Other valid Instance properties allowed.", "properties": { "title": { "type": "string", "description": "The child record\u2019s title" }, "source": { "type": "string", "description": "The child record\u2019s source" }, "instanceTypeId": { "type": "string", "description": "The child record\u2019s resource type ID (UUID) " } }, "required": [ "title", "source", "instanceTypeId" ] }, "instancesRelationshipTypeId": { "type": "string", "description": "UUID for the type of relationship to establish to a child instance (article, volume, multipart, series)" } } } } }, "precedingTitles": { "type": "array", "description": "Collection of objects with information required for finding and linking to preceding Instances", "items": { "type": "object", "properties": { "instanceIdentifier": { "type": "object", "description": "Object with information required for finding the preceding Instance to link to", "properties": { "hrid": { "type": "string", "description": "A unique ID for the preceding instance to link to" } }, "provisionalInstance": { "type": "object", "description": "Object with at least the mandatory Instance properties required for creating a provisional Instance if the preceding does not yet exist. Other valid Instance properties allowed.", "properties": { "title": { "type": "string", "description": "The preceding Instance\u2019s title" }, "source": { "type": "string", "description": "The preceding Instance\u2019s source" }, "instanceTypeId": { "type": "string", "description": "The preceding Instance\u2019s resource type ID (UUID) " } }, "required": [ "title", "source", "instanceTypeId" ] } } } } }, "succeedingTitles": { "type": "array", "description": "Collection of objects with information required for finding and linking to succeeding Instances", "items": { "type": "object", "properties": { "instanceIdentifier": { "type": "object", "description": "Object with information required for finding the succeeding Instance to link to", "properties": { "hrid": { "type": "string", "description": "A unique ID for the succeeding instance to link to" } }, "provisionalInstance": { "type": "object", "description": "Object with at least the mandatory Instance properties required for creating a provisional Instance if the succeeding does not yet exist. Other valid Instance properties allowed.", "properties": { "title": { "type": "string", "description": "The succeeding Instance\u2019s title" }, "source": { "type": "string", "description": "The succeeding Instance\u2019s source" }, "instanceTypeId": { "type": "string", "description": "The succeeding Instance\u2019s resource type ID (UUID) " } }, "required": [ "title", "source", "instanceTypeId" ] } } } } } } }, "processing": { "description": "Processing instructions, for example for value retention on updates.", "type": "object", "$ref": "instructions/processing.json" } }, "required": [ "instance" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Response on a successful upsert request", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set as it was pushed to Inventory storage", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items as it was pushed to Inventory storage", "items": { "type": "object", "$ref": "holdings-record.json" } }, "instanceRelations": { "type": "object", "description": "Collection of the Instance's relations to other instances, like parent-child relations or title successions", "parentInstances": { "type": "array", "description": "The Instance's relations to parent instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "childInstances": { "type": "array", "description": "The Instance's relations to child instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "precedingTitles": { "type": "array", "description": "The Instance's relation to preceding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title (this Instance)" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "succeedingTitles": { "type": "array", "description": "The Instance's relation to succeeding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title (this Instance)" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } } }, "metrics": { "type": "object", "description": "Reports the number of operations performed by record type, transaction type, and outcome", "$ref": "metrics.json" } } }
PUT /shared-inventory-batch-upsert-matchkey- Parameters
sharedInventoryBatchUpsertMatchkey (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "An instance record and an array of holdings records with embedded items", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items", "items": { "type": "object", "$ref": "holdings-record.json" } }, "processing": { "type": "object", "description": "An object holding supporting pieces of data and/or processing instructions for Inventory update processing", "properties": { "institutionId": { "type": "string", "description": "The FOLIO UUID of the institution that provided the source records for the update; necessary for certain clean-up tasks in a shared inventory", "$ref": "raml-util/schemas/uuid.schema" }, "localIdentifier": { "type": "string", "description": "The source system's unique identifier for the source record of this update request; necessary for certain clean-up tasks in a shared inventory" }, "identifierTypeId": { "type": "string", "description": "The FOLIO UUID for the identifier type for the local record IDs coming from the given library", "$ref": "raml-util/schemas/uuid.schema" } } } } }
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "description": "Reports the number of operations performed by record type, transaction type, and outcome", "properties": { "INSTANCE": { "type": "object", "description": "Reports the number of operations performed on Instance records by transaction type and outcome", "properties": { "CREATED": { "type": "object", "description": "Reports the number of Instance create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Instance create operations." }, "FAILED": { "type": "integer", "description": "Number of failed Instance create operations." }, "SKIPPED": { "type": "integer", "description": "Number of Instance create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Instance create operations not completed (0 unless there is a logical error in MIU)" } } }, "UPDATED": { "type": "object", "description": "Reports the number of Instance update operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Instance update operations" }, "FAILED": { "type": "integer", "description": "Number of failed Instance update operations" }, "SKIPPED": { "type": "integer", "description": "Number of Instance update operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Instance update operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of Instance delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Instance delete operations (0 or 1)" }, "FAILED": { "type": "integer", "description": "Number of failed Instance delete operations (0 or 1)" }, "SKIPPED": { "type": "integer", "description": "Number of Instance delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Instance delete operations not completed (0 unless there is a logical error in MIU)" } } } } }, "HOLDINGS_RECORD": { "type": "object", "description": "Reports the number of operations performed on holdings records by transaction type and outcome", "properties": { "CREATED": { "type": "object", "description": "Reports the number of HoldingsRecord create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed HoldingsRecord create operations" }, "FAILED": { "type": "integer", "description": "Number of failed HoldingsRecord create operations" }, "SKIPPED": { "type": "integer", "description": "Number of HoldingsRecord create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of HoldingsRecord create operations not completed (0 unless there is a logical error in MIU)" } } }, "UPDATED": { "type": "object", "description": "Reports the number of HoldingsRecord update operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed HoldingsRecord update operations" }, "FAILED": { "type": "integer", "description": "Number of failed HoldingsRecord update operations" }, "SKIPPED": { "type": "integer", "description": "Number of HoldingsRecord update operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of HoldingsRecord update operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of HoldingsRecord delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed HoldingsRecord delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed HoldingsRecord delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of HoldingsRecord delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of HoldingsRecord delete operations not completed (0 unless there is a logical error in MIU)" } } } } }, "ITEM": { "type": "object", "description": "Reports the number of operations performed on Items by transaction type and outcome", "properties": { "CREATED": { "type": "object", "description": "Reports the number of Item create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Item create operations" }, "FAILED": { "type": "integer", "description": "Number of failed Item create operations" }, "SKIPPED": { "type": "integer", "description": "Number of Item create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item create operations not completed (0 unless there is a logical error in MIU)" } } }, "UPDATED": { "type": "object", "description": "Reports the number of Item update operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Item update operations" }, "FAILED": { "type": "integer", "description": "Number of failed Item update operations" }, "SKIPPED": { "type": "integer", "description": "Number of Item update operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item update operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of Item delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed Item delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed Item delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of Item delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item delete operations not completed (0 unless there is a logical error in MIU)" } } } } }, "INSTANCE_RELATIONSHIP": { "type": "object", "description": "Reports the number of operations performed for the Instance's parent-child relationships", "properties": { "CREATED": { "type": "object", "description": "Reports the number of relationship create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed relationship create operations" }, "FAILED": { "type": "integer", "description": "Number of failed relationship create operations" }, "SKIPPED": { "type": "integer", "description": "Number of relationship create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of Item relationship operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of relationship delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed relationship delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed relationship delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of relationship delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of relationship delete operations not completed (0 unless there is a logical error in MIU)" } } }, "PROVISIONAL_INSTANCE": { "type": "object", "description": "If the parent or child didn't exist in Inventory yet, this will report on operation for creating a provisional Instance", "properties": { "COMPLETED": { "type": "integer", "description": "1 if the other Instance was successfully created" }, "FAILED": { "type": "integer", "description": "1 if the creation of the other Instance failed" }, "SKIPPED": { "type": "integer", "description": "1 if creation of the other Instance was skipped (should always be 0)" }, "PENDING": { "type": "integer", "description": "1 if creation was required but not completed (0 unless there is a logical error in MIU)" } } } } }, "INSTANCE_TITLE_SUCCESSION": { "type": "object", "description": "Reports the number of operations performed for the Instance's parent-child relationships", "properties": { "CREATED": { "type": "object", "description": "Reports the number of title succession create operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed title succession create operations" }, "FAILED": { "type": "integer", "description": "Number of failed title succession create operations" }, "SKIPPED": { "type": "integer", "description": "Number of title succession create operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of title succession create operations not completed (0 unless there is a logical error in MIU)" } } }, "DELETED": { "type": "object", "description": "Reports the number of title succession delete operations by outcome", "properties": { "COMPLETED": { "type": "integer", "description": "Number of successfully completed title succession delete operations" }, "FAILED": { "type": "integer", "description": "Number of failed title succession delete operations" }, "SKIPPED": { "type": "integer", "description": "Number of title succession delete operations that were skipped" }, "PENDING": { "type": "integer", "description": "Number of title succession delete operations not completed (0 unless there is a logical error in MIU)" } } }, "PROVISIONAL_INSTANCE": { "type": "object", "description": "If the successive title didn't exist in Inventory yet, this will report on operation for creating a provisional title", "properties": { "COMPLETED": { "type": "integer", "description": "1 if the other title was successfully created" }, "FAILED": { "type": "integer", "description": "1 if the creation of the other title failed" }, "SKIPPED": { "type": "integer", "description": "1 if creation of the other title was skipped (should always be 0)" }, "PENDING": { "type": "integer", "description": "1 if creation was required but not completed (0 unless there is a logical error in MIU)" } } } } } } }
PUT /shared-inventory-upsert-matchkey- Parameters
sharedInventoryUpsertMatchkey (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiRequestUnprocessableEntity – Unprocessable Entity
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "An instance record and an array of holdings records with embedded items", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items", "items": { "type": "object", "$ref": "holdings-record.json" } }, "processing": { "type": "object", "description": "An object holding supporting pieces of data and/or processing instructions for Inventory update processing", "properties": { "institutionId": { "type": "string", "description": "The FOLIO UUID of the institution that provided the source records for the update; necessary for certain clean-up tasks in a shared inventory", "$ref": "raml-util/schemas/uuid.schema" }, "localIdentifier": { "type": "string", "description": "The source system's unique identifier for the source record of this update request; necessary for certain clean-up tasks in a shared inventory" }, "identifierTypeId": { "type": "string", "description": "The FOLIO UUID for the identifier type for the local record IDs coming from the given library", "$ref": "raml-util/schemas/uuid.schema" } } } } }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "Response on a successful upsert request", "type": "object", "properties": { "instance": { "type": "object", "description": "The Instance, the bibliographic part, of this Inventory record set as it was pushed to Inventory storage", "$ref": "instance.json" }, "holdingsRecords": { "type": "array", "description": "Collection of holdings of the Instance, each holdings record with embedded items as it was pushed to Inventory storage", "items": { "type": "object", "$ref": "holdings-record.json" } }, "instanceRelations": { "type": "object", "description": "Collection of the Instance's relations to other instances, like parent-child relations or title successions", "parentInstances": { "type": "array", "description": "The Instance's relations to parent instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "childInstances": { "type": "array", "description": "The Instance's relations to child instances", "items": { "type": "object", "properties": { "subInstanceId": { "type": "string", "description": "UUID of the child instance" }, "superInstanceId": { "type": "string", "description": "UUID of the parent instance" }, "instanceRelationshipTypeId": { "type": "string", "description": "UUID of the type of relations - ie a multipart monograph relation" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "precedingTitles": { "type": "array", "description": "The Instance's relation to preceding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title (this Instance)" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } }, "succeedingTitles": { "type": "array", "description": "The Instance's relation to succeeding title(s)", "items": { "type": "object", "properties": { "succeedingInstanceId": { "type": "string", "description": "UUID of the succeeding title" }, "precedingInstanceId": { "type": "string", "description": "UUID of the preceding title (this Instance)" }, "CREATE_PROVISIONAL_INSTANCE": { "type": "object", "description": "Provisional Instance required to create this Instance relationship", "$ref": "instance.json" } } } } }, "metrics": { "type": "object", "description": "Reports the number of operations performed by record type, transaction type, and outcome", "$ref": "metrics.json" } } }