Unable to create a Blog Article that is hidden

benpow2
Visitor
2 0 0

I believe this is a bug but thought I would check here first.  I'm trying to create a hidden blog article, as a test here is my request:

 

 

 

{
  "article": {
    "title": "test",
    "body_html": "test body",
    "published": false,
    "published_at": "1976-05-26T00:00:00-00:00"
  }
}

 

 

 

Response:

 

 

 

{
  "article": {
    "id": 123,
    "title": "test",
    "created_at": "2024-05-21T08:35:29+01:00",
    "body_html": "test body",
    "blog_id": 123,
    "author": "Shopify API",
    "user_id": null,
    "published_at": "1976-05-26T01:00:00+01:00",
    "updated_at": "2024-05-21T08:35:29+01:00",
    "summary_html": null,
    "template_suffix": null,
    "handle": "test",
    "tags": "",
    "admin_graphql_api_id": "gid://shopify/OnlineStoreArticle/123"
  }
}

 

 

 

but the article is fully visible, ie., not hidden.  I've tried both POST and PUT requests to see if an update would do it but that also does not work.  Apparently there is no GraphQL versions of these requests yet either.

 

There is even an "example" of "Create an unpublished article for a blog" here https://shopify.dev/docs/api/admin-rest/2024-01/resources/article 

 

Any ideas?


Thanks.

Replies 2 (2)

Dan-From-Ryviu
Shopify Partner
7892 1533 1563

Did you check Visibility status of article in your store? Because liquid objects of article does not have published

https://shopify.dev/docs/api/liquid/objects/article

- Helpful? Like and Accept solution or ❤Donate❤
- Ryviu - Product Reviews app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Shopee and Walmart and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Enjoy 1 month of Shopify for $1. Sign up now.

benpow2
Visitor
2 0 0

Yeah, that's how I knew it wasn't working initially; the Visibility is marked as Visible and it shows up in the public Blog.  The response as you can see also does not return the field. 

 

Thanks.