Request Objects

This section discusses submitting data using Sierrra APIs. To PUT or POST data using the Sierra REST API, you must submit the data as a request object. You can:

Create a Patron Record

Use the PatronPatch object to create a new record.

Create or Update an Item Record

Use the ItemPatch object to create or update an item record. Click the links below to view the ItemPatch properties and an example.

POST Data Describing a New Acquisition

Use the AcquisitionOrderPost object to add bib and order records to the Sierra system for a new acquisition.

See The Acquisitions API Mapping Table for information on how the API loads records for acquistions.

The AcquisitionOrderPost object includes the following properties:

order

object

The order property contains an AcquisitionOrder object that provides order information and MARC records in application/marc-json, application/marc-in-json, or application/marc-xml format.

marcContentType

string

The format in which the MARC content is encoded, that is, application/marc-json, application/marc-in-json, or application/marc-xml.

Example:

"marcContentType": "application/marc-json"

marc

object

The MARC data for bibliographic and order record creation.

The maximum length is 100,000 bytes per record.

POST a New Hold

Use the PatronHoldPost object to place a new hold request. For example:

The PatronHoldPost object includes the following properties:

recordType

string

The record type code, that is, bib (b), item (i), or volume (j), associated with the hold.

Example:

"recordType": "i"

recordNumber

integer

The held record number.

Example:

"recordNumber": 7916916

pickupLocation

string

The pickup location code.

Example:

"pickupLocation": "21"

neededBy

string (optional)

The date after which the held item is no longer needed, in ISO 8601 format (yyyy-MM-dd).

Example:

"neededBy": "2015-08-31"

numberOfCopies

integer (optional)

The number of copies to hold.

Example:

"numberOfCopies": 1

note

string (optional)

Informational note related to the hold.

Example:

"note": [
   "book needed in location 3"
]

POST Validate Patron by Barcode and PIN

Use the PatronValidation object to validate a patron using the barcode and PIN. For example:

  {
    "barcode": "21197300685699",
    "pin": "12345"
  }

The PatronValidation object includes the following properties:

barcode

string

The patron's barcode.

pin

string

The patron's pin.

caseSensitivity

boolean (optional

Case sensitivity

Example:

  {
    "barcode": "G123469",
    "pin": "1234"
    "caseSensitivity": false
  }

POST Validate User by Sierra Login and Password

Use the user object to validate a user with the username and password.

userName

A text string defining the username.

string

Example:

"userName": "iii"

password

A text string defining the password.

string

Example:

"password": "test1"

PUT New Data to a Hold

Use the PatronHoldPut object to modify a hold. For example:

{
  "pickupLocation": "21",
  "freeze": false
}

The PatronHoldPut object includes the following properties:

pickupLocation

string (optional)

The pickup location code.

Example:

"pickupLocation": "21"

freeze

boolean (optional)

Whether the hold should be frozen (suspended).

Example:

"freeze": false

PUT New Data to a Patron Record

Use the PatronPatch object to update a Patron record.

The PatronPatch object includes the following properties:

emails

array (optional)

A list of strings, which are the patron's email addresses.

Example:

"emails": [
  "parker@example.com"
]

names

array (returned only if requested)

A list of strings, which are the patron's names.

Example:

"names": [
  "Examplestein, GLORIA",
  "Examplestein-Einem, GLORIA"
]

addresses

array (returned only if requested)

Contains the patron's addresses.

phones

array

(Returned only if requested)

The phones property contains a list of Phone objects, which contain the patron's telephone numbers.

pin

string

The patron's Personal Identification Number. This field is validated and must contain both characters and numbers.

Example:

"pin": "12345test"

patronType

integer (optional)

The patron type code. Use /v6/patrons/metadata to extract valid data for this field.

Example:

“patronType” : 2

barcodes

array

The patron's barcode(s).

Example:

"barcodes": [
"555-1234",
"555-2312"
]

expirationDate

string

The expiration date of the patron’s borrowing privileges in ISO 8601 (yyyy-MM-dd).

Example:

"expirationDate": "2020-05-24"

birthDate

string

The patron’s birthday in ISO 8601 (yyy-MM-dd).

Example:

"birthDate": "1967-01-29"

patronCodes

array

List of patron codes – pcode1, pcode2, pcode3, and pcode4. Use /v6/patrons/metadata to extract valid data for this field.

blockInfo

array

Manual block information.

Example:

"blockInfo": {
"code": "p"
}

uniqueIds

array

The patron’s uniqueIds.

Example:

"uniqueIds": [
"201617200",
"201617201",
"pcode3": 0 ]

pMessage

string

Library-defined patron message. Use /v6/patrons/metadata to extract valid data for this field.

Example:

"pMessage": "e"

homeLibraryCode

string

Location code for the patron’s home library. Use /v6/patrons/metadata to extract valid data for this field.

Example:

"homeLibraryCode": "9Star"

langPref

string

Language code that specifies in which the system can generate notices for patrons. Use /v6/patrons/metadata to extract valid data for this field.

Example:

"langPref" : "hun"

FixedFields

array

The fixed length fields from the patron record. The patron ID must be specified. The following fixed-length fields are available:

“43” : expirationDate

"44" : pcode1 (library defined)

"45" : pcode2 (library defined)

"46" : pcode3 (library defined)

"47" : patronType

"51" : birthDate

"56" : mblock

"126" : pcode4 (library defined)

"268" : notice preference

varFields

array

Variable length fields. Currently it is possible to:

- add any number of this field type

- create the following variable length fields:

“x” : note

“m” : message

“y” : patron image (PAT IMAGE)

POST Add a Manual Fine to a Patron Record

Use the Charge object to add a manual fine to a patron's record.

PUT Pay Multiple Patron Fines

Use the bulkPayments object to pay multiple patrons' fines in batch. Select the links below to view the bulkPayments properties and an example.