# Shipping\_address update

**URL:** <https://community.shiphero.com/t/shipping-address-update/156>\
**Category:** GraphQL API\
**Created:** [October 2, 2019, 8:03am UTC](https://community.shiphero.com/t/shipping-address-update/156 "2019-10-02T08:03:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![varun](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@varun](https://community.shiphero.com/u/varun)\
**Post date:** [October 2, 2019, 8:03am UTC](https://community.shiphero.com/t/shipping-address-update/156/1 "2019-10-02T08:03:25Z")

</div>

Can’t update all fields in Shipping address with GraphQL,  
`first_name` is not updated  
`last_name` is not updated  
if we send `company` it become null on shiphero  
If we send `country` as country name it appears on shipping address block but when we edit it, the country is not selected [https://nimb.ws/5klqJm](https://nimb.ws/5klqJm) (same thing even if we send it with `country_code`)  
If we send `country` as country code and without `country_code` it appears on shipping address block like country code and when we edit it,  
the country is selected,[https://nimb.ws/CsoKjQ](https://nimb.ws/CsoKjQ)  
For now we are sending `country` as country code and without `country_code` to shiphero, not sure if is ok.  
Rest of fields are updated.

Do we need to send `state_code` and `country_code`?  
Is it ok to send `country` as country code  
Why `first_name, last_name, company` not updated?

Our mutation

```
mutation {
  order_update(
    data: {
      order_id: "T3JkZXI6MTA1NTY3Mjk3"
      shipping_address: {
        first_name: "Fname"
        last_name: "Lname"
        company: "TestCompany"
        address1: "test addres 1"
        address2: "test addres 2"
        city: "Sacramento"
        state: "California"
        state_code: "CA"
        country: "US"
        zip: "94203"
        phone: "54586486"
      }
    }
  ) {
     order {
      id
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![varun](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@varun](https://community.shiphero.com/u/varun)\
**Post date:** [October 2, 2019, 9:09am UTC](https://community.shiphero.com/t/shipping-address-update/156/2 "2019-10-02T09:09:17Z")

</div>

One more thing please,  
How we can update order `email` with GrahphQL?  
this field is missing in `order_update` but exists in `order_create`

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [October 2, 2019, 1:31pm UTC](https://community.shiphero.com/t/shipping-address-update/156/3 "2019-10-02T13:31:10Z")

</div>

Hi varun!  
As for `email` you should be able to add it as well in the `order_update` mutation.  
I noticed it’s not updating some of the fields on this mutation, thanks for catching that. I already submitted a request for the engineering team to work on it. I will let you know as soon as I have an update.  
Thanks!  
Tom

---

<div class="post-metadata">

**Author:** ![varun](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@varun](https://community.shiphero.com/u/varun)\
**Post date:** [October 2, 2019, 1:47pm UTC](https://community.shiphero.com/t/shipping-address-update/156/4 "2019-10-02T13:47:26Z")

</div>

Thank you Tom, highly appreciate your prompt response.

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [October 2, 2019, 4:43pm UTC](https://community.shiphero.com/t/shipping-address-update/156/5 "2019-10-02T16:43:57Z")

</div>

Hi varun! `order_update` for `shipping_address` should be working perfectly now  
As for the `country_code` you can send it as `country`, that should work.  
Same for `state` and `state_code`

---

<div class="post-metadata">

**Author:** ![varun](https://avatars.discourse-cdn.com/v4/letter/v/e9bcb4/32.png) [@varun](https://community.shiphero.com/u/varun)\
**Post date:** [October 3, 2019, 7:28am UTC](https://community.shiphero.com/t/shipping-address-update/156/6 "2019-10-03T07:28:12Z")

</div>

Hi @tomasw,

Thanks for the update! I just tried it out, looks like everything is ok now.
