foliolib.folio.api.inventory.InventoryMove

class foliolib.folio.api.inventory.InventoryMove(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)

Bases: foliolib.folio.FolioApi

Inventory Move API

API for moving items between holdings and holdings between instances

Parameters
  • tenant (str) – Tenant id

  • okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.

Methods

set_move_holdings(move)

POST /inventory/holdings/move

set_move_items(move)

POST /inventory/items/move

set_move_holdings(move: dict)

POST /inventory/holdings/move

Parameters

move (dict) – See Schema below

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Ids holder for moving holdings",
  "type": "object",
  "properties": {
    "toInstanceId": {
      "description": "Id of the instance to which the holdings are moved.",
      "$ref": "uuid.json"
    },
    "holdingsRecordIds": {
      "description": "Ids of the holdings to move.",
      "type": "array",
      "items": {
        "$ref": "uuid.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "toInstanceId",
    "holdingsRecordIds"
  ]
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Ids holder for not moved items or holdings",
  "type": "object",
  "properties": {
    "nonUpdatedIds": {
      "description": "Ids of the items or holdings that wasn't moved",
      "type": "array",
      "items": {
        "$ref": "uuid.json"
      }
    }
  },
  "additionalProperties": false
}
set_move_items(move: dict)

POST /inventory/items/move

Parameters

move (dict) – See Schema below

Returns

See Schema below

Return type

dict

Raises
  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiFatalError – Server Error

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Ids holder for moving items between holdings",
  "type": "object",
  "properties": {
    "toHoldingsRecordId": {
      "description": "Id of the holding to which the items are moved.",
      "$ref": "uuid.json"
    },
    "itemIds": {
      "description": "Ids of the items to move.",
      "type": "array",
      "items": {
        "$ref": "uuid.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "toHoldingsRecordId",
    "itemIds"
  ]
}
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Ids holder for not moved items or holdings",
  "type": "object",
  "properties": {
    "nonUpdatedIds": {
      "description": "Ids of the items or holdings that wasn't moved",
      "type": "array",
      "items": {
        "$ref": "uuid.json"
      }
    }
  },
  "additionalProperties": false
}