API Question - POST Item
Hi Folks
Thought I might get lucky with an API knowledgeable user able to answer this question quickly.
I am an API developer and GET and POST many things via the API, however, I have never POSTed an inventory item change via the API.
Inventory updates are easy via the import facility and you only require the MYOB Number as an mandatory field.
The endpoint information on the Developers web is NOT easy to understand so that when I have to use a new Endpoint POST I only get it right by trial and error and filtering the errors returned - correcting these and trying again.
I need to POST back to a live MYOB file running a fully configured inventory system 2 fields regularly from an integrator I have running.
Custom List 2 and item Standard Cost.
The Developer endpoint info shows 2 mandatory fields
1. item UID ( no problem)
2. MYOB Number (again no problem) - easy though I have asked through the Developers email why they need 2 mandatory fields - if we only needed the UID we would have a means to bulk update MYOB Numbers which we cannot do via the import feature - that is an aside)
My question - the document is not clear - and I am trying to cut the trial and error out here - do I need any other information to POST these updates.
The Doc
Hi The_Doc , updating existing items is done via a PUT operation. According to https://developer.myob.com/api/myob-business-api/v2/inventory/item/, "Items shown with [tick] are required when posting or puting data".
It would pay to expand the page display to show all the element notes. (Click the link at the end - "To view the descriptions for the elements you can either hover (over) any attribute to reveal details or click here to show all details")
You'll definitely need to include the row version, which should be obtained immediately prior to the PUT operation. I'm not sure that all the other UIDs (ticked) are required, but a trial (using Postman?) should confirm that.