Metafields
Get Order Metafields
GET https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/metafieldsRequest
Gets a Metafield
object list, by order_id
.
The maximum number of metafields allowed on each order, product, category, variant, or brand is 250 per client ID.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
An array of metafields and metadata.
Body
Response payload for the BigCommerce API.
dataarray[]
Create Metafields
POST https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/metafieldsRequest
Creates an order Metafield
.
The maximum number of metafields allowed on each order, product, category, variant, or brand is 250 per client ID.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
A Metafield
object.
Body
Common Metafield properties.
namespacestring
required>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes.
Example: Sales Departmentkeystring
required>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
.Example: Staff Namevaluestring
required>= 1 characters<= 65535 charactersThe value of the field, for example:
1
,blue
.Example: Ronaldodescriptionstring
>= 0 characters<= 255 charactersDescription for the metafields.
Example: Name of Staff Member
example
Response
A Metafield
object.
Body
Response payload for the BigCommerce API.
example
Get a Metafield
GET https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/metafields/{metafield_id}Request
Gets a Metafield
, by order_id
.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- metafield_id in path - integerrequired
The ID of the
Metafield
.
example
Response
A Metafield
object.
Body
Response payload for the BigCommerce API.
example
Update a Metafield
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/metafields/{metafield_id}Request
Updates a Metafield
object.
The maximum number of metafields allowed on each order, product, category, variant, or brand is 250 per client ID.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- metafield_id in path - integerrequired
The ID of the
Metafield
.
A Metafield
object.
Body
The model for a PUT to update metafield.
example
Response
A metafield and metadata.
Body
Response payload for the BigCommerce API.
example
Delete a Metafield
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/metafields/{metafield_id}Request
Deletes a Metafield
.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- metafield_id in path - integerrequired
The ID of the
Metafield
.
example
Response
An empty response.