Enable required phone numer through the API?

mattiasjp
Tourist
4 0 3

Is it possible to enable the shipping address phone number through the API?

I've searched for this but found nothing, but might just have missed it.

It's the one found on this page: /admin/settings/checkout  on a store.

 

The idea is, since our app requires this field, is that the app could enable it and have a check to see if it is enabled or not.

Replies 6 (6)

Zonica
Tourist
4 0 0

Hi

I am having the sane issue.

Did you find a solution for this?And if so would you be able to discuss the solution?

Best regards

Zonica

mattiasjp
Tourist
4 0 3

No, from what I could gather after researching more, it is just not possible.

Instead we just added instructions in the app we're creating so the shop owner knows how to do it manually.

We also added code that checks if phone is available, otherwise skip it if possible.

Zonica
Tourist
4 0 0

Thank you for the reply.

Have you thought about inserting a phone number field into the theme file?

Similar to this post

https://community.shopify.com/c/Technical-Q-A/Phone-Number-as-compulsory-in-Customer-Registration/m-...

and if so why didn't you go for that option?

 

mattiasjp
Tourist
4 0 3

I can see a lot of problems with that route, as mentioned in the same thread there.

And as a public app I wouldn't want to force changes on a customer store.

There are a lot of stuff in Shopify like this. For example being able to add a dropdown to a shipping method were a client can pick the closest service point for that one carrier service. Or just being able to add anything, like certain carriers requires additional data like a door code. Impossible to add with Shopify since we aren't allowed to modify the checkout page. Hopefully they'll make more parts more flexible in the future.

Zonica
Tourist
4 0 0

Thank you for the response! I appreciate it a lot.

yrisob
Shopify Partner
4 0 0

Hi, Mattiasjp
How do you check that the shipping address phone is required? As I see in the admin module they call: https://{shop}/api/shopify/{shop}t?operation=CheckoutSettingsIndex&type=query and got a response with checkoutSettings, but graphQL query response doesn't exist this prorety.