Metafields Batch
Get All Customer Metafields
GET https://api.bigcommerce.com/stores/{store_hash}/v3/customers/metafieldsRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list of products.
- key in query - stringFilter based on a metafieldʼs key.
- key:in in query - arrayFilter based on comma-separated metafieldʼs keys. Could be used with vanilla 'key' query parameter.Type: array[string]
- namespace in query - stringFilter based on a metafieldʼs namespaces.
- namespace:in in query - arrayFilter based on comma-separated metafieldʼs namespaces. Could be used with vanilla
namespace
query parameter.Type: array[string] - direction in query - string
Sort direction. Acceptable values are:
asc
,desc
.Allowed: asc | desc
- include_fields in query - arrayFields to include, in a comma-separated list. The ID and the specified fields will be returned.Type: array[string]
Allowed: resource_id | key | value | namespace | permission_set | resource_type | description | owner_client_id | date_created | date_modified
- date_modified:min in query - stringFilter items by minimum date modified. For example,
date_modified:min=
2024-05-14T09:34:00or
date_modified:min=2019-09-04`. Returns metafields modified after this date. - date_modified:max in query - stringFilter items by maximum date modified. For example,
date_modified:max=2019-09-04T00:00:00
ordate_modified:max=2019-09-04
. Returns metafields modified before this date. - date_created:min in query - stringFilter items by minimum date created. For example,
date_created:min=2019-09-04T00:00:00
ordate_created:min=2019-09-04
. Returns metafields created after this date. - date_created:max in query - stringFilter items by maximum date created. For example,
date_created:max=
2024-05-14T09:34:00or
date_created:max=2019-09-04`. Returns metafields created before this date.
example
Response
List of Metafield
objects.
Body
Response payload for the BigCommerce API.
dataarray[object]
example
Create Multiple Metafields
POST https://api.bigcommerce.com/stores/{store_hash}/v3/customers/metafieldsRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
Body
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 Memberresource_idinteger
requiredThe ID for the resource with which the metafield is associated.
Example: 42
example
Response
Body
dataarray[object]
errorsarray[]
Empty for 200 responses.Example: []
example
Update Multiple Metafields
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/customers/metafieldsRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
Body
namespacestring
>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes.
Example: Sales Departmentkeystring
>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
.Example: Staff Namevaluestring
>= 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 Memberidinteger
requiredThe ID of metafield to update.
Example: 42
example
Response
Body
dataarray[object]
errorsarray[]
Empty for 200 responses.Example: []
example
Delete Multiple Metafields
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/customers/metafieldsRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
example
Response
Response object for metafields deletion with success.
Body
Response payload for the BigCommerce API.
dataarray[integer]
Type: array[integer]Example: [123,124,125]errorsarray[]
Empty for 200 responses.Example: []