We’re trying to use the Admin API 2020-10 to archive a number of older products. We’re using the REST PUT requests documented here. The docs say there are 3 supported values: active, archived and draft. The example PUT request uses the “draft” status. However, when we run that request it never updates the status. The response comes back with HTTP 200 OK but the body of it still shows “status” : “active” and when checking the product in the catalog is is in fact active.
The release notes for 2020-10 also mention this feature so we expected it to function. Is the “archived” status actively supported in the Admin API 2020-10 REST interface? Are we missing something? Doing something wrong?
// request url
// https://
Thanks,
sfsdev


I don’t have any real reason to suspect this will work, but if you’re still stuck, you could try setting the ‘published_status’ to ‘unpublished’ at the same time?
Thanks for your input. We basically already have them unpublished but they still show up in the catalog when searching for products. Our thoughts were that this would hide them in the catalog. Similar to the way Orders are archived. You can find them but you have to specifically look for them.
Show More
A few months ago there was a Shopify video where they made number of announcements about big updates and improvements. I remember hearing about this around that time. I watched a video where there was an “archive” option when editing a Product on the Admin portal. This issue seems to be that feature, documented and mentioned in the release notes for 2020-10, but doesn’t seem to work.
Show More
Anyone from the Shopify side have input on this? I tried a support chat but was quickly redirected to the community forum. It’s great to pay lots of money for a product and be told to ask the public when you need some support.
I tried setting the Product’s “published_status” to “unpublished” but it didn’t reflect that change. There isn’t a “published_state” property for Products. The docs only mention “published_status” as a filter to the GET requests.
It’s interesting that I can’t adjust the “published_scope” to anything but “web” or “global.” What if I want to unpublish it? In other words, what’s the REST API’s equivalent to the UI’s dialog where you uncheck all Sales Channels for a Product and apply it?
Sorry that wasn’t much help. Not something I’ve attempted before.
I assume you’re using the REST API for this? Have you tried the GraphQL API productChangeStatus instead? I’ve not got around to using it much but I know you can do something like this in Node, for example. Just need to add your product ID, shop and access token.
let query = `mutation productChangeStatus($productId: ID!, $status: ProductStatus!) {
productChangeStatus(productId: $productId, status: 'archived') {
product {
id
}
userErrors {
code
field
message
}
}
}`;
async function graphql(query) {
const fetch = require("node-fetch");
let res = await fetch(`https://SHOP/admin/api/2020-10/graphql.json`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Shopify-Access-Token": ACCESS_TOKEN
},
body: JSON.stringify(query)
});
let final = await res.json();
return final;
}
Thanks for the example code. We’re pretty far down the REST API path. We’ll switch over to GraphQL if absolutely necessary. Just wish the REST API worked the way the documents say it’s supposed to. Hopefully someone from Shopify will chime in and we’re missing something simple.
I know it isn’t the greatest solution but it’s essentially the same amount of work involved as using the REST API here as it’ll be just one request.
Yeah, I seem to run into a lot of issues and the support has been, quite honestly, shameful. So I’m trying to do my best to help out, even if it’s not too useful, ha.
Once you setup the GQL, it seems strange to use Rest. I used think Rest was good enough for me too.
The main problem is, moving forward, I can see Rest getting left behind. Only GQL will be supported with the latest stuff. Amazingly though, there remain some things you can still only do with Rest, so there is that.
I think published status is a huge internal mess at the moment, hopefully, ironed out soon? I am playing in that same sandbox and nothing matches the docs for reality in a lot of places.
Thanks for your input. After minimal development I also feel that the community here, and Shopify, are leaning towards GraphQL over REST. The documentation seems thorough. I just wish it matched what the code actually does. Regardless, it’s good to know I’m not going crazy and others are experiencing the same headaches.
Well I tried the GraphQL solution and, unfortunately, it doesn’t work. The productChangeStatus mutation runs without issue. It just ignores the ARCHIVED status. Using GraphQL version 2020-10.
// https://
After that runs I lookup the same product id ...
```javascript
// query
{
product(id: "gid://shopify/Product/
I also I tried the "DRAFT" status. That didn't stick. Switched to the 2021-01 candidate version of GraphQL. Still no go. Documented feature that straight up doesn't work.
It's awesome that these powerful APIs are available for Shopify stores and I'm excited to dig deeper. It's just so frustrating to chase a feature for two days that's supposed to work. <insert angry emoji here>
Frustrated,
sfsdev
I’m seeing the same thing with regards to updating product status through the API, so it’s not an issue with your calls. It’s a holiday here today but I’ll check with our teams tomorrow and get back to you here with an update.
Just to follow up on this. In order to ensure a smooth transition while introducing new functionality around product status, the rollout for this feature will be happening incrementally for shops over the next few weeks. During this time a given shop may or may not have the feature enabled, if the feature isn’t enabled you’ll see the status remain the same after attempting to update it. Our API docs are being updated to indicate this as well. Once the rollout is complete for all shops, I’ll post back here to confirm.
Thanks for the update. Great to hear there’s a solution in the works and the docs are being updated to reflect the rollout. I’ll check back for updates over the next few weeks.
I’m also experiencing issues archiving products from the API. Our shop received the new update maybe a week and a half ago… Still unable to archive anything from the API. Seems like the status property on the item is just ignored.