Retrieve a list of contract items.
GET /idm-connect/contract
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.
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
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. Using limit=0 will return totalRecords with the exact value. For details about totalRecords see https://github.com/folio-org/raml-module-builder#estimated-totalrecords
Example:
10
Returns a list of contract items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Collection of walk-in contracts",
"properties": {
"contracts": {
"description": "Walk-in contracts",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A walk-in contract",
"properties": {
"id": {
"description": "The UUID of this contract",
"type": "string"
},
"personal": {
"description": "Personal information for this contract",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
},
"academicTitle": {
"description": "Academic title",
"type": "string"
},
"dateOfBirth": {
"description": "Date of birth",
"type": "string"
},
"address": {
"description": "Address",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"addressLine1": {
"description": "First address line",
"type": "string"
},
"addressLine2": {
"description": "Second address line",
"type": "string"
},
"zipCode": {
"description": "Zip code",
"type": "string"
},
"city": {
"description": "City name",
"type": "string"
},
"country": {
"description": "Country name",
"type": "string"
}
},
"required": [
"addressLine1",
"zipCode",
"city"
]
},
"email": {
"description": "E-Mail address",
"type": "string"
}
},
"required": [
"firstName",
"lastName",
"dateOfBirth",
"address",
"email"
]
},
"libraryCard": {
"description": "Library card number",
"type": "string"
},
"uniLogin": {
"description": "University login",
"type": "string"
},
"status": {
"description": "Contract status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"enum": [
"draft",
"transmission_error",
"transmission_error_edit",
"pending",
"pending_edit",
"updated"
]
},
"beginDate": {
"description": "Contract begin date",
"type": "string"
},
"endDate": {
"description": "Contract end date",
"type": "string"
},
"comment": {
"description": "Field for comments",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"_version": {
"description": "Record version for optimistic locking",
"type": "integer"
}
}
}
},
"totalRecords": {
"description": "Total count of walk-in contracts",
"type": "integer"
}
},
"required": [
"contracts",
"totalRecords"
]
}
Example:
{
"contracts": [
{
"id": "465ce0b3-10cd-4da2-8848-db85b63a0a32",
"personal": {
"firstName": "Lienhardt",
"lastName": "Führer",
"academicTitle": "Dr.",
"dateOfBirth": "1994-04-22",
"address": {
"addressLine1": "Peter-Schmitter-Straße 83",
"addressLine2": "F/8",
"zipCode": "88453",
"city": "Erolzheim",
"country": "Germany"
},
"email": "lienhardtfuehrer@aol.com"
},
"libraryCard": "79254581",
"uniLogin": "mhb76lxa",
"status": "draft",
"beginDate": "2018-01-12",
"endDate": "2020-01-12",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "7f5473c0-e7c3-427c-9202-ba97a1385e50",
"personal": {
"firstName": "Caroline",
"lastName": "Graf",
"dateOfBirth": "2004-10-26",
"address": {
"addressLine1": "Martin Luther-Straße 63",
"addressLine2": "V/5",
"zipCode": "67746",
"city": "Unterjeckenbach",
"country": "Germany"
},
"email": "carolinegraf@aol.com"
},
"libraryCard": "69136862",
"uniLogin": "xbe45xzv",
"status": "updated",
"beginDate": "2013-03-23",
"endDate": "2015-03-23",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "066e5034-8403-4e51-99db-8378d3239a14",
"personal": {
"firstName": "Violetta",
"lastName": "Kunz",
"academicTitle": "Prof.",
"dateOfBirth": "1999-10-27",
"address": {
"addressLine1": "Güglinger Straße 24",
"zipCode": "24852",
"city": "Sollerup",
"country": "Germany"
},
"email": "kunzvioletta@aol.com"
},
"libraryCard": "00149822",
"uniLogin": "ydt36ivt",
"status": "pending",
"beginDate": "2017-01-23",
"endDate": "2019-01-23",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "5fd84d19-8c6c-45b8-bd79-69b90b2e35d5",
"personal": {
"firstName": "Meikel",
"lastName": "Lutz",
"academicTitle": "Dr.",
"dateOfBirth": "2000-08-29",
"address": {
"addressLine1": "Am Heidehof 91",
"zipCode": "54441",
"city": "Mannebach",
"country": "Germany"
},
"email": "lutzmeikel@hotmail.com"
},
"libraryCard": "44492207",
"uniLogin": "hen14wxw",
"status": "pending_edit",
"beginDate": "2015-10-07",
"endDate": "2017-10-07",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "961dad38-bdd2-4886-ab55-392df4ccfe39",
"personal": {
"firstName": "Meikel",
"lastName": "Führer",
"academicTitle": "Dr.",
"dateOfBirth": "1990-11-01",
"address": {
"addressLine1": "Bleibergquelle 54",
"zipCode": "25358",
"city": "Sommerland",
"country": "Germany"
},
"email": "meikelfuehrer@yahoo.com"
},
"libraryCard": "71150023",
"uniLogin": "esw29vlq",
"status": "transmission_error",
"beginDate": "2010-04-06",
"endDate": "2012-04-06",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "d4927c21-1bbb-4be0-905d-8b4fa02ccc42",
"personal": {
"firstName": "Brita",
"lastName": "Geßner",
"dateOfBirth": "1998-08-24",
"address": {
"addressLine1": "Nelkenstraße 95",
"zipCode": "54441",
"city": "Mannebach",
"country": "Germany"
},
"email": "brita_gessner@googlemail.com"
},
"libraryCard": "80844141",
"uniLogin": "zmo17mkt",
"status": "transmission_error_edit",
"beginDate": "2017-11-17",
"endDate": "2019-11-17",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "7d2ef5b7-88b2-48c2-b263-10dcd7692b8d",
"personal": {
"firstName": "Titus",
"lastName": "Woll",
"dateOfBirth": "1996-08-26",
"address": {
"addressLine1": "Willi-Steitz-Straße 42",
"addressLine2": "R/9",
"zipCode": "39288",
"city": "Burg",
"country": "Germany"
},
"email": "titus_woll@aol.com"
},
"libraryCard": "12778293",
"uniLogin": "byo87ynr",
"status": "draft",
"beginDate": "2018-07-10",
"endDate": "2020-07-10",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "a5d03581-835e-4b05-bd5e-11bd3f455e61",
"personal": {
"firstName": "Inka",
"lastName": "Adam",
"dateOfBirth": "1989-03-14",
"address": {
"addressLine1": "Oberallgäuer Platz 60",
"zipCode": "09114",
"city": "Chemnitz",
"country": "Germany"
},
"email": "inkaadam@googlemail.com"
},
"libraryCard": "89468934",
"uniLogin": "rij11asi",
"status": "updated",
"beginDate": "2017-01-23",
"endDate": "2019-01-23",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "22d71965-4821-4dbe-b82c-963d44fab0e4",
"personal": {
"firstName": "Violetta",
"lastName": "Kunz",
"academicTitle": "Prof.",
"dateOfBirth": "2005-02-08",
"address": {
"addressLine1": "Altenrathstraße 59",
"addressLine2": "E/2",
"zipCode": "82327",
"city": "Tutzing",
"country": "Germany"
},
"email": "kunzvioletta@googlemail.com"
},
"libraryCard": "40917582",
"uniLogin": "wwh27ybc",
"status": "updated",
"beginDate": "2018-05-08",
"endDate": "2020-05-08",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
},
{
"id": "e35970e7-8ed8-4238-a0f2-8c9c2ae2ebde",
"personal": {
"firstName": "Lienhardt",
"lastName": "Führer",
"academicTitle": "Prof.",
"dateOfBirth": "1990-10-11",
"address": {
"addressLine1": "Schwanenwik 62",
"zipCode": "18273",
"city": "Güstrow",
"country": "Germany"
},
"email": "lienhardt_fuehrer@aol.com"
},
"libraryCard": "79473551",
"uniLogin": "fpl05nkx",
"status": "transmission_error",
"beginDate": "2014-07-14",
"endDate": "2016-07-14",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
}
],
"totalRecords": 20
}
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: text/plain
Type: any
Example:
unable to list contract -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list contract -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a new contract item.
POST /idm-connect/contract
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A walk-in contract",
"properties": {
"id": {
"description": "The UUID of this contract",
"type": "string"
},
"personal": {
"description": "Personal information for this contract",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
},
"academicTitle": {
"description": "Academic title",
"type": "string"
},
"dateOfBirth": {
"description": "Date of birth",
"type": "string"
},
"address": {
"description": "Address",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"addressLine1": {
"description": "First address line",
"type": "string"
},
"addressLine2": {
"description": "Second address line",
"type": "string"
},
"zipCode": {
"description": "Zip code",
"type": "string"
},
"city": {
"description": "City name",
"type": "string"
},
"country": {
"description": "Country name",
"type": "string"
}
},
"required": [
"addressLine1",
"zipCode",
"city"
]
},
"email": {
"description": "E-Mail address",
"type": "string"
}
},
"required": [
"firstName",
"lastName",
"dateOfBirth",
"address",
"email"
]
},
"libraryCard": {
"description": "Library card number",
"type": "string"
},
"uniLogin": {
"description": "University login",
"type": "string"
},
"status": {
"description": "Contract status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"enum": [
"draft",
"transmission_error",
"transmission_error_edit",
"pending",
"pending_edit",
"updated"
]
},
"beginDate": {
"description": "Contract begin date",
"type": "string"
},
"endDate": {
"description": "Contract end date",
"type": "string"
},
"comment": {
"description": "Field for comments",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"_version": {
"description": "Record version for optimistic locking",
"type": "integer"
}
}
}
Example:
{
"id": "465ce0b3-10cd-4da2-8848-db85b63a0a32",
"personal": {
"firstName": "Lienhardt",
"lastName": "Führer",
"academicTitle": "Dr.",
"dateOfBirth": "1994-04-22",
"address": {
"addressLine1": "Peter-Schmitter-Straße 83",
"addressLine2": "F/8",
"zipCode": "88453",
"city": "Erolzheim",
"country": "Germany"
},
"email": "lienhardtfuehrer@aol.com"
},
"libraryCard": "79254581",
"uniLogin": "mhb76lxa",
"status": "draft",
"beginDate": "2018-01-12",
"endDate": "2020-01-12",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created contract item
Media type: application/json
Type: any
Example:
{
"id": "465ce0b3-10cd-4da2-8848-db85b63a0a32",
"personal": {
"firstName": "Lienhardt",
"lastName": "Führer",
"academicTitle": "Dr.",
"dateOfBirth": "1994-04-22",
"address": {
"addressLine1": "Peter-Schmitter-Straße 83",
"addressLine2": "F/8",
"zipCode": "88453",
"city": "Erolzheim",
"country": "Germany"
},
"email": "lienhardtfuehrer@aol.com"
},
"libraryCard": "79254581",
"uniLogin": "mhb76lxa",
"status": "draft",
"beginDate": "2018-01-12",
"endDate": "2020-01-12",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
}
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: text/plain
Type: any
Example:
"unable to add contract -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create contract -- unauthorized
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: text/plain
Type: any
Example:
Internal server error, contact administrator
Update contract item with given {contractId}
PUT /idm-connect/contract/{id}
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A walk-in contract",
"properties": {
"id": {
"description": "The UUID of this contract",
"type": "string"
},
"personal": {
"description": "Personal information for this contract",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
},
"academicTitle": {
"description": "Academic title",
"type": "string"
},
"dateOfBirth": {
"description": "Date of birth",
"type": "string"
},
"address": {
"description": "Address",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"addressLine1": {
"description": "First address line",
"type": "string"
},
"addressLine2": {
"description": "Second address line",
"type": "string"
},
"zipCode": {
"description": "Zip code",
"type": "string"
},
"city": {
"description": "City name",
"type": "string"
},
"country": {
"description": "Country name",
"type": "string"
}
},
"required": [
"addressLine1",
"zipCode",
"city"
]
},
"email": {
"description": "E-Mail address",
"type": "string"
}
},
"required": [
"firstName",
"lastName",
"dateOfBirth",
"address",
"email"
]
},
"libraryCard": {
"description": "Library card number",
"type": "string"
},
"uniLogin": {
"description": "University login",
"type": "string"
},
"status": {
"description": "Contract status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"enum": [
"draft",
"transmission_error",
"transmission_error_edit",
"pending",
"pending_edit",
"updated"
]
},
"beginDate": {
"description": "Contract begin date",
"type": "string"
},
"endDate": {
"description": "Contract end date",
"type": "string"
},
"comment": {
"description": "Field for comments",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"_version": {
"description": "Record version for optimistic locking",
"type": "integer"
}
}
}
Example:
{
"id": "465ce0b3-10cd-4da2-8848-db85b63a0a32",
"personal": {
"firstName": "Lienhardt",
"lastName": "Führer",
"academicTitle": "Dr.",
"dateOfBirth": "1994-04-22",
"address": {
"addressLine1": "Peter-Schmitter-Straße 83",
"addressLine2": "F/8",
"zipCode": "88453",
"city": "Erolzheim",
"country": "Germany"
},
"email": "lienhardtfuehrer@aol.com"
},
"libraryCard": "79254581",
"uniLogin": "mhb76lxa",
"status": "draft",
"beginDate": "2018-01-12",
"endDate": "2020-01-12",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
}
Item successfully updated
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: text/plain
Type: any
Example:
"unable to update contract -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"contract not found"
Conflict
Media type: text/plain
Type: any
Example:
Optimistic locking version has changed
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: text/plain
Type: any
Example:
internal server error, contact administrator
Retrieve contract item with given {contractId}
GET /idm-connect/contract/{id}
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "A walk-in contract",
"properties": {
"id": {
"description": "The UUID of this contract",
"type": "string"
},
"personal": {
"description": "Personal information for this contract",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"firstName": {
"description": "First name",
"type": "string"
},
"lastName": {
"description": "Last name",
"type": "string"
},
"academicTitle": {
"description": "Academic title",
"type": "string"
},
"dateOfBirth": {
"description": "Date of birth",
"type": "string"
},
"address": {
"description": "Address",
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"addressLine1": {
"description": "First address line",
"type": "string"
},
"addressLine2": {
"description": "Second address line",
"type": "string"
},
"zipCode": {
"description": "Zip code",
"type": "string"
},
"city": {
"description": "City name",
"type": "string"
},
"country": {
"description": "Country name",
"type": "string"
}
},
"required": [
"addressLine1",
"zipCode",
"city"
]
},
"email": {
"description": "E-Mail address",
"type": "string"
}
},
"required": [
"firstName",
"lastName",
"dateOfBirth",
"address",
"email"
]
},
"libraryCard": {
"description": "Library card number",
"type": "string"
},
"uniLogin": {
"description": "University login",
"type": "string"
},
"status": {
"description": "Contract status",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"enum": [
"draft",
"transmission_error",
"transmission_error_edit",
"pending",
"pending_edit",
"updated"
]
},
"beginDate": {
"description": "Contract begin date",
"type": "string"
},
"endDate": {
"description": "Contract end date",
"type": "string"
},
"comment": {
"description": "Field for comments",
"type": "string"
},
"metadata": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "metadata.schema",
"title": "Metadata Schema",
"description": "Metadata about creation and changes to records, provided by the server (client should not provide)",
"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"
]
},
"_version": {
"description": "Record version for optimistic locking",
"type": "integer"
}
}
}
Example:
{
"id": "465ce0b3-10cd-4da2-8848-db85b63a0a32",
"personal": {
"firstName": "Lienhardt",
"lastName": "Führer",
"academicTitle": "Dr.",
"dateOfBirth": "1994-04-22",
"address": {
"addressLine1": "Peter-Schmitter-Straße 83",
"addressLine2": "F/8",
"zipCode": "88453",
"city": "Erolzheim",
"country": "Germany"
},
"email": "lienhardtfuehrer@aol.com"
},
"libraryCard": "79254581",
"uniLogin": "mhb76lxa",
"status": "draft",
"beginDate": "2018-01-12",
"endDate": "2020-01-12",
"comment": "A comment.",
"metadata": {
"createdDate": "2021-11-01T17:39:12.364+00:00",
"updatedDate": "2021-11-01T17:39:12.364+00:00"
}
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"contract not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete contract item with given {contractId}
DELETE /idm-connect/contract/{id}
Item deleted successfully
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: text/plain
Type: any
Example:
"unable to delete contract -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"contract not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Transmit the walk-in contract with id to external IDM system and update its status
GET /idm-connect/contract/{id}/transmit
IDM returned OK
IDM returned Bad Request
IDM returned Unauthorized
Internal server error
Media type: text/plain
Type: any
Delete multiple walk-in contracts
POST /idm-connect/contract/bulk-delete
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Request object for bulk-delete operation",
"properties": {
"uuids": {
"description": "Array of UUIDs that should be deleted",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"required": [
"uuids"
]
}
Request successful
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "Response object for bulk-delete operation",
"properties": {
"requested": {
"description": "Number of deletions requested",
"type": "integer"
},
"deleted": {
"description": "Number of successfully executed deletions",
"type": "integer"
},
"failed": {
"description": "Number of failed deletions",
"type": "integer"
},
"failedItems": {
"description": "UUIDs that failed deletion",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"requested",
"deleted",
"failed"
]
}
Bad request
Media type: text/plain
Type: any
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
Media type: text/plain
Type: any
Get existing users
GET /idm-connect/searchidm
Users first name
Example:
John
Users last name
Example:
Doe
Users date of birth
Example:
2015-12-24
IDM returned OK
IDM returned Bad Request
IDM returned Unauthorized
Internal server error
Media type: text/plain
Type: any
Set a UBReaderNumber
POST /idm-connect/ubreadernumber
unilogin
Example:
123abc78
UBReaderNumber
Example:
1234567890
IDM returned OK
IDM returned Bad Request
IDM returned Unauthorized
Internal server error
Media type: text/plain
Type: any
Delete a UBReaderNumber
DELETE /idm-connect/ubreadernumber
unilogin
Example:
123abc78
IDM returned OK
IDM returned Bad Request
IDM returned Unauthorized
Internal server error
Media type: text/plain
Type: any