Metafields
Get Product Metafields
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/metafieldsRequest
Returns a list of Product Metafields. Optional parameters can be passed in.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
dataarray[object]
example
Create a Product Metafield
POST https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/metafieldsRequest
Creates a Product Metafield.
Required Fields:
- permission_set
- namespace
- key
- value
Note: The maxiumum number of metafields allowed on each order, product, category, variant, or brand is 250 per client ID. For more information, see Platform Limits in the Help Center.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Metafield for products, categories, variants, and brands; the max number of metafields allowed on each is 250. For more information, see Platform Limits in the Help Center.
keystring
required>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
. Required for POST.Example: Locationvaluestring
required>= 1 characters<= 65535 charactersThe value of the field, for example:
1
,blue
. Required for POST.Example: 4HGnamespacestring
required>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes. This is set by the developer. Required for POST.
Example: Warehouse Locationsdescriptionstring
>= 0 characters<= 255 charactersDescription for the metafields.
Example: Location in the warehouse
example
Response
Body
data
example
Get a Product Metafield
GET https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/metafields/{metafield_id}Request
Returns a single Product Metafield. Optional parameters can be passed in.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
data
example
Update a Product Metafield
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/metafields/{metafield_id}Request
Updates a Product Metafield.
Required Fields
- none
Read-Only Fields
- id
- These fields can only be modified using the API account that created the metafield:
namespace
key
permission_set
value
Usage Notes
- Attempting to modify the
namespace
,key
,permission_set
, orvalue
field using an API account different from the one used to create those metafields will result in a403
error message.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Metafield for products, categories, variants, and brands; the max number of metafields allowed on each is 250. For more information, see Platform Limits in the Help Center.
keystring
required>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
. Required for POST.Example: Locationvaluestring
required>= 1 characters<= 65535 charactersThe value of the field, for example:
1
,blue
. Required for POST.Example: 4HGnamespacestring
required>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes. This is set by the developer. Required for POST.
Example: Warehouse Locationsdescriptionstring
>= 0 characters<= 255 charactersDescription for the metafields.
Example: Location in the warehouse
example
Response
Body
data
example
Delete a Product Metafield
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/catalog/products/{product_id}/metafields/{metafield_id}Request
Deletes a Product Metafield.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string