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.

Custom page with Ajax/API

Custom page with Ajax/API

gfagnani
New Member
19 0 0

Hello Shopify Community!  

 

I need to build a new page restrict to customers, which will have a form to change some customer basic data, like first name, last name, phone, etc. 

 

I'll submit this form and change the information using Ajax / API, through a custom JS file. What is the best way to do that according to authentication and security? 

 

To be honest, I didn't understand very well the Shopify documentation. I've been trying to call the REST admin API, but I don't have success with the PUT method. I also didn't understand how to create a custom APP and call the REST API from that. 

 

Thanks!

 

Replies 4 (4)

gfagnani
New Member
19 0 0

I need help to get this information. Please!

hassain
Shopify Staff (Retired)
624 104 189

Hey @gfagnani ,

 

You can look into the following tutorials on how to build a Shopify App in NodeJS that can utilize the Admin API. This should help you get started, but feel free to ask more or make a new forum post if you have any specific questions

 

https://help.shopify.com/en/api/tutorials/build-a-shopify-app-with-node-and-express

https://developers.shopify.com/tutorials/build-a-shopify-app-with-node-and-react

 

To learn more visit the Shopify Help Center or the Community Blog.

scope123
Visitor
1 0 0

So the only way to add/change data for a customer is to create and host a separate app?

 

I need to add a bunch of fields to the customer database, are you saying that isn't possible on the Shopify hosted site?

gfagnani
New Member
19 0 0

@scope123 wrote:

So the only way to add/change data for a customer is to create and host a separate app?

 

I need to add a bunch of fields to the customer database, are you saying that isn't possible on the Shopify hosted site?


Exactly! You cannot change the Shopify fields/data structure. To add these fields that you are saying, you can use meta fields.  But, the problem is, to change any meta field, you need to do it through a custom app because Shopify doesn't allow any POST or PUT method from your store. 

 

Let me know if you have any further questions. 

 

Thanks! 🙂