BigCommerce
Catalog API
Batch Metafields

Catalog - Categories

Get All Category Metafields

GET /catalog/categories/metafields

Request

Get all category metafields.

Authentication

  • X-Auth-Token in header
    required

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

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 /catalog/categories/metafields

Request

Create multiple metafields.

Authentication

  • X-Auth-Token in header
    required

Parameters

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

    The MIME type of the request body.

Body

array | application/json
  • 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

  • resource_id
    integer
    required

    The ID for the category with which the metafield is associated.

    Example: 42

    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

      Data about the response, including pagination and collection totals.

    example

    Update multiple Metafields

    PUT /catalog/categories/metafields

    Request

    Create multiple metafields.

    Authentication

    • X-Auth-Token in header
      required

    Parameters

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

      The MIME type of the request body.

    Body

    array | application/json
    • permission_set
      string

      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

      Namespace for the metafield, for organizational purposes.

      >= 1 characters<= 64 characters

      Example: Sales Department

    • key
      string

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

      >= 1 characters<= 64 characters

      Example: Staff Name

    • value
      string

      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

    • id
      integer
      required

      The ID of metafield to update.

      Example: 42

      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

        Data about the response, including pagination and collection totals.

      example

      Delete All Metafields

      DELETE /catalog/categories/metafields

      Request

      Delete all category metafields.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • Accept in header with default of application/json - string
        required

        The MIME type of the response body.

      List of metafield IDs.

      Body

      array | application/json

        example

        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?