Inventory Storage Item Batch Sync API version v2.0
http://localhost
Inventory Storage Item Batch Sync API
Batch API for synchronously uploading items into the inventory
Item Batch Upload Sync API
Create or update a collection of items in a single synchronous request; if any item fails the complete batch will be rejected (all or nothing)
post /item-storage/batch/synchronous
Create or update a collection of items in a single synchronous request; if any item fails the complete batch will be rejected (all or nothing)
Query Parameters
- upsert: (boolean - default: false)
When a record with the same id already exists upsert=true will update it, upsert=false will fail the complete batch. The _version property of each item to be updated must match the stored _version property (optimistic locking).
Body
Media type: application/json
Type: json
Content:
{
"$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-storage/item.json"
}
}
},
"additionalProperties": false,
"required": [
"items"
]
}
Example:
{
"items": [
{
"id": "f2901bcc-6290-417a-843b-a6d97ee9a418",
"holdingsRecordId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61",
"barcode": "456743454532",
"status": {
"name": "Available"
},
"materialTypeId": "240886da-17d9-435f-985e-21111e586fc8",
"permanentLoanTypeId": "2e48e713-17f3-4c13-a9f8-23845bb210a4"
},
{
"id": "0b96a642-5e7f-452d-9cae-9cee66c9a892",
"holdingsRecordId": "65cb2bf0-d4c2-4886-8ad0-b76f1ba75d61",
"barcode": "645398607547",
"status": {
"name": "Available"
},
"materialTypeId": "1a54b431-2e4f-452d-9cae-9cee66c9a892",
"permanentLoanTypeId": "2b94c631-fca9-4892-a730-03ee529ffe27",
"temporaryLoanTypeId": "e8b311a6-3b21-43f2-a269-dd9310cb2d0e",
"temporaryLocationId": "0df935eb-f3f4-4741-9ac6-33c500174b96"
}
]
}
HTTP status code 201
All items have been successfully created or updated
HTTP status code 409
Optimistic locking version conflict
Body
Media type: text/plain
Type: any
Example:
version conflict
HTTP status code 413
Payload Too Large
Body
Media type: text/plain
Type: any
Example:
Payload Too Large
HTTP status code 422
Unprocessable Entity
Body
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"
}
}
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Internal server error