http://localhost
Batch API for managing records
Creates records from a record collection. It returns both saved records and error messages for records that were not saved.
POST /source-storage/batch/records
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of record DTO",
"type": "object",
"additionalProperties": false,
"properties": {
"records": {
"description": "List of records",
"type": "array",
"id": "recordList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Record DTO Schema",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"snapshotId": {
"description": "Corresponding snapshot id, which is the same as jobExecutionId",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"matchedId": {
"description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"generation": {
"description": "Generation from the last record with the same matchedId incremented by 1. Starts from 0.",
"type": "integer"
},
"recordType": {
"description": "Type of record, e.g. MARC",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"MARC",
"EDIFACT"
]
},
"rawRecord": {
"description": "Raw record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Raw data",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"content"
]
},
"parsedRecord": {
"description": "Parsed record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
},
"errorRecord": {
"description": "Error record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"description": {
"description": "Error description",
"type": "string"
},
"content": {
"description": "Record content"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"description",
"content"
]
},
"deleted": {
"description": "Flag indicates that the record marked as deleted",
"type": "boolean",
"default": false
},
"order": {
"description": "Order of the record in imported file",
"type": "integer",
"minimum": 0
},
"externalIdsHolder": {
"description": "Container for identifiers of external entities",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"instanceId": {
"description": "instance id",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"instanceHrid": {
"description": "instance hrid",
"type": "string"
}
}
},
"additionalInfo": {
"description": "Auxiliary data which is not related to MARC type record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"suppressDiscovery": {
"description": "Flag indicates if the record is displayed during a search",
"type": "boolean",
"default": false
}
}
},
"state": {
"description": "This field represents the actual state of a particular SRS record. Can be: ACTUAL, OLD, DRAFT, DELETED. ",
"type": "string",
"enum": [
"ACTUAL",
"OLD",
"DRAFT",
"DELETED"
],
"default": "ACTUAL"
},
"leaderRecordStatus": {
"description": "Single character representing MARC leader 05",
"type": "string",
"pattern": "^[a|c|d|n|p|o|s|x]{1}$"
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"snapshotId",
"matchedId",
"recordType",
"rawRecord"
]
}
},
"totalRecords": {
"description": "Total number of records",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"records",
"totalRecords"
]
}
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Response schema for Records batch requests",
"type": "object",
"additionalProperties": false,
"properties": {
"records": {
"description": "List of successfully processed records",
"type": "array",
"id": "recordList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Record DTO Schema",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"snapshotId": {
"description": "Corresponding snapshot id, which is the same as jobExecutionId",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"matchedId": {
"description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"generation": {
"description": "Generation from the last record with the same matchedId incremented by 1. Starts from 0.",
"type": "integer"
},
"recordType": {
"description": "Type of record, e.g. MARC",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"MARC",
"EDIFACT"
]
},
"rawRecord": {
"description": "Raw record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Raw data",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"content"
]
},
"parsedRecord": {
"description": "Parsed record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
},
"errorRecord": {
"description": "Error record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"description": {
"description": "Error description",
"type": "string"
},
"content": {
"description": "Record content"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"description",
"content"
]
},
"deleted": {
"description": "Flag indicates that the record marked as deleted",
"type": "boolean",
"default": false
},
"order": {
"description": "Order of the record in imported file",
"type": "integer",
"minimum": 0
},
"externalIdsHolder": {
"description": "Container for identifiers of external entities",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"instanceId": {
"description": "instance id",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"instanceHrid": {
"description": "instance hrid",
"type": "string"
}
}
},
"additionalInfo": {
"description": "Auxiliary data which is not related to MARC type record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"suppressDiscovery": {
"description": "Flag indicates if the record is displayed during a search",
"type": "boolean",
"default": false
}
}
},
"state": {
"description": "This field represents the actual state of a particular SRS record. Can be: ACTUAL, OLD, DRAFT, DELETED. ",
"type": "string",
"enum": [
"ACTUAL",
"OLD",
"DRAFT",
"DELETED"
],
"default": "ACTUAL"
},
"leaderRecordStatus": {
"description": "Single character representing MARC leader 05",
"type": "string",
"pattern": "^[a|c|d|n|p|o|s|x]{1}$"
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"snapshotId",
"matchedId",
"recordType",
"rawRecord"
]
}
},
"errorMessages": {
"description": "List of error messages",
"type": "array",
"items": {
"type": "string"
}
},
"totalRecords": {
"description": "Total number of records",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"records",
"totalRecords"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Unprocessable Entity
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
Media type: text/plain
Type: any
Example:
Internal server error
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Response schema for Records batch requests",
"type": "object",
"additionalProperties": false,
"properties": {
"records": {
"description": "List of successfully processed records",
"type": "array",
"id": "recordList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Record DTO Schema",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"snapshotId": {
"description": "Corresponding snapshot id, which is the same as jobExecutionId",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"matchedId": {
"description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"generation": {
"description": "Generation from the last record with the same matchedId incremented by 1. Starts from 0.",
"type": "integer"
},
"recordType": {
"description": "Type of record, e.g. MARC",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"MARC",
"EDIFACT"
]
},
"rawRecord": {
"description": "Raw record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Raw data",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"content"
]
},
"parsedRecord": {
"description": "Parsed record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
},
"errorRecord": {
"description": "Error record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"description": {
"description": "Error description",
"type": "string"
},
"content": {
"description": "Record content"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"description",
"content"
]
},
"deleted": {
"description": "Flag indicates that the record marked as deleted",
"type": "boolean",
"default": false
},
"order": {
"description": "Order of the record in imported file",
"type": "integer",
"minimum": 0
},
"externalIdsHolder": {
"description": "Container for identifiers of external entities",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"instanceId": {
"description": "instance id",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"instanceHrid": {
"description": "instance hrid",
"type": "string"
}
}
},
"additionalInfo": {
"description": "Auxiliary data which is not related to MARC type record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"suppressDiscovery": {
"description": "Flag indicates if the record is displayed during a search",
"type": "boolean",
"default": false
}
}
},
"state": {
"description": "This field represents the actual state of a particular SRS record. Can be: ACTUAL, OLD, DRAFT, DELETED. ",
"type": "string",
"enum": [
"ACTUAL",
"OLD",
"DRAFT",
"DELETED"
],
"default": "ACTUAL"
},
"leaderRecordStatus": {
"description": "Single character representing MARC leader 05",
"type": "string",
"pattern": "^[a|c|d|n|p|o|s|x]{1}$"
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"snapshotId",
"matchedId",
"recordType",
"rawRecord"
]
}
},
"errorMessages": {
"description": "List of error messages",
"type": "array",
"items": {
"type": "string"
}
},
"totalRecords": {
"description": "Total number of records",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"records",
"totalRecords"
]
}
Updates parsed records from a collection. It returns both updated records and error messages for records that were not updated.
PUT /source-storage/batch/parsed-records
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of record DTO",
"type": "object",
"additionalProperties": false,
"properties": {
"records": {
"description": "List of records",
"type": "array",
"id": "recordList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Record DTO Schema",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"snapshotId": {
"description": "Corresponding snapshot id, which is the same as jobExecutionId",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"matchedId": {
"description": "Represents relations with another matched records, necessary for saving the history of applying changes for inventory/holding/etc records",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"generation": {
"description": "Generation from the last record with the same matchedId incremented by 1. Starts from 0.",
"type": "integer"
},
"recordType": {
"description": "Type of record, e.g. MARC",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"enum": [
"MARC",
"EDIFACT"
]
},
"rawRecord": {
"description": "Raw record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Raw data",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"content"
]
},
"parsedRecord": {
"description": "Parsed record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
},
"errorRecord": {
"description": "Error record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"description": {
"description": "Error description",
"type": "string"
},
"content": {
"description": "Record content"
}
},
"excludedFromEqualsAndHashCode": [
"content"
],
"required": [
"description",
"content"
]
},
"deleted": {
"description": "Flag indicates that the record marked as deleted",
"type": "boolean",
"default": false
},
"order": {
"description": "Order of the record in imported file",
"type": "integer",
"minimum": 0
},
"externalIdsHolder": {
"description": "Container for identifiers of external entities",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"additionalProperties": false,
"properties": {
"instanceId": {
"description": "instance id",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"instanceHrid": {
"description": "instance hrid",
"type": "string"
}
}
},
"additionalInfo": {
"description": "Auxiliary data which is not related to MARC type record",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"suppressDiscovery": {
"description": "Flag indicates if the record is displayed during a search",
"type": "boolean",
"default": false
}
}
},
"state": {
"description": "This field represents the actual state of a particular SRS record. Can be: ACTUAL, OLD, DRAFT, DELETED. ",
"type": "string",
"enum": [
"ACTUAL",
"OLD",
"DRAFT",
"DELETED"
],
"default": "ACTUAL"
},
"leaderRecordStatus": {
"description": "Single character representing MARC leader 05",
"type": "string",
"pattern": "^[a|c|d|n|p|o|s|x]{1}$"
},
"metadata": {
"description": "Metadata provided by the server",
"type": "object",
"readonly": true,
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"properties": {
"createdDate": {
"description": "Date and time when the record was created",
"type": "string",
"format": "date-time"
},
"createdByUserId": {
"description": "ID of the user who created the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"createdByUsername": {
"description": "Username of the user who created the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"updatedByUserId": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"createdDate"
]
}
},
"required": [
"snapshotId",
"matchedId",
"recordType",
"rawRecord"
]
}
},
"totalRecords": {
"description": "Total number of records",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"records",
"totalRecords"
]
}
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Response schema for Parsed Records batch requests",
"type": "object",
"additionalProperties": false,
"properties": {
"parsedRecords": {
"description": "List of successfully processed parsed records",
"type": "array",
"id": "recordList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Parsed Record Schema",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
}
},
"errorMessages": {
"description": "List of error messages",
"type": "array",
"items": {
"type": "string"
}
},
"totalRecords": {
"description": "Total number of parsed records",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"parsedRecords",
"totalRecords"
]
}
Bad request
Media type: text/plain
Type: any
Example:
Bad request
Unprocessable Entity
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
Media type: text/plain
Type: any
Example:
Internal server error
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Response schema for Parsed Records batch requests",
"type": "object",
"additionalProperties": false,
"properties": {
"parsedRecords": {
"description": "List of successfully processed parsed records",
"type": "array",
"id": "recordList",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Parsed Record Schema",
"additionalProperties": false,
"properties": {
"id": {
"description": "UUID",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"
},
"content": {
"description": "Parsed record content, e.g. MARC record"
},
"formattedContent": {
"description": "Parsed content represented in human readable form",
"type": "string"
}
},
"excludedFromEqualsAndHashCode": [
"content",
"formattedContent"
],
"required": [
"content"
]
}
},
"errorMessages": {
"description": "List of error messages",
"type": "array",
"items": {
"type": "string"
}
},
"totalRecords": {
"description": "Total number of parsed records",
"type": "integer"
}
},
"excludedFromEqualsAndHashCode": [
"totalRecords"
],
"required": [
"parsedRecords",
"totalRecords"
]
}