https://github.com/folio-org/mod-orders
API for retriving receiving history
Entity representing a receiving-history
Get receiving history matching the provided criteria
GET /orders/receiving-history
How to calculate the totalRecords property. "exact" for the correct number, "estimated" for an estimation, "auto" to automatically select "exact" or "estimated", "none" for suppressing the totalRecords property. For details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
none
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
With valid searchable fields
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
titleOrPackage==Harry Potter AND receiving_status==received sortBy po_line_number
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of receiving history",
"type": "object",
"properties": {
"receivingHistory": {
"description": "collection of receiving history",
"type": "array",
"id": "receivingHistory",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "receiving history details",
"properties": {
"id": {
"description": "UUID of this piece 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}$"
},
"displaySummary": {
"description": "Display summary information",
"type": "string"
},
"checkin": {
"description": "If true this piece is for the Check-in workflow",
"type": "boolean"
},
"chronology": {
"description": "Chronology is the descriptive information for the dating scheme of a serial. Synchronized with inventory item.",
"type": "string"
},
"comment": {
"description": "Free form commentary",
"type": "string"
},
"dateOrdered": {
"description": "Date and time when purchase order was opened",
"format": "date-time",
"type": "string"
},
"discoverySuppress": {
"description": "Records the fact that the record should not be displayed in a discovery system",
"type": "boolean"
},
"displayOnHolding": {
"default": false,
"description": "Whether or not receiving history should be displayed in holding record view",
"type": "boolean"
},
"enumeration": {
"description": "Enumeration is the descriptive information for the numbering scheme of a serial. Synchronized with inventory item.",
"type": "string"
},
"copyNumber": {
"type": "string",
"description": "Copy number of the piece"
},
"instanceId": {
"description": "UUID of the instance record this piece is related to",
"$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}$"
},
"itemId": {
"description": "UUID of the associated item 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}$"
},
"locationId": {
"description": "UUID of the (inventory) location 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}$"
},
"pieceFormat": {
"description": "The format of the piece",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"enum": [
"Physical",
"Electronic",
"Other"
]
},
"poLineId": {
"description": "UUID of the purchase order line this record is associated with",
"$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}$"
},
"poLineNumber": {
"description": "A human readable number assigned to this PO line",
"pattern": "^[a-zA-Z0-9]{1,16}-[0-9]{1,3}$",
"type": "string"
},
"poLineReceiptStatus": {
"description": "The purchase order line receipt status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"enum": [
"Awaiting Receipt",
"Cancelled",
"Fully Received",
"Partially Received",
"Pending",
"Receipt Not Required",
"Ongoing"
],
"default": "Pending"
},
"purchaseOrderId": {
"description": "UUID of associated purchase order",
"$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}$"
},
"receiptDate": {
"description": "Date that this item is expected to arrive",
"format": "date-time",
"type": "string"
},
"receivedDate": {
"description": "date received",
"format": "date-time",
"type": "string"
},
"receivingNote": {
"description": "A note at the poLine level pertaining to receiving/check-in",
"type": "string"
},
"receivingStatus": {
"description": "the status of this piece",
"enum": [
"Received",
"Expected"
],
"type": "string"
},
"supplement": {
"description": "Whether or not this is supplementary material",
"type": "boolean"
},
"title": {
"description": "Title of the instance this poLine is associated with",
"type": "string"
}
},
"additionalProperties": false
}
},
"totalRecords": {
"description": "The number of objects contained in this collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"receivingHistory",
"totalRecords"
]
}
Example:
{
"receivingHistory":
[
{
"id": "5e317dc2-deeb-4429-b2a1-91e5cd0fd5f7",
"displaySummary": "Tutorial Volume 10",
"comment": "Special Edition",
"dateOrdered": "2018-09-09T00:00:00.000",
"checkin": true,
"instanceId": "8343e5a0-fed8-11e8-8eb2-f2801f1b9fd1",
"itemId": "1c92433e-916d-452e-ac76-5268d0ec3f66",
"locationId": "53cf956f-c1df-410b-8bea-27f712cca7c0",
"poLineId": "c1498090-538a-4470-9525-27e4e0c74b07",
"poLineNumber": "268758-03",
"pieceFormat": "Physical",
"poLineReceiptStatus": "Partially Received",
"purchaseOrderId": "0804ddec-6545-404a-b54d-a693f505681d",
"receiptDate": "2018-10-08T00:00:00.000Z",
"receivingNote": "ASD FGH ABCDEFGHIJKLMNOPQ",
"receivingStatus": "Expected",
"supplement": true,
"title": "Kayak Fishing in the Northern Gulf Coast"
}
],
"totalRecords": 1
}
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 list receiving-history -- malformed parameter 'query', syntax error at column 6"
Not authorized to perform requested action
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 list receiving-history -- unauthorized"
Item with a given ID not found
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:
"receiving-history not found"
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