Global API
...
Request
Purchase Order
Read
1 min
the following is an example of read purchase order the quickbooks purchase order id (id) is required to read the purchase order request // create a map to store all the data of a purchase order map\<string, object> purchaseordermap = new map\<string, object>(); purchaseordermap put('id','631'); //required, if quickbooks multi org is enabled in breadwinner 	 purchaseordermap put('qborgid','4620816365285051610'); 	 	 // initializing the request data to be passed map\<string, object> reqobj = new map\<string, object>(); reqobj put('version', '1 0'); reqobj put('action', 'readpurchaseorder'); reqobj put('options',purchaseordermap); // placing a request to breadwinner global api map\<string, object> respmap = breadwinner qbo breadwinnerqbapi call(reqobj); system debug('respmap=>'+respmap); response { action=readpurchaseorder, timestamp=1713347174505, validrequest=true, version=1 0, responsejson={ "statuscode" 200, "status" "ok", "purchaseorder" \[ { "vendorref" { "value" "296", "name" "account" }, "vendoraddr" { "line1" "account", "id" "968" }, "txndate" "2024 04 17", "totalamt" 100000 00, "synctoken" "0", "sparse"\ false, "postatus" "open", "metadata" { "lastupdatedtime" "2024 04 17t02 45 32 07 00", "createtime" "2024 04 17t02 45 32 07 00" }, "line" \[ { "linenum" 1, "itembasedexpenselinedetail" { "unitprice" 100000, "taxcoderef" { "value" "non" }, "qty" 1, "itemref" { "value" "70", "name" "genwatt diesel 1000kw" }, "billablestatus" "notbillable" }, "id" "1", "detailtype" "itembasedexpenselinedetail", "amount" 100000 00 } ], "id" "631", "docnumber" "1066", "customfield" \[ ], "currencyref" { "value" "usd", "name" "united states dollar" }, "apaccountref" { "value" "33", "name" "accounts payable (a/p)" } } ] } }