{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ucp.dev/2026-04-08/schemas/shopping/types/selected_option.json",
  "title": "Selected Option",
  "description": "A specific option selection on a variant (e.g., Size: Large).",
  "type": "object",
  "required": [
    "name",
    "label"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "Option name (e.g., 'Size')."
    },
    "id": {
      "type": "string",
      "description": "Optional option value identifier from option_value.id. When present, the server SHOULD use it for matching; name and label remain required for display."
    },
    "label": {
      "type": "string",
      "description": "Selected option label (e.g., 'Large')."
    }
  }
}