Metafields

Get a Store Metafield

GET /store/metafields/{metafieldId}

Request

Gets a store metafield.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    The MIME type of the response body.
  • metafieldId in path - integer
    required

    The ID of the Metafield.

example

Response

A Metafield object.

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    object

    Allows app partners to write custom data to various resources in the API.

  • meta
    object

    Response metadata.

example

Update a Store Metafield

PUT /store/metafields/{metafieldId}

Request

Update a store Metafield.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    The MIME type of the response body.
  • metafieldId in path - integer
    required

    The ID of the Metafield.

  • Content-Type in header with default of application/json - string

A Metafield object.

Body

object | application/json

Common Metafield properties.

  • permission_set
    string
    required

    Determines the visibility and writeability of the field by other API consumers.

    ValueDescription
    app_onlyPrivate to the app that owns the field.
    readVisible to other API consumers.
    writeOpen for reading and writing by other API consumers.
    read_and_sf_accessVisible to other API consumers, including on the storefront.
    write_and_sf_accessOpen 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

  • namespace
    string
    required

    Namespace for the metafield, for organizational purposes.

    >= 1 characters<= 64 characters
    Example: Sales Department
  • key
    string
    required

    The name of the field, for example: location_id, color.

    >= 1 characters<= 64 characters
    Example: Staff Name
  • value
    string
    required

    The value of the field, for example: 1, blue.

    >= 1 characters<= 65535 characters
    Example: Ronaldo
  • description
    string

    Description for the metafields.

    >= 0 characters<= 255 characters
    Example: Name of Staff Member

example

Response

A metafield and metadata.

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    object

    Allows app partners to write custom data to various resources in the API.

  • meta
    object

    Response metadata.

example

Delete a Metafield

DELETE /store/metafields/{metafieldId}

Request

Deletes a store Metafield.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    The MIME type of the response body.
  • metafieldId in path - integer
    required

    The ID of the Metafield.

example

Response

An empty response.

Did you find what you were looking for?