Carts
Get All Cart Metafields
GET /stores/{store_hash}/v3/carts/metafields
Request
Get all cart metafields.
Authentication
- X-Auth-Token in headerrequired
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 - string
Filter based on a metafieldʼs key.
- key:in in query - array
Filter based on comma-separated metafieldʼs keys. Could be used with vanilla
key
query parameter. - namespace in query - string
Filter based on a metafieldʼs namespaces.
- namespace:in in query - array
Filter based on comma-separated metafieldʼs namespaces. Could be used with vanilla
namespace
query parameter - direction in query - string
Sort direction. Acceptable values are:
asc
,desc
.Allowed values: asc | desc
example
Response
List of Metafield
objects.
Body
Response payload for the BigCommerce API.
dataarray[object]
metaobject
Data about the response, including pagination and collection totals.
example
Create multiple Metafields
POST /stores/{store_hash}/v3/carts/metafields
Request
Create multiple metafields.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
permission_setstring
requiredDetermines the visibility and writeability of the field by other API consumers.
Value Description app_only
Private to the app that owns the field. read
Visible to other API consumers. write
Open for reading and writing by other API consumers. read_and_sf_access
Visible to other API consumers, including on the storefront. write_and_sf_access
Open for reading and writing by other API consumers, including on the storefront. Allowed: app_only | read | write | read_and_sf_access | write_and_sf_access
namespacestring
required>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes.
Example: Sales Department
keystring
required>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
.Example: Staff Name
valuestring
required>= 1 characters<= 65535 charactersThe value of the field, for example:
1
,blue
.Example: Ronaldo
descriptionstring
>= 0 characters<= 255 charactersDescription for the metafields.
Example: Name of Staff Member
resource_idstring
requiredThe ID for the cart with which the metafield is associated.
Example: 42
example
Response
List of created Metafield
objects.
Body
Response payload for the BigCommerce API.
dataarray[object]
errorsarray[]
Empty for 200 responses.
Example: []
metaobject
Data about the response, including pagination and collection totals.
example
Update multiple Metafields
PUT /stores/{store_hash}/v3/carts/metafields
Request
Create multiple metafields.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
permission_setstring
requiredDetermines the visibility and writeability of the field by other API consumers.
Value Description app_only
Private to the app that owns the field. read
Visible to other API consumers. write
Open for reading and writing by other API consumers. read_and_sf_access
Visible to other API consumers, including on the storefront. write_and_sf_access
Open for reading and writing by other API consumers, including on the storefront. Allowed: app_only | read | write | read_and_sf_access | write_and_sf_access
namespacestring
required>= 1 characters<= 64 charactersNamespace for the metafield, for organizational purposes.
Example: Sales Department
keystring
required>= 1 characters<= 64 charactersThe name of the field, for example:
location_id
,color
.Example: Staff Name
valuestring
required>= 1 characters<= 65535 charactersThe value of the field, for example:
1
,blue
.Example: Ronaldo
descriptionstring
>= 0 characters<= 255 charactersDescription for the metafields.
Example: Name of Staff Member
idstring
requiredThe ID of metafield to update.
Example: 42
example
Response
List of updated Metafield
objects.
Body
Response payload for the BigCommerce API.
dataarray[object]
errorsarray[]
Empty for 200 responses.
Example: []
metaobject
Data about the response, including pagination and collection totals.
example
Delete All Metafields
DELETE /stores/{store_hash}/v3/carts/metafields
Request
Delete all cart metafields.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
List of metafield id
s.
Body
example
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: []
metaobject
Additional data about the response.