OCLC Developer Network

Purchase order items resource

Building a query:

To access a collection of purchase order items construct the URL in the following manner:

https://acq.sd00.worldcat.org/purchaseorders/{orderNumber}/items?{query}

To access information on a specific purchase order item construct the URL in the following manner:

https://acq.sd00.worldcat.org/purchaseorders/{orderNumber}/items/{orderItemNumber}

where {query}, {orderNumber}, or {orderItemNumber} provide information about the purchase order items you are requesting information for.

 

Examples:

Below are some sample URLs and an explanation of what they are querying using different HTTP methods:

EXAMPLE URLHTTP METHODNOTES
https://acq.sd00.worldcat.org/purchaseorders/PO-2011-01/items?startIndex=0&itemsPerPage=20GETReturns a collection of purchase order items in purchase order PO-2011-11, where the start index is set to 0, and 20 items are displayed per page.
https://acq.sd00.worldcat.org/purchaseorders/PO-2011-11/items/OIN-2011-31GETReturns information about a specific purchase order item with the ID in OIN-2011-31 in a purchase order with the ID PO-2011-11.
https://acq.sd00.worldcat.org/purchaseorders/PO-2011-11/items/OIN-2011-31PUTWill update a purchase order item with ID OIN-2011-31 inside a purchase order with ID PO-2011-01 if properly structured XML is attached to the request.
https://acq.sd00.worldcat.org/purchaseorders/PO-2011-11/items/OIN-2011-31DELETEWill delete a specific purchase order item with ID OIN-2011-31 inside the purchase order with ID PO-2011-11.
https://acq.sd00.worldcat.org/purchaseorders/PO-2011-11/itemsPOSTWill create a new purchase order item insider the purchase order with ID PO-2011-11 if properly structured XML is attached to the request. 

 

XML structure for POST and PUT requests:

More information about the proper structure of XML made as part of POST and PUT requests can be found here:

Below are two XML payload examples for creating and updating a purchase order item:

Creating a purchase order item:

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005">
<title type="text" />
   <content type="application/xml">
     <ns3:purchaseOrderItem xmlns:ns3="http://worldcat.org/xmlschemas/purchase-order/PurchaseOrderItem-1.5" xmlns="http://worldcat.org/xmlschemas/purchase-order/PurchaseOrder-1.5" xmlns:ns2="http://worldcat.org/xmlschemas/common-types/Identity-1.2" xmlns:ns4="http://worldcat.org/xmlschemas/purchase-order/Resource-1.5" xmlns:ns5="http://worldcat.org/xmlschemas/purchase-order/CopyConfig-1.5" xmlns:ns6="http://worldcat.org/xmlschemas/purchase-order/Copy-1.5" xmlns:ns7="http://worldcat.org/xmlschemas/purchase-order/CopyReceipt-1.5" xmlns:ns8="http://worldcat.org/xmlschemas/purchase-order/PurchaseOrderSubmission-1.5">
       <ns3:resources>
         <ns3:resource>
           <ns4:worldcatResource>
             <ns4:oclcNumber>300096045</ns4:oclcNumber>
           </ns4:worldcatResource>
         </ns3:resource>
       </ns3:resources>
       <ns3:copyConfigs>
         <ns3:copyConfig>
           <ns5:copyConfigNumber>1</ns5:copyConfigNumber>
           <ns5:copyCount>1</ns5:copyCount>
           <ns5:branchId>129055</ns5:branchId>
           <ns5:shelvingLocationId>NORT-Reference</ns5:shelvingLocationId>
         </ns3:copyConfig>
       </ns3:copyConfigs>
       <ns3:orderItemNumberRange>OIN</ns3:orderItemNumberRange>
     </ns3:purchaseOrderItem>
   </content>
</entry>

Updating a purchase order item:

<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gd="http://schemas.google.com/g/2005">
  <title type="text" />
  <updated>2012-06-29T14:02:35.028Z</updated>
  <gd:etag>2012-06-29T10:02:34.000-04:00</gd:etag>
  <content type="application/xml">
    <ns3:purchaseOrderItem xmlns:ns3="http://worldcat.org/xmlschemas/purchase-order/PurchaseOrderItem-1.5" xmlns="http://worldcat.org/xmlschemas/purchase-order/PurchaseOrder-1.5" xmlns:ns2="http://worldcat.org/xmlschemas/common-types/Identity-1.2" xmlns:ns4="http://worldcat.org/xmlschemas/purchase-order/Resource-1.5" xmlns:ns5="http://worldcat.org/xmlschemas/purchase-order/CopyConfig-1.5" xmlns:ns6="http://worldcat.org/xmlschemas/purchase-order/Copy-1.5" xmlns:ns7="http://worldcat.org/xmlschemas/purchase-order/CopyReceipt-1.5" xmlns:ns8="http://worldcat.org/xmlschemas/purchase-order/PurchaseOrderSubmission-1.5">
      <ns3:orderItemNumber>OIN-2012-212</ns3:orderItemNumber>
      <ns3:resources>
        <ns3:resource>
          <ns4:worldcatResource>
            <ns4:title>Tibet - Land zwischen Himmel und Erde : eine Reise ins Innere : [Fachbuch]</ns4:title>
            <ns4:materialType>otr</ns4:materialType>
            <ns4:author>Grieder, Peter</ns4:author>
            <ns4:edition>1. Aufl.</ns4:edition>
            <ns4:isbn>9783638913263</ns4:isbn>
            <ns4:isbn>3638913260</ns4:isbn>
            <ns4:oclcNumber>300096045</ns4:oclcNumber>
            <ns4:publisher>München [u.a.] Grin</ns4:publisher>
          </ns4:worldcatResource>
        </ns3:resource>
      </ns3:resources>
      <ns3:copyConfigs>
        <ns3:copyConfig>
          <ns5:copyConfigNumber>1</ns5:copyConfigNumber>
          <ns5:purchaseOrderItemNumber>OIN-2012-212</ns5:purchaseOrderItemNumber>
          <ns5:copyCount>1</ns5:copyCount>
          <ns5:branchId>129055</ns5:branchId>
          <ns5:shelvingLocationId>NORT-Reference</ns5:shelvingLocationId>
          <ns5:invoicedPercentage>0.00</ns5:invoicedPercentage>
          <ns5:paidPercentage>0.00</ns5:paidPercentage>
          <ns5:orderStatus>OPEN</ns5:orderStatus>
          <ns5:purchaseStatus>NO</ns5:purchaseStatus>
        </ns3:copyConfig>
      </ns3:copyConfigs>
      <ns3:orderItemNumberRange>OIN</ns3:orderItemNumberRange>
      <ns3:orderType>FIRM_ORDER</ns3:orderType>
      <ns3:processingType>SINGLE_VOLUME_WORK</ns3:processingType>
      <ns3:quantity>1</ns3:quantity>
      <ns3:discountPercentage>0.00</ns3:discountPercentage>
      <ns3:tax1Percentage>0.00</ns3:tax1Percentage>
      <ns3:tax2Percentage>0.00</ns3:tax2Percentage>
      <ns3:orderingPrice>0.00</ns3:orderingPrice>
      <ns3:shippingPrice>0.00</ns3:shippingPrice>
      <ns3:serviceCharge>0.00</ns3:serviceCharge>
      <ns3:totalPrice>0.00</ns3:totalPrice>
      <ns3:materialType>otr</ns3:materialType>
      <ns3:shippingType>STD</ns3:shippingType>
      <ns3:shippingAddressId>MAIN</ns3:shippingAddressId>
      <ns3:position>0</ns3:position>
      <ns3:lastUpdateTime>2012-06-29T10:02:34.000-04:00</ns3:lastUpdateTime>
      <ns3:insertTime>2012-06-29T10:02:34.000-04:00</ns3:insertTime>
      <ns3:taxCalculationMethod>EXCLUDE_ADDITIONAL_COSTS</ns3:taxCalculationMethod>
    </ns3:purchaseOrderItem>
  </content>
</entry>

Query options:

Below is a list of all the possible parameters that can be used as part of the purchase order items resource, all of them are optional:

PARAMETERDESCRIPTION
startIndexWhat index item to start the collection at.
itemsPerPageHow many collection items to return per request.
 

Follow the OCLC Developer Network:

The OCLC Developer Network supports the use of OCLC Web Services—a set of tools and APIs that expose data and services for WorldCat and our member libraries and partner institutions or companies. learn more »

© 2010 OCLC Domestic and international trademarks and/or service marks of OCLC Online Computer Library Center, Inc. and its affiliates


Powered by Drupal, an open source content management system