Skip to navigation

Update Cart Metafield

Update a Metafield, by cart_id.

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Cartsmodifystore_cart
Cartsread-onlystore_cart_read_only
Information & Settingsmodifystore_v2_information
Information & Settingsread-onlystore_v2_information

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

cart_idstringRequiredformat: "UUID"

The ID of the Cart to which the transactions belong.

metafield_idintegerRequired

The unique ID of the subject Metafield.

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

A Metafield object.

permission_setenumRequired

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 the storefront.
write_and_sf_accessOpen for reading and writing by other API consumers, including on the storefront.
Allowed values:
namespacestringRequired1-64 characters
Namespace for the metafield, for organizational purposes.
keystringRequired1-64 characters

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

valuestringRequired1-65535 characters

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

descriptionstringOptional0-255 characters
Description for the metafields.

Response

A Metafield and metadata.

dataobjectOptional
Allows app partners to write custom data to various resources in the API.
metaobjectOptional
Response metadata.

Errors

400
Bad Request Error
422
Unprocessable Entity Error