# Order\_create mutation multiple line\_items

**URL:** <https://community.shiphero.com/t/order-create-mutation-multiple-line-items/2842>\
**Category:** GraphQL API\
**Created:** [February 25, 2024, 6:12am UTC](https://community.shiphero.com/t/order-create-mutation-multiple-line-items/2842 "2024-02-25T06:12:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdwelrn](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sdwelrn](https://community.shiphero.com/u/sdwelrn)\
**Post date:** [February 25, 2024, 6:12am UTC](https://community.shiphero.com/t/order-create-mutation-multiple-line-items/2842/1 "2024-02-25T06:12:09Z")

</div>

Hi,

I’m just starting to learn GraphQL and following the schema documentation has been very helpful. I can create an order using the order\_create mutation as long as only 1 line item exists. How do I put in more than 1 line\_items in the mutation? I use Insomnia and the editor keeps warning me about not allowing duplicates inside the line\_items object.

---

<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 26, 2024, 3:57pm UTC](https://community.shiphero.com/t/order-create-mutation-multiple-line-items/2842/2 "2024-02-26T15:57:39Z")

</div>

Hello @sdwelrn! To add multiple line items you can use the following structure, using some test data from my account:

```auto
      line_items: [
        {
          product_name: "FUJIFILM XF 16-55mm f/2.8 R LM WR Lens"
          sku: "FU165528"
          partner_line_item_id: "45645365436"
          quantity: 1
          price: "1199.00"
        }
        {
          product_name: "FUJIFILM XF 16-55mm f/2.8 R LM WR Lens"
          sku: "FU165528"
          partner_line_item_id: "4564536546636"
          quantity: 1
          price: "999.00"
        }
      ]

```

Curly brackets for each line item inside square brackets for an array is how it’s done. You can have 2 of the same SKU, which we don’t recommend unless they differ in price. Each line item must have its own `partner_line_item_id`

I hope this helps! Let me know if you have further questions!

---

<div class="post-metadata">

**Author:** ![sdwelrn](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sdwelrn](https://community.shiphero.com/u/sdwelrn)\
**Post date:** [February 26, 2024, 4:10pm UTC](https://community.shiphero.com/t/order-create-mutation-multiple-line-items/2842/3 "2024-02-26T16:10:53Z")

</div>

@tomasfd Thank you for the explanation and sample code. Regarding the partner\_line\_item\_id, is that an unique id for the order or is it unique across the account?

---

<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 26, 2024, 4:56pm UTC](https://community.shiphero.com/t/order-create-mutation-multiple-line-items/2842/4 "2024-02-26T16:56:42Z")

</div>

Hey @sdwelrn we check the uniqueness of that field per account+`shop_name`. As the field might be repeatable in different store integrations. Best!

---

<div class="post-metadata">

**Author:** ![sdwelrn](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@sdwelrn](https://community.shiphero.com/u/sdwelrn)\
**Post date:** [February 26, 2024, 7:22pm UTC](https://community.shiphero.com/t/order-create-mutation-multiple-line-items/2842/5 "2024-02-26T19:22:35Z")

</div>

Thank you, all my questions have been answered.
