# Creating POs and Orders with multiple lines of the same SKU

**URL:** <https://community.shiphero.com/t/creating-pos-and-orders-with-multiple-lines-of-the-same-sku/785>\
**Category:** GraphQL API\
**Created:** [September 10, 2020, 6:18pm UTC](https://community.shiphero.com/t/creating-pos-and-orders-with-multiple-lines-of-the-same-sku/785 "2020-09-10T18:18:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaac.wyatt](https://avatars.discourse-cdn.com/v4/letter/i/6f9a4e/32.png) [@isaac.wyatt](https://community.shiphero.com/u/isaac.wyatt)\
**Post date:** [September 10, 2020, 6:18pm UTC](https://community.shiphero.com/t/creating-pos-and-orders-with-multiple-lines-of-the-same-sku/785/1 "2020-09-10T18:18:23Z")

</div>

Hi there!

I am working on an integration with ShipHero where the operation will need to create purchase orders and sales orders with multiple lines for the same SKU. Specific use cases are below.

- Inbound orders can have multiple lines for the same SKU due to varying lot numbers (this will be mapped to the notes field for each line)
- Outbound “shipments” can have multiple lines for the same SKU due to different order numbers. The customer will consolidate all open orders for a single customer in their ERP and send an order file to ShipHero, which can have multiple order lines for the same SKU.

I am running into an issue while trying to create POs (SOs too) where the same SKU is repeated across more than one line. The PO is created in ShipHero, but only a single line containing the SKU is created. Please see the mutation below.

mutation {  
purchase\_order\_create(  
data: {  
po\_date: “2020-01-01”  
po\_number: “TestPOExample6”  
subtotal: “230.00”  
tax: “2.30”  
shipping\_price: “0.00”  
total\_price: “230.00”  
warehouse\_id: “\<WAREHOUSE\_ID\>”  
line\_items: [  
{  
sku: “3673”  
quantity: 5  
expected\_weight\_in\_lbs: “0”  
vendor\_id: “”  
quantity\_received: 0  
quantity\_rejected: 0  
price: “0”  
product\_name: “Product for testing Purchase Orders”  
fulfillment\_status: “pending”  
sell\_ahead: 0  
note: “test-lot-1”  
partner\_line\_item\_id: “1”  
}  
{  
sku: “3673”  
quantity: 5  
expected\_weight\_in\_lbs: “0”  
vendor\_id: “”  
quantity\_received: 0  
quantity\_rejected: 0  
price: “0”  
product\_name: “Product for testing Purchase Orders”  
fulfillment\_status: “pending”  
sell\_ahead: 0  
partner\_line\_item\_id: “2”  
note: “test-lot-2”  
}  
]  
fulfillment\_status: “pending”  
discount: “0.00”  
vendor\_id: “\<VENDOR\_ID\>”  
}  
) {  
request\_id  
complexity  
purchase\_order {  
id  
po\_number  
account\_id  
warehouse\_id  
vendor\_id  
created\_at  
po\_date  
date\_closed  
packing\_note  
fulfillment\_status  
po\_note  
description  
subtotal  
discount  
total\_price  
tax  
shipping\_method  
shipping\_carrier  
shipping\_name  
shipping\_price  
tracking\_number  
payment\_method  
payment\_due\_by  
payment\_note  
locking  
locked\_by\_user\_id  
line\_items(first: 1) {  
edges {  
node {  
id  
sku  
}  
}  
}  
}  
}  
}

Has anyone run into this issue before?

Thanks!  
Isaac

---

<div class="post-metadata">

**Author:** ![MahmoudEssamShaban](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@MahmoudEssamShaban](https://community.shiphero.com/u/MahmoudEssamShaban)\
**Post date:** [May 8, 2021, 1:19pm UTC](https://community.shiphero.com/t/creating-pos-and-orders-with-multiple-lines-of-the-same-sku/785/2 "2021-05-08T13:19:44Z")

</div>

Hey, I’m currently facing the same issue? Were you able to solve this?
