Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do i update a nested value via. the API?

How do i update a nested value via. the API? i want to update my custom field custom_product_fields_magento_product_id

Request path: /api/product/f9529c4f40e94fa6ae7439f97090cc9e

Request type: PATCH

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Body:

{
    "translated.customFields.custom_product_fields_magento_product_id" : "123"
}

Where am i going wrong? i can easily update product values that arent nested, like "productNumber" : "value"

>Solution :

You can use

{
    "customFields": {
        "custom_product_fields_magento_product_id":"123"
    }
}

The value will be automatically saved to translation, the language of which is specified in the request header or in the default language.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading