Get METAFIELD using variant id using ADMIN REST API

I am creating products with variant including the metafield for cost_price in one api call. But the response does not include metafields. Is it possible to retrieve metafield via product variant ID?

Thanks!

Hello @kaye_tee

You cannot retrieve metafields in the create product API call within the REST API. Instead, you can utilize the GraphQL API, where you can access variant metafields in the response. Alternatively, you can make a variant metafield API call after creating the product.

If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.