BoldSales

API Documentation

Add product field options

post/api/v1/products/fields/{fieldId}/options

Adds a new field option to the specified field in the product module, identified by its field ID.

Code snippet

curl -X 'POST' \
  'https://{yourdomain}/api/v1/products/fields/{fieldId}/options' \
  -H 'accept: text/plain; x-api-version=1.0' \
  -H 'x-api-key: {your API key}' \
  -H 'Content-Type: application/json-patch+json; x-api-version=1.0' \
  -d '{
    "data": {
      "options": ["India", "England", "China"]
    }
  }'

Path parameters

fieldIdintegerRequiredThe unique identifier of the field to which the options will be added.

Request body

optionsarrayRequiredA list of string values that defines the selectable options for the field. Each string in the list is added as an individual option that users can select.

Example response

201 Created

{
  "message": "Field option(s) added successfully."
}