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
6274 572 1311

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 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


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

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


View solution in original post

Liam
Shopify Staff
2731 292 743

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
6274 572 1311

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 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


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

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


Liam
Shopify Staff
2731 292 743

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 😅