Update data with the Admin API

I use the Admin API to make entries and updates.

I need to add values to the codeinjection_head parameter instead of overriding it.

At the moment I proceed in this way:


    payload = {
        posts: [{
            "codeinjection_head": "<link .....  />",
            "updated_at": update
    axios.put(urlUpdate + id + '/', payload, { headers })
        .then(response => console.log())
        .catch(error => console.error(error.response.data));


I need the new “link” to be added, it does not have to replace the existing one

I think what you need to do here is to get the value of codeinjection_head first, then when you create your payload, append your new value onto the end of the existing value, so that you’re providing the full contents of codeinjection_head when you update…

I think it’s the only solution