What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

Adding a page url & handle programmatically through the api

Solved

Adding a page url & handle programmatically through the api

MBO1
Visitor
2 0 0

Is it's possible to create a custom page handle/url (eg. https://myshopifystore.com/pages/my-page) when creating a Shopify page through the REST API? 

Accepted Solutions (2)

PaulNewton
Shopify Partner
7481 661 1570

This is an accepted solution.

https://www.google.com/search?q=shopify+api+online+store+page 

The dev docs

https://shopify.dev/docs/api/admin-rest/2023-10/resources/page 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


View solution in original post

Liam
Community Manager
3108 344 895

This is an accepted solution.

Hi MBO1,

 

Our docs on the Page resource show an example of making a POST request to the pages.json endpoint, where you have access to the handle property that you can use to define what the page URL will be. 

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

PaulNewton
Shopify Partner
7481 661 1570

This is an accepted solution.

https://www.google.com/search?q=shopify+api+online+store+page 

The dev docs

https://shopify.dev/docs/api/admin-rest/2023-10/resources/page 

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Liam
Community Manager
3108 344 895

This is an accepted solution.

Hi MBO1,

 

Our docs on the Page resource show an example of making a POST request to the pages.json endpoint, where you have access to the handle property that you can use to define what the page URL will be. 

 

Hope this helps!

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

MBO1
Visitor
2 0 0

Thank you, I found it eventually in the docs after I asked the question 😅