New Section API Testing

AddisonApps
Shopify Expert
55 6 12

Hi,


I am testing out the new Sections API in a developer’s preview store (Unite 2019). I have built a public app to make requests to the admin Sections API.

 

I am trying to create a new section but I am not fully sure how this new feature works, as the documentation is understandably lacking.

 

I am trying to make a post request to “/master_pages.json”, with the request formatted like this:

 

{  
   "name":"test-section",
   "default":false,
   "sections":[  
      {  
         "id":"page",
         "title":"Test Section",
         "section_file":"pages/product.liquid"
      }
   ],
   "blocks":[  
      {  
         "id":"test-block",
         "type":"test-product-block",
         "settings":[  
            {  
               "autoplay":{  
                  "type":"checkbox",
                  "value":"true"
               }
            }
         ]
      }
   ]
}

 

I am receiving a 406 error (The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request), I am not sure if this is because my request is incorrect or if the POST feature of this API is active yet?

 

Thanks

Replies 2 (2)
PaulNewton
Shopify Partner
4184 302 886

https://community.shopify.com/c/New-Online-Store-Design/bd-p/storedesign

 

Moderators should probably should move this topic

Save time seeking solutions - Learn To Ask Questions The Smart Way

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org
Problem Solved? ✔Accept and Like solutions to help future merchants
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
AddisonApps
Shopify Expert
55 6 12

@PaulNewton wrote:

https://community.shopify.com/c/New-Online-Store-Design/bd-p/storedesign

 

Moderators should probably should move this topic


I did not know that board existed, thank you. I will remove this post and create a new post on that board.