SPIKE: [MODINREACH-79] Record Contribution: Analyze data required for D2IR contribution

MODINREACH-79 - Getting issue details... STATUS

D2IR Record contribution API data endpoints

Contribution

Contribute Batch Items

Add and modify item records.

If one or more items submitted for update with this method already exist in the central
database, but do not belong to the bib specified in the URL, then the entire batch update will
fail, with a status message of statmsg=172:<bibId>:One or more items in this batch are
not linked to the specified local bib.

POST/innreach/v2/contribution/items/<bibId>

URL parameters

PropertyDescriptionFOLIO MAPPING
bibIdID of the bibliographic record. Lowercase alpha-numeric string, maximum 32 characters.instance.hrid Instance.id (stripped-down)

Request parameters

PropertyTypeRequiredDescription
itemInfo[ ]Yeslist of itemInfo (maximum count 100)

ItemInfo

PropertyTypeRequiredDescriptionFOLIO MAPPING
itemIdStringyesLowercase alphanumeric string, maximum 32 charactersitem.hrid Item.id (stripped-down)
agencyCodeStringYes5 character lowercase alphanumericfrom mod-inn-reach settings
centralItemTypeIntegerYesValid values provided by central (central-specific)

MaterialTypeMapping.centralItemType

locationKeyStringYes

Lowercase alphanumeric, maximum 5 characters.

Validated against keys sent via Post Locations endpoints

LocationMapping.innReachLocation
itemCircStatusStringYesAvailable/Not Available/On Loan/Non-Lendable

MODINREACH-123 - Getting issue details... STATUS

  • When evaluated for contribution, items with an item status of Available but no "Non-lendable" effective loan type, location, or material type should receive an itemCircStatus of "Available"
  • When evaluated for contribution, items with an item status of "In transit" but no "Non-lendable" effective loan type, location, or material type OR other pending requests should receive an itemCircStatus of "Available"
  • When evaluated for contribution, items with an item status of "Paged", "In transit", "Declared lost", "Withdrawn", "Awaiting pickup", "Aged to lost", or "Long missing", or any other status specified in the "Not available" statuses setting described in UIINREACH-33, but no "Non-lendable" effective loan type, location, or material type should receive an itemCircStatus of "Not Available"
  • If an item has one or more effective loan types, locations, or material types specified in the "Non-lendable" settings described in UIINREACH-33, the itemCircStatus of the item should be set to Non-Lendable for INN-Reach contribution
holdCountIntegerNoItem hold count, maximum 99
dueDateTimeIntegerNoEpoch UNIX time stamp, for example: 1544466568
callNumberStringNoMaximum 128 charactersItem.effectiveCallNumberComponents ?
volumeDesignationStringNoMaximum 32 charactersItem.volume
copyNumberIntegerConditionalConditional Only if nonzeroItem.copyNumber
marc856URIStringConditionalMaximum 512 bytes (valid URL format)
DO NOT include if there is a marc856URI in the contributed bib record that applies to this Item. That is, include only if there is an 856 URI that applies specifically to this item.

marc856PublicNoteStringConditionalMaximum 64 characters. Include only if sending marc856URI for this item.
itemNoteStringNoMaximum 256 characters
suppressStringNoASCII 'y' or 'n' only. Default: n
  • n (no, default)
    • Record is not excluded from contribution by criteria defined in MODINREACH-42
  • y (yes)
    • Record has a statistical code specified in criteria defined in MODINREACH-42 that indicates it should be contributed but suppressed from central discovery

Contribute Bib

Adds and modifies bib records. The bibId can be used as the local system's unique bib identifier. Local sites
that have nonconforming record identifiers will need to have those identifiers converted to match the D2IR
bibId restrictions described in the table below. The submitted bib ID will become the unique INN-Reach cata-
log bib identifier.

Multiple agencies can share the same bib. When this occurs, the same bibId must be
used for the central reference to this bib by all the sharing agencies. The bib should be
contributed only once, regardless of the number of sharing agencies. The bib’s agency
affiliations are reflected on the central by its contributed holdings, as separate items will be
contributed by the various agencies.

POST/innreach/v2/contribution/bib/<bibId>

URL parameters

PropertyDescriptionFOLIO MAPPING
bibIdID of the bibliographic record. Lowercase alpha-numeric string, maximum 32 characters.instance.hrid Instance.id (stripped-down)

Request parameters

PropertyTypeRequiredDescriptionFOLIO MAPPING
marc21BibFormatStringyesCurrently supports "ISO2709""ISO2709"
marc21BibDataStringYes

Base 64 encoded MARC data (maximum 99999 bytes before base 64 encoding).

  • Only standard MARC fields accepted
  • Must include 008 and 245 fields
  • Omit 9XX fields
  • Strip data with local meaning only or that you do not want to expose
encoded b64 MARC record from mod-source-record-storage
titleHoldCountIntegerYesNumber of title level holds0 (title level holds not currently supported in FOLIO)
itemCountIntegerYes

Number of items linked to this bib

(max 99, count of items associated with the FOLIO instance record that are contributed, initial value should be 0)

suppressStringNo

ASCII y, n, or g; "g" means display the resource in the discovery layer as having been provided by the consortium, not by the individual site.

Default: n

  • n (no, default)
    • Record is not excluded from contribution by criteria defined in MODINREACH-42
  • y (yes)
    • Record has a statistical code specified in criteria defined in MODINREACH-42 that indicates it should be contributed but suppressed from central discovery
  • g (display as owned by system, not by site)
    • Record has a statistical code specified in criteria defined in MODINREACH-42 that indicates it should be contributed as consortia-owned

Verification

Look Up Bib by bibId

This method allows a client to look up a bibliographic record by its ID.
The central returns the following status codes:

  • 200 - The record was found, and the corresponding central record has been loaded.
  • 404 - The record was not found in the "z" section of the i-file index.
  • 500 - An error exists in the milproto format, or a system error occurred.
GET/innreach/v2/local/<localCode>/bib/<bibId>

URL parameters

PropertyDescriptionFOLIO MAPPING
localCodeUnique code that represents the local server.CentralServer.localServerCode
bibIdThe ID of the bibliographic record.instance.hrid Instance.id (stripped-down)

Response content

PropertyTypeRequired
statusStringYes
reasonStringYes
errors[ ]Yes

Sample Success Response:

{
"status":"ok",
"reason":"success",
"errors":[],
}

Sample Failure Response:

{
"status":"failed",
"reason":"Record not found",
"errors":[],
}

Look Up Bib by bibId and itemId

This method allows a client to look up a bibliographic record by its bibID and itemId.
The central returns the following status codes:

  • 200 - The item was found, and the corresponding central record has been loaded.
  • 404 - The item was not found by either the bibId or itemId.
  • 500 - The item was found but belongs to a different bibliographic record than the one specified by the bibId.
  • 500 - An error exists in the milproto format, or a system error occurred.
GET/innreach/v2/local/<localCode>/bib/<bibId>/item/<itemId>

URL parameters

PropertyDescriptionFOLIO MAPPING
localCodeUnique code that represents the local server.CentralServer.localServerCode
bibIdThe ID of the bibliographic record.Instance.id (stripped-down)
itemIdThe ID of the item.Item.id (stripped-down)

Response content

PropertyTypeRequired
statusStringYes
reasonStringYes
errors[ ]Yes

Sample Success Response:

{
"status":"ok",
"reason":"success",
"errors":[],
}

Sample Failure Response:

{
"status":"failed",
"reason":"Record not found",
"errors":[],
}

Sample Failure Response:

{
"status":"failed",
"reason":"Server internal error",
"errors": {
	"type": "error",
	"name": "Internal error",
	"reason": "Failed to load central record"
  }
}