how to update custom field value to Product.

DonyDony Member Posts: 16
edited August 7 in Products & Inventory

I am uploading product value from API. I am successful in that. I want to update Tags and custom field value along with item as well..

I tried to find a lot but did not get any help for that. IF anybody has any idea about this please do let me know.



Thanks in advance.

1 comment

  • gregaricangregarican Member Posts: 507 

    You would issue a PUT request to the endpoint of https://api.merchantos.com/API/Account/{AccountId}/Item/{ItemId}.json with your Authorization: Bearer {Token} in the request header.

    The JSON body of your request would look something like this below, where I am updating a Note, specifying on-hands for a specific ItemShop, as well as updating a CustomFieldValue. You would need to know the CustomFieldID, CustomFieldChoiceID, etc. for the element, depending on how it's defined in the system. Hope this helps!

     "Note": { 

      "note": "This is a newly-updated note." 

     },

     "ItemShops": {

      "ItemShop": {

       "itemShopID": 164,

       "shopID": 1,

       "qoh": 1

      }

     },

     "CustomFieldValues": {

          "CustomFieldValue": [

            {

              "customFieldID": "13",

              "name": "Stone 2",

              "type": "single_choice",

              "value": {

                "customFieldChoiceID": "194",

                "value": "",

                "name": "Agate",

                "canBeDeleted": "false",

                "customFieldID": "13"

              }

            } ]

     }

    }

Sign In or Register to comment.