foliolib.folio.api.inventoryStorage.ItemSyncUnsafe

class foliolib.folio.api.inventoryStorage.ItemSyncUnsafe(tenant: str)

Bases: foliolib.folio.FolioApi

Inventory Storage Item Batch Sync Unsafe API

Batch API for synchronously uploading items into the inventory

Base class of the Folio API

Parameters

tenant (str) – Tenant id

Methods

set_synchronousUnsafe(synchronousUnsafe)

Create or update (upsert) a collection of items in a single synchronous request; if any item fails the complete batch will be rejected (all or nothing).

set_synchronousUnsafe(synchronousUnsafe: dict)

Create or update (upsert) a collection of items in a single synchronous request; if any item fails the complete batch will be rejected (all or nothing). Environment variable DB_ALLOW_SUPPRESS_OPTIMISTIC_LOCKING is required, see https://github.com/folio-org/raml-module-builder#environment-variables for details. The _version property is ignored, optimistic locking is disabled - this is known to lead to data loss in some cases, don’t use in production, you have been warned!

POST /item-storage/batch/synchronous-unsafe

Parameters

synchronousUnsafe (dict) – See Schema below

Raises
  • OkapiRequestPayloadToLarge – Payload Too Large

  • OkapiRequestUnprocessableEntity – Unprocessable Entity

  • OkapiRequestFatalError – Server Error

Schema

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of item records",
  "type": "object",
  "properties": {
    "items": {
      "description": "List of item records",
      "id": "items",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "item.json"
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "items"
  ]
}