Update some fields in exisiting contact

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
Micheal2
3 Posts
User

3Posts

0Kudos

0Solutions

Solved: Go to Solution

Update some fields in exisiting contact

Hi guys,

 

I am making API call to update the contact with JSON below:

 {
                    "UID": "5f81f864-bd3a-4086-9f75-c728f194119d",
                    "LastName": "Quyet",
                    "FirstName": "Michael",
                    "IsIndividual" : true,                                     
                    "Addresses": [
                        {
                            "Location": 1,
                            "Street": "27a Commercial Rd",
                            "City": "Newstead",
                            "State": "Qld",
                            "PostCode": "4006",                            
                            "Phone1": "0411414414",                           
                            "Email": "help@thecatalysisgroup.com.au",
                            "Website": "www.thecatalysisgroup.com.au",
                            "ContactName": "Michael Quyet"
                        }
                    ],                    
                    "SellingDetails": {                       
                        "ABN" : "",
                        "TaxCode": {
                            "UID": "3bd2fbea-54d7-4115-8030-b84360048465"
                        },
                        "FreightTaxCode": {
                            "UID": "3bd2fbea-54d7-4115-8030-b84360048465"
                        }
                   },                      
                    "RowVersion": "5083169798557270016"
                }

API call: [PUT] https://ar1.api.myob.com/accountright/c06778dd-4371-4a83-975f-522df65d7574/Contact/Customer/5f81f864...

 

Yes, it will update the fields I listed on JSON. However, other fields that are not listed in the JSON, will be overwritten as empty. How can I update only the fields I listed in JSON above and keep other fields as original data?

 

Thanks in advance.

 

Micheal 

1 REPLY 1
Hannah_B
MYOB Moderator
142 Posts
MYOB Moderator
Australia
MYOB Moderator

142Posts

33Kudos

25Solutions

Accepted Solution Solved

Re: Update some fields in exisiting contact

Hi @Micheal2

 

Thank you for reaching out, We would need to include the full body in the PUT request even if we are not updating all the fields. This will stop those fields from being removed.

 

Thanks,


Thanks,
@Hannah_B


MYOB API Specialist


MYOB API Support Centre|MYOB App Marketplace|MYOB AccountRight API Endpoint Doc's



Did my answer help?


Mark it as a Solution

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