Is api.applyShippingAddressChange broken?

Solved

Is api.applyShippingAddressChange broken?

Gregles
Shopify Partner
16 3 0

I'm getting some very strange responses from the Shopify API and the errors are not helpful.

 

Example 1: Enter an address

The data - this comes from an address lookup api service so it is valid:

await api.applyShippingAddressChange({
      type: 'updateShippingAddress',
      address: {
            address1: "165 ASHRIDGE RD",
            city: "DARRA",
            countryCode: "AU",
            provinceCode: "QLD",
            zip: "4076"
      }
}

Error response:

{
     errors: {
          0: {
               field: "address1",
               message: "Enter an address"
          }
     }
}

 

As you can see, the data does contain a valid address1 value.

 

Example 2: Enter a valid ZIP / postal code for Victoria

The data - this comes from an address lookup api service so it is valid:

await api.applyShippingAddressChange({
      type: 'updateShippingAddress',
      address: {
            address1: '154 AUTUMN ST',
            city: 'GEELONG WEST',
            countryCode: 'AU',
            provinceCode: 'VIC',
            zip: '3218'
      }
}

That is a valid postcode for Victoria:

https://postcodes-australia.com/state-postcodes/vic

 

Interestingly in the both cases the city and province code are updating.

 

Things I have tried:

  1. Other addresses in the system
  2. Manually parsing information that I know is correct (my own address)
  3. removing the address2 field if it's empty
  4. ensuring all values are strings not ints
  5. adding a name field (was clutching at straws)

 

Can anyone at Shopify shed some light on this please. I really need to resolve these errors.

 

Thanks

Greg

 

Thanks

Greg

Accepted Solution (1)

Gregles
Shopify Partner
16 3 0

This is an accepted solution.

I resolved this by switching over the REACT framework and upgrading the component libraries

View solution in original post

Reply 1 (1)

Gregles
Shopify Partner
16 3 0

This is an accepted solution.

I resolved this by switching over the REACT framework and upgrading the component libraries