How to create an order via an API in your institution in 5 easy steps.
However, this blog focuses on your institution and not a generic sample, so that you will have an example with, for example, your fund code, vendor codes, vendor account, reporting codes, etc.
Identify an order in Alma similar to the one you want to create (POL type, fund, vendor, etc.)
Be sure to use sandbox or production depending on API key you will use.
In the example here we will use
1. POL-43637 which is an electronic one-time and in status sent
2. POL-44127 which is an physical one-time and in status closed
Do a GET on each order and save the XML in a local file for editing.
Here is the syntax (of course replace “01234567890” with your real API key):
Edit the output from the GET above as follows to use as input for the POST to create the new orders.
Remove the following lines because they will get created automatically:
- POL number
- POL status
- PO number
- created date
- status date
- expected_receipt_date (relevant for POL type physical)
Remove the following sections because they will get created automatically:
- locations section (relevant for POL type physical) (will get created based on POL owner library)
Change the following so you will not have a match in an existing:
- ISBN or ISSN
- system control number
Do a POST as follows:
In the Body choose application/xml and put in the edited output from the GET above.
Get response with POL number
See POL in Alma and see that it was created from the API