GraphQL Product API

Topic summary

User exports product data via API to CSV, then manually imports the CSV into one or more stores. They currently use the REST API for exporting but find that product metafields (custom fields) do not appear in REST responses—neither those with definitions (standardized schema) nor those without definitions (custom/legacy).

Because REST misses these metafields, they switched to the GraphQL API, which returns both defined and undefined metafields. However, they would prefer to keep using REST if there’s a way to include custom-created metafields in the export.

Key questions:

  • Can the REST API export product metafields, both with and without definitions?
  • If yes, what endpoints/parameters are required to retrieve them?

Outcome/status: No resolution yet. The user is seeking clarification to decide between REST and GraphQL based on metafield coverage and data structure suitability.

Summarized with AI on January 15. AI used: gpt-5.

I manually import the CSV file and only use the API for exporting products. I retrieve all the information related to the products and save it on my local server in a CSV file. Once the CSV file is created, I manually import it into my store or another store. Could you please clarify if I can export metafields, both with and without definitions, using the REST API? If it’s possible, how can I achieve this? Because the REST API response does not seem to include custom created metafields, whether they have definitions or not.

My main issue is that when I use the REST API to export products, it doesn’t export the metafields, both with and without definitions. That’s why I switched to using the GraphQL API, which provides me with both types of metafields, with and without definitions. I want to know if there’s a way to get custom-created metafields with or without definitions using the REST API, so I don’t have to use the GraphQL API. Both APIs have different structures, so I’m trying to determine which one is more suitable for my needs.