Skip to main content
PUT
/
stores
/
{storeId}
/
products
/
{productId}
/
variants
/
{variantId}
/
fields
/
{fieldId}
Update custom field
curl --request PUT \
  --url https://api.komerza.com/stores/{storeId}/products/{productId}/variants/{variantId}/fields/{fieldId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "<string>",
  "identifier": "<string>",
  "type": "<string>",
  "isRequired": true,
  "placeholder": "<string>",
  "hint": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "code": "<string>",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "dateCreated": "2023-11-07T05:31:56Z",
    "variantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "label": "<string>",
    "identifier": "<string>",
    "type": "<string>",
    "isRequired": true,
    "options": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "dateCreated": "2023-11-07T05:31:56Z",
        "customFieldId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "label": "<string>",
        "value": "<string>",
        "order": 1073741823
      }
    ],
    "placeholder": "<string>",
    "hint": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Your API key goes here

Path Parameters

storeId
string<uuid>
required

The ID of the store containing the product.

productId
string<uuid>
required

The ID of the product.

variantId
string<uuid>
required

The ID of the variant containing the field.

fieldId
string<uuid>
required

The ID of the custom field to update.

Body

The updated custom field details.

Form for creating a new custom field on a product. Options (for select/radio types) are managed via a separate API.

label
string
required

The display label for this custom field.

Required string length: 1 - 128
identifier
string
required

A machine‐friendly identifier (letters, numbers, underscores only).

Required string length: 1 - 64
type
string
required

The type of the field. Must be one of the supported types: text, textarea, select, checkbox, radio, number.

Minimum string length: 1
isRequired
boolean
required

Whether filling out this field is mandatory.

placeholder
string | null

Placeholder text shown when the field is empty (text/textarea only).

Maximum string length: 256
hint
string | null

Optional help text displayed under the field.

Maximum string length: 512

Response

The object was successfully updated.

Represents a default generic response for API endpoints.

success
boolean
required

Indicates whether the operation or response was successful.

message
string | null

A descriptive message providing additional context or information about the response.

code
string | null

The error code (if there was an error) to use when referencing the error

data
object

Represents a user‐defined custom field for a product, allowing additional input or choice.