Patron Services version v4.2
https://github.com/folio-org/mod-patron
Patron Services
This module allows 3rd party discovery services to perform patron actions in FOLIO
Patron Services
Services that allow patron empowerment from 3rd party discovery services
Creates external patron request
post /patron
Creates external patron request
Body
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"
]
}
HTTP status code 201
when new staging user record is created
Body
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"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
unable to process request
HTTP status code 422
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Service endpoints that manage accounts by an existing Id
Return account details for the specified FOLIO user id
get /patron/account/{id}
Return account details for the specified FOLIO user id
URI Parameters
- id: required(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}$)
The UUID of a FOLIO user
Query Parameters
- includeLoans: (boolean - default: false)
Indicates whether or not to include the loans array in the response
- includeCharges: (boolean - default: false)
Indicates whether or not to include the charges array in the response
- includeHolds: (boolean - default: false)
Indicates whether or not to include the holds array in the response
- sortBy: (string)
Part of CQL query, indicates the order of records within the lists of holds, charges, loans
Example:
item.title/sort.ascending
- offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)
Skip over a number of elements by specifying an offset value for the query
Example:
0
- limit: (integer - default: 2147483647 - minimum: 0 - maximum: 2147483647)
Limit the number of elements returned in the response
Example:
10
HTTP status code 200
Returns the user account info
Body
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
}
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to get account -- unauthorized
HTTP status code 403
Access Denied
Body
Media type: text/plain
Type: any
Example:
Access Denied
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
account not found
HTTP status code 422
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Service endpoint for loan renewal
Renews a loan on the item for the user
post /patron/account/{id}/item/{itemId}/renew
Renews a loan on the item for the user
URI Parameters
- id: required(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}$)
The UUID of a FOLIO user
- itemId: required(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}$)
The UUID of a FOLIO item
HTTP status code 201
Returns the renewed loan data
Body
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
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to renew loan -- unauthorized
HTTP status code 403
Access Denied
Body
Media type: text/plain
Type: any
Example:
Access Denied
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
item not found
HTTP status code 409
Conflict
Body
Media type: text/plain
Type: any
Example:
Optimistic Locking Conflict
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Services that provide hold management
Creates a hold request on an existing item for the user
post /patron/account/{id}/item/{itemId}/hold
Creates a hold request on an existing item for the user
URI Parameters
- id: required(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}$)
The UUID of a FOLIO user
- itemId: required(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}$)
The UUID of a FOLIO item
Body
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?"
}
HTTP status code 201
Returns data for a new hold request on the specified item
Body
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?"
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create hold -- unauthorized
HTTP status code 403
Access Denied
Body
Media type: text/plain
Type: any
Example:
Access Denied
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
item not found
HTTP status code 409
Conflict
Body
Media type: text/plain
Type: any
Example:
Optimistic Locking Conflict
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Services that provide hold management by Id
Services that provides a list of allowed pickup service points
Returns a list of pickup service points allowed for a particular patron and item
get /patron/account/{id}/item/{itemId}/allowed-service-points
Returns a list of pickup service points allowed for a particular patron and item
URI Parameters
- id: required(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}$)
The UUID of a FOLIO user
- itemId: required(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}$)
The UUID of a FOLIO item
HTTP status code 200
Successfully returns a list of allowed service points
Body
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"
} ]
}
HTTP status code 422
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Services that provide hold management
Creates a hold request on an existing item by instance ID for the user
post /patron/account/{id}/instance/{instanceId}/hold
Creates a hold request on an existing item by instance ID for the user
URI Parameters
- id: required(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}$)
The UUID of a FOLIO user
- instanceId: required(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}$)
The UUID of a FOLIO instance
Body
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?"
}
HTTP status code 201
Returns data for a new hold request on the selected item
Body
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?"
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to create hold -- unauthorized
HTTP status code 403
Access Denied
Body
Media type: text/plain
Type: any
Example:
Access Denied
HTTP status code 404
Instance with a given ID not found
Body
Media type: text/plain
Type: any
Example:
item not found
HTTP status code 409
Conflict
Body
Media type: text/plain
Type: any
Example:
Optimistic Locking Conflict
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Services that provides a list of allowed pickup service points
Returns a list of pickup service points allowed for a particular patron and instance
get /patron/account/{id}/instance/{instanceId}/allowed-service-points
Returns a list of pickup service points allowed for a particular patron and instance
URI Parameters
- id: required(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}$)
The UUID of a FOLIO user
- instanceId: required(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}$)
The UUID of a FOLIO instance
HTTP status code 200
Successfully returns a list of allowed service points
Body
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"
} ]
}
HTTP status code 422
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Services that provide hold management
cancels the request
post /patron/account/{id}/hold/{holdId}/cancel
cancels the request
URI Parameters
- id: required(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}$)
The UUID of a FOLIO user
- holdId: required(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}$)
The UUID of a FOLIO hold request
Body
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?"
}
HTTP status code 200
Returns an updated hold request after cancelling
Body
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?"
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
unable to process request -- constraint violation
HTTP status code 401
Not authorized to perform requested action
Body
Media type: text/plain
Type: any
Example:
unable to cancel hold -- unauthorized
HTTP status code 403
Access Denied
Body
Media type: text/plain
Type: any
Example:
access denied
HTTP status code 404
Item with a given ID not found
Body
Media type: text/plain
Type: any
Example:
hold not found
HTTP status code 409
Conflict
Body
Media type: text/plain
Type: any
Example:
Optimistic Locking Conflict
HTTP status code 422
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Endpoint to fetch patron details by email ID or external system ID (UUID).
Get the patron details by email ID or external system ID
get /patron/registration-status/{identifier}
Get the patron details by email ID or external system ID
URI Parameters
- identifier: required(string)
The email ID or the external system ID of the patron.
HTTP status code 200
patron information retrieved successfully
Body
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"
}
}
HTTP status code 400
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 404
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Updates external patron based on external system Id.
put /patron/{externalSystemId}
URI Parameters
- externalSystemId: required(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}$)
The UUID of a staging user
Body
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"
]
}
HTTP status code 200
when staging user record is updated
Body
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"
]
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
unable to process request
HTTP status code 404
Staging user with a given externalSystemID not found
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
HTTP status code 405
Internal server error, e.g. due to missing externalSystemId in the parameter
Body
Media type: text/plain
Type: any
Example:
the request's HTTP method is not supported by the server or the resource.
HTTP status code 422
Validation error
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "errors.schema",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "error.schema",
"description": "An error",
"properties": {
"message": {
"type": "string",
"description": "Error message text"
},
"type": {
"type": "string",
"description": "Error message type"
},
"code": {
"type": "string",
"description": "Error message code"
},
"parameters": {
"description": "Error message parameters",
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "parameters.schema",
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"message"
]
}
},
"total_records": {
"description": "Total number of errors",
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error, e.g. due to misconfiguration
Body
Media type: text/plain
Type: any
Example:
internal server error, contact administrator