Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

Do Shopify products have to be marked as "tracked by shopify" for api changes to reflect?

Loz86
Pathfinder
88 6 14

Hi guys 

As per the title...

 

Do Shopify products have to be marked as "tracked by shopify" for api changes to reflect?

Accepted Solution (1)
Sp1ke
Tourist
10 3 3

This is an accepted solution.

When creating new product, there is optional settings called "inventory_management" (possible values are: 'null' or 'shopify')

You will be able to update your inventory levels through API only in case "inventory_management"="shopify" for related product.

You can use following json code to update inventory_management for necessary product:

 

use PUT for related product_id on https://yourshop.myshopify.com/admin/api/2023-07/products/7815459321185.json

 

{"product":
{
"id": "7815459321185",
"variants": [{
"id": "43467836236481",
"inventory_management": "shopify"
}]
}
}

 

View solution in original post

Replies 5 (5)

topnewyork
Trailblazer
209 25 27

The "Tracked by Shopify" checkbox in product settings relates more to inventory management and tracking within the Shopify system itself. When a product is marked as "Tracked by Shopify," it means that Shopify will manage and track the inventory for that product. This feature helps with inventory management within the Shopify platform.

API changes and how data is reflected through the Shopify API are separate from this setting. Changes made via the Shopify API—such as product updates, inventory changes, pricing modifications, etc.—are typically reflected regardless of whether the product is marked as "Tracked by Shopify." As long as the API requests are properly authenticated and the correct endpoints are used, the changes should be reflected in your Shopify store's data.

So, to update or modify products using the Shopify API, you'll need the appropriate API endpoints and proper authentication methods, and the changes should reflect in your store's data regardless of whether the product is marked as "Tracked by Shopify.

 
 
Need a Shopify developer?
Hire us at topnewyorkwebdesign.com
For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
Subscribe to our youtube channel
Loz86
Pathfinder
88 6 14

Many thanks for the reply Topnewyork, that was the answer I was hoping for.

 

Do you have a link to any Shopify API documentation that specifies this? As I couldn't seem to find this mentioned anywhere when I looked.

Loz86
Pathfinder
88 6 14

Apparently it turns out they do have to be marked as tracked.

I have an app created which should update my stock inventory via API however it is returning this error...

Inventory item does not have inventory tracking enabled 

Sp1ke
Tourist
10 3 3

This is an accepted solution.

When creating new product, there is optional settings called "inventory_management" (possible values are: 'null' or 'shopify')

You will be able to update your inventory levels through API only in case "inventory_management"="shopify" for related product.

You can use following json code to update inventory_management for necessary product:

 

use PUT for related product_id on https://yourshop.myshopify.com/admin/api/2023-07/products/7815459321185.json

 

{"product":
{
"id": "7815459321185",
"variants": [{
"id": "43467836236481",
"inventory_management": "shopify"
}]
}
}

 

Loz86
Pathfinder
88 6 14

Thank you @Sp1ke, I managed to figure it out in the end 👍