Forum Discussion
Have a look at this thread and see if it is of any use (even if it only confirms the problem).
Hi John.. Thanks for the link... Last week, I stumbled across the issue you bring up on that post, but as you mention, it's a simply fact of ignoring it. In other words, I assumed that the ItemPurchase endpoint returning ItemPurchase objects with the status of Service was just a bug.. This did not prevent me from using the ItemPurchaseLines as they were all correct. So even though, the ItemPurchase had a status of "Service", this was easy enough to ignore and still do work we required. I have no trouble processing the majority of our purchases.
The issue I am describing, and also described on the post by the poster that you link is a different issue than just an incorrect status. Namely, no purchase is returned when querying the ItemPurchase Endpoint for a specific item purchase. The only way to get the purchase, is by querying the ServicePurchase endpoint, or the Purchase endpoint.. both of which don't give you lines you can use.. I am yet to find the specific conditions for a purchase to get incorrectly placed via endpoint... funnily enough, after conversion to bill, it then gets correctly positioned, in other words, i can successfully get it from the ItemBill endpoint.
- John_Dinning5 years agoTrusted User
Ah ok. So you are having this problem with one particular Item Purchase Order and not all of them is that correct?
I am using the SDK/API and am able to return an Item Purchase Order (and its lines) using the ItemPurchaseOrderService and ItemPurchaseOrderSvc.GetRange with this filter (e.g.):
$filter = Number eq '00000012'
I have not noticed it fail yet, but that doesn't necessily mean that it hasn't.
- dlarosa5 years agoContributing User
Hi John. Correct, the problem is only with some Item Purchase Orders. Out of the last 30 Item Purchase Orders, I have had the problem with about 3 of them.
Like you, we are also using the ItemPurchaseOrderSvc.GetRange function.. filtering specifially for the invoice number like you mention... it returns nothing for the problem item purchase orders... because of this, I went hunting for it, and found out it returns from the ServicePurchaseOrderSvc instead.
- 5 years ago
Hi dlarosa,
It sounds like we are having the same issue with Sales rather than Purchases. I am not using the SDK/API but have been testing using Insomnia to look at the raw returns for various GETs. I have also been in touch with the apisupport team and they have confirmed that there is a bug with Items / Services.
As suggested by John, I have attempted to return the line items using a filter, but again the return only works if I request Service types and I am missing specifically the ShipQuantity line. Looking at the documentation the Service GET doesn't return ShipQuantity.
So far it has only happened for 2 Items that I have found, but there doesn't appear to be a reason for it. API support have suggested recreating the Invoice in MYOB but for us this hasn't worked as the recreated Invoice is still a Service type when it should be an Item.
Looking for something else?
Search the Community Forum for answers or find your topic and get the conversation started!
Find technical support and help for all MYOB products in our online help centre
Dig into MYOB Academy for free courses, learning paths and live events to help build your business with MYOB.