Thanks for being patient while we implement your feedback to improve the developer experience.

Get Custom Fields

GET /catalog/products/{product_id}/custom-fields

Request

Returns a list of product Custom Fields. Optional parameters can be passed in.

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.

  • product_id in path - integer - required

    The ID of the Product to which the resource belongs.

  • include_fields in query - string

    Fields to include, in a comma-separated list. The ID and the specified fields will be returned.

  • exclude_fields in query - string

    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.

  • 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.

example

curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/custom-fields' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'

Response

Body

object | application/json
  • data
    array[object]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

{ "data": [ { "name": "Release year", "value": "1987", "id": 1 } ], "meta": { "pagination": { "total": 1, "count": 1, "per_page": 50, "current_page": 1, "total_pages": 1, "links": { "previous": "?page=1&limit=50", "current": "?page=1&limit=50", "next": "?page=1&limit=50" } } } }

Create a Custom Fields

POST /catalog/products/{product_id}/custom-fields

Request

Creates a Custom Field.

Required Fields:

  • name
  • value

Read-Only:

  • id

Limits

  • 200 custom fields per product limit.
  • 255 characters per custom field limit.

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

object | application/json

Gets custom fields associated with a product. These allow you to specify additional information that will appear on the product’s page, such as a book’s ISBN or a DVD’s release date.

  • name
    string
    required

    The name of the field, shown on the storefront, orders, etc. Required for /POST

    >= 1 characters<= 250 characters

    Example: ISBN

  • value
    string
    required

    The name of the field, shown on the storefront, orders, etc. Required for /POST

    >= 1 characters<= 250 characters

    Example: 1234567890123

example

{ "name": "ISBN", "value": "1234567890123" }

Response

Body

object | application/json
  • data
    object

    Gets custom fields associated with a product. These allow you to specify additional information that will appear on the product’s page, such as a book’s ISBN or a DVD’s release date.

  • meta
    object

    Response metadata.

example

{ "data": { "name": "Release Year", "value": "1976", "id": 2 }, "meta": {} }

Get a Custom Field

GET /catalog/products/{product_id}/custom-fields/{custom_field_id}

Request

Returns a single Custom Field. Optional parameters can be passed in.

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.

  • product_id in path - integer - required

    The ID of the Product to which the resource belongs.

  • custom_field_id in path - integer - required

    The ID of the CustomField.

  • custom_field_id in path - integer - required

    The ID of the CustomField.

  • include_fields in query - string

    Fields to include, in a comma-separated list. The ID and the specified fields will be returned.

  • exclude_fields in query - string

    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.

example

curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/custom-fields/[custom_field_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'

Response

Body

object | application/json
  • data
    object

    Gets custom fields associated with a product. These allow you to specify additional information that will appear on the product’s page, such as a book’s ISBN or a DVD’s release date.

  • meta
    object

    Response metadata.

example

{ "data": { "name": "Release Year", "value": "1976", "id": 2 }, "meta": {} }

Update a Custom Field

PUT /catalog/products/{product_id}/custom-fields/{custom_field_id}

Request

Updates a Custom Field.

Required Fields

  • none

Read-Only

  • id

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.

  • custom_field_id in path - integer - required

    The ID of the CustomField.

Body

object | application/json

Gets custom fields associated with a product. These allow you to specify additional information that will appear on the product’s page, such as a book’s ISBN or a DVD’s release date.

  • id
    integer

    The unique numeric ID of the custom field; increments sequentially. Read-Only

    Example: 6

  • name
    string
    required

    The name of the field, shown on the storefront, orders, etc. Required for /POST

    >= 1 characters<= 250 characters

    Example: ISBN

  • value
    string
    required

    The name of the field, shown on the storefront, orders, etc. Required for /POST

    >= 1 characters<= 250 characters

    Example: 1234567890123

example

{ "id": 6, "name": "ISBN", "value": "1234567890123" }

Response

Body

object | application/json
  • data
    object

    Gets custom fields associated with a product. These allow you to specify additional information that will appear on the product’s page, such as a book’s ISBN or a DVD’s release date.

  • meta
    object

    Response metadata.

example

{ "data": { "name": "Release Year", "value": "1976", "id": 2 }, "meta": {} }

Delete a Custom Field

DELETE /catalog/products/{product_id}/custom-fields/{custom_field_id}

Request

Deletes a product Custom Field.

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.

  • product_id in path - integer - required

    The ID of the Product to which the resource belongs.

  • custom_field_id in path - integer - required

    The ID of the CustomField.

  • custom_field_id in path - integer - required

    The ID of the CustomField.

example

curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v3/catalog/products/[product_id]/custom-fields/[custom_field_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'

Response

204 No Content. Action has been enacted and no further information is to be supplied. null is returned.