APIs for My Account, Search, and Library Card Registration Intermediate, Polaris, Public Libraries Presented by Mark W. Jarrell Online Applications Developer Richland Library Columbia, SC
Overview Intro to APIs (what they are and how to use them) Case study on RichlandLibrary.com Statistics of use by customers (number of API-based renewals, holds, etc.) vs. traditional methods Getting You Started (Sharing some code) Demo (Using shared code)
What’s an API? Why use them?
What’s an API? Why use them? “Application Programming Interface” In our context, basically a way to interact with Polaris without using a tool delivered from Innovative. Examples of things you might build to consume the API: Custom website Mobile app Tool that searches multiple Polaris instances at once Potential Benefits Complete control over the information presented to the user Responsive design for mobile devices No need to hack the PowerPAC code Data mashups with other items, data, & services from your library that are not stored in Polaris (bento box approach)
Case Study RichlandLibrary.com
Registering For A Card API Methods: PatronRegistrationCreate
My Account login, account info, checkouts, renewal, fine payment API Methods: PatronValidate, PatronItemsOutGet, PatronBasicDataGet, PatronUpdate, ItemRenew, PatronAccountGet, PatronAccountPay
My Account autocomplete searches, holds, My Lists (coming soon) API Methods: PatronHoldRequestsGet, HoldRequestCancel, BibSearch, OrganizationsGet, PatronSearch, HoldRequestCreate
My Account bento box style searching
Case Study API Methods Currently Used See document titled “PAPI Service 5.0 SP3” from Polaris Developer Network AuthenticateStaffUser – Required for certain protected methods BibGet BibSearch – Search for items (Lots of options here) BibHoldingsGet HoldRequestCancel HoldRequestCreate HoldRequestReply ItemRenew – Renew customer items OrganizationsGet – Find their home branch library PatronAccountGet PatronAccountPay – Pay off fines PatronHoldRequestsGet PatronItemsOutGet – List the customer’s checked out items PatronPreferencesGet – HTML vs. text-only s, etc. PatronRegistrationCreate – Registers new library customers PatronUpdate – Change PIN, etc. PatronValidate … Also “My Lists” Methods (Brand new in 5.0)
Statistics – RichlandLibrary.com 70,000 renewals via API per month 49% of total renewals 50,000 holds via API per month (API & PAC combined) 81% of total hold requests 330 fines paid via API per month 11% of total fines paid 200 library card registrations via API per month 14% of total new cards
How do I get started? Work w/ your Polaris Site Manager to get access to the Polaris Developer Network API documentation, forum, sandbox environment access You should receive an API Access ID and API Access Key for use with your systems. Make note of those. Some of the methods in the API (referred to as “protected”) can be used only with a staff-level account so… Create a special account & password on your network that is just a basic domain user. Create a matching account & password in Polaris that has the same permissions as a basic circulation account. Make note of the Polaris User ID number.
DEMO (Using Polaris API PHP Class)
RICHLANDLIBRARY.COM Mark W. Jarrell Online Applications Developer Richland Library (803) Twitter, Drupal: attheshow Questions?