Shopify Admin API product price based on gold price

Good morning,

I am selling products that include gold and products that do not include gold. For the products without gold I want to keep the price as it is. For the products with gold I want to calculate the price based on the current gold price.

I get the current gold price over an API and can calculate the final price by multiplying the current gold price with the amount of gold in the product.

My question is how can I integrate my calculation in the Admin API and how do i get the gold price API into the Admin API in order to only change the product price of products that include gold? Unfortunately, the Admin API documentation does not answer my question. Therefore, it would be super helpful, to get a step by step explanation or a link to a more concrete documentation.

Would appreciate any info! :slightly_smiling_face:

Thanks for your help and have a good day