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/ login endpoint with the given 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 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 supplier and user credentials:
- Create a supplier code in the central supplier table (rol_supplier).
- Write down (or remember) the created actor_id,
- Create a user login for this supplier bij assigning a login to the actor created above
- Assign a user role with the least possible permissions (actuelly no permissions are neccessary, just a login)
- In the table "NBD-codes per branch" a record must be added for the supplier with the supplier code (max. 8 pos.).
- Pre-order records are created in Order-series A (Bestelreeks A), so the A-series (A-reeks) must be present in the system
- Add in the Title source table (titel bron / X57) the supplier code. This is needed for tracing the source of the title information