https://github.com/folio-org/mod-orders
API for checking-in pieces
Check-in items spanning one or more PO lines
Check-in items spanning one or more po_lines in this order
POST /orders/check-in
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A collection of check-in",
"type": "object",
"properties": {
"toBeCheckedIn": {
"description": "List of check-in",
"id": "toBeCheckedIn",
"type": "array",
"items": {
"type": "object",
"properties": {
"poLineId": {
"description": "The id of the 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}$"
},
"checkedIn": {
"description": "The number of pieces to check-in",
"type": "integer"
},
"checkInPieces": {
"description": "A collection of piece records",
"type": "array",
"id": "checkInPieces",
"items": {
"type": "object",
"properties": {
"id": {
"description": "The id of the piece",
"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}$"
},
"barcode": {
"description": "The barcode assigned to the piece",
"type": "string"
},
"receiptDate": {
"description": "The date when associated piece is expected to arrive",
"type": "string",
"format": "date-time"
},
"callNumber": {
"description": "The call number assigned to the piece",
"type": "string"
},
"comment": {
"description": "The free form notes pertaining to the piece",
"type": "string"
},
"displaySummary": {
"description": "Display summary of the piece",
"type": "string"
},
"createItem": {
"description": "Whether or not to create an item record for this piece",
"type": "boolean"
},
"supplement": {
"description": "Whether or not this is a supplementary material for this piece",
"type": "boolean"
},
"receivingTenantId": {
"description": "The tenant id where piece should be checked in",
"type": "string"
},
"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",
"$schema": "http://json-schema.org/draft-04/schema#",
"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}$"
},
"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."
},
"discoverySuppress": {
"type": "boolean",
"description": "Records the fact that the record should not be displayed in a discovery system"
},
"copyNumber": {
"type": "string",
"description": "Copy number of the piece"
},
"materialTypeId": {
"description": "The id of the materialType",
"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}$"
},
"productId": {
"description": "The id of the Product",
"type": "string"
},
"productIdType": {
"description": "The UUID corresponding to the type of product id",
"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}$"
},
"accessionNumber": {
"description": "The number referencing physical item acquired by the library",
"type": "string"
},
"itemDescription": {
"description": "The description associated with the item record",
"type": "string"
},
"electronicBookplate": {
"description": "A text that relates to the owner of the book",
"type": "string"
},
"itemStatus": {
"description": "The status of the Check in piece",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"enum": [
"In process",
"On order",
"Available",
"In transit",
"Order closed",
"Aged to lost",
"Awaiting pickup",
"Awaiting delivery",
"Checked out",
"Claimed returned",
"Declared lost",
"In process (non-requestable)",
"Intellectual item",
"Long missing",
"Lost and paid",
"Missing",
"Paged",
"Restricted",
"Unavailable",
"Unknown",
"Withdrawn"
],
"default": "In process"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false,
"required": [
"poLineId"
]
}
},
"totalRecords": {
"description": "The total number of pieces to check-in in the list",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"toBeCheckedIn",
"totalRecords"
]
}
Example:
{
"toBeCheckedIn": [
{
"poLineId": "0804ddec-6545-404a-b54d-a693f505681d",
"checkedIn": 2,
"checkInPieces": [
{
"id": "5e317dc2-deeb-4429-b2a1-91e5cd0fd5f7",
"barcode": "0987654321",
"receiptDate": "2025-11-11T00:00:00.000+00:00",
"callNumber": "PR 8923 W6 L36 1990 c.3",
"comment": "Very important note",
"displaySummary": "Vol. 1",
"createItem": true,
"supplement": false,
"receivingTenantId": "diku",
"locationId": "eb2d063a-5b4c-4cab-8db1-5fc5c5941df6",
"materialTypeId": "3cdc2cd3-6646-43bf-aacc-37934aeae36c",
"productId": "9780547840482",
"productIdType": "bae22dfa-5ea8-43aa-b61d-8da89ba339c4",
"accessionNumber": "1956.1",
"itemDescription": "This is the piece item one to checkin",
"electronicBookplate": "This book is from the Harvard University library",
"itemStatus": "In process"
},
{
"id": "71d9322b-5cdd-45d8-ad45-c7f3044802e7",
"barcode": "0987654111",
"receiptDate": "2025-11-11T00:00:00.000+00:00",
"callNumber": "BF2050 .M335 1999",
"comment": "Very important note",
"displaySummary": "Vol. 2",
"createItem": false,
"supplement": true,
"receivingTenantId": "diku",
"holdingId": "df798357-0bda-4ad4-b0a3-86f5edec3703",
"materialTypeId": "93da93b3-5c2c-4077-b92d-12341d2070d2",
"productId": "2573-0797",
"productIdType": "31dcaba7-bce1-4a12-bd06-9ce901422285",
"accessionNumber": "2002.4",
"itemDescription": "This is the piece item two to checkin",
"electronicBookplate": "This book is from the Florida University library",
"itemStatus":"In process"
}
]
}
],
"totalRecords": 2
}
Returns processing result of the check-in
Media type: application/json
Type: json
Content:
{
"$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",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"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"
]
}
Example:
{
"receivingResults": [
{
"poLineId": "0804ddec-6545-404a-b54d-a693f505681d",
"processedSuccessfully": 1,
"processedWithError": 1,
"receivingItemResults": [
{
"pieceId": "c18c49b7-d970-44d6-b5d4-bd76c1c62d83",
"processingStatus": {
"type": "success"
}
},
{
"pieceId": "cb9b0468-f2b4-4a13-b64c-662c4c9ec3ed",
"processingStatus": {
"type": "failure",
"error": {
"code": "pieceAlreadyReceived",
"message": "The piece record is already received"
}
}
}
]
},
{
"poLineId": "7f0c4975-885e-47d5-8d5a-793dffbba9b2",
"processedSuccessfully": 1,
"processedWithError": 0,
"receivingItemResults": [
{
"pieceId": "20241b8c-9076-4cf5-817b-f2c1e2cb242f",
"processingStatus": {
"type": "success"
}
}
]
}
],
"totalRecords": 3
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
"unable to update check-in -- malformed JSON at 13:4"
Validation errors
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Internal server error, e.g. due to misconfiguration
Media type: application/json
Type: any
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
Media type: text/plain
Type: any
Example:
internal server error, contact administrator