Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

References

...

Additional:

...

  1. Alma operator-assigned blocks

  2. System-assigned blocks (limits)

  3. Overdue blocks due to an overdue item (punitive blocks)

Active patron blocks can be retrieved using the Alma User API > Get user details > user_blocks endpoint. Details can be found here.

...

block_type: code of user block type

...

Check for Patron Blocks

Endpoint:

GET /almaws/v1/users/{user_id}

Key Field:

  • user_block: Provides details about active blocks on the user's account.

Example Request:

Code Block
http
GET https://api-na.hosted.exlibrisgroup.com/almaws/v1/users/12345678?apikey={your_api_key}

Example Response:

Code Block
json
{
  "primary_id": "12345678",
  "first_name": "John",
  "last_name": "Doe",
  "user_block": [
    {
      "block_type": "General",
      "description": "User has overdue items",
      "status": "Active"
    }
  ],
  "user_status": "Active"
}

Details can be found here.

...

Place Requests

Place request at lending agency

Before placing DCB request at the in Alma as a lending agency, a virtual patron needs to be found or created in Alma.

...

A virtual patron in Alma can be created by using the Rest user Create a User API. The mandatory fields for this API are as follows:

Endpoint

POST /almaws/v1/users

The minimum required fields are primary_id, first_name, last_name, and user_group.

  • record_type:Public

  • primary_id: The primary identifier of the userAccount

  • first_name: User's first name.

  • last_name: User's last name.

  • account_type: External

  • Useruser_group(optional): Used in fulfillment policies

  • last_name: Used in displays and search

  • (which one to choose or DCB should create (question))

For more details on creating a user, refer to Create user

...

Search for a user in Alma

Retrieve User API allows to look up a user by their primary ID, barcode, or email address.

Endpoint

GET /almaws/v1/users/{user_id}

Parameters

  1. user_id: The user's unique identifier in Alma. This can be their primary ID, barcode, or email address.

...

Creating an item-level request in Alma

Create a Request API allows to create an Item-level requests can be created using the Rest User request API. Key parameters and mandatory fields include:

Parameters:

...

Bib/Holding/Item ID: The bibliographic, holding, or item ID.

...

Endpoint

POST /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items/{item_pid}/requests

Required Parameters

  1. mms_id: The unique identifier of the bibliographic record.

  2. holding_id: The ID of the holding record associated with the item.

  3. item_pid: The unique identifier of the physical item.

Key parameters and mandatory fields include:

  • user_primary_id: The ID of the requesting user.

  • Mandatory Fields:

    request_type: HOLD

  • pickup_location_type: LIBRARY

  • pickup_location_library: The pickup location library code. (Note: Alma does not provide a direct API endpoint to create pickup locations dynamically. Pickup locations are defined and configured in the Alma interface by library administrators.)

  • material_type (optional): Used in fulfillment policies.

Hold request example

Code Block
http
POST https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/123456789/holdings/987654321/items/567890123/requests?apikey={your_api_key}
{
  "user_primary_id": "patron123",
  "request_type": "HOLD",
  "pickup_location_type": "LIBRARY",
  "pickup_location_library": "Main Library",
  "comment": "Requesting for research purposes."
}

For more details on creating a request for an item, refer to Create request for an Item

...

A virtual item in Alma can be created by using the following APIs:

  1. Create an Item API allows to add an item to a specific bibliographic record and holding

  • Mandatory Fields:

    • The actual record: XML string describing the record

    • record_format: Default is marc21

    • suppress_from_publishing: default is true

  1. Create holding record

Endpoint

POST /almaws/v1/bibs/{mms_id}/holdings/{holding_id}/items

Required Parameters:

Parameters:

  • mms_id:

    Bib record ID
  • Mandatory Fields:

    • The actual record: XML string describing the record

    • suppress_from_publishing: tbd

Create Item

  • The unique identifier of the bibliographic record.

  • holding_id: The ID of the holding record where the item will be added.

Key Fields:

  • Barcode

  • physical_material_type

  • policy: Interlibrary Loan

  • location?

...

Creating an item-level request

Item-level requests can be created using the Rest User Request API. Key parameters and mandatory fields include:

  • Parameters:

    • Bib/Holding/Item ID: The bibliographic, holding, or item ID.

    • User_id: The ID of the requesting user.

  • Mandatory Fields:

    • request_type: HOLD

    • pickup_location_type: LIBRARY

    • pickup_location_library: The pickup location library code.

    • material_type (optional): Used in fulfillment policies.

...

  • : The item's shelving location

  • library: The library where the item is located.

Example request:

Code Block
http
POST https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/123456789/holdings/987654321/items?apikey={your_api_key}
Content-Type: application/json

{
  "item_data": {
    "barcode": "1234567890123",
    "policy": "Standard Loan",
    "library": {
      "value": "MAIN"
    },
    "location": {
      "value": "GEN"
    },
    "physical_material_type": {
      "value": "BOOK"
    },
    "description": "Hardcover edition",
    "enumeration_a": "Vol. 1"
  }
}

Notes:

  • Barcodes must be unique across Alma. If the barcode already exists, the request will fail

  • Library and location codes must match valid configurations in Alma.

  • The mms_id and holding_id should correspond to existing records.

For more details on creating an item, refer to Create Item.

...

  1. Create a Bibliographic Record API

API Endpoint

POST /almaws/v1/bibs

Key Fields:

  • The MARC XML structure should follow the standard MARC21 format.

  • suppress_from_publishing: default is true

For more details on creating a bibliographic record, refer to Create record

...

  1. Create a Holding Record API

API Endpoint

POST /almaws/v1/bibs/{mms_id}/holdings

Parameters:

  • mms_id: Bib record ID

Key Fields:

  • The actual record: XML string describing the record

    • suppress_from_publishing: tbd

For more details on creating a holding record, refer to Create holding record

...

Circulate Requests

Circulation tracking and reaction (lending)

Lifecycle

Given

When

Then

Dispatched by Supplying Library

Trigger: Manual action in Alma - Scan in items

  • DCB Patron Request exists in status REQUEST_PLACED_AT_BORROWING_AGENCY

DCB Patron Request Workflow matches corresponding request details at

  • Alma Supplying Library:

    • Request status: In progress (Transit item)

    • Item status: Transit

Trigger DCB HandleSupplierInTransit event to change

  • Borrowing or Pickup Library

    • transaction state = OPEN

  • DCB

    • PatronRequest.PICKUP_TRANSIT

    • HostLmsItem.ITEM_PICKUP_TRANSIT

Received at Pickup Library

  • DCB Patron Request exists

    • with corresponding HostLmsItem.ITEM_PICKUP_TRANSIT

DCB Patron Request Workflow matches corresponding request details at

  • Pickup Library

    • transaction state = AWAITING_PICKUP

Trigger HandleBorrowerItemOnHoldShelf event to change

  • Borrowing or Pickup Library

    • transaction state =AWAITING_PICKUP

  • DCB

    • PatronRequest.READY_FOR_PICKUP

    • HostLmsItem.ITEM_ON_HOLDSHELF

  • Alma Supplying Library(question) :

    • On hold shelf / Ready for pickup

Item Checked Out to Patron at Pickup Library

  • DCB Patron Request exists

    • with corresponding HostLmsItem.ITEM_ON_HOLDSHELF

DCB Patron Request Workflow matches corresponding request details at

  • Pickup Library

    • transaction state = ITEM_CHECKED_OUT

Trigger HandleBorrowerItemLoaned event to change

  • Borrowing or Supplying Library

    • transaction state = ITEM_CHECKED_OUT

  • DCB

    • PatronRequest.LOANED

    • HostLmsItem.ITEM_LOANED

  • Alma Supplying Library:

    • Request status: In progressCompleted

    • Item status: Loan

    • Loan is createdstatus: Active, the item is checked out to a patron.

Item Returned by Borrowing Patron

  • DCB Patron Request exists in status

    • with corresponding HostLmsItem.ITEM_LOANED

DCB Patron Request Workflow matches corresponding request details at either

  • Pickup or Borrowing Library

    • transaction state = ITEM_CHECKED_IN

Trigger HandleBorrowerRequestReturnTransit event to change at

  • Borrowing or Pickup Library

    • transaction state = ITEM_CHECKED_IN

    • loan status = Closed

    • virtual item status = In transit

  • DCB

    • PatronRequest.RET-TRANSIT

    • HostLmsItem.ITEM_RETURNED

  • Alma Supplying Library:

    • no changes?

Received Back at Lending Agency

Trigger: Manual action in Alma - Return items

  • DCB Patron Request exists in status

    • with corresponding HostLmsItem.ITEM_RETURNED

DCB Patron Request Workflow matches corresponding request details at either

  • Alma Supplying Library

    Request status: Closed?

    • Item status: Item in place /Transit for Reshelving?

    • Loan is closedstatus:

      • In Transit: If the item is returned to a non-owning branch and is being sent back to its home location

      • Returned: The item has been returned to the library and is no longer checked out.

Trigger HandleBorrowerRequestReturnTransit event to change

  • Borrowing or Pickup Library

    • transaction state = CLOSED

  • DCB

    • PatronRequest.COMPLETED

    • HostLmsItem.ITEM_AVAILABLE

    • Local status on supplier request changed to AVAILABLE

Workflow diagram

...

1. Placing the request

When a patron places a DCB request, it goes through initial checks and follows the sequence of status transitions (more details https://openlibraryfoundation.atlassian.net/wiki/x/IYAZqw) :

DCB Status Transition:

  • SUBMITTED_TO_DCB,

  • PATRON_VERIFIED,

  • RESOLVED,

  • REQUEST_PLACED_AT_SUPPLYING_AGENCY,

  • CONFIRMED,

  • REQUEST_PLACED_AT_BORROWING_AGENCY

Alma status updates:

  • Request type: Patron physical item request

  • Process status: New (Not started)

  • Item Status: "Item in place" (indicating the item is currently available on the shelf)

2. Item is sent out to the borrowing agency

Alma updates:

  • Request status: In progress

  • Item status: Transit

DCB status transition:

  • Transaction status changes on PICKUP_TRANSIT

3. Item received in borrowing agency:

DCB status transition:

  • Transaction status changes to RECEIVED_AT_PICKUP > READY_FOR_PICKUP

Alma updates:

  • No status updates

4. Item is loaned in borrowing agency:

DCB status transition:

  • Transaction status changes to LOANED

  • A loan is created in Alma.

Alma status updates:

  • Request status: In progress

  • Item status: Loan

  • Loan is created

Alma loan creation

To create the loan in Alma, the Rest Item Loan API is used with the following parameters and fields:

Parameters:

...

Alma loan creation

Create Loan API allows to create a loan record for a patron.

API Endpoint

POST /almaws/v1/loans

Parameters:

...

  • item_barcode: The barcode of the item being loaned.

  • patron_id: The ID of the requesting user.

  • item_pid or item_barcode: Item ID or barcode must be supplied

...

  • the patron who is borrowing the item.

 Key Fields:

  • circ_desk: Circulation desk code (DCB parameter?)

  • library: Library code responsible for the loan (lending agency?)

  • request_id

  • due_date (optional)

  • loan_policy (optional)

Example Request

Basic Loan Request:

Code Block
http
POST https://api-na.hosted.exlibrisgroup.com/almaws/v1/loans?apikey={your_api_key}
Content-Type: application/json

{
  "item_barcode": "1234567890123",
  "patron_id": "987654321",
  "due_date": "2024-12-18"
}

Loan with Policy:

Code Block
http
POST https://api-na.hosted.exlibrisgroup.com/almaws/v1/loans?apikey={your_api_key}
Content-Type: application/json

{
  "item_barcode": "1234567890123",
  "patron_id": "987654321",
  "loan_policy": {
    "value": "Regular"
  }
}

For more details on creating a loan, refer to Create user loan

5. Item returned at the borrowing library

DCB status transition:

...

Alma updates:

  • No status updates

6. Item returned to the lending library (scan item at lending library):

Alma status updates:

  • Request status: Closed?

  • Item status: Item in place

  •  Loan is closed

DCB status transition:

  • Transaction status changes to COMPLETED          

Circulation tracking and reaction (borrowing)

tbd

Finalization

In Alma, request cancellation can be performed automatically by REST API, manually in Alma by a staff member.

Cancel user request by API

API key parameters and mandatory fields include:

  • Parameters:

    • user_id: The ID of the requesting user.

    • request_id: A unique identifier of the request that should be canceled.

  • Mandatory Fields:

    • reason: CancelledAtPatronRequest

For more details on cancellation request by API can be found here

Cancel user request manually in Alma

...

Circulation tracking and reaction (borrowing)

tbd

Finalization

Common Request Closure Statuses in Alma

  1. Completed. The request has been successfully fulfilled.

  2. Canceled. The request has been canceled, either manually by a user/staff member or automatically by the system.

  3. Expired. The request has expired without being fulfilled, based on library-defined expiration rules.

  4. Rejected. The request was rejected by library staff or the system due to eligibility, policy, or technical reasons.

  5. Failed. The request could not be fulfilled due to a failure in the process.

  6. Hold Shelf Expired. The item was placed on the hold shelf but was not picked up within the designated time frame.

Retrieving Request Closure Status via API

Endpoint:

GET /almaws/v1/bibs/{mms_id}/requests

Example Request:

Code Block
http
GET https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/123456789/requests?apikey={your_api_key}

Key Fields in Response:

  • request_status: Shows the current or final status of the request.

  • expiry_date: Indicates the expiration date, if applicable.

  • pickup_location: Provides the location where the item was to be picked up.

Example Response:

Code Block
json

{
  "total_record_count": 2,
  "requests": [
    {
      "request_id": "12345",
      "request_status": "Completed",
      "expiry_date": "2024-11-30T23:59:00Z",
      "pickup_location": "Main Library"
    },
    {
      "request_id": "67890",
      "request_status": "Canceled",
      "expiry_date": null,
      "pickup_location": "Science Library"
    }
  ]
}

Cancel a request in Alma via the API

Endpoint:

DELETE /almaws/v1/bibs/{mms_id}/requests/{request_id}

Required Parameters

  1. mms_id: The bibliographic record ID of the item for which the request was made.

  2. request_id: The unique identifier of the request to be canceled.

Required Parameters

  1. mms_id: The bibliographic record ID of the item for which the request was made.

  2. request_id: The unique identifier of the request to be canceled.

Example Request

Code Block
http
DELETE https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/123456789/requests/987654321?reason=User%20no%20longer%20needs%20item&apikey={your_api_key}

Default request-cancellation reasons