Hi,
I’m trying to add location_id/location_name while creating purchase order via API using mutation purchase_order_create, but I’m getting error as In field line_items: In element #0: In field location_id: Unknown field.
The mutation I used is :
mutation {
purchase_order_create(
data: {
po_date: "2020-09-24"
po_number: "test-po"
subtotal: "230.00"
shipping_price: "0.00"
total_price: "230.00"
warehouse_id: "V345yZWhvdXNlOjY0NzE2"
line_items: [
{
sku: "TestSKU"
quantity: 6
expected_weight_in_lbs: "1.00"
vendor_id: "VmVuZG9ye5YM1MzU2MA=="
vendor_sku:"VendorTestSKU"
quantity_received: 0
quantity_rejected: 0
price: "200.00"
product_name: "Product for testing Purchase Orders"
fulfillment_status: "pending"
sell_ahead: 0
location_id:"QmluOj5YODQ0MTI="
}
]
fulfillment_status: "pending"
discount: "0.00"
}
) {
request_id
complexity
}
}
I’m getting error as :
"message": "Argument \"data\" has invalid value In field \"line_items\": In element #0: In field \"location_id\": Unknown field."
Please help me to add location details while creating purchase order.
Thanks in advance!