π«Variant object
Important Notice
Shopify has deprecated the REST Admin API that these Mechanic objects depend on. The product and variant endpoints were removed on Feb 1, 2025, and Shopify is phasing out the remaining REST endpoints over time. Read about the deprecation here and here. Use the GraphQL going forward. The product and variant objects ceased to work on Feb 1, 2025 due to changes made by Shopify. Shopify is phasing out the REST API entirely β read more here.
All of our library tasks will be ported to use GraphQL only, which will provide a model for how you can update your custom tasks. You'll be able to update your non-customized library tasks with a click of a button βΊοΈ Please see these guides for migrating your custom tasks to GraphQL.
How to access it
Use
{{ order.line_items[n].variant }}in tasks responding to shopify/orders eventsUse
{{ product.variants[n] }}in tasks responding to shopify/products events
What it contains
An array of related inventory level objects:
{{ variant.inventory_levels }}The related inventory item object:
{{ variant.inventory_item }}The related product object:
{{ variant.product }}The related metafields object:
{{ variant.metafields }}
Last updated
Was this helpful?