Skip to navigation

Update Channel Metafield

Updates a single channel metafield.

Usage Notes

  • Attempting to modify namespace, key, and permission_set fields using a client ID different from the one used to create those metafields will result in a 403 error message.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Channel Listingsmodifystore_channel_listings
Channel Listingsread-onlystore_channel_listings_read_only
Channel Settingsmodifystore_channel_settings
Channel Settingsread-onlystore_channel_settings_read_only
Sites & Routesmodifystore_sites
Sites & Routesread-onlystore_sites_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

channel_idlongRequired
The ID of a channel.
metafield_idstringRequired
The ID of the metafield.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects an object.
namespacestringOptional1-64 characters
Namespace for the metafield, for organizational purposes.
keystringOptional1-64 characters
The name of the field.
valuestringOptional1-65535 characters
The value of the field.
permission_setenumOptional

Determines the visibility and writeability of the field by other API consumers.

ValueDescription
app_onlyPrivate to the app that owns the field
readVisible to other API consumers
writeOpen for reading and writing by other API consumers
read_and_sf_accessVisible to other API consumers, including on storefront
write_and_sf_accessOpen for reading and writing by other API consumers, including on storefront
Allowed values:
descriptionstringOptional0-255 characters
Description for the metafield.

Response

OK
dataobjectOptional
Common Metafield properties.
metaobjectOptional
Response metadata.

Errors

400
Bad Request Error
404
Not Found Error