Custom fields

Get Product Custom Fields

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

Request

Returns a list of product Custom Fields. You can pass in optional parameters.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

  • 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: name | type | sku | description | weight | width | depth | height | price | cost_price | retail_price | sale_price | map_price | tax_class_id | product_tax_code | calculated_price | categories | brand_id | option_set_id | option_set_display | inventory_level | inventory_warning_level | inventory_tracking | reviews_rating_sum | reviews_count | total_sold | fixed_cost_shipping_price | is_free_shipping | is_visible | is_featured | related_products | warranty | bin_picking_number | layout_file | upc | mpn | gtin | date_last_imported | search_keywords | availability | availability_description | condition | is_condition_shown | order_quantity_minimum | order_quantity_maximum | page_title | meta_keywords | meta_description | date_created | date_modified | view_count | preorder_release_date | preorder_message | is_preorder_only | is_price_hidden | price_hidden_label | custom_url | base_variant_id | open_graph_type | open_graph_title | open_graph_description | open_graph_use_meta_description | open_graph_use_product_name | open_graph_use_image

  • exclude_fields in query - array
    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
    Type: array[string]
  • page in query - integer

    Specifies the page number in a limited (paginated) list of products.

  • limit in query with default of 50 - integer

    Controls the number of items per page in a limited (paginated) list of products.

example

Response

Gets array of Custom fields.

Body

object | application/json
  • data
    array[object]

  • meta
    object

    Data about the response, including pagination and collection totals.

example

Create a Product Custom Field

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

Request

Creates a Custom Field.

Required Fields:

  • name
  • value

Name-Value Pair Uniqueness

  • Every name-value pair must be unique inside a product.

Read-Only:

  • id

Limits

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

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • product_id in path - integer
    required

    The ID of the Product to which the resource belongs.

Body

object | application/json
Payload for POST request to create custom fields associated with a product.
  • name
    string
    required

    The name of the field, shown on the storefront, orders, etc. This field is a requirement for /POST requests.

    >= 1 characters<= 250 characters
    Example: ISBN
  • value
    string
    required

    The value of the field, shown on the storefront, orders, etc. This field is a requirement for /POST requests.

    >= 1 characters<= 250 characters
    Example: 1234567890123

example

Response

Gets Custom field.

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

Get a Product Custom Field

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

Request

Returns a Custom Field.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • 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.

  • 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: name | type | sku | description | weight | width | depth | height | price | cost_price | retail_price | sale_price | map_price | tax_class_id | product_tax_code | calculated_price | categories | brand_id | option_set_id | option_set_display | inventory_level | inventory_warning_level | inventory_tracking | reviews_rating_sum | reviews_count | total_sold | fixed_cost_shipping_price | is_free_shipping | is_visible | is_featured | related_products | warranty | bin_picking_number | layout_file | upc | mpn | gtin | date_last_imported | search_keywords | availability | availability_description | condition | is_condition_shown | order_quantity_minimum | order_quantity_maximum | page_title | meta_keywords | meta_description | date_created | date_modified | view_count | preorder_release_date | preorder_message | is_preorder_only | is_price_hidden | price_hidden_label | custom_url | base_variant_id | open_graph_type | open_graph_title | open_graph_description | open_graph_use_meta_description | open_graph_use_product_name | open_graph_use_image

  • exclude_fields in query - array
    Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
    Type: array[string]

example

Response

Gets Custom field.

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

Update a Product Custom Field

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

Request

Updates a Custom Field.

Required Fields

  • none

Name-Value Pair Uniqueness

  • Every name-value pair must be unique inside a product.

Read-Only

  • id

    Limits

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

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • 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.

Body

object | application/json
Payload for PUT request to update custom fields associated with a product.
  • name
    string

    The value of the field, shown on the storefront, orders, etc. This field is a requirement for /POST requests.

    >= 1 characters<= 250 characters
    Example: ISBN
  • value
    string

    The value of the field, shown on the storefront, orders, etc. This field is a requirement for /POST requests.

    >= 1 characters<= 250 characters
    Example: 1234567890123

example

Response

Gets Custom field.

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

Delete a Product Custom Field

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

Request

Deletes a product Custom Field.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • 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.

example

Response

204 No Content
Did you find what you were looking for?