Product options API

Create product option

Creates new product option for given catalog

post/api/sites/multiscreen/{site_name}/ecommerce/options

Request

  • Base URL
    https://api.duda.co
  • URL
    https://api.duda.co/api/sites/multiscreen/{site_name}/ecommerce/options
  • Auth
    HTTP basic

Path parameters

site_namestring required

The site's unique name (its ID), returned when the site is created.

Request body

namestring required

Displayed option name

type'TEXT' | 'COLOR' nullable

Product option type

Example request

{
  "choices": [
    {
      "value": "Red",
      "color": "#FF0000"
    },
    {
      "value": "Blue",
      "color": "#0000FF"
    }
  ],
  "name": "Shirt size",
  "type": "COLOR"
}

Response

OK

idstring

Immutable identifier for referencing

namestring

Displayed option name

type'TEXT' | 'COLOR' nullable

Product option type

Example response

{
  "choices": [
    {
      "id": "db3je27rg7",
      "value": "45"
    }
  ],
  "id": "WMd1xylGrp",
  "name": "Shirt size",
  "type": "COLOR"
}

Changes

No recorded changes to this operation across all 1 revision of this API.