Having trouble changing the material/texture of an element through API

Hello all,

I’m busy with a 3D Model viewer and configurator through the Sketchfab API.
Everything works fine, except for changing the colour of a specific element.

(e.g. the bands on these window slats). Turning it from this default gray;

Into this brown (which is a material within the model);

I have read through the documentation and tried the different Materials & Textures options in the API.

I’ve come close to the effect I want, by changing the Texture with another through its URL, handily hidden in the child element of another child element when read out into the console. This sadly changes all elements that have that same texture.

Quite the puzzle looking for buried links (and figuring out what texture they lead to), but that might be because I’m missing something.

Is there any way for me to skip a lot of this overhead puzzling and get to my goal quickly? I assume there’s a very simple solution I’m completely missing here.

Did you check this sample on how to change texture ? Viewer API - Examples - Sketchfab

It shows how to get the list of material and then change the texture of a particular material.

Thank you kindly.