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

Authorizations

Authorization
string
header
required

Your API key goes here

Path Parameters

storeId
string<uuid>
required

The ID of the store.

productId
string<uuid>
required

The ID of the product.

variantId
string<uuid>
required

The ID of the variant.

fieldId
string<uuid>
required

The ID of the parent custom field.

Body

The form containing new option details.

Form for creating or updating an option for a custom field.

label
string
required

The user-facing label for this option.

Required string length: 1 - 128
value
string
required

The stored value for this option (often same as Label).

Required string length: 1 - 64
order
integer<int32>
required

Sort order among sibling options.

Required range: 0 <= x <= 2147483647

Response

The object was successfully created.

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 one of the selectable options for a CustomField.