Acquisitions
Order upload
The endpoint /order supports uploading of acquisition files such as: pre-order, order, shipping, and invoice information.
After generating a wise-key and logging in with the /login endpoint (with a username and password) a file can be uploaded with /order.
Prerequisites:
- The vendor/supplier must have an entry in the supplier table (rol_supplier)
- The vendor/supplier must have an account in Wise with any kind of role
- The vendor/supplier must login via the /login endpoint with the api-key
See Steps for creating a supplier and supplier user credentials below for specific steps
Example request:
curl --location --request POST '{{"http://hkatestcs42mxr1.nit.oclc.org/restapi/order"}}' \
--header 'WISE_KEY: {wise-key}' \
--header 'Authorization: {token} ' \
--header 'Accept: multipart/form-data' \
--form 'orderFile=@"mworder.xml"'
Example order file:
<?xml version="1.0" encoding="UTF-8"?>
<wise-orders>
<orders>
<order>
<referenceno>ABESTELV-I202-000002-210302-1114</referenceno>
<supplier_code>000002</supplier_code>
<supplier_name>Vendor</supplier_name>
<relation_code>I202</relation_code>
<relation_name>BIB</relation_name>
<order_date>210302111444</order_date>
<message_type>ORDER</message_type>
<orderrows>
<orderrow>
<orderrow_id>WBV650</orderrow_id>
<relation_code>2000</relation_code>
<product_id>1270632</product_id>
<amount>1</amount>
<status>OR</status>
<items>
<item>
<item_id>WBV650-0001</item_id>
<product_id>1270632</product_id>
<status>OR</status>
</item>
</items>
</orderrow>
<orderrow>
<orderrow_id>WBV7</orderrow_id>
<relation_code>2020</relation_code>
<product_id>102022</product_id>
<amount>1</amount>
<status>OR</status>
<items>
<item>
<item_id>WBV7-0001</item_id>
<product_id>102022</product_id>
<status>OR</status>
</item>
</items>
</orderrow>
</orderrows>
</order>
</orders>
<products>
<product>
<product_id>1270632</product_id>
<article_number>9789021408354</article_number>
<title>Maak je bed op : kleine dingen die je leven kunnen veranderen?</title>
<author>McRaven, William H.</author>
<media_type>BOE</media_type>
<ean_or_isbn>9789021408354</ean_or_isbn>
</product>
<product>
<product_id>102022</product_id>
<article_number>9026040687</article_number>
<title>Lranger</title>
<author>Camus, Albert</author>
<media_type>BOE</media_type>
<ean_or_isbn>9789026040689</ean_or_isbn>
</product>
</products>
</wise-orders>
Remark:
Orderrow_id : max 30 characters
Steps for creating a vendor (supplier) and vendor user credentials:
- Create a vendor code by adding the vendor to the Central vendor table (rol_supplier).
- Write down the Customer-ID created when the vendor was added to the table.
- Create a user login for this supplier. The Customer ID (actor_id) entered for the new account should be the same as the Customer-ID created in the previous steps.
- Assign a user role to the new account with the least possible number of permissions (no permissions are actually necessary for the account; just a login is necessary).
- Add a record for the vendor with the vendor code (maximum 8 pos.) in the NBD order codes per branch table.
- Pre-order records are created in Order series A, so the A-series must be present in the system as well.
- Add the vendor code in the Title source table. This is needed for tracing the source of the title information.