Bug 37762: ISO18626 REST API specs

Reference:
https: //illtransactions.org/schemas/ISO-18626-2021-2.xsd
Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2025-09-08 08:27:48 +00:00 committed by Lucas Gass
parent 55fa4609fa
commit f9b9bc77b2
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
52 changed files with 1287 additions and 0 deletions

View File

@ -0,0 +1,102 @@
package Koha::REST::V1::ILL::ISO18626;
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <https://www.gnu.org/licenses>.
use Modern::Perl;
use Mojo::Base 'Mojolicious::Controller';
use Koha::ILL::ISO18626;
use Koha::ILL::ISO18626::Request;
use Koha::ILL::ISO18626::Requests;
use Try::Tiny qw( catch try );
=head1 API
=head2 Methods
=head3 message
XSD schema used:
https://illtransactions.org/schemas/ISO-18626-v1_1.xsd
=cut
sub message {
my $c = shift->openapi->valid_input or return;
my $body = $c->req->body;
my $json = JSON::decode_json($body);
my $response;
return $c->render(
status => 403,
openapi => { error => 'Server unavailable' }
) unless C4::Context->preference('ILLModule');
# 1) Identify the ISO18626 message
my ($messageType) = keys %$json;
my $message_types = Koha::ILL::ISO18626::message_types;
unless ( grep { $_ eq $messageType } @$message_types ) {
return $c->render( status => 400, text => 'Invalid message type ' . $messageType );
}
# 2) Check for validation errors
my $validation_errors = Koha::ILL::ISO18626::is_invalid( $messageType, $json );
if ($validation_errors) {
$response = Koha::ILL::ISO18626::error_response(
$messageType . 'Confirmation',
$validation_errors
);
$c->res->headers->add( 'Content-Type', 'application/xml' );
return $c->render( status => 400, openapi => $response );
}
# 3) Handle authentication
my $requesting_agency = Koha::ILL::ISO18626::is_auth_ok( $messageType, $json );
if ( !$requesting_agency ) {
$response = Koha::ILL::ISO18626::error_response(
$messageType . 'Confirmation',
{ errorValue => 'AuthenticationFailed', errorMessage => 'Invalid accountId or securityCode provided.' }
);
$c->res->headers->add( 'Content-Type', 'application/xml' );
return $c->render( status => 400, openapi => $response );
}
# 4) Handle confirmation response
return try {
Koha::Database->new->schema->txn_do(
sub {
my $response = Koha::ILL::ISO18626::confirmation_response( $messageType, $body, $requesting_agency );
$c->res->headers->add( 'Content-Type', 'application/xml' );
return $c->render( status => $response->{status}, openapi => $response->{openapi} );
}
);
} catch {
if ($_) {
if ( $_->isa('Koha::Exceptions::Object::DuplicateID') ) {
return $c->render(
status => 409,
openapi => { error => $_->error, conflict => $_->duplicate_id }
);
}
}
$c->unhandled_exception($_);
};
}
1;

View File

@ -0,0 +1,28 @@
---
type: object
properties:
supplyingAgencyId:
$ref: '../types/agencyId.yaml'
description: Identification of the supplying library
requestingAgencyId:
$ref: '../types/agencyId.yaml'
description: Identification of the requesting library
timestamp:
type: string
format: date-time
description: Date and time of the confirmation transaction See ISO 8601-1 YYYY-MM-DDThh:mm:ssZ
requestingAgencyRequestId:
type: string
description: Requesting library’s request identification
timestampReceived:
type: string
format: date-time
description: Date and time of the confirmed request transaction See ISO 8601-1 YYYY-MM-DDThh:mm:ssZ
messageStatus:
$ref: '../types/messageStatus.yaml'
description: Value “OK” or “ERROR”
required:
- timestamp
- timestampReceived
- messageStatus
additionalProperties: false

View File

@ -0,0 +1,12 @@
---
type: object
properties:
errorType:
$ref: '../types/errorType.yaml'
errorValue:
type:
- string
- "null"
required:
- errorType
additionalProperties: false

View File

@ -0,0 +1,35 @@
---
type: object
properties:
request:
type: object
properties:
header:
$ref: './types/requestHeader.yaml'
bibliographicInfo:
$ref: './request/bibliographicInfo.yaml'
publicationInfo:
$ref: './request/publicationInfo.yaml'
serviceInfo:
$ref: './request/serviceInfo.yaml'
supplierInfo:
type: array
items:
$ref: './request/supplierInfo.yaml'
requestedDeliveryInfo:
type: array
items:
$ref: './request/requestedDeliveryInfo.yaml'
requestingAgencyInfo:
$ref: './request/requestingAgencyInfo.yaml'
patronInfo:
$ref: './request/patronInfo.yaml'
billingInfo:
$ref: './request/billingInfo.yaml'
required:
- header
- bibliographicInfo
- serviceInfo
required:
- request
additionalProperties: false

View File

@ -0,0 +1,87 @@
---
type: object
properties:
supplierUniqueRecordId:
type:
- string
- "null"
description: SupplierUniqueRecordId should be used for the supplying librarys internal unique identifier for the requested item, acquired from a preceding automatic holdings request. If this identifier is used, there should be no other identifiers in BibliographicInfo
title:
type:
- string
- "null"
description: Title of the requested item
author:
type:
- string
- "null"
description: Author of the requested item
authorId:
type:
- string
- "null"
description: ISNI name identifier of the author. See ISO 27729
subtitle:
type:
- string
- "null"
description: Subtitle of the requested item
seriesTitle:
type:
- string
- "null"
description: Title of the series
edition:
type:
- string
- "null"
description: Number or name of the edition
titleOfComponent:
type:
- string
- "null"
description: Title of the component part (e.g. article)
authorOfComponent:
type:
- string
- "null"
description: Author of the component part
volume:
type: array
description: Volume number
issue:
type:
- string
- "null"
description: Issue number
pagesRequested:
type:
- string
- "null"
description: Page from and page to
estimatedNoPages:
type:
- string
- "null"
description: Expected number of pages
bibliographicItemId:
type: array
items:
$ref: './bibliographicInfo/bibliographicItemId.yaml'
description: Identification of a physical or electronic object
sponsor:
type:
- string
- "null"
description: Person or organization sponsoring the publication
informationSource:
type:
- string
- "null"
description: Description of where bibliographic information was found
bibliographicRecordId:
type: array
items:
$ref: './bibliographicInfo/bibliographicRecordId.yaml'
description: Identification of a bibliographic record
additionalProperties: false

View File

@ -0,0 +1,20 @@
---
type: object
properties:
bibliographicItemIdentifier:
type: string
bibliographicItemIdentifierCode:
type: string
enum:
- DOI # ISO 26324
- Handle # RFC 3650
- ISBN # ISO 2108
- ILII # ISO 20247
- ISSN # ISO 3297
- ISMN # ISO 10957
- NBN # RFC 8458
- URN # RFC 8141
required:
- bibliographicItemIdentifier
- bibliographicItemIdentifierCode
additionalProperties: false

View File

@ -0,0 +1,24 @@
---
type: object
properties:
bibliographicRecordIdentifier:
type: string
bibliographicRecordIdentifierCode:
type: string
enum:
- AMICUS # Canadian National Catalogue code
- BL # British Library
- FAUST # FAUST number (Denmark)
- JNB # Japanese National Bibliography
- LA # Libraries Australia
- LCCN # Library of Congress. Cataloging Number (US)
- Medline # Medline
- NCID # NACSIS-CAT bibliographic record identifier (Japan)
- OCLC # OCLC
- PID # Danish National Union Catalogue Record Identifier
- PMID # PubMed Id
- TP # Te Puna (New Zealand)
required:
- bibliographicRecordIdentifier
- bibliographicRecordIdentifierCode
additionalProperties: false

View File

@ -0,0 +1,21 @@
---
type: object
properties:
paymentMethod:
$ref: '../valuePairs/paymentMethod.yaml'
description: The preferred payment method If the requesting library is willing and is able to accept any payment method, then the requesting library shall not include this element in the message
maximumCosts:
$ref: '../types/costs.yaml'
description: The highest amount the requesting agency is prepared to pay for the service. If the requesting library has no maximum costs, then the requesting library shall not include this element in the message.
billingMethod:
$ref: '../types/schemeValuePair.yaml'
description: Preferred billing method
billingName:
type:
- string
- "null"
description: Name of the contact person in finance department, etc.
address:
$ref: '../types/address.yaml'
description: Name of the contact person in finance department, etc.
additionalProperties: false

View File

@ -0,0 +1,42 @@
---
type: object
properties:
patronId:
type:
- string
- "null"
description: Details of the patron for whom the request is being made
surname:
type:
- string
- "null"
description: Details of the patron for whom the request is being made
givenName:
type:
- string
- "null"
description: First name of the patron
patronType:
type: string
enum:
- Adult
- Child
- DoctoralStudent
- Faculty
- GraduateStudent
- PostdoctoralResearcher
- PostgraduateStudent
- Researcher
- Staff
- Student
- UnderGraduateStudent
description: Type of patron
sendToPatron:
$ref: '../types/yesNo.yaml'
description: Only used with value “Y” if requesting library asks the supplying library to send the requested resource directly to the patron
address:
type: array
items:
$ref: '../types/address.yaml'
description: Description of how to contact the patron.
additionalProperties: false

View File

@ -0,0 +1,48 @@
---
type: object
properties:
publisher:
type:
- string
- "null"
description: Name of the publisher
publisherId:
type:
- string
- "null"
description: ISNI name identifier of the publisher. See ISO 27729
publicationType:
type: string
enum:
- ArchiveMaterial
- Article
- AudioBook
- Book
- Chapter
- ConferenceProc
- Game
- GovernmentPubl
- Image
- Journal
- Manuscript
- Map
- Movie
- MusicRecording
- MusicScore
- Newspaper
- Patent
- Report
- SoundRecording
- Thesis
description: Type of publication
publicationDate:
type:
- string
- "null"
description: Date of publication. For serials and serial articles, this should be the publication date of the component part such as issue, not the date when the serial was first issued
placeOfPublication:
type:
- string
- "null"
description: Place of publication, e.g. a city
additionalProperties: false

View File

@ -0,0 +1,16 @@
---
type: object
properties:
sortOrder:
type:
- integer
- "null"
description: Value from 1 to 99 according to the order
address:
$ref: '../types/address.yaml'
description: Description of the delivery address
deliveryMethod:
$ref: '../valuePairs/deliveryMethod.yaml'
courierName:
$ref: '../valuePairs/courierName.yaml'
additionalProperties: false

View File

@ -0,0 +1,19 @@
---
type: object
properties:
name:
type:
- string
- "null"
description: Name of the requesting agency
contactName:
type:
- string
- "null"
description: Name of the requesting agency
address:
type: array
items:
$ref: '../types/address.yaml'
description: Description of how to contact the requesting agency
additionalProperties: false

View File

@ -0,0 +1,63 @@
---
type: object
properties:
requestType:
$ref: '../types/requestType.yaml'
description: If no request type is specified, the default is “New”
requestSubType:
type: array
items:
$ref: '../types/requestSubType.yaml'
description: Sub type to qualify the request
requestingAgencyPreviousRequestId:
type:
- string
- "null"
description: Requesting agencys previous request number when a retry is sent. The Retry request may include updated data based on ReasonRetry
serviceType:
$ref: '../types/serviceType.yaml'
description: If Copy is requested, then the requesting library is interested only in a copy. If Loan is requested, then the requesting library is interested only in a loan. If CopyOrLoan is requested, then the requesting library is willing to accept either a copy or a loan
serviceLevel:
type: array
items:
$ref: '../valuePairs/serviceLevel.yaml'
itemFormat:
type: array
items:
$ref: '../valuePairs/itemFormat.yaml'
needBeforeDate:
type:
- string
- "null"
format: date-time
description: The request is not relevant after the stated date/time Ref. ISO 8601-1 YYYY-MM-DDThh:mm:ssZ. If the requesting library is willing and is able to accept the requested item at any time, then the requesting library shall not include this element in the message
copyrightCompliance:
$ref: '../types/schemeValuePair.yaml'
description: The requesting librarys copyright compliance
anyEdition:
$ref: '../types/yesNo.yaml'
description: Yes for yes to any edition. No if only the specified edition is acceptable
loanCondition:
type: array
items:
$ref: '../valuePairs/loanCondition.yaml'
startDate:
type:
- string
- "null"
format: date-time
description: Start date for a Booking (RequestSubType) See ISO 8601-1 YYYY-MM-DDThh:mm:ssZ
endDate:
type:
- string
- "null"
format: date-time
description: End date for a Booking (RequestSubType) See ISO 8601-1 YYYY-MM-DDThh:mm:ssZ
note:
type:
- string
- "null"
description: Human readable note
required:
- serviceType
additionalProperties: false

View File

@ -0,0 +1,35 @@
---
type: object
properties:
sortOrder:
type:
- integer
- "null"
description: Value from 1 to 99 defining the order of preference of use
supplierCode:
$ref: '../types/agencyId.yaml'
description: Code defining a potential supplier
supplierDescription:
type:
- string
- "null"
description: Textual information about supplier
bibliographicRecordId:
$ref: './bibliographicInfo/bibliographicRecordId.yaml'
description: Identification of a bibliographic record used
callNumber:
type:
- string
- "null"
description: Indication of the shelf position of the resource
summaryHoldings:
type:
- string
- "null"
description: Textual description of summary level holdings
availabilityNote:
type:
- string
- "null"
description: Information about availability
additionalProperties: false

View File

@ -0,0 +1,19 @@
---
type: object
properties:
requestConfirmation:
type: object
properties:
confirmationHeader:
$ref: './confirmation/confirmationHeader.yaml'
errorData:
type: array
items:
$ref: './confirmation/errorData.yaml'
required:
- confirmationHeader
additionalProperties: false
required:
- requestConfirmation
additionalProperties: false

View File

@ -0,0 +1,12 @@
---
type: object
properties:
accountId:
type:
- string
- "null"
securityCode:
type:
- string
- "null"
additionalProperties: false

View File

@ -0,0 +1,21 @@
---
type: object
properties:
requestingAgencyMessage:
type: object
properties:
header:
$ref: './types/requestingAgencyMessageHeader.yaml'
action:
$ref: './types/action.yaml'
note:
type:
- string
- "null"
required:
- header
- action
additionalProperties: false
required:
- requestingAgencyMessage
additionalProperties: false

View File

@ -0,0 +1,20 @@
---
type: object
properties:
requestingAgencyMessageConfirmation:
type: object
properties:
confirmationHeader:
$ref: './confirmation/confirmationHeader.yaml'
action:
$ref: './types/action.yaml'
errorData:
type: array
items:
$ref: './confirmation/errorData.yaml'
required:
- confirmationHeader
additionalProperties: false
required:
- requestingAgencyMessageConfirmation
additionalProperties: false

View File

@ -0,0 +1,27 @@
---
type: object
properties:
supplyingAgencyMessage:
type: object
properties:
header:
$ref: './types/supplyingAgencyMessageHeader.yaml'
messageInfo:
$ref: './supplyingAgencyMessage/messageInfo.yaml'
statusInfo:
$ref: './supplyingAgencyMessage/statusInfo.yaml'
retryInfo:
$ref: './supplyingAgencyMessage/retryInfo.yaml'
deliveryInfo:
$ref: './supplyingAgencyMessage/deliveryInfo.yaml'
shippingInfo:
$ref: './supplyingAgencyMessage/shippingInfo.yaml'
returnInfo:
$ref: './supplyingAgencyMessage/returnInfo.yaml'
required:
- header
- messageInfo
- statusInfo
required:
- supplyingAgencyMessage
additionalProperties: false

View File

@ -0,0 +1,47 @@
---
type: object
properties:
dateSent:
type: string
format: date-time
description: Start date for a Booking (RequestSubType) See ISO 8601-1 YYYY-MM-DDThh:mm:ssZ
itemId:
type:
- string
- "null"
description: Value of Barcode(s) or RFID-tag Id of the item(s) being delivered
URL:
type:
- string
- "null"
description: URL from which to download or access the requested item
deliveryMethod:
$ref: '../valuePairs/deliveryMethod.yaml'
description: The service via which the requested item was sent
address:
$ref: '../types/address.yaml'
sentToPatron:
type:
- boolean
- "null"
loanCondition:
type: array
items:
$ref: '../valuePairs/loanCondition.yaml'
itemFormat:
type: array
items:
$ref: '../valuePairs/itemFormat.yaml'
serviceType:
$ref: '../types/serviceType.yaml'
description: If Copy is requested, then the requesting library is interested only in a copy. If Loan is requested, then the requesting library is interested only in a loan. If CopyOrLoan is requested, then the requesting library is willing to accept either a copy or a loan
deliveryCosts:
type: array
items:
$ref: '../types/costs.yaml'
paymentMethod:
$ref: '../valuePairs/paymentMethod.yaml'
description: The payment method preferred by the supplying library
required:
- dateSent
additionalProperties: false

View File

@ -0,0 +1,40 @@
---
type: object
properties:
reasonForMessage:
$ref: '../types/reasonForMessage.yaml'
answerYesNo:
$ref: '../types/yesNo.yaml'
note:
type:
- string
- "null"
reasonUnfilled:
type: string
enum:
- NonCirculating
- NotAvailableForILL
- NotHeld
- NotOnShelf
- PolicyProblem
- PoorCondition
reasonRetry:
type: string
enum:
- AtBindery
- CostExceedsMaxCost
- CourierNotSupp
- MultiVolAvail
- MustMeetLoanCondition
- NotCurrentAvailableForILL
- NotFoundAsCited
- OnLoan
- OnOrder
- ReqDelDateNotPossible
- ReqDelMethodNotSupp
- ReqEditionNotPossible
- ReqFormatNotPossible
- ReqPayMethodNotSupported
- ReqServLevelNotSupp
- ReqServTypeNotPossible
additionalProperties: false

View File

@ -0,0 +1,61 @@
---
type: object
properties:
loanCondition:
type: array
items:
$ref: '../valuePairs/loanCondition.yaml'
description: Applied when ReasonRetry, MustMeetLoanCondition is used because the supplying library requires that conditions of use be met once the requested item is delivered
edition:
type: array
items:
type:
- string
- "null"
itemFormat:
type: array
items:
$ref: '../valuePairs/itemFormat.yaml'
volume:
type: array
items:
type:
- string
- "null"
serviceType:
$ref: '../types/serviceType.yaml'
description: If Copy is requested, then the requesting library is interested only in a copy. If Loan is requested, then the requesting library is interested only in a loan. If CopyOrLoan is requested, then the requesting library is willing to accept either a copy or a loan
serviceLevel:
type: array
items:
$ref: '../valuePairs/serviceLevel.yaml'
deliveryMethod:
type: array
items:
$ref: '../valuePairs/deliveryMethod.yaml'
description: Applied when ReasonRetry, ReqDelMethodNotSupp is used, because the requested delivery method(s) are not supported. The supplying library indicates which delivery methods are supported
courierName:
type: array
items:
$ref: '../valuePairs/courierName.yaml'
offeredCosts:
type: array
items:
$ref: '../types/costs.yaml'
description: Applied when ReasonRetry, MaximumCosts, is used because actual costs exceed those specified by the requesting library. The supplying library indicates what the actual cost shall be (consists of Complex Type Costs)
paymentMethod:
type: array
items:
$ref: '../valuePairs/paymentMethod.yaml'
description: Applied when ReasonRetry, ReqPayMethodNotSupp is used, because the requested payment method is not supported. The supplying library indicates which payment method(s) are supported
retryBefore:
type:
- string
- "null"
format: date-time
retryAfter:
type:
- string
- "null"
format: date-time
additionalProperties: false

View File

@ -0,0 +1,12 @@
---
type: object
properties:
returnAgencyId:
$ref: '../types/agencyId.yaml'
name:
type:
- string
- "null"
physicalAddress:
$ref: '../types/address/physicalAddress.yaml'
additionalProperties: false

View File

@ -0,0 +1,25 @@
---
type: object
properties:
courierName:
$ref: '../valuePairs/courierName.yaml'
trackingId:
type: array
items:
type:
- string
- "null"
description: The tracking number(s) assigned by the courier to the package(s) containing the item(s) to be shipped
insurance:
$ref: '../types/yesNo.yaml'
insuranceThirdParty:
$ref: '../types/yesNo.yaml'
thirdPartyName:
type:
- string
- "null"
insuranceCosts:
type: array
items:
$ref: '../types/costs.yaml'
additionalProperties: false

View File

@ -0,0 +1,19 @@
---
type: object
properties:
status:
$ref: '../types/status.yaml'
expectedDeliveryDate:
type:
- string
- "null"
format: date-time
dueDate:
type:
- string
- "null"
format: date-time
lastChange:
type: string
format: date-time
additionalProperties: false

View File

@ -0,0 +1,19 @@
---
type: object
properties:
supplyingAgencyMessageConfirmation:
type: object
properties:
confirmationHeader:
$ref: './confirmation/confirmationHeader.yaml'
reasonForMessage:
$ref: './types/reasonForMessage.yaml'
errorData:
type: array
items:
$ref: './confirmation/errorData.yaml'
required:
- confirmationHeader
required:
- supplyingAgencyMessageConfirmation
additionalProperties: false

View File

@ -0,0 +1,13 @@
---
type: string
enum:
- StatusRequest # The requesting library asks the supplying library to provide the current status for the request
- Received # The requesting library notifies the supplying library the requested item has been received
- Cancel # The requesting library asks the supplying library if the request may be cancelled. The supplying library returns a SupplyingAgencyMessage with ReasonForMessage = CancelResponse Yes or No.
- Renew # The requesting library asks the supplying library if the item currently on loan may be renewed. The supplying library returns a SupplyingAgencyMessage with ReasonForMessage = RenewResponse Yes or No (and DueDate if applicable)
- HoldReturn # The requesting library notifies the supplying library that an item currently on loan cannot be returned for the time being (due to temporary issues that prevent processing of returns at the requesting library)
- ShippedReturn # The requesting library notifies the supplying library that the borrowed item has been sent back
- ShippedForward # The requesting library notifies the supplying library that the borrowed item has been returned and sent to the library specified in ReturnInfo
- Notification # The requesting library sends a message to the supplying library
- Lost # The requesting library notifies the supplying library the item has been lost
description: Action in confirmed Receiving Agency Message

View File

@ -0,0 +1,11 @@
---
type: object
properties:
address:
$ref: './address/physicalAddress.yaml'
# FIXME: Allow both, but oneOf and anyOf are swagger v3 only
# anyOf:
# - $ref: 'definitions/ISO18626/request/address/electronicAddress.yaml'
# - $ref: 'definitions/ISO18626/request/address/physicalAddress.yaml'
additionalProperties: false

View File

@ -0,0 +1,11 @@
---
type: object
properties:
electronicAddressType:
$ref: '../../types/schemeValuePair.yaml'
electronicAddressData:
type: string
required:
- electronicAddressType
- electronicAddressData
additionalProperties: false

View File

@ -0,0 +1,24 @@
---
type: object
properties:
line1:
type:
- string
- "null"
line2:
type:
- string
- "null"
locality:
type:
- string
- "null"
postalCode:
type:
- string
- "null"
region:
$ref: '../../types/schemeValuePair.yaml'
country:
$ref: '../../types/schemeValuePair.yaml'
additionalProperties: false

View File

@ -0,0 +1,15 @@
---
type: object
properties:
agencyIdType:
type: string
enum:
- DNUCNI # Danish National Union Catalogue Non-ISIL Identifier
- ICOLC # https://icolc.net/consortia
- ISIL # ISO 15511
agencyIdValue:
type: string
required:
- agencyIdType
- agencyIdValue
additionalProperties: false

View File

@ -0,0 +1,13 @@
---
type: object
properties:
currencyCode:
type: string
description: Currency symbol as specified in ISO 4217 e.g. 'USD', 'EUR', 'GBP', 'AUD'
monetaryValue:
type: number
format: float
required:
- currencyCode
- monetaryValue
additionalProperties: false

View File

@ -0,0 +1,22 @@
---
type: object
properties:
errorType:
type: string
enum:
- UnsupportedActionType
- UnsupportedReasonForMessageType
- UnrecognisedDataElement
- UnrecognisedDataValue
- BadlyFormedMessage
description: |
The type of error that occurred.
* `UnsupportedActionType`: The supplying library cannot handle the received message because the Action in Requesting Agency Message is not supported Value: Action type which is not supported by the application
* `UnsupportedReasonForMessageType`: The requesting library cannot handle the received message because the ReasonforMessage in the Supplying Agency Message is not supported Value: ReasonforMessage type which is not supported by the application
* `UnrecognisedDataElement`: The supplying library or requesting library has received a data element it does not recognize Values: data element which is not recognized by the application
* `UnrecognisedDataValue`: The receiving system may respond with an error message if the content of a data element is not understandable or if the code or combination of codes is not recognized Value: The combination of the name of the data element and the element values or combination of elements values which is not recognized by the application
* `BadlyFormedMessage`: The structure of the incoming message did not conform to the protocol schema definition and could not be interpreted by the receiving system No value
required:
- errorType
additionalProperties: false

View File

@ -0,0 +1,6 @@
---
type: string
enum:
- OK
- ERROR
additionalProperties: false

View File

@ -0,0 +1,10 @@
---
type: string
enum:
- RequestResponse
- StatusRequestResponse
- RenewResponse
- CancelResponse
- StatusChange
- Notification
additionalProperties: false

View File

@ -0,0 +1,32 @@
---
type: object
properties:
supplyingAgencyId:
$ref: '../types/agencyId.yaml'
description: Identification of supplying library. Shall be provided except for RequestSubType = PatronRequest and TransferRequest
requestingAgencyId:
$ref: '../types/agencyId.yaml'
description: Identification of requesting library
consortialId:
$ref: '../types/agencyId.yaml'
description: Identification of the consortium with which the request is associated
multipleItemRequestId:
type:
- string
- "null"
description: Identification of MultipleItemRequest
timestamp:
type: string
format: date-time
description: Date and time of the transaction
requestingAgencyRequestId:
type: string
description: Requesting librarys request identification or number
requestingAgencyAuthentication:
$ref: '../requestHeader/requestingAgencyAuthentication.yaml'
description: Authentication in supplying library system of the requesting library
required:
- requestingAgencyId
- timestamp
- requestingAgencyRequestId
additionalProperties: false

View File

@ -0,0 +1,8 @@
---
type: string
enum:
- BookingRequest
- MultipleItemRequest
- PatronRequest
- TransferRequest
- SupplyingLibrarysChoice

View File

@ -0,0 +1,6 @@
---
type: string
enum:
- New
- Retry
- Reminder

View File

@ -0,0 +1,32 @@
---
type: object
properties:
supplyingAgencyId:
$ref: '../types/agencyId.yaml'
description: Identification of supplying library. Shall be provided except for RequestSub-Type = PatronRequest and TransferRequest
requestingAgencyId:
$ref: '../types/agencyId.yaml'
consortialId:
$ref: '../types/agencyId.yaml'
description: Identification of the consortium with which the request is associated
timestamp:
type: string
format: date-time
description: Date and time of the transaction
requestingAgencyRequestId:
type: string
description: Requesting librarys request identification or number
supplyingAgencyRequestId:
type:
- string
- "null"
description: Supplying librarys request identification or number
requestingAgencyAuthentication:
$ref: '../requestHeader/requestingAgencyAuthentication.yaml'
description: Authentication in supplying library system of the requesting library
required:
- supplyingAgencyId
- requestingAgencyId
- timestamp
- requestingAgencyRequestId
additionalProperties: false

View File

@ -0,0 +1,4 @@
---
type: string
xml:
attribute: true

View File

@ -0,0 +1,6 @@
---
type: string
enum:
- Copy
- Loan
- CopyOrLoan

View File

@ -0,0 +1,18 @@
---
type: string
enum:
- RequestReceived
- ExpectToSupply
- WillSupply
- Loaned
- Overdue
- Recalled
- RetryPossible
- Unfilled
- HoldReturn
- ReleaseHoldReturn
- CopyCompleted
- LoanCompleted
- CompletedWithoutReturn
- Cancelled
additionalProperties: false

View File

@ -0,0 +1,26 @@
---
type: object
properties:
supplyingAgencyId:
$ref: '../types/agencyId.yaml'
description: Identification of supplying library. Shall be provided except for RequestSub-Type = PatronRequest and TransferRequest
requestingAgencyId:
$ref: '../types/agencyId.yaml'
timestamp:
type: string
format: date-time
description: Date and time of the transaction
requestingAgencyRequestId:
type: string
description: Requesting librarys request identification or number
supplyingAgencyRequestId:
type:
- string
- "null"
description: Requesting librarys request identification or number
required:
- supplyingAgencyId
- requestingAgencyId
- timestamp
- requestingAgencyRequestId
additionalProperties: false

View File

@ -0,0 +1,5 @@
---
type: string
enum:
- Y
- N

View File

@ -0,0 +1,9 @@
---
type: string
enum:
- DB Schenker
- DHL
- Fedex
- PostNord AB
- UPS
description: An identified courier to be used if DeliveryMethod value = “Courier”. If the requesting library is willing and is able to accept any courier, then the requesting library shall not include this element in the message

View File

@ -0,0 +1,11 @@
---
type: string
enum:
- ArticleExchange
- Courier
- Email
- FTP
- Mail
- Odyssey
- URL
description: The service via which the requested item should be sent. If the requesting library is willing and is able to accept any delivery method, then the requesting library shall not include this element in the message

View File

@ -0,0 +1,25 @@
---
type: string
enum:
- CassetteTape
- CD
- CD-ROM
- Daisy-ROM
- DVD
- EPUB
- EPUB2
- EPUB3
- JPEG
- LargePrint
- LP
- Microform
- MP3
- Multimedia
- PaperCopy
- PDF
- Printed
- Tape
- TIFF
- UltraHD
- VHS
description: If the requesting library is willing and is able to accept any format, then the requesting library shall not include this element in the message

View File

@ -0,0 +1,9 @@
---
type: string
enum:
- LibraryUseOnly # Use in library only
- WatchLibraryUseOnly # Supervised use in library only
- NoReproduction # No reproduction
- SignatureRequired # Signature required
- SpecCollSupervReq # Special collections supervision required
description: Conditions for use of the item. Used when submitting a Request Retry, after the supplying library indicates there is a loan condition that shall be met

View File

@ -0,0 +1,14 @@
---
type: string
enum:
- BankTransfer
- CreditCard
- DebitCard
- EFTS
- IBS
- IIBS
- IFLAVoucher
- IFM
- LAPS
- Paypal
description: If the requesting library is willing and is able to accept any format, then the requesting library shall not include this element in the message

View File

@ -0,0 +1,10 @@
---
type: string
enum:
- Express
- Normal
- Rush
- SecondaryMail
- Standard
- Urgent
description: If the requesting library is willing and is able to accept any service level, then the requesting library shall not include this element in the message

View File

@ -0,0 +1,53 @@
---
/public/ill/iso18626:
post:
x-mojo-to: ILL::ISO18626#message
operationId: ISO18626message
tags:
- iso18626
summary: ISO18626 message
parameters:
- name: message
in: body
description: The XML object containing information about the new request
required: true
schema:
type: object
# $ref: "../swagger.yaml#/definitions/ISO18626request"
# $ref: "../swagger.yaml#/definitions/ISO18626requestingAgencyMessage"
produces:
- application/xml
consumes:
- application/xml
responses:
"201":
description: An ISO18626 confirmation message
# schema:
# $ref: "../swagger.yaml#/definitions/ISO18626requestConfirmation"
# $ref: "../swagger.yaml#/definitions/ISO18626requestingAgencyMessageConfirmation"
"400":
description: |
Bad request. Possible `error_code` attribute values:
* `invalid_query`
schema:
$ref: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
$ref: "../swagger.yaml#/definitions/error"
"404":
description: Patron not found
schema:
$ref: "../swagger.yaml#/definitions/error"
"500":
description: |
Internal server error. Possible `error_code` attribute values:
* `internal_server_error`
schema:
$ref: "../swagger.yaml#/definitions/error"
"503":
description: Under maintenance
schema:
$ref: "../swagger.yaml#/definitions/error"

View File

@ -120,6 +120,18 @@ definitions:
$ref: ./definitions/ill_batchstatus.yaml
ill_batchstatuses:
$ref: ./definitions/ill_batchstatuses.yaml
ISO18626request:
$ref: ./definitions/ISO18626/request.yaml
ISO18626requestingAgencyMessage:
$ref: ./definitions/ISO18626/requestingAgencyMessage.yaml
ISO18626supplyingAgencyMessage:
$ref: ./definitions/ISO18626/supplyingAgencyMessage.yaml
ISO18626requestConfirmation:
$ref: ./definitions/ISO18626/requestConfirmation.yaml
ISO18626requestingAgencyMessageConfirmation:
$ref: ./definitions/ISO18626/requestingAgencyMessageConfirmation.yaml
ISO18626supplyingAgencyMessageConfirmation:
$ref: ./definitions/ISO18626/supplyingAgencyMessageConfirmation.yaml
import_batch_profile:
$ref: ./definitions/import_batch_profile.yaml
import_batch_profiles:
@ -575,6 +587,8 @@ paths:
$ref: "./paths/biblios.yaml#/~1public~1biblios~1{biblio_id}"
"/public/checkouts/availability":
$ref: ./paths/checkouts.yaml#/~1public~1checkouts~1availability
"/public/ill/iso18626":
$ref: ./paths/ill_iso18626.yaml#/~1public~1ill~1iso18626
"/public/items":
$ref: "./paths/items.yaml#/~1public~1items"
"/public/biblios/{biblio_id}/items":
@ -867,6 +881,12 @@ parameters:
name: ill_batchstatus_code
required: true
type: string
iso18626_request_id_pp:
description: ISO18626 ILL request internal identifier
in: path
name: iso18626_request_id
required: true
type: integer
import_batch_profile_id_pp:
description: Internal profile identifier
in: path