MYOBCommunity
Partner Zone
|
|
Partner Zone

Updating records using PUT

This thread is now closed to new comments.
Some of the links provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
1 REPLY
API Evangelist KeranM
297 Posts
API Evangelist
Australia
KeranM
API Evangelist

297Posts

93Kudos

56Solutions

Accepted Solution Solved Solution

Re: Updating records using PUT

Hi there

 

You are right PATCH is a great method for partial updates of records - however MYOBapi does not support this. 

Unfortunately you do need to GET the full record & PUT the change back.

 

The API will check for RowVersion to ensure your data doesn't clash when pushed back as MYOB products are multi-user and so we need to check some one or something else hasn't edited that item while you've been making changes

 

Hope that helps

Keran McKenzie
Futurist in residence @MYOB

Are you a developer? Check out http://developer.myob.com
Looking for an Add-on? Check out http://myob.com/addons/

Twitter: @myobapi | @keranm
Highlighted
Contributing Partner MitchPearce
10 Posts
Contributing Partner
Australia
MitchPearce
Contributing Partner

10Posts

0Kudos

1Solutions

Solved: Go to Solution

Updating records using PUT

Hi,

 

I would like to be able to update a field within a record without first using GET to get the entire record, then editing the JSON string then using PUT to replace the whole record. I've found info on the PATCH method, but this doesn't seem to be supported by MYOB API(please correct me if I'm wrong). I've also found examples online where you can expose the field within a record and use PUT to replace only that field... But I can't get it to work - error 404

 

PUT    /contacts/employees/UID/LastName

 

{"New LastName"}

 

is this, or should this be possible? Or do I need to work with the entire record when using PUT?

 

mitch

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post