Skip to main content

Adding barcode support to inventory shipments API

We're adding barcode support to inventory shipments in version 2026-04, enabling merchants to assign barcodes to shipments for faster receiving workflows.

The following API changes are included:

New field on InventoryShipment

  • barcode: String - A nullable field representing the unique barcode assigned to a shipment.

Updated inventoryShipmentCreate mutation

New inventoryShipmentSetBarcode mutation

  • Sets or clears the barcode on an existing shipment. Pass an empty string to clear the barcode.

Example usage:

mutation {
  inventoryShipmentSetBarcode(
    inventoryShipmentId: "gid://shopify/InventoryShipment/123"
    barcode: "SHIP-2026-0001"
  ) {
    inventoryShipment {
      id
      barcode
    }
    userErrors {
      code
      field
      message
    }
  }
}

What you need to know

  • Barcodes must be unique per shop. Two shipments in the same shop cannot share the same barcode.
  • Barcodes have a maximum length of 255 characters.
  • Leading/trailing whitespace is automatically stripped. Barcodes consisting only of whitespace are treated as empty.

Error codes

  • DUPLICATE_BARCODE: Another shipment in the same shop already has this barcode.
  • SHIPMENT_NOT_FOUND: The specified shipment does not exist.
  • BARCODE_TOO_LONG: The barcode exceeds the maximum length of 255 characters.

Why we made this change Merchants transferring inventory between locations, for example, from a warehouse to a retail store, currently have to scan and receive each item in a shipment one by one. This is slow and error-prone for large shipments. Shipment barcodes let warehouse systems and 3PLs attach a scannable identifier (such as a GS1-128 code) to a shipment so that the entire shipment can be identified and received in a single scan.

Was this section helpful?