API to create a product issue with meta fields

Topic summary

A developer is encountering issues when creating products via API—specifically, metafields are not being set correctly.

Problem Identified:

  • The user is likely using an incorrect namespace for the ispattern metafield
  • Using global as the namespace may not match the actual metafield definition

Suggested Solutions:

  • Check the metafield’s definition in the Admin UI by clicking the text field, which should reveal the correct namespace
  • Use the metafieldDefinitions GraphQL query to retrieve accurate namespace and key information:
    metafieldDefinitions(first: 100, ownerType: PRODUCT) {
      nodes {
        name
        namespace
        key
      }
    }
    

Additional Guidance:

  • Standard metafield definitions are auto-configured and cannot be edited
  • Only custom metafield definitions can be modified
  • For further API-related questions, the developer resources and Technical Q&A community board were recommended

Status: The issue remains unresolved pending verification of the correct namespace.

Summarized with AI on November 23. AI used: claude-sonnet-4-5-20250929.

Thx for the answer. Where can I find def in Admin UI? I only see this

1 Like