Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Unable to update smartcollection rules

Unable to update smartcollection rules

Venki_b2sell
Shopify Partner
4 0 1

Hi i am not able to update smartcollection rule through the API. When i invloke /admin/api/2023-01/smart_collections/482865238.json i am getting response as 200 and my new rule is added in the response and updated at time also changed and if i go and view the collection through admin panel my new rule is not listed there. So i try to fetch the collection by get method, then i am not getting my updated collection i am getting my old collection only. Can you resolve my issue?

Replies 2 (2)

garyrgilbert
Shopify Partner
432 41 189

Silly question but what does your PUT look like?

 

{
  "smart_collection":{
    "id": 482865238,
    "rules":[
      {
         "column" : "title",
         "relation" : "starts_with",
         "condition" : "iPod"
      }
    ]
  }
}

 

Cheers,

 

Gary 

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Venki_b2sell
Shopify Partner
4 0 1

Hi gary, 

            I tried the same way and getting the response as OK, if i fetch that smart collection using GET Method  I'm not getting the updated collection, instead i am getting  the old collection only.