--- title: AttributeInput - Storefront API description: The input fields for an attribute. api_version: 2026-01 api_name: storefront type: input-object api_type: graphql source_url: html: 'https://shopify.dev/docs/api/storefront/latest/input-objects/AttributeInput' md: >- https://shopify.dev/docs/api/storefront/latest/input-objects/AttributeInput.md --- # Attribute​Input input\_object The input fields for an attribute. ## Fields * key [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) non-null Key or name of the attribute. * value [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) non-null Value of the attribute. *** ## Input objects using this input * [Cart​Input.attributes](https://shopify.dev/docs/api/storefront/latest/input-objects/CartInput#fields-attributes) INPUT OBJECT The input fields to create a cart. * [Cart​Line​Input.attributes](https://shopify.dev/docs/api/storefront/latest/input-objects/CartLineInput#fields-attributes) INPUT OBJECT The input fields for adding a merchandise line to a cart. Each line represents a [`ProductVariant`](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant) the buyer intends to purchase, along with the quantity and optional [`SellingPlan`](https://shopify.dev/docs/api/storefront/current/objects/SellingPlan) for subscriptions. Used by the [`cartCreate`](https://shopify.dev/docs/api/storefront/current/mutations/cartCreate) mutation when creating a cart with initial items, and the [`cartLinesAdd`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesAdd) mutation when adding items to an existing cart. * [Cart​Line​Update​Input.attributes](https://shopify.dev/docs/api/storefront/latest/input-objects/CartLineUpdateInput#fields-attributes) INPUT OBJECT The input fields for updating a merchandise line in a cart. Used by the [`cartLinesUpdate`](https://shopify.dev/docs/api/storefront/current/mutations/cartLinesUpdate) mutation. Specify the line item's [`id`](https://shopify.dev/docs/api/storefront/current/input-objects/CartLineUpdateInput#fields-id) along with any fields to modify. You can change the quantity, swap the merchandise, update custom attributes, or associate a different selling plan. *** ## Map ### Input objects using this input * [Cart​Input.attributes](https://shopify.dev/docs/api/storefront/latest/input-objects/CartInput#fields-attributes) * [Cart​Line​Input.attributes](https://shopify.dev/docs/api/storefront/latest/input-objects/CartLineInput#fields-attributes) * [Cart​Line​Update​Input.attributes](https://shopify.dev/docs/api/storefront/latest/input-objects/CartLineUpdateInput#fields-attributes)