# Shipment\_create mutation issue with line\_item\_ids , line\_items fields

**URL:** <https://community.shiphero.com/t/shipment-create-mutation-issue-with-line-item-ids-line-items-fields/3773>\
**Category:** GraphQL API\
**Created:** [September 9, 2026, 10:54pm UTC](https://community.shiphero.com/t/shipment-create-mutation-issue-with-line-item-ids-line-items-fields/3773 "2026-09-09T22:54:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevchcm](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@kevchcm](https://community.shiphero.com/u/kevchcm)\
**Post date:** [September 9, 2026, 10:54pm UTC](https://community.shiphero.com/t/shipment-create-mutation-issue-with-line-item-ids-line-items-fields/3773/1 "2026-09-09T22:54:21Z")

</div>

I’m having an issue creating a shipment.

I’m getting the following errors:

```auto
{
  "errors": [
    {
      "message": "Field 'CreateShipmentInput.line_items' of required type '[CreateShipmentLineItemInput]!' was not provided.",
      "locations": [
        {
          "line": 35,
          "column": 11
        }
      ]
    },
    {
      "message": "Field 'line_items' is not defined by type 'CreateShipmentShippingLabelInput'. Did you mean 'line_item_ids'?",
      "locations": [
        {
          "line": 70,
          "column": 9
        }
      ]
    }
  ]
}

```

And I have no idea what **line\_item\_ids** it’s because it doesn’t appear in the schema documentation [CreateShipmentInput | ShipHero GraphQL API](https://developer.shiphero.com/schema/types/create-shipment-input.html)  
And then I’m getting erros for putting line\_items which is the one in the schema, so I have no idea what to add.

This is my payload

```auto
mutation Shipment_create(
  $customer_account_id: String
  $order_id: String!
  $warehouse_id: String!
  $name: String
  $address1: String
  $address2: String
  $city: String
  $state: String
  $country: String
  $zip: String
  $carrier: String!
  $shipping_name: String!
  $shipping_method: String!
  $cost: String!
  $address_name: String
  $address_address1: String
  $address_address2: String
  $address_city: String
  $address_state: String
  $address_country: String
  $address_zip: String
  $weight: String
  $height: String
  $width: String
  $length: String
  $pdf_location: String
  # $line_item_ids: [String]!
  $tracking_number: String
  $tracking_url: String
  $notify_customer_via_shiphero: Boolean
  $notify_customer_via_store: Boolean
) {
  shipment_create(
    data: {
      customer_account_id: $customer_account_id
      order_id: $order_id
      warehouse_id: $warehouse_id
      address: {
        name: $name
        address1: $address1
        address2: $address2
        city: $city
        state: $state
        country: $country
        zip: $zip
      }
      labels: {
        carrier: $carrier
        shipping_name: $shipping_name
        shipping_method: $shipping_method
        cost: $cost
        address: {
          name: $address_name
          address1: $address_address1
          address2: $address_address2
          city: $address_city
          state: $address_state
          country: $address_country
          zip: $address_zip
        }
        dimensions: {
          weight: $weight
          height: $height
          width: $width
          length: $length
        }
        label: { pdf_location: $pdf_location }
        line_item_ids: ["UHJvZHVjdEluZm86MzM1MzMwNDYz"]
        line_items: [{ line_item_id: "UHJvZHVjdEluZm86MzM1MzMwNDYz", quantity: 3}]
        tracking_number: $tracking_number
        tracking_url: $tracking_url
      }
      notify_customer_via_shiphero: $notify_customer_via_shiphero
      notify_customer_via_store: $notify_customer_via_store
    }
  ) {
    request_id
    complexity
    shipment {
      id
      order_id
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![lpezza](https://avatars.discourse-cdn.com/v4/letter/l/439d5e/32.png) [@lpezza](https://community.shiphero.com/u/lpezza)\
**Post date:** [September 10, 2026, 4:42pm UTC](https://community.shiphero.com/t/shipment-create-mutation-issue-with-line-item-ids-line-items-fields/3773/2 "2026-09-10T16:42:49Z")

</div>

Hi @kevchcm! I hope you are doing well,

I looked into this and the two errors come from mixing up two fields that look similar but live at different levels of the input.

**line\_items** (required, top-level of data)

`CreateShipmentInput.line_items` is required and describes what’s being shipped in this shipment overall: `[{ line_item_id, quantity }].` It needs to be a sibling of order\_id, warehouse\_id, address, and labels, not nested inside labels. That’s the first error: line\_items was missing from the top level.

**line\_item\_ids** (inside each labels entry)

`CreateShipmentShippingLabelInput` doesn’t have a `line_items` field, only line\_item\_ids, a plain list of ID strings. This says which of the shipment’s line items go on that specific package/label. If your shipment has one package, this list ends up matching line\_items in content, just as IDs instead of objects. That’s the second error: line\_items doesn’t exist on that type, hence the “did you mean line\_item\_ids” hint.

Worth noting: `line_item_ids` is documented in the schema, it’s just easy to miss since it’s on a different type than the one you’d expect. You can find it on the [CreateShipmentShippingLabelInput](https://developer.shiphero.com/schema/types/create-shipment-shipping-label-input.html) page in the schema reference, or by introspecting that type directly if you’re browsing the schema in a GraphQL client like Postman or GraphiQL.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/shiphero/original/2X/9/91084e94231b22231abec5e57e8c78c3ab54cbe3.png)

Corrected shape:

```auto
shipment_create(
  data: {
    order_id: $order_id
    warehouse_id: $warehouse_id
    address: { ... }
    line_items: [{ line_item_id: $line_item_id, quantity: $quantity }] HERE!!!
    labels: {
      carrier: $carrier
      shipping_name: $shipping_name
      shipping_method: $shipping_method
      cost: $cost
      address: { ... }
      dimensions: { ... }
      label: { pdf_location: $pdf_location }
      line_item_ids: [$line_item_id]
      tracking_number: $tracking_number
      tracking_url: $tracking_url
    }
  }
) { ... }

```

One more thing worth checking on your end: the line\_item\_id you used ( **UHJvZHVjdEluZm86MzM1MzMwNDYz** ) decodes to a **ProductInfoID** , not a **LineItemID**. line\_item\_id needs the line item ID from the order (the one you get from order.line\_items or orders.line\_items), not a **productID**. Even after fixing the structure above, that specific ID would likely fail with a not-found error. Worth double-checking where you’re sourcing that ID from before retrying.

I hope this helps! If you have any questions, don’t hesitate and ask!

Best regards, Luciano.
