Thank you for visiting our Partner Zone. This area is an exclusive space for MYOB Partners. Find out how to Partner with MYOB.
August 2019
August 2019
Hello,
We are having an issue where we have a Supplier setup as a 'ITEM' purchasing type.
However when any order is raised, when queried through the API, the PO is being returned on the service order endpoint.
our supplier:
https://ar1.api.myob.com/accountright/XXXXXXX/Contact/Supplier/ZZZZZZZ
PrintedForm | "CS Purchase Order" | string | |
PurchaseComment | null | string | |
PurchaseLayout | Item | MYOB.AccountRight.SDK.Contracts.Version2.Contact.PurchaseLayoutType | |
PurchaseOrderDelivery | Nothing | MYOB.AccountRight.SDK.Contracts.Version2.Sale.DocumentAction? | |
ShippingMethod | null | string |
The order returned
https://ar1.api.myob.com/accountright/XXXXXXX/Purchase/Order/Service/YYYYYY
We are attempting to integrate MYOB to our suppliers system, but to do so we need the inventory codes that are only available with an ITEM Purchase order line item payload.
Service type orders do not offer this.
Attached screenshot of the Order, shows that Items have been selected. Dispite this the order is still returned on the service endpoint
August 2019
August 2019
How are you querying it through the API?
I have found (using the SDK) that if you use the Order endpoint to get all orders
https://developer.myob.com/api/accountright/v2/purchase/order/
an item order has an OrderType of 'Item'.
If you use the Order/Item endpoint to get just item orders
https://developer.myob.com/api/accountright/v2/purchase/order/order_item/
all the orders say they have an OrderType of 'Service'.
This appears to be a bug, but since you are only asking for Item Orders, just ignore it.
Does that help?
August 2019 - last edited August 2019
August 2019 - last edited August 2019
Hi John, Thanks for the reply.
No, but it may confirm a bug.
We arent interested in service orders, we need the item orders to access the inventory par numvers/item codes against each line item. This then gets passed on you our supplier where the matching part numbers are used to generate an invoice in their system.
Because out 'item' type orders are returned on the service endpoint, this stuffs everything up, the service item model does not contain the inventory codes, just a narration, which cant be used with our supplier.
Our workflow:
- We are calling ite Item PO endpoint.
- Supplieris setup as an "Item" template/type.
- orders raised in myob are clearly of item type format (your prompted for inventory codes, the header of the form says "Purchases Edit Item")
- Yet when we call the sdk, we get NO orders on the item endpoint, and all orders on the service endpoint.
The po's should be returned on the items endpoint, but they arent.
Either a data issue or a sdk/api bug.
August 2019
August 2019
Hi armh,
We only deal with item orders, and are getting the item orders by supplier using the item orders endpoint ok I believe.
Although, as I said, they are marked as service orders which is no doubt a bug and may be related.
I have also found that the Item Orders endpoint returns orders that have been converted to bills, which I don't think it should.
I think the API code in this area needs reviewing.
August 2019
August 2019
I've setup a test supplier as an item type order template and raised po's all works fine, orders come through on the ItemOrder endpoint.
I call customer support they went through the order and supplier and all was set correctly and was indeed an Item Type po.
The api/sdk doesnt agree.
I've raised a ticket with API support, i suspect theres a data issue with the supplier card in question.