Get ShopMetafield by key.

bernier154bernier154 Member Posts: 1


in an integration that i am developing, I need to delete a metafield. In the app i have the key of the metafield but not the id. Is the a way to query a meta field with the key instead of the id. It would be more efficient to do it like that instead of querying get all meta field and loop from theme to find the selected meta field.

Thank you

1 comment

  • paul1_apaul1_a Member, Moderator, Lightspeed Staff Posts: 72 moderator


    Using the API, the only way to retrieve a metafield is using the ID. You can however implement your own lookup table and query by key if this is something you see yourself doing often.


Sign In or Register to comment.