Use PAPI to update a patron's primary and secondary address

Hello All,

I am trying to use the papi api to update student addresses. Students have both a home address and a school address attached to their record. I am trying to use the PatronRegistrationUpdate Version 2 and PatronRegistrationCreate Version 2 endpoints to achieve this as needed. Based on the documentation it seems possible, but I cannot get the address to set at all with the update, and can only seem to set one address with the create.

The endpoint works for all the non-address settings, so I am confident it’s working outside of the address data. Below is the XML I am sending in the body of my request. Note, I’ve redacted identifying patron information with “XXXXX” and all other fields besides address appear to set. I am getting a success code as well even though the address isn’t set(PAPIErrorCode 0).

Please advise! Thank you!

Request URL (patch): https://jaxpl-training.polarislibrary.com/papiservice/REST/public/v1/1033/100/3/patron/XXXXXX?ignoresa=true

Request body:

<?xml version="1.0" encoding="UTF-8"?>
<PatronRegistrationDataV2>
	<Barcode>XXXXX</Barcode>
	<Birthdate>2006-07-10</Birthdate>
	<DeliveryOptionID>2</DeliveryOptionID>
	<EmailAddress>XXXXXX</EmailAddress>
	<EmailFormat>2</EmailFormat>
	<ExpirationDate>2025-08-10</ExpirationDate>
	<LogonBranchID>3</LogonBranchID>
	<LogonUserID>1</LogonUserID>
	<LogonWorkstationID>1</LogonWorkstationID>
	<NameFirst>XXXX</NameFirst>
	<NameLast>XXXX</NameLast>
	<Password>XXXX</Password>
	<Password2>XXXX</Password2>
	<PatronBranchID>3</PatronBranchID>
	<PatronCode>6</PatronCode>
	<PhoneVoice1></PhoneVoice1>
	<ReadingListFlag>false</ReadingListFlag>
	<AddrCheckDate>2025-08-10</AddrCheckDate>
	<Addresses>
		<PatronRegistrationAddressDataV2>
			<AddressTypeID>1</AddressTypeID>
			<City>JACKSONVILLE</City>
			<CountryID>1</CountryID>
			<County>DUVAL</County>
			<FreeTextLabel>Mailing</FreeTextLabel>
			<PostalCode>32210</PostalCode>
			<State>FL</State>
			<StreetOne>XXXXXXX</StreetOne>
		</PatronRegistrationAddressDataV2>
		<PatronRegistrationAddressDataV2>
			<AddressTypeID>1</AddressTypeID>
			<City>JACKSONVILLE</City>
			<CountryID>1</CountryID>
			<County>DUVAL</County>
			<FreeTextLabel>School (K-12 Student Only)</FreeTextLabel>
			<PostalCode>32205</PostalCode>
			<State>FL</State>
			<StreetOne>Riverside High School - 0331</StreetOne>
			<StreetTwo>1200 S McDuff Ave</StreetTwo>
		</PatronRegistrationAddressDataV2>
	</Addresses>
</PatronRegistrationDataV2>

Hi @somaliajamall ,

I haven’t reviewed this recently, but from what I recall, the issue with address updates might be linked to the PowerPAC settings. In my previous tests, the address update only took effect if the following setting was enabled: Profiles > PAC > Patron Access Options > Contact Info > Patron address set to “Patron can change without verification.”

Important: Enabling this setting opens the address fields in PowerPAC, allowing patrons to make unverified changes through “My Account.” I recommend testing this setting in a controlled environment, as it may grant unintended access.

Although I haven’t finalized my project, it seems that for us to enable this feature effectively, we might need to customize the PowerPAC files to hide the address fields in “My Account.” This way, any changes would go through a proper validation process.

Hope this helps!

Updated with visual of admin setting referenced.

1 Like

This worked!! Thank you so much!

Warmly,

Somalia Jamall (Jacksonville Public Library)

Glad this helped! Can you share your plans with how you will handle patron entered data on the PowerPAC?

We don’t let patrons update their addresses via self service (those fields are hidden in “my Account”), so there aren’t any impacts for us in turning off verification! They have to speak with a librarian to update that information.

@somaliajamall, Do you currently have custom code in place to hide the address fields on the PowerPAC page? And do you need to reapply this customization with each upgrade?

The reason I ask is that the setting mentioned above controls whether the address fields are accessible to patrons by default. In your test, you may not have seen the address fields become editable because PowerPAC needs to be recycled for the changes to take effect.

If you do have a customization in place and a standard process to replicate it with each upgrade, could you share any details? This is a challenge I’ll need to address soon to enable PAPI for address updates.

Thanks!

Good call! Yes, @somaliajamall some settings changes don’t get picked up until you restart the App Pools.

Could you just do a custom theme and use CSS with display:none?

Yes we are doing a display: none with css I believe!

Using a custom theme with CSS set to display:none can visually hide the address fields, but this approach only conceals them superficially. Anyone with basic knowledge could inspect the page, adjust the CSS in their browser, and enter any information they wanted.

A more secure solution would be to remove the fields from the page entirely or set them to a fixed, non-editable value. This approach ensures that patrons cannot access or modify these fields, even if they attempt to manipulate the page’s code.

This is true, but a risk we’d be willing to accept for the ease of maintainability aspect. These are patrons that already have an account, one that they’ve already logged into in order to get to this page.

You might find a reverse proxy you could sit in front of PowerPAC that might allow you to do some manipulation of the raw page HTML. And of course editing the .aspx page would probably work. You could probably build up a script to edit the .aspx page after each upgrade to make the work a bit more sustainable too. But the price performance ratio of display: none is kinda of hard to beat.

You’re right; for the price-performance ratio, display:none is hard to beat. Thanks for the discussion!

1 Like