Metafields
Get Metafields
GET https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locations/{location_id}/metafieldsRequest
Retrieve metafields for a location.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
The request has been successfully processed.
Body
dataarray[object]
Create a Metafield
POST https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locations/{location_id}/metafieldsRequest
Create a location metafield.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Common metafield properties.
keystring
>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
.Example: statusvaluestring
>= 1 characters<= 65535 charactersThe value of the field, for example:
1
,blue
.Example: upcomingnamespacestring
>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes.
Example: headquartersdescriptionstring
>= 0 characters<= 255 charactersDescription for the metafields.
example
Response
The request has been successfully processed.
Body
data
Allows app partners to write custom data to various resources in the API.
Get a Metafield
GET https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locations/{location_id}/metafields/{metafield_id}Request
Get a metafield by location.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
The request has been successfully processed.
Body
data
Allows app partners to write custom data to various resources in the API.
Update a Metafield
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locations/{location_id}/metafields/{metafield_id}Request
Update a metafield.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
Common metafield properties.
keystring
>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
.Example: statusvaluestring
>= 1 characters<= 65535 charactersThe value of the field, for example:
1
,blue
.Example: upcomingnamespacestring
>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes.
Example: headquartersdescriptionstring
>= 0 characters<= 255 charactersDescription for the metafields.
example
Response
The request has been successfully processed.
Body
data
Allows app partners to write custom data to various resources in the API.
Delete a Metafield
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/inventory/locations/{location_id}/metafields/{metafield_id}Request
Delete a metafield.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
No Content