6 years ago
How to get Purchase Order with Orderlines using .Net SDK?
Hi,
I am using the AccountRight .Net SDK to retrieve various entities like Customers, Account, PurchaseOrder etc.
I am able to get the PurchaseOrder using the following code -
var service = new PurchaseOrderService(config);
var result = service.GetRange(file, null, credentials);
The result contains only the PurchaseOrder info, can't find any Line items under it. Could you please guide how to get the order lines using the API? Any example would be great.
Many thanks.
Kind regards,
JK
You need to go "down" a level and use the Order Type eg. Item/Service/Pro.
This will then include the lines on the order.
See here for details:
https://developer.myob.com/api/accountright/v2/purchase/order/order_item/