Skip to main content
Skip to Content
DocsManagement APICartsBatch MetafieldsBatch Metafields

Batch metafields

Get All Cart Metafields

GET /carts/metafields

Request

Get all cart metafields.

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 - 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.
    Type: array[string]
  • 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
    Type: array[string]
  • direction in query - string

    Sort direction. Acceptable values are: asc, desc.

    Allowed: asc | desc

  • include_fields in query - array
    Fields 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 - string

    'Query parameter that lets you filter by the minimum date modified created, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields modified after this date.'

  • date_modified:max in query - string

    'Query parameter that lets you filter by the maximum date modified created, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields modified before this date.'

  • date_created:min in query - string

    'Query parameter that lets you filter by the minimum date created, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields created after this date.'

  • date_created:max in query - string

    'Query parameter that lets you filter by the maximum date created, for example, 2024-05-14T09:34:00 or 2024-05-14. Returns metafields created before this date.'

example

Response

List of Metafield objects.

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[object]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

Create multiple Metafields

POST /carts/metafields

Request

Create multiple metafields.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string

Body

array | application/json

example

Response

List of created Metafield objects.

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[object]

  • errors
    array[]

    Empty for 200 responses.
    Example: []
  • meta
    object

    Additional data about the response.

example

Update multiple Metafields

PUT /carts/metafields

Request

Create multiple metafields.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string

Body

array | application/json

example

Response

List of updated Metafield objects.

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[object]

  • errors
    array[]

    Empty for 200 responses.
    Example: []
  • meta
    object

    Additional data about the response.

example

Delete multiple Metafields

DELETE /carts/metafields

Request

Delete all cart metafields.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
List of metafield ids.

Body

array | application/json

    example

    Response

    Response object for metafields deletion with success.

    Body

    object | application/json

    Response payload for the BigCommerce API.

    • data
      array[integer]

      Type: array[integer]
      Example: [123,124,125]
    • errors
      array[]

      Empty for 200 responses.
      Example: []
    • meta
      object

      Additional data about the response.

    example

    Did you find what you were looking for?