Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

Split the shipping address into two fields - street name and house number.

Dev-Opklopper
Shopify Partner
1 0 0

The Admin API returns the street name and house number in one field when returning order data. Is it possible to get this data separately? If not, is there any practice that would help me split this field into street and house number?

Reply 1 (1)

Liam
Shopify Staff
2602 281 716

Hi - there's no way within Shopify (or via the Shopify API) to split this field into two, but you could do this in your app by using regex to identify and separate the numbers and text in the address string.

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