Webhooks
Models
Catalog
Catalog
Products
Product Bulk Pricing Rules
Product Custom Fields
Product Images
Product Variant Options
Product Variant Option Values
Product Variants
Product Variants Metafields
Product Modifiers
Product Modifier Values
Product Modifier Images
Product Complex Rules
Product Reviews
Product Videos
Brands
Brand Metafields
Brand Images
Category
Category Metafields
Category Images
Variants
Models
post

/catalog/products/{product_id}/metafields

Creates a Product Metafield.

Required Fields:

  • permission_set
  • namespace
  • key
  • value

Read-Only Fields

  • id

Authorization

apiKey - X-Auth-Client
apiKey - X-Auth-Token

Request Parameters

1 Path Parameter
2 Headers

Request Body

1 Example
Schema
object

Common Metafield properties.

id
integer

Unique ID of the Metafield. Read-Only.

1 validation
permission_set
string

Determines whether the field is completely private to the app that owns the field (app_only), or visible to other API consumers (read), or completely open for reading and writing to other apps (write). Required for POST.

2 validations + required
namespace
string

Namespace for the metafield, for organizational purposes. This is set set by the developer. Required for POST.

4 validations + required
key
string

The name of the field, for example: location_id, color. Required for POST.

4 validations + required
value
string

The value of the field, for example: 1, blue. Required for POST.

4 validations + required
description
string

Description for the metafields.

3 validations
resource_type
string

The type of resource with which the metafield is associated.

3 validations
resource_id
integer

The ID for the resource with which the metafield is associated.

4 validations
created_at
string

Date and time of the metafield’s creation. Read-Only.

2 validations
updated_at
string

Date and time when the metafield was last updated. Read-Only.

2 validations

Responses

1 Example
Schema
object
data
object

Common Metafield properties.

meta
object

Empty meta object; may be used later.

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
Path Params
2 path params not set
store_hash
product_id
$$.env
2 variables not set
X-Auth-Client
X-Auth-Token