Skip to main content

Product schema overview

The product schema is a standardized format that transforms your Shopify product data into an optimized structure for the search and browse engine.

Catalog scale and limits

Layers has no hard limits on the number of products, variants, or SKUs that can be synced and indexed. Layers scales with your catalog and has handled catalogs with millions of SKUs.

Schema fields

The following table outlines the key fields in the product schema, along with their data types, descriptions, and example values:
You can provide type-hints to Named Tags by using the {key}:{type}:{value} tag format. Supported types: number, boolean, and date.

King Linked Options groups

Enable King Linked Options and sync the catalog before using its product-card data. In search, browse, or block requests, include external.king_linked_options.group in attributes alongside the other fields your cards need. Read the group at results[].external.king_linked_options.group, not a top-level linked_options field. This follows the normal external-attribute projection: requesting the whole external object or using the default response also includes synced integration data. The group is an object or null; handle an absent integration or empty group without failing the rest of the product card. Validate that a handle and usable label exist before rendering a link. Use colors when present, otherwise the swatch image or a text fallback. Treat availability as synced display data, not a checkout guarantee. This integration does not merge sibling products into a single result or add swatch UI automatically. Layers refreshes eligible storefront-sourced integration data every six hours, in addition to product resyncs. Missing, inactive, deleted, or invalid groups replace stale group data with null; incomplete or failed sync responses keep the previous data. Disabling the integration removes its external attributes through normal integration cleanup.

API response type consistency

The following fields are guaranteed to always be returned as JSON objects (or null) in API responses, never as empty arrays. This keeps types consistent for API consumers and prevents type mismatches in strongly-typed clients:
  • metafields - Always an object or null
  • calculated - Always an object or null
  • named_tags - Always an object or null
  • category - Always an object or null
  • featured_media - Always an object or null
  • first_or_matched_variant - Always an object or null
  • price_range - Always an object or null
When these fields have no data, the API returns {} (empty object) or null, never [] (empty array). The API enforces this behavior at the response level to maintain consistent typing across all endpoints.
Sequential array fields like tags and images are not affected by this enforcement and continue to return as arrays.

Data types and formatting

  • Integer: Whole numbers without decimals.
  • String: Textual data, often used for titles or descriptions.
  • Decimal: Numbers with decimal points, typically used for prices.
  • Array: A list of values, used for tags or features.
  • Boolean: A true or false value, indicating binary states such as availability.

See also