# Update SKU using order update mutiation?

**URL:** <https://community.shiphero.com/t/update-sku-using-order-update-mutiation/1833>\
**Category:** GraphQL API\
**Created:** [January 28, 2022, 12:20am UTC](https://community.shiphero.com/t/update-sku-using-order-update-mutiation/1833 "2022-01-28T00:20:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Metrelli](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Metrelli](https://community.shiphero.com/u/Metrelli)\
**Post date:** [January 28, 2022, 12:20am UTC](https://community.shiphero.com/t/update-sku-using-order-update-mutiation/1833/1 "2022-01-28T00:20:58Z")

</div>

Hey there, I’m fairly new to this and wanted to ask if you can update the SKU of an order out with another SKU using the order update mutation before the order ships?

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [January 28, 2022, 12:48pm UTC](https://community.shiphero.com/t/update-sku-using-order-update-mutiation/1833/2 "2022-01-28T12:48:14Z")

</div>

Hello @Metrelli!

By updating the SKU, do you mean deleting a line item and adding a different one?

Have a nice day!  
TomasFD

---

<div class="post-metadata">

**Author:** ![Metrelli](https://avatars.discourse-cdn.com/v4/letter/m/b4bc9f/32.png) [@Metrelli](https://community.shiphero.com/u/Metrelli)\
**Post date:** [January 28, 2022, 8:27pm UTC](https://community.shiphero.com/t/update-sku-using-order-update-mutiation/1833/3 "2022-01-28T20:27:30Z")

</div>

Hey @tomasfd,

If a line item is the product shipped, then yup! Is that possible to delete and add a new one before it gets fulfilled?

---

<div class="post-metadata">

**Author:** ![tomasfd](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tomasfd](https://community.shiphero.com/u/tomasfd)\
**Post date:** [February 1, 2022, 12:24pm UTC](https://community.shiphero.com/t/update-sku-using-order-update-mutiation/1833/4 "2022-02-01T12:24:38Z")

</div>

Hello @metrelli!

If the order is already wholly fulfilled, you won’t be able to add more line items.

If it is pending or partially fulfilled, you can do the following:

1. Add the line item you want with a query like this:

```auto
mutation{
  order_add_line_items(
    data:{
      order_id:"string"
      line_items:[{
        sku:"string"
        quantity:int
        price:"string"
        partner_line_item_id:"string"
        product_name:"string"
      }]      
  	}
  ){
    complexity
    request_id
  }
}

```

1. Remove the line item you don’t want anymore:

```auto
mutation{
  order_remove_line_items(
    data:{
      order_id:"string"
      line_item_ids:"string"
    }
  ){
    complexity
    request_id
  }
}

```

Please let me know if this doesn’t help.

Have a nice day!  
TomasfD
