https://github.com/folio-org/mod-patron
This module allows 3rd party discovery services to perform patron actions in FOLIO
Services that allow patron empowerment from 3rd party discovery services
Creates external patron request
POST /patronMedia type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Staging User Information Schema",
"description": "A staging user",
"javaName": "StagingUser",
"type": "object",
"properties": {
"id": {
"description": "A globally unique (UUID) identifier for the user",
"type": "string"
},
"isEmailVerified": {
"description": "A flag to determine if a patron is activated.",
"type": "boolean"
},
"minor": {
"description": "An optional flag If true, the user will be assigned to the 'Basic -- Minor (INTERNAL)' patron group upon creation; otherwise if false or null, the 'Remote Non-circulating' group is assigned.",
"type": "boolean"
},
"status": {
"type": "string",
"description": "whether tier-1 or tier-2",
"enum": [
"TIER-1",
"TIER-2"
]
},
"externalSystemId": {
"description": "A unique ID (UUID) that corresponds to an external authority",
"type": "string"
},
"generalInfo": {
"type": "object",
"description": "General info of staging user",
"properties": {
"firstName": {
"type": "string",
"description": "The staging user's given name"
},
"preferredFirstName": {
"type": "string",
"description": "The user's preferred name"
},
"middleName": {
"type": "string",
"description": "The staging user's middle name (if any)"
},
"lastName": {
"type": "string",
"description": "The staging user's surname"
}
},
"required": [
"firstName",
"lastName"
],
"additionalProperties": false
},
"addressInfo": {
"type": "object",
"description": "Primary address info of staging user",
"properties": {
"addressLine0": {
"type": "string",
"description": "Address, Line 0"
},
"addressLine1": {
"type": "string",
"description": "Address, Line 1"
},
"city": {
"type": "string",
"description": "City name"
},
"province": {
"type": "string",
"description": "Province"
},
"zip": {
"type": "string",
"description": "Zip Code"
},
"country": {
"type": "string",
"description": "Country"
}
},
"additionalProperties": false
},
"contactInfo": {
"type": "object",
"description": "Contact info of staging user",
"properties": {
"phone": {
"type": "string",
"description": "The user's primary phone number"
},
"mobilePhone": {
"type": "string",
"description": "The user's mobile phone number"
},
"email": {
"type": "string",
"description": "The user's email address",
"format": "email"
}
},
"required": [
"email"
],
"additionalProperties": false
},
"preferredEmailCommunication": {
"type": "array",
"description": "Email communication info of staging user",
"items": {
"type": "string",
"enum": [
"Support",
"Programs",
"Services"
]
},
"maxItems": 3,
"uniqueItems": true
},
"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"
]
}
},
"required": [
"generalInfo",
"contactInfo"
],
"additionalProperties": false
}Example:
{
"isEmailVerified": false,
"status": "TIER-1",
"externalSystemId": "9eb67301-6f6e-468f-9b1a-6134dc39a684",
"generalInfo": {
"firstName": "test1",
"middleName": "www",
"lastName": "new-record-1"
},
"addressInfo": {
"addressLine0": "123 Main St",
"addressLine1": "Apt 4B",
"city": "Metropolis",
"province": "NY",
"zip": "12345",
"country": "USA"
},
"contactInfo": {
"phone": "555-123456",
"mobilePhone": "555-5678",
"email": "new-record-kapil_new1@test.com"
},
"preferredEmailCommunication": [
"Programs",
"Support",
"Services"
]
}
when new staging user record is created
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Staging User Information Schema",
"description": "A staging user",
"javaName": "StagingUser",
"type": "object",
"properties": {
"id": {
"description": "A globally unique (UUID) identifier for the user",
"type": "string"
},
"isEmailVerified": {
"description": "A flag to determine if a patron is activated.",
"type": "boolean"
},
"minor": {
"description": "An optional flag If true, the user will be assigned to the 'Basic -- Minor (INTERNAL)' patron group upon creation; otherwise if false or null, the 'Remote Non-circulating' group is assigned.",
"type": "boolean"
},
"status": {
"type": "string",
"description": "whether tier-1 or tier-2",
"enum": [
"TIER-1",
"TIER-2"
]
},
"externalSystemId": {
"description": "A unique ID (UUID) that corresponds to an external authority",
"type": "string"
},
"generalInfo": {
"type": "object",
"description": "General info of staging user",
"properties": {
"firstName": {
"type": "string",
"description": "The staging user's given name"
},
"preferredFirstName": {
"type": "string",
"description": "The user's preferred name"
},
"middleName": {
"type": "string",
"description": "The staging user's middle name (if any)"
},
"lastName": {
"type": "string",
"description": "The staging user's surname"
}
},
"required": [
"firstName",
"lastName"
],
"additionalProperties": false
},
"addressInfo": {
"type": "object",
"description": "Primary address info of staging user",
"properties": {
"addressLine0": {
"type": "string",
"description": "Address, Line 0"
},
"addressLine1": {
"type": "string",
"description": "Address, Line 1"
},
"city": {
"type": "string",
"description": "City name"
},
"province": {
"type": "string",
"description": "Province"
},
"zip": {
"type": "string",
"description": "Zip Code"
},
"country": {
"type": "string",
"description": "Country"
}
},
"additionalProperties": false
},
"contactInfo": {
"type": "object",
"description": "Contact info of staging user",
"properties": {
"phone": {
"type": "string",
"description": "The user's primary phone number"
},
"mobilePhone": {
"type": "string",
"description": "The user's mobile phone number"
},
"email": {
"type": "string",
"description": "The user's email address",
"format": "email"
}
},
"required": [
"email"
],
"additionalProperties": false
},
"preferredEmailCommunication": {
"type": "array",
"description": "Email communication info of staging user",
"items": {
"type": "string",
"enum": [
"Support",
"Programs",
"Services"
]
},
"maxItems": 3,
"uniqueItems": true
},
"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"
]
}
},
"required": [
"generalInfo",
"contactInfo"
],
"additionalProperties": false
}Example:
{
"isEmailVerified": false,
"status": "TIER-1",
"externalSystemId": "9eb67301-6f6e-468f-9b1a-6134dc39a684",
"generalInfo": {
"firstName": "test1",
"middleName": "www",
"lastName": "new-record-1"
},
"addressInfo": {
"addressLine0": "123 Main St",
"addressLine1": "Apt 4B",
"city": "Metropolis",
"province": "NY",
"zip": "12345",
"country": "USA"
},
"contactInfo": {
"phone": "555-123456",
"mobilePhone": "555-5678",
"email": "new-record-kapil_new1@test.com"
},
"preferredEmailCommunication": [
"Programs",
"Support",
"Services"
]
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process requestValidation error
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 administratorReturn account details for the specified FOLIO user id
GET /patron/account/{id}The UUID of a FOLIO user
Indicates whether or not to include the loans array in the response
Indicates whether or not to include the charges array in the response
Indicates whether or not to include the holds array in the response
Part of CQL query, indicates the order of records within the lists of holds, charges, loans
Example:
item.title/sort.ascendingSkip over a number of elements by specifying an offset value for the query
Example:
0Limit the number of elements returned in the response
Example:
10Returns the user account info
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Account Schema",
"type": "object",
"description": "Account schema for patron portal integration",
"additionalProperties": false,
"properties": {
"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}$",
"description": "The FOLIO id of the patron"
},
"totalCharges": {
"type": "object",
"description": "A patron's total outstanding fines and charges",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Money Schema",
"additionalProperties": false,
"properties": {
"amount": {
"type": "number",
"description": "The amount of the fine or charge",
"example": 3.14
},
"isoCurrencyCode": {
"type": "string",
"description": "An ISO 4217 standard currency code",
"example": "USD"
}
},
"required": [
"amount",
"isoCurrencyCode"
]
},
"totalChargesCount": {
"type": "integer",
"description": "The total number of fines and charges for the patron",
"example": 10
},
"totalLoans": {
"type": "integer",
"description": "The total number of items loaned to the patron",
"example": 10
},
"totalHolds": {
"type": "integer",
"description": "The total number of requested items for the patron",
"example": 10
},
"charges": {
"type": "array",
"description": "A list of the patron's charges and fines",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Charge Schema",
"description": "Charge schema for patron portal integration",
"additionalProperties": false,
"properties": {
"item": {
"type": "object",
"description": "The item that is accruing the charge",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"chargeAmount": {
"type": "object",
"description": "The outstanding balance on the item",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Money Schema",
"additionalProperties": false,
"properties": {
"amount": {
"type": "number",
"description": "The amount of the fine or charge",
"example": 3.14
},
"isoCurrencyCode": {
"type": "string",
"description": "An ISO 4217 standard currency code",
"example": "USD"
}
},
"required": [
"amount",
"isoCurrencyCode"
]
},
"accrualDate": {
"type": "string",
"format": "date-time",
"description": "The date when charges begin to accrue"
},
"description": {
"type": "string",
"description": "A description of the charge"
},
"state": {
"type": "string",
"description": "The current state of the charge"
},
"reason": {
"type": "string",
"description": "The reason for this charge"
},
"feeFineId": {
"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}$",
"description": "The UUID of the fee/fine for this charge"
}
}
}
},
"holds": {
"type": "array",
"description": "A list of the patron's item holds",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Hold Schema",
"description": "Hold schema for patron portal integration",
"additionalProperties": true,
"properties": {
"requestId": {
"type": "string",
"description": "The UUID of the request"
},
"item": {
"type": "object",
"description": "The item that is checked out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"requestDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request expires"
},
"status": {
"type": "string",
"description": "The status of the hold request",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - Awaiting delivery",
"Open - In transit",
"New - Awaiting confirmation",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"pickupLocationId": {
"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}$",
"description": "The UUID of the pick up location"
},
"queuePosition": {
"type": "integer",
"description": "The position in the queue for this patron"
},
"cancellationReasonId": {
"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}$",
"description": "The id of the request reason"
},
"canceledByUserId": {
"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}$",
"description": "The id of the user that cancelled the request"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"canceledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"required": [
"requestDate",
"pickupLocationId"
]
}
},
"loans": {
"type": "array",
"description": "A list of the patron's item checked out items",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Loan Schema",
"description": "Loan schema for patron portal integration",
"additionalProperties": false,
"properties": {
"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}$",
"description": "The id of the loan"
},
"item": {
"type": "object",
"description": "The item that is loaned out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"loanDate": {
"type": "string",
"format": "date-time",
"description": "The date the item was loaned out"
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "The date the item is due"
},
"overdue": {
"type": "boolean",
"description": "Indicates if the item is overdue"
}
},
"required": [
"item",
"loanDate",
"dueDate",
"overdue"
]
}
}
},
"required": [
"totalCharges",
"totalChargesCount",
"totalLoans",
"totalHolds",
"charges",
"holds",
"loans"
]
}Example:
{
"totalCharges": {
"amount": 50.0,
"isoCurrencyCode": "USD"
},
"totalChargesCount": 1,
"totalLoans": 1,
"totalHolds": 1,
"charges": [
{
"item" : {
"instanceId" : "6e024cd5-c19a-4fe0-a2cd-64ce5814c694",
"itemId" : "7d9dfe70-0158-489d-a7ed-2789eac277b3",
"title" : "Some Book About Something",
"author" : "Some Guy; Another Guy"
},
"chargeAmount" : {
"amount" : 50.0,
"isoCurrencyCode" : "USD"
},
"accrualDate" : "2018-01-31T00:00:01Z",
"state" : "Paid Partially",
"reason" : "damage - rebinding",
"feeFineId" : "881c628b-e1c4-4711-b9d7-090af40f6a8f"
}
],
"holds": [
{
"requestId": "8bbac557-d66f-4571-bbbf-47a107cc1589",
"item": {
"instanceId": "255f82f3-5b1b-4239-93e4-ec6acf03ad9d",
"itemId": "26670295-716a-4f84-8f65-2ef31707c017",
"title": "I Want to Hold Your Hand",
"author": "John Lennon; Paul McCartney"
},
"queuePosition": 1,
"requestDate": "2018-06-02T08:16:30Z",
"pickupLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8",
"status": "Open - Not yet filled"
}
],
"loans": [
{
"id": "9a171a89-baca-4f1a-b2c4-d7253854864e",
"item": {
"instanceId": "6e024cd5-c19a-4fe0-a2cd-64ce5814c694",
"itemId": "7d9dfe70-0158-489d-a7ed-2789eac277b3",
"title": "Some Book About Something",
"author": "Some Guy; Another Guy"
},
"loanDate": "2018-06-01T11:12:00Z",
"dueDate": "2525-01-01T11:12:00Z",
"overdue": false
}
]
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violationNot authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to get account -- unauthorizedAccess Denied
Media type: text/plain
Type: any
Example:
Access DeniedItem with a given ID not found
Media type: text/plain
Type: any
Example:
account not foundValidation error
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"
}
}
}Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorRenews a loan on the item for the user
POST /patron/account/{id}/item/{itemId}/renewThe UUID of a FOLIO user
The UUID of a FOLIO item
Returns the renewed loan data
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Loan Schema",
"type": "object",
"description": "Loan schema for patron portal integration",
"additionalProperties": false,
"properties": {
"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}$",
"description": "The id of the loan"
},
"item": {
"type": "object",
"description": "The item that is loaned out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"loanDate": {
"type": "string",
"format": "date-time",
"description": "The date the item was loaned out"
},
"dueDate": {
"type": "string",
"format": "date-time",
"description": "The date the item is due"
},
"overdue": {
"type": "boolean",
"description": "Indicates if the item is overdue"
}
},
"required": [
"item",
"loanDate",
"dueDate",
"overdue"
]
}Example:
{
"id": "9a171a89-baca-4f1a-b2c4-d7253854864e",
"item": {
"instanceId": "6e024cd5-c19a-4fe0-a2cd-64ce5814c694",
"itemId": "7d9dfe70-0158-489d-a7ed-2789eac277b3",
"title": "Some Book About Something",
"author": "Some Guy; Another Guy"
},
"loanDate": "2018-06-01T11:12:00Z",
"dueDate": "2525-01-01T11:12:00Z",
"overdue": false
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violationNot authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to renew loan -- unauthorizedAccess Denied
Media type: text/plain
Type: any
Example:
Access DeniedItem with a given ID not found
Media type: text/plain
Type: any
Example:
item not foundConflict
Media type: text/plain
Type: any
Example:
Optimistic Locking ConflictValidation 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 administratorCreates a hold request on an existing item for the user
POST /patron/account/{id}/item/{itemId}/holdThe UUID of a FOLIO user
The UUID of a FOLIO item
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Hold Schema",
"type": "object",
"description": "Hold schema for patron portal integration",
"additionalProperties": true,
"properties": {
"requestId": {
"type": "string",
"description": "The UUID of the request"
},
"item": {
"type": "object",
"description": "The item that is checked out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"requestDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request expires"
},
"status": {
"type": "string",
"description": "The status of the hold request",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - Awaiting delivery",
"Open - In transit",
"New - Awaiting confirmation",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"pickupLocationId": {
"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}$",
"description": "The UUID of the pick up location"
},
"queuePosition": {
"type": "integer",
"description": "The position in the queue for this patron"
},
"cancellationReasonId": {
"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}$",
"description": "The id of the request reason"
},
"canceledByUserId": {
"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}$",
"description": "The id of the user that cancelled the request"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"canceledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"required": [
"requestDate",
"pickupLocationId"
]
}Example:
{
"requestId": "dd238b5b-01fc-4205-83b8-ce27a650d827",
"item": {
"instanceId": "23611f0b-35cc-4f40-af09-75907d7cc421",
"itemId": "32e5757d-6566-466e-b69d-994eb33d2b62",
"title": "Something's Got a Hold on Me",
"author": "Etta James; Leroy Kirkland; Pearl Woods"
},
"queuePosition": 1,
"requestDate": "2018-06-02T08:16:30Z",
"expirationDate": "3000-01-30T08:16:30Z",
"pickupLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8",
"status": "Open - Not yet filled",
"patronComments": "Can you deliver this to the History building for Professor Grant?"
}
Returns data for a new hold request on the specified item
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Hold Schema",
"type": "object",
"description": "Hold schema for patron portal integration",
"additionalProperties": true,
"properties": {
"requestId": {
"type": "string",
"description": "The UUID of the request"
},
"item": {
"type": "object",
"description": "The item that is checked out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"requestDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request expires"
},
"status": {
"type": "string",
"description": "The status of the hold request",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - Awaiting delivery",
"Open - In transit",
"New - Awaiting confirmation",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"pickupLocationId": {
"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}$",
"description": "The UUID of the pick up location"
},
"queuePosition": {
"type": "integer",
"description": "The position in the queue for this patron"
},
"cancellationReasonId": {
"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}$",
"description": "The id of the request reason"
},
"canceledByUserId": {
"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}$",
"description": "The id of the user that cancelled the request"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"canceledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"required": [
"requestDate",
"pickupLocationId"
]
}Example:
{
"requestId": "dd238b5b-01fc-4205-83b8-ce27a650d827",
"item": {
"instanceId": "23611f0b-35cc-4f40-af09-75907d7cc421",
"itemId": "32e5757d-6566-466e-b69d-994eb33d2b62",
"title": "Something's Got a Hold on Me",
"author": "Etta James; Leroy Kirkland; Pearl Woods"
},
"queuePosition": 1,
"requestDate": "2018-06-02T08:16:30Z",
"expirationDate": "3000-01-30T08:16:30Z",
"pickupLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8",
"status": "Open - Not yet filled",
"patronComments": "Can you deliver this to the History building for Professor Grant?"
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violationNot authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create hold -- unauthorizedAccess Denied
Media type: text/plain
Type: any
Example:
Access DeniedItem with a given ID not found
Media type: text/plain
Type: any
Example:
item not foundConflict
Media type: text/plain
Type: any
Example:
Optimistic Locking ConflictValidation 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 administratorReturns a list of pickup service points allowed for a particular patron and item
GET /patron/account/{id}/item/{itemId}/allowed-service-pointsThe UUID of a FOLIO user
The UUID of a FOLIO item
Successfully returns a list of allowed service points
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Allowed pickup service points grouped by request type",
"type": "object",
"properties": {
"allowedServicePoints": {
"description": "Allowed pickup service point IDs for Page requests",
"type": "array",
"$schema": "http://json-schema.org/draft-04/schema#",
"default": null,
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "UUID string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"name": {
"type": "string",
"description": "Service point name"
},
"discoveryName": {
"type": "string",
"description": "discoveryDisplayName of Service point"
}
},
"required": [
"id",
"name"
]
}
}
},
"required": [
"allowedServicePoints"
]
}Example:
{
"allowedServicePoints" : [ {
"id" : "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
"name" : "Circ Desk 1",
"discoveryName" : "Circ Desk 1"
}, {
"id" : "c4c90014-c8c9-4ade-8f24-b5e313319f4b",
"name" : "Circ Desk 2",
"discoveryName" : "Circ Desk 2"
} ]
}
Validation error
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 administratorCreates a hold request on an existing item by instance ID for the user
POST /patron/account/{id}/instance/{instanceId}/holdThe UUID of a FOLIO user
The UUID of a FOLIO instance
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Hold Schema",
"type": "object",
"description": "Hold schema for patron portal integration",
"additionalProperties": true,
"properties": {
"requestId": {
"type": "string",
"description": "The UUID of the request"
},
"item": {
"type": "object",
"description": "The item that is checked out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"requestDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request expires"
},
"status": {
"type": "string",
"description": "The status of the hold request",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - Awaiting delivery",
"Open - In transit",
"New - Awaiting confirmation",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"pickupLocationId": {
"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}$",
"description": "The UUID of the pick up location"
},
"queuePosition": {
"type": "integer",
"description": "The position in the queue for this patron"
},
"cancellationReasonId": {
"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}$",
"description": "The id of the request reason"
},
"canceledByUserId": {
"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}$",
"description": "The id of the user that cancelled the request"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"canceledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"required": [
"requestDate",
"pickupLocationId"
]
}Example:
{
"requestId": "dd238b5b-01fc-4205-83b8-ce27a650d827",
"item": {
"instanceId": "23611f0b-35cc-4f40-af09-75907d7cc421",
"itemId": "32e5757d-6566-466e-b69d-994eb33d2b62",
"title": "Something's Got a Hold on Me",
"author": "Etta James; Leroy Kirkland; Pearl Woods"
},
"queuePosition": 1,
"requestDate": "2018-06-02T08:16:30Z",
"expirationDate": "3000-01-30T08:16:30Z",
"pickupLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8",
"status": "Open - Not yet filled",
"patronComments": "Can you deliver this to the History building for Professor Grant?"
}
Returns data for a new hold request on the selected item
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Hold Schema",
"type": "object",
"description": "Hold schema for patron portal integration",
"additionalProperties": true,
"properties": {
"requestId": {
"type": "string",
"description": "The UUID of the request"
},
"item": {
"type": "object",
"description": "The item that is checked out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"requestDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request expires"
},
"status": {
"type": "string",
"description": "The status of the hold request",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - Awaiting delivery",
"Open - In transit",
"New - Awaiting confirmation",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"pickupLocationId": {
"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}$",
"description": "The UUID of the pick up location"
},
"queuePosition": {
"type": "integer",
"description": "The position in the queue for this patron"
},
"cancellationReasonId": {
"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}$",
"description": "The id of the request reason"
},
"canceledByUserId": {
"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}$",
"description": "The id of the user that cancelled the request"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"canceledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"required": [
"requestDate",
"pickupLocationId"
]
}Example:
{
"requestId": "dd238b5b-01fc-4205-83b8-ce27a650d827",
"item": {
"instanceId": "23611f0b-35cc-4f40-af09-75907d7cc421",
"itemId": "32e5757d-6566-466e-b69d-994eb33d2b62",
"title": "Something's Got a Hold on Me",
"author": "Etta James; Leroy Kirkland; Pearl Woods"
},
"queuePosition": 1,
"requestDate": "2018-06-02T08:16:30Z",
"expirationDate": "3000-01-30T08:16:30Z",
"pickupLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8",
"status": "Open - Not yet filled",
"patronComments": "Can you deliver this to the History building for Professor Grant?"
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violationNot authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create hold -- unauthorizedAccess Denied
Media type: text/plain
Type: any
Example:
Access DeniedInstance with a given ID not found
Media type: text/plain
Type: any
Example:
item not foundConflict
Media type: text/plain
Type: any
Example:
Optimistic Locking ConflictValidation 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 administratorReturns a list of pickup service points allowed for a particular patron and instance's items
POST /patron/account/{id}/instance/{instanceId}/allowed-service-pointsThe UUID of a FOLIO user
The UUID of a FOLIO instance
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Collection of Item IDs to get allowed service points for",
"type": "object",
"properties": {
"itemIds": {
"description": "A UUID of the item",
"type": "array",
"items": {
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/",
"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}$"
}
}
},
"required": [
"itemIds"
]
}Example:
{
"itemIds": [
"650b2d28-dc05-4177-9dc3-c45316fe5aa6",
"9631dd19-63e4-570d-a50c-de0665de3b44"
]
}
Returns an allowed service points per item
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Allowed pickup service points per item",
"type": "object",
"properties": {
"allowedServicePointsPerItem": {
"description": "List of allowed pickup service points per each item ID",
"type": "array",
"items": {
"type": "object",
"properties": {
"itemId": {
"description": "A UUID of the item",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"allowedServicePoints": {
"description": "Item's Allowed pickup service point IDs",
"type": "array",
"$schema": "http://json-schema.org/draft-04/schema#",
"default": null,
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "UUID string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"name": {
"type": "string",
"description": "Service point name"
},
"discoveryName": {
"type": "string",
"description": "discoveryDisplayName of Service point"
}
},
"required": [
"id",
"name"
]
}
}
},
"required": [
"itemId",
"allowedServicePoints"
]
}
}
},
"required": [
"allowedServicePointsPerItem"
]
}Example:
{
"allowedServicePointsPerItem": [
{
"itemId": "7e881333-3a3a-501c-a6d4-03b81e3c7e79",
"allowedServicePoints": [
{
"id": "be6cdc85-1202-4c48-99fa-56af591f5a3a",
"name": "One good service point"
},
{
"id": "650b2d28-dc05-4177-9dc3-c45316fe5aa6",
"name": "Main circ college"
}
]
},
{
"itemId": "9631dd19-63e4-570d-a50c-de0665de3b44",
"allowedServicePoints": [
{
"id": "f297326f-60ea-5d8c-8e8f-9b0179421d10",
"name": "Another good service point"
},
{
"id": "650b2d28-dc05-4177-9dc3-c45316fe5aa6",
"name": "Main circ college"
}
]
}
]
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
Validation error
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 administratorReturns a list of pickup service points allowed for a particular patron and instance
GET /patron/account/{id}/instance/{instanceId}/allowed-service-pointsThe UUID of a FOLIO user
The UUID of a FOLIO instance
Successfully returns a list of allowed service points
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Allowed pickup service points grouped by request type",
"type": "object",
"properties": {
"allowedServicePoints": {
"description": "Allowed pickup service point IDs for Page requests",
"type": "array",
"$schema": "http://json-schema.org/draft-04/schema#",
"default": null,
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "UUID string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"name": {
"type": "string",
"description": "Service point name"
},
"discoveryName": {
"type": "string",
"description": "discoveryDisplayName of Service point"
}
},
"required": [
"id",
"name"
]
}
}
},
"required": [
"allowedServicePoints"
]
}Example:
{
"allowedServicePoints" : [ {
"id" : "3a40852d-49fd-4df2-a1f9-6e2641a6e91f",
"name" : "Circ Desk 1",
"discoveryName" : "Circ Desk 1"
}, {
"id" : "c4c90014-c8c9-4ade-8f24-b5e313319f4b",
"name" : "Circ Desk 2",
"discoveryName" : "Circ Desk 2"
} ]
}
Validation error
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 administratorSubmits a batch multi-item request for a particular patron and instance's items
POST /patron/account/{id}/instance/{instanceId}/batch-requestThe UUID of a FOLIO user
The UUID of a FOLIO instance
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Multi-Item Request Schema",
"type": "object",
"description": "Account schema for patron portal integration",
"additionalProperties": false,
"properties": {
"batchRequestId": {
"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}$",
"description": "The UUID id of the batch request"
},
"requests": {
"description": "Physical addresses associated with the user",
"type": "array",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"itemId": {
"description": "UUID of the item",
"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}$"
},
"pickUpLocationId": {
"description": "UUID of the pickup 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}$"
}
},
"required": [
"itemId",
"pickUpLocationId"
],
"additionalProperties": false
}
},
"patronComments": {
"description": "Patron comments to be included with each request",
"type": "string",
"maxLength": 1000
}
},
"required": [
"requests"
]
}Example:
{
"batchRequestId": "5203c035-005e-4a70-b555-ddaa3094c51c",
"requests": [
{
"itemId": "7e881333-3a3a-501c-a6d4-03b81e3c7e79",
"pickUpLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8"
},
{
"itemId": "7e881333-3a3a-501c-a6d4-03b81e3c7e79",
"pickUpLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8"
}
],
"patronComments": "patron comment"
}
Returns multi-item request submission result
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Multi-Item Request Submission Result",
"type": "object",
"properties": {
"batchId": {
"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}$",
"description": "The UUID id of the batch request"
},
"requesterId": {
"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}$",
"description": "The UUID id of the requester"
},
"mediatedRequestStatus": {
"description": "Status of the submitted mediated batch request",
"type": "string",
"enum": [
"Pending",
"In progress",
"Completed",
"Failed"
]
},
"itemRequestsStats": {
"type": "object",
"description": "Statistics about the item requests in the batch",
"properties": {
"total": {
"type": "integer",
"description": "Total number of item requests in the batch"
},
"pending": {
"type": "integer",
"description": "Number of item requests still pending creation"
},
"inProgress": {
"type": "integer",
"description": "Number of item requests currently being created"
},
"completed": {
"type": "integer",
"description": "Number of successfully created item requests"
},
"failed": {
"type": "integer",
"description": "Number of item requests that failed to be created"
}
}
},
"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"
]
}
},
"required": [
"batchId",
"requesterId",
"mediatedRequestStatus"
]
}Example:
{
"batchId": "5203c035-005e-4a70-b555-ddaa3094c51c",
"requesterId": "9a171a89-baca-4f1a-b2c4-d7253854864e",
"mediatedRequestStatus": "In progress",
"itemRequestsStats": {
"total": 100,
"pending": 5,
"inProgress": 95,
"completed": 0,
"failed": 0
},
"metadata": {
"createdByUserId": "9a171a89-baca-4f1a-b2c4-d7253854864e",
"createdDate": "2024-06-01T12:00:00Z",
"updatedByUserId": "9a171a89-baca-4f1a-b2c4-d7253854864e",
"updatedDate": "2024-06-01T12:00:00Z"
}
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
Validation error
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 administratorReturns the status of a batch multi-item request
GET /patron/account/{id}/instance/{instanceId}/batch-request/{batchRequestId}/statusThe UUID of a FOLIO user
The UUID of a FOLIO instance
The UUID of a batch request
Successfully returns the status of a batch request
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Multi-Item Request Processing Status",
"type": "object",
"properties": {
"batchRequestId": {
"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}$",
"description": "The UUID id of the batch request"
},
"status": {
"description": "Status of the submitted batch request",
"type": "string",
"enum": [
"In progress",
"Completed"
]
},
"submittedAt": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"completedAt": {
"type": "string",
"format": "date-time",
"description": "The date when the request was completed"
},
"itemsTotal": {
"type": "integer",
"description": "Total number of items to be requested in batch"
},
"itemsRequested": {
"type": "integer",
"description": "Number of items successfully requested"
},
"itemsPending": {
"type": "integer",
"description": "Number of items still pending to be requested"
},
"itemsFailed": {
"type": "integer",
"description": "Number of items that failed to be requested"
},
"itemsPendingDetails": {
"type": "array",
"description": "Collection of items request details that are still pending to be processed",
"items": {
"type": "object",
"properties": {
"instanceId": {
"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}$",
"description": "The UUID id of the instance"
},
"itemId": {
"description": "UUID of the item",
"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}$"
},
"title": {
"description": "Title of the item",
"type": "string"
},
"pickUpLocationId": {
"description": "UUID of the pickup 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}$"
}
}
}
},
"itemsFailedDetails": {
"type": "array",
"description": "Collection of items request details that are failed on processing and creating requests",
"items": {
"type": "object",
"properties": {
"instanceId": {
"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}$",
"description": "The UUID id of the instance"
},
"itemId": {
"description": "UUID of the item",
"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}$"
},
"title": {
"description": "Title of the item",
"type": "string"
},
"pickUpLocationId": {
"description": "UUID of the pickup 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}$"
},
"errorCode": {
"description": "Error code indicating the reason for failure",
"type": "string"
},
"errorDetails": {
"description": "Detailed message describing the failure",
"type": "string"
}
}
}
},
"itemsRequestedDetails": {
"type": "array",
"description": "Collection of processed and created items requests details",
"items": {
"type": "object",
"properties": {
"instanceId": {
"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}$",
"description": "The UUID id of the instance"
},
"itemId": {
"description": "UUID of the item",
"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}$"
},
"title": {
"description": "Title of the item",
"type": "string"
},
"pickUpLocationId": {
"description": "UUID of the pickup 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}$"
},
"confirmedRequestId": {
"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}$",
"description": "The UUID id of created item request"
}
}
}
}
},
"required": [
"batchRequestId",
"status",
"submittedAt"
]
}Example:
{
"batchRequestId": "5203c035-005e-4a70-b555-ddaa3094c51c",
"status": "Completed",
"submittedAt": "2025-09-08T12:27:33.822+00:00",
"completedAt": "2025-09-08T12:30:33.822+00:00",
"itemsTotal": 3,
"itemsRequested": 1,
"itemsPending": 1,
"itemsPendingDetails": [
{
"instanceId": "9d1b77e4-f02e-4b7f-b296-3f2042ddac54",
"itemId": "0faa1eec-bdef-4d5e-a458-bceca8e04855",
"title": "100 banned books: censorship histories of world literature / Nicholas J. Karolides, Margaret Bald, and Dawn B. Sova; introduction by Ken Wachsberger.",
"pickupLocationId": "650b2d28-dc05-4177-9dc3-c45316fe5aa6"
}
],
"itemsFailed": 1,
"itemsFailedDetails": [
{
"instanceId": "9d1b77e4-f02e-4b7f-b296-3f2042ddac54",
"itemId": "0738aade-23ce-4177-8c6e-f5f13572c827",
"title": "100 banned books: censorship histories of world literature / Nicholas J. Karolides, Margaret Bald, and Dawn B. Sova; introduction by Ken Wachsberger.",
"pickupLocationId": "650b2d28-dc05-4177-9dc3-c45316fe5aa6",
"errorCode": "This failed because of some internal issue",
"errorDetails": "This failed because of some internal issue"
},
{
"instanceId": "9d1b77e4-f02e-4b7f-b296-3f2042ddac54",
"itemId": "0faa1eec-bdef-4d5e-a458-bceca8e04855",
"title": "Something else, pt.2",
"pickupLocationId": "650b2d28-dc05-4177-9dc3-c45316fe5aa6",
"errorCode": "This failed because of some internal issue",
"errorDetails": "Everything failed here, and no one knows why"
}
],
"itemsCompletedDetails": [
{
"instanceId": "9d1b77e4-f02e-4b7f-b296-3f2042ddac54",
"itemId": "0faa1eec-bdef-4d5e-a458-bceca8e04855",
"title": "100 banned books: censorship histories of world literature / Nicholas J. Karolides, Margaret Bald, and Dawn B. Sova; introduction by Ken Wachsberger.",
"pickupLocationId": "650b2d28-dc05-4177-9dc3-c45316fe5aa6",
"confirmedRequestId": "8d1b77e4-f02e-4b7f-b296-3f2042ddac57"
}
]
}
Batch request with a given ID not found
Media type: text/plain
Type: any
Example:
Multi-Item request not foundValidation error
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"
}
}
}Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorcancels the request
POST /patron/account/{id}/hold/{holdId}/cancelThe UUID of a FOLIO user
The UUID of a FOLIO hold request
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Hold Schema",
"type": "object",
"description": "Hold schema for patron portal integration",
"additionalProperties": true,
"properties": {
"requestId": {
"type": "string",
"description": "The UUID of the request"
},
"item": {
"type": "object",
"description": "The item that is checked out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"requestDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request expires"
},
"status": {
"type": "string",
"description": "The status of the hold request",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - Awaiting delivery",
"Open - In transit",
"New - Awaiting confirmation",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"pickupLocationId": {
"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}$",
"description": "The UUID of the pick up location"
},
"queuePosition": {
"type": "integer",
"description": "The position in the queue for this patron"
},
"cancellationReasonId": {
"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}$",
"description": "The id of the request reason"
},
"canceledByUserId": {
"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}$",
"description": "The id of the user that cancelled the request"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"canceledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"required": [
"requestDate",
"pickupLocationId"
]
}Example:
{
"requestId": "dd238b5b-01fc-4205-83b8-ce27a650d827",
"item": {
"instanceId": "23611f0b-35cc-4f40-af09-75907d7cc421",
"itemId": "32e5757d-6566-466e-b69d-994eb33d2b62",
"title": "Something's Got a Hold on Me",
"author": "Etta James; Leroy Kirkland; Pearl Woods"
},
"queuePosition": 1,
"requestDate": "2018-06-02T08:16:30Z",
"expirationDate": "3000-01-30T08:16:30Z",
"pickupLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8",
"status": "Open - Not yet filled",
"patronComments": "Can you deliver this to the History building for Professor Grant?"
}
Returns an updated hold request after cancelling
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Hold Schema",
"type": "object",
"description": "Hold schema for patron portal integration",
"additionalProperties": true,
"properties": {
"requestId": {
"type": "string",
"description": "The UUID of the request"
},
"item": {
"type": "object",
"description": "The item that is checked out",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Patron Item Schema",
"additionalProperties": false,
"properties": {
"instanceId": {
"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}$",
"description": "The FOLIO id of the instance"
},
"itemId": {
"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}$",
"description": "The FOLIO id of the item"
},
"title": {
"type": "string",
"description": "The title of the item"
},
"author": {
"type": "string",
"description": "The author of the item"
},
"isbn": {
"type": "string",
"description": "The ISBN of the item"
}
},
"required": [
"instanceId"
]
},
"requestDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request was made"
},
"expirationDate": {
"type": "string",
"format": "date-time",
"description": "The date when the request expires"
},
"status": {
"type": "string",
"description": "The status of the hold request",
"enum": [
"Open - Not yet filled",
"Open - Awaiting pickup",
"Open - Awaiting delivery",
"Open - In transit",
"New - Awaiting confirmation",
"Closed - Filled",
"Closed - Cancelled",
"Closed - Unfilled",
"Closed - Pickup expired"
]
},
"pickupLocationId": {
"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}$",
"description": "The UUID of the pick up location"
},
"queuePosition": {
"type": "integer",
"description": "The position in the queue for this patron"
},
"cancellationReasonId": {
"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}$",
"description": "The id of the request reason"
},
"canceledByUserId": {
"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}$",
"description": "The id of the user that cancelled the request"
},
"cancellationAdditionalInformation": {
"description": "Additional information about a cancellation",
"type": "string"
},
"canceledDate": {
"description": "Date the request was cancelled",
"type": "string",
"format": "date-time"
},
"patronComments": {
"description": "Comments made by the patron",
"type": "string"
}
},
"required": [
"requestDate",
"pickupLocationId"
]
}Example:
{
"requestId": "dd238b5b-01fc-4205-83b8-ce27a650d827",
"item": {
"instanceId": "23611f0b-35cc-4f40-af09-75907d7cc421",
"itemId": "32e5757d-6566-466e-b69d-994eb33d2b62",
"title": "Something's Got a Hold on Me",
"author": "Etta James; Leroy Kirkland; Pearl Woods"
},
"queuePosition": 1,
"requestDate": "2018-06-02T08:16:30Z",
"expirationDate": "3000-01-30T08:16:30Z",
"pickupLocationId": "ebab9ccc-4ece-4f35-bc82-01f3325abed8",
"status": "Open - Not yet filled",
"patronComments": "Can you deliver this to the History building for Professor Grant?"
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to cancel hold -- unauthorizedAccess Denied
Media type: text/plain
Type: any
Example:
access deniedItem with a given ID not found
Media type: text/plain
Type: any
Example:
hold not foundConflict
Media type: text/plain
Type: any
Example:
Optimistic Locking ConflictValidation error
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"
}
}
}Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorGet the patron details by email ID or external system ID
GET /patron/registration-status/{identifier}The email ID or the external system ID of the patron.
patron information retrieved successfully
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "User Schema",
"description": "A user",
"javaName": "User",
"type": "object",
"properties": {
"username": {
"description": "A unique name belonging to a user. Typically used for login",
"type": "string"
},
"id": {
"description": "A globally unique (UUID) identifier for the user",
"type": "string"
},
"externalSystemId": {
"description": "A unique ID that corresponds to an external authority",
"type": "string"
},
"barcode": {
"description": "The unique library barcode for this user",
"type": "string"
},
"active": {
"description": "A flag to determine if the user's account is effective and not expired. The tenant configuration can require the user to be active for login. Active is different from the loan patron block",
"type": "boolean"
},
"type": {
"description": "The class of user like staff or patron; this is different from patronGroup; it can store shadow, system user and dcb types also",
"type": "string"
},
"patronGroup": {
"description": "A UUID corresponding to the group the user belongs to, see /groups API, example groups are undergraduate and faculty; loan rules, patron blocks, fees/fines and expiration days can use the patron group",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"departments": {
"description": "A list of UUIDs corresponding to the departments the user belongs to, see /departments API",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"description": "A universally unique identifier (UUID), this is a 128-bit number used to identify a record and is shown in hex with dashes, for example 6312d172-f0cf-40f6-b27d-9fa8feaf332f; the UUID version must be from 1-5; see https://dev.folio.org/guides/uuids/",
"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}$"
}
},
"meta": {
"description": "Deprecated",
"type": "object"
},
"proxyFor": {
"description": "Deprecated",
"type": "array",
"items": {
"type": "string"
}
},
"personal": {
"description": "Personal information about the user",
"type": "object",
"properties": {
"lastName": {
"description": "The user's surname",
"type": "string"
},
"firstName": {
"description": "The user's given name",
"type": "string"
},
"middleName": {
"description": "The user's middle name (if any)",
"type": "string"
},
"preferredFirstName": {
"description": "The user's preferred name",
"type": "string"
},
"email": {
"description": "The user's email address",
"type": "string"
},
"phone": {
"description": "The user's primary phone number",
"type": "string"
},
"mobilePhone": {
"description": "The user's mobile phone number",
"type": "string"
},
"dateOfBirth": {
"type": "string",
"description": "The user's birth date",
"format": "date-time"
},
"addresses": {
"description": "Physical addresses associated with the user",
"type": "array",
"minItems": 0,
"items": {
"type": "object",
"properties": {
"id": {
"description": "A unique id for this address",
"type": "string"
},
"countryId": {
"description": "The country code for this address",
"type": "string"
},
"addressLine1": {
"description": "Address, Line 1",
"type": "string"
},
"addressLine2": {
"description": "Address, Line 2",
"type": "string"
},
"city": {
"description": "City name",
"type": "string"
},
"region": {
"description": "Region",
"type": "string"
},
"postalCode": {
"description": "Postal Code",
"type": "string"
},
"addressTypeId": {
"description": "A UUID that corresponds with an address type object",
"type": "string",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "uuid.schema",
"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}$"
},
"primaryAddress": {
"description": "Is this the user's primary address?",
"type": "boolean"
}
},
"required": [
"addressTypeId"
],
"additionalProperties": false
}
},
"preferredContactTypeId": {
"description": "Id of user's preferred contact type like Email, Mail or Text Message, see /addresstypes API",
"type": "string"
},
"profilePictureLink": {
"description": "Link to the profile picture",
"type": "string",
"format": "uri"
}
},
"additionalProperties": false,
"required": [
"lastName"
]
},
"enrollmentDate": {
"description": "The date in which the user joined the organization",
"type": "string",
"format": "date-time"
},
"expirationDate": {
"description": "The date for when the user becomes inactive",
"type": "string",
"format": "date-time"
},
"createdDate": {
"description": "Deprecated",
"type": "string",
"format": "date-time"
},
"updatedDate": {
"description": "Deprecated",
"type": "string",
"format": "date-time"
},
"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"
]
},
"tags": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "tags.schema",
"title": "tags",
"description": "List of simple tags that can be added to an object",
"properties": {
"tagList": {
"description": "List of tags",
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"customFields": {
"description": "Object that contains custom field",
"type": "object",
"additionalProperties": true
},
"preferredEmailCommunication": {
"type": "array",
"items": {
"type": "string",
"enum": [
"Support",
"Programs",
"Services"
]
},
"maxItems": 3,
"uniqueItems": true,
"description": "Preferred email communication types"
}
},
"additionalProperties": false
}Example:
{
"username": "jhandey",
"id": "7261ecaae3a74dc68b468e12a70b1aec",
"active": true,
"type": "patron",
"patronGroup": "4bb563d9-3f9d-4e1e-8d1d-04e75666d68f",
"meta": {
"creation_date": "2016-11-05T0723",
"last_login_date": ""
},
"personal": {
"lastName": "Handey",
"firstName": "Jack",
"preferredFirstName": "Jackie",
"email": "jhandey@biglibrary.org",
"phone": "2125551212"
}
}
Validation error
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"
}
}
}Validation error
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"
}
}
}Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administratorPUT /patron/{externalSystemId}The UUID of a staging user
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Staging User Information Schema",
"description": "A staging user",
"javaName": "StagingUser",
"type": "object",
"properties": {
"id": {
"description": "A globally unique (UUID) identifier for the user",
"type": "string"
},
"isEmailVerified": {
"description": "A flag to determine if a patron is activated.",
"type": "boolean"
},
"minor": {
"description": "An optional flag If true, the user will be assigned to the 'Basic -- Minor (INTERNAL)' patron group upon creation; otherwise if false or null, the 'Remote Non-circulating' group is assigned.",
"type": "boolean"
},
"status": {
"type": "string",
"description": "whether tier-1 or tier-2",
"enum": [
"TIER-1",
"TIER-2"
]
},
"externalSystemId": {
"description": "A unique ID (UUID) that corresponds to an external authority",
"type": "string"
},
"generalInfo": {
"type": "object",
"description": "General info of staging user",
"properties": {
"firstName": {
"type": "string",
"description": "The staging user's given name"
},
"preferredFirstName": {
"type": "string",
"description": "The user's preferred name"
},
"middleName": {
"type": "string",
"description": "The staging user's middle name (if any)"
},
"lastName": {
"type": "string",
"description": "The staging user's surname"
}
},
"required": [
"firstName",
"lastName"
],
"additionalProperties": false
},
"addressInfo": {
"type": "object",
"description": "Primary address info of staging user",
"properties": {
"addressLine0": {
"type": "string",
"description": "Address, Line 0"
},
"addressLine1": {
"type": "string",
"description": "Address, Line 1"
},
"city": {
"type": "string",
"description": "City name"
},
"province": {
"type": "string",
"description": "Province"
},
"zip": {
"type": "string",
"description": "Zip Code"
},
"country": {
"type": "string",
"description": "Country"
}
},
"additionalProperties": false
},
"contactInfo": {
"type": "object",
"description": "Contact info of staging user",
"properties": {
"phone": {
"type": "string",
"description": "The user's primary phone number"
},
"mobilePhone": {
"type": "string",
"description": "The user's mobile phone number"
},
"email": {
"type": "string",
"description": "The user's email address",
"format": "email"
}
},
"required": [
"email"
],
"additionalProperties": false
},
"preferredEmailCommunication": {
"type": "array",
"description": "Email communication info of staging user",
"items": {
"type": "string",
"enum": [
"Support",
"Programs",
"Services"
]
},
"maxItems": 3,
"uniqueItems": true
},
"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"
]
}
},
"required": [
"generalInfo",
"contactInfo"
],
"additionalProperties": false
}Example:
{
"isEmailVerified": false,
"status": "TIER-1",
"externalSystemId": "9eb67301-6f6e-468f-9b1a-6134dc39a684",
"generalInfo": {
"firstName": "test1",
"middleName": "www",
"lastName": "new-record-1"
},
"addressInfo": {
"addressLine0": "123 Main St",
"addressLine1": "Apt 4B",
"city": "Metropolis",
"province": "NY",
"zip": "12345",
"country": "USA"
},
"contactInfo": {
"phone": "555-123456",
"mobilePhone": "555-5678",
"email": "new-record-kapil_new1@test.com"
},
"preferredEmailCommunication": [
"Programs",
"Support",
"Services"
]
}
when staging user record is updated
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Staging User Information Schema",
"description": "A staging user",
"javaName": "StagingUser",
"type": "object",
"properties": {
"id": {
"description": "A globally unique (UUID) identifier for the user",
"type": "string"
},
"isEmailVerified": {
"description": "A flag to determine if a patron is activated.",
"type": "boolean"
},
"minor": {
"description": "An optional flag If true, the user will be assigned to the 'Basic -- Minor (INTERNAL)' patron group upon creation; otherwise if false or null, the 'Remote Non-circulating' group is assigned.",
"type": "boolean"
},
"status": {
"type": "string",
"description": "whether tier-1 or tier-2",
"enum": [
"TIER-1",
"TIER-2"
]
},
"externalSystemId": {
"description": "A unique ID (UUID) that corresponds to an external authority",
"type": "string"
},
"generalInfo": {
"type": "object",
"description": "General info of staging user",
"properties": {
"firstName": {
"type": "string",
"description": "The staging user's given name"
},
"preferredFirstName": {
"type": "string",
"description": "The user's preferred name"
},
"middleName": {
"type": "string",
"description": "The staging user's middle name (if any)"
},
"lastName": {
"type": "string",
"description": "The staging user's surname"
}
},
"required": [
"firstName",
"lastName"
],
"additionalProperties": false
},
"addressInfo": {
"type": "object",
"description": "Primary address info of staging user",
"properties": {
"addressLine0": {
"type": "string",
"description": "Address, Line 0"
},
"addressLine1": {
"type": "string",
"description": "Address, Line 1"
},
"city": {
"type": "string",
"description": "City name"
},
"province": {
"type": "string",
"description": "Province"
},
"zip": {
"type": "string",
"description": "Zip Code"
},
"country": {
"type": "string",
"description": "Country"
}
},
"additionalProperties": false
},
"contactInfo": {
"type": "object",
"description": "Contact info of staging user",
"properties": {
"phone": {
"type": "string",
"description": "The user's primary phone number"
},
"mobilePhone": {
"type": "string",
"description": "The user's mobile phone number"
},
"email": {
"type": "string",
"description": "The user's email address",
"format": "email"
}
},
"required": [
"email"
],
"additionalProperties": false
},
"preferredEmailCommunication": {
"type": "array",
"description": "Email communication info of staging user",
"items": {
"type": "string",
"enum": [
"Support",
"Programs",
"Services"
]
},
"maxItems": 3,
"uniqueItems": true
},
"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"
]
}
},
"required": [
"generalInfo",
"contactInfo"
],
"additionalProperties": false
}Example:
{
"isEmailVerified": false,
"status": "TIER-1",
"externalSystemId": "9eb67301-6f6e-468f-9b1a-6134dc39a684",
"generalInfo": {
"firstName": "test1",
"middleName": "www",
"lastName": "new-record-1"
},
"addressInfo": {
"addressLine0": "123 Main St",
"addressLine1": "Apt 4B",
"city": "Metropolis",
"province": "NY",
"zip": "12345",
"country": "USA"
},
"contactInfo": {
"phone": "555-123456",
"mobilePhone": "555-5678",
"email": "new-record-kapil_new1@test.com"
},
"preferredEmailCommunication": [
"Programs",
"Support",
"Services"
]
}
Bad request
Media type: text/plain
Type: any
Example:
unable to process requestStaging user with a given externalSystemID not found
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"
}
}
}Internal server error, e.g. due to missing externalSystemId in the parameter
Media type: text/plain
Type: any
Example:
the request's HTTP method is not supported by the server or the resource.Validation error
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