---
title: BarcodeInput - GraphQL Admin
description: >-
  The input fields for barcodes that are associated with a product variant. A
  variant accepts up to

  20 barcodes, and a given variant input can't

  set both `barcode` and `barcodes`. Refer to the

  [`ProductVariantBarcode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariantBarcode)

  object for how these barcodes are returned.
api_version: 2026-10
source_url:
  html: 'https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BarcodeInput'
  md: >-
    https://shopify.dev/docs/api/admin-graphql/latest/input-objects/BarcodeInput.md
api_name: admin
api_type: graphql
type: input-object
---

# Barcode​Input

input\_object

The input fields for barcodes that are associated with a product variant. A variant accepts up to 20 barcodes, and a given variant input can't set both `barcode` and `barcodes`. Refer to the [`ProductVariantBarcode`](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductVariantBarcode) object for how these barcodes are returned.

## Fields

* type

  [Barcode​Type](https://shopify.dev/docs/api/admin-graphql/latest/enums/BarcodeType)

  The associated standard that the barcode conforms to. Barcode types are validated against their respective format standards. A `null` format denotes no type provided on write and the value is stored as entered.

* value

  [String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)

  non-null

  The value of the barcode. For example, `9780262033848`. Maximum length: 255 characters.

***

## Input objects using this input

* [Gift​Card​Product​Variant​Set​Input.barcodes](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/GiftCardProductVariantSetInput#fields-barcodes)

  INPUT OBJECT

  The input fields for specifying a gift card product variant to create or update with the [`giftCardProductSet`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/giftCardProductSet) mutation.

  Include an [`id`](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/GiftCardProductSetVariantInput#field-GiftCardProductSetVariantInput.fields.id) to update an existing variant, or omit it to create a new one. Gift card variant defaults are applied automatically, meaning variants are set to non-taxable, don't require shipping, and their inventory is untracked.

* [Product​Variant​Set​Input.barcodes](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductVariantSetInput#fields-barcodes)

  INPUT OBJECT

  The input fields for specifying a product variant to create or update.

* [Product​Variants​Bulk​Input.barcodes](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductVariantsBulkInput#fields-barcodes)

  INPUT OBJECT

  The input fields for specifying a product variant to create as part of a variant bulk mutation.

***

## Map

### Input objects using this input

* [Gift​Card​Product​Variant​Set​Input.barcodes](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/GiftCardProductVariantSetInput#fields-barcodes)
* [Product​Variant​Set​Input.barcodes](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductVariantSetInput#fields-barcodes)
* [Product​Variants​Bulk​Input.barcodes](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ProductVariantsBulkInput#fields-barcodes)
