foliolib.folio.api.orders.Receive
- class foliolib.folio.api.orders.Receive(tenant: str, okapi: Optional[foliolib.okapi.okapiClient.OkapiClient] = None)
Bases:
foliolib.folio.FolioApiOrders Business Logic API
API for receiving pieces
- Parameters
tenant (str) – Tenant id
okapi (OkapiClient, optional) – Instance of OkapiClient. Defaults to None.
Methods
set_receive(receive)Receive items spanning one or more PO lines
- set_receive(receive: dict)
Receive items spanning one or more PO lines
POST /orders/receive- Parameters
receive (dict) – See Schema below
- Returns
See Schema below
- Return type
dict
- Raises
OkapiRequestError – Bad Request
OkapiFatalError – Server Error
Schema
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A collection of receiving items", "type": "object", "properties": { "toBeReceived": { "description": "List of receivings", "id": "toBeReceived", "type": "array", "items": { "type": "object", "properties": { "poLineId": { "description": "The id of the receiving PO line", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "received": { "description": "The number of items received", "type": "integer" }, "receivedItems": { "description": "List of receiving items details", "id": "receivedItems", "type": "array", "items": { "type": "object", "properties": { "barcode": { "description": "The barcode assigned to the item", "type": "string" }, "callNumber": { "description": "The call number assigned to the piece", "type": "string" }, "comment": { "description": "The free form notes pertaining to this item", "type": "string" }, "caption": { "description": "The volume or caption of the item", "type": "string" }, "itemStatus": { "description": "The status of the item", "$ref": "item_status.json" }, "locationId": { "description": "The id of the location", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "holdingId": { "description": "UUID of the holding record", "$ref": "../../common/schemas/uuid.json" }, "displayOnHolding": { "description": "Whether or not receiving history should be displayed in holding record view", "type": "boolean", "default": false }, "enumeration": { "type": "string", "description": "Enumeration is the descriptive information for the numbering scheme of a serial. Synchronized with inventory item." }, "chronology": { "type": "string", "description": "Chronology is the descriptive information for the dating scheme of a serial. Synchronized with inventory item." }, "copyNumber": { "type": "string", "description": "Copy number of the piece" }, "pieceId": { "description": "UUID of this piece record", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" } }, "required": [ "pieceId" ], "additionalProperties": false } } }, "required": [ "poLineId" ], "additionalProperties": false } }, "totalRecords": { "description": "The total number of receiving items in the list", "type": "integer" } }, "additionalProperties": false, "required": [ "toBeReceived", "totalRecords" ] }
{ "$schema": "http://json-schema.org/draft-04/schema#", "description": "A collection of receiving results", "type": "object", "properties": { "receivingResults": { "description": "List of receiving/checkin results", "id": "receivingResults", "type": "array", "items": { "type": "object", "properties": { "poLineId": { "description": "The id of the receiving/checkin po line", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "processedSuccessfully": { "description": "The number of items processed successfully", "type": "integer" }, "processedWithError": { "description": "The number of items processed with error", "type": "integer" }, "receivingItemResults": { "description": "List of processed receiving item details", "id": "receivingItemResults", "type": "array", "items": { "type": "object", "properties": { "pieceId": { "description": "UUID of this piece record", "type": "string", "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" }, "processingStatus": { "description": "The status describing item processing result", "type": "object", "properties": { "type": { "description": "Resulting status of the processed piece record", "type": "string", "enum": [ "success", "failure" ] }, "error": { "description": "Error details in case receiving/check-in process for the piece record has failed", "type": "object", "$ref": "../../../raml-util/schemas/error.schema", "readonly": true } }, "required": [ "type" ], "additionalProperties": false } }, "required": [ "pieceId", "processingStatus" ], "additionalProperties": false } } }, "required": [ "poLineId", "receivingItemResults" ], "additionalProperties": false } }, "totalRecords": { "description": "The total number of receiving/check-in items in the list", "type": "integer" } }, "additionalProperties": false, "required": [ "receivingResults", "totalRecords" ] }