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
Property | Description |
---|---|
bibId | ID of the bibliographic record. Lowercase alpha-numeric string, maximum 32 characters. |
Request parameters
Property | Type | Required | Description |
---|---|---|---|
itemInfo | [ ] | Yes | list of itemInfo (maximum count 100) |
ItemInfo
Property | Type | Required | Description | FOLIO MAPPING |
---|---|---|---|---|
itemId | String | yes | Lowercase alphanumeric string, maximum 32 characters | Item.id/Item.itemIdentifier |
agencyCode | String | Yes | 5 character lowercase alphanumeric | from mod-inn-reach settings |
centralItemType | Integer | Yes | Valid values provided by central (central-specific) | MaterialTypeMapping.centralItemType |
locationKey | String | Yes | Lowercase alphanumeric, maximum 5 characters. Validated against keys sent via Post Locations endpoints | LocationMapping.innReachLocation |
itemCircStatus | String | Yes | Available/Not Available/On Loan/Non-Lendable | Item.status |
holdCount | Integer | No | Item hold count, maximum 99 | |
dueDateTime | Integer | No | Epoch UNIX time stamp, for example: 1544466568 | |
callNumber | String | No | Maximum 128 characters | Item.effectiveCallNumberComponents ? |
volumeDesignation | String | No | Maximum 32 characters | Item.volume |
copyNumber | Integer | Conditional | Conditional Only if nonzero | Item.copyNumber |
marc856URI | String | Conditional | Maximum 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. | |
marc856PublicNote | String | Conditional | Maximum 64 characters. Include only if sending marc856URI for this item. | |
itemNote | String | No | Maximum 256 characters | |
suppress | String | No | ASCII 'y' or 'n' only. Default: n |
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
Property | Description |
---|---|
bibId | ID of the bibliographic record. Lowercase alpha-numeric string, maximum 32 characters. |
Request parameters
Property | Type | Required | Description | FOLIO MAPPING |
---|---|---|---|---|
marc21BibFormat | String | yes | Currently supports "ISO2709" | |
marc21BibData | String | Yes | Base 64 encoded MARC data (maximum 99999 bytes before base 64 encoding).
| encoded b64 MARC record from mod-source-record-storage |
titleHoldCount | Integer | Yes | Number of title level holds | |
itemCount | Integer | Yes | Number of items linked to this bib | GET mod-inventory-storage/item-storage totalRecords of items for specific instance ? |
suppress | String | No | 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 |
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
Property | Description |
---|---|
localCode | Unique code that represents the local server. |
bibId | The ID of the bibliographic record. |
Response content
Property | Type | Required |
---|---|---|
status | String | Yes |
reason | String | Yes |
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
Property | Description |
---|---|
localCode | Unique code that represents the local server. |
bibId | The ID of the bibliographic record. |
itemId | The ID of the item. |
Response content
Property | Type | Required |
---|---|---|
status | String | Yes |
reason | String | Yes |
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" } }