---
title: "MetafieldInput"
description: "Additional metafields to associate to the discount."
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/inputs/metafield-input'
  md: 'https://developer.shopline.com/docs/admin-graph-ql-api/common-objects/inputs/metafield-input.md'
---
# MetafieldInput

Additional metafields to associate to the discount.

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Input

## Type Signature

`MetafieldInput`

## Input Fields

* `type`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  Additional metafields to associate to the discount.

* `value`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The data stored in the metafield. Always stored as a string, regardless of the metafield's type.

* `key`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The unique identifier for a metafield within its namespace.

* `namespace`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The container for a group of metafields that the metafield is or will be associated with. Used in tandem with key to lookup a metafield on a resource, preventing conflicts with other metafields with the same key.
  
  

* `description`

  [String](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/string.md)

  The description of the metafield.

* `id`

  [ID](https://developer.shopline.com/docs/admin-graph-ql-api/common/scalars/id.md)

  The unique ID of the metafield.

## Schema Definition

```graphql
input MetafieldInput { 
	type: String
	value: String
	key: String
	namespace: String
	description: String
	id: ID 
}
```

## Input field from

* [DiscountAutomaticAppInput](https://developer.shopline.com/docs/admin-graph-ql-api/discounts-and-marketing/inputs/discount-automatic-app-input.md).metafields

  Other metadata linked with the discount.

## Error Handling

For detailed information about common codes, see [Status and error codes](https://developer.shopline.com/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes).

