Tech Blog

How to use an API to edit a user record and change the record type from Public to Staff in 5 easy steps

See also: How to create a user via an API in your institution in 5 easy steps.

In the example here we will

  1. Retrieve a user with GET
  2. Edit the output
  3. Use the edited output as input for a PUT to update the user.


Note that user with primary identifier “Lynn Crown” is record type public

We will change that record type to Staff.


Retrieve patron as follows.  Do a GET on the user and save the XML in a local file for editing.
Here is the syntax (of course replace “01234567890” with your real API key): Crown?user_id_type=all_unique&view=full&expand=none&apikey=01234567890


Edit the output from the GET above as follows to use as input for the PUT to update the existing user.

Change this line

<record_type desc="Public">PUBLIC</record_type>


<record_type desc="Staff">STAFF</record_type>
XML BeforeXML After


Do a PUT as follows (of course replace “01234567890” with your real API key): Crown?user_id_type=all_unique&send_pin_number_letter=false&apikey=01234567890

In the Body choose application/xml and put in the edited output from the GET above.
Get response which will include the updated user


In Alma User Interface see that the record type was changed and that it was updated by the API

Leave a Reply