[Migration map](../reference/tool-name-migration.md).
# segment_options
Discover the current source condition wizard hierarchy, option codes and input requirements. Access, channelCode and navigation follow the [segment reader](publ_segments_get.md#access-and-identity).
## Input
All objects are strict; selection defaults to {kind:majors}. Codes must be observed in the preceding hierarchy, not inferred from labels. majorCategoryCode and subjectCode match `[A-Z0-9_-]{1,64}`.
| Input | Contract |
| --- | --- |
| channelCode | Required selected channel code. |
| selection | Optional discriminated object. |
| selection.kind | majors, subjects, items or condition. |
| selection.majorCategoryCode | Required after majors. |
| selection.subjectCode | Required for items/condition. |
| selection.itemCode | Condition only; integer 0–999999. Convert an observed padded source code such as 001 to numeric 1. |
| selection.evaluationType | Condition only; FINALIZED or MUTABLE, copied from the selected item. |
```json
{"channelCode":"selected-channel-code"}
```
```json
{"channelCode":"selected-channel-code","selection":{"kind":"subjects","majorCategoryCode":"USER"}}
```
```json
{"channelCode":"selected-channel-code","selection":{"kind":"items","majorCategoryCode":"USER","subjectCode":"A"}}
```
```json
{"channelCode":"selected-channel-code","selection":{"kind":"condition","majorCategoryCode":"USER","subjectCode":"A","itemCode":1,"evaluationType":"FINALIZED"}}
```
USER/A/1 are illustrative source/demo selections; discover the actual selected-channel hierarchy before use.
## Composition and output
The workflow reads all parents needed for the requested level, repeats the entire hierarchy, then checks channel/context continuity. It verifies unique numeric ids and source keys, correct parents, one selected item with matching numeric code/evaluation type, and a definition whose classificationCodeGroup, valueType and targetEntity agree with that item. A present channelId must match. Each catalogue/options array is bounded to 5,000 entries; option values must be unique.
Success returns SEGMENT_OPTIONS, majorCategories and, depending on selection depth, subjects, items, selectedItem and item. Catalogue rows expose observed ids/codes/names; subjects identify their parent, and items add classificationCodeGroup, evaluationType, valueType, targetEntity, contextualFieldTemplate and releaseStatus. The item definition projects classificationCodeGroup/name/majorCategoryCode/subjectCode/evaluationType/valueType/targetEntity/contextualFieldTemplate, contextualFieldSlots and options containing value/name/description. Copy an option's value into classificationCode.
contextualFieldSlots.value.inputType identifies the value renderer. entity has inputType NONE or ENTITY_SELECT_MODAL, targetEntity and config with optional useMultiSelect/useEntitySelectModal. Use [entity discovery](publ_segment_entities.md) only when required. The writer enforces [supported value and selection rules](publ_segment_preview.md#composition-rules).
revision hashes context plus the selected catalogue; it is not an update revision. creationRevision separately binds create context. A writer update/delete requires the detail reader's revision. writesPerformed:false and verification {confirmed:true,atomicSnapshot:false} establish catalogue observation only.
Draft, Upcoming and Sunset items cannot be newly selected; Deprecated is available with a warning, while Released and Released(!) are not rejected by this release gate. MUTABLE may be saved but has no count preview. No default all-user option is auto-selected. Unknown/nested installed-feature selectors remain unsupported. This GET-only method performs no save, count, entity-resolution POST or task creation.
Current observations use the [bounded response and recovery rules](../guides/segments.md#oversized-responses-and-recovery).
An oversized response is not a successful empty result. If a write was already
sent, retain its original task and reconcile; the failed read does not authorize
repeating the change.
## Inputs
| Field | Required here | Contract |
| --- | --- | --- |
| `selection` | No | one of: `majors`, `subjects`, `items`, `condition` (by `kind`); default `{"kind":"majors"}` |
| `selection.majorCategoryCode` | Yes | When `selection.kind` is `subjects`: string; pattern `^[A-Z0-9_-]{1,64}$` |
| `selection.majorCategoryCode` | Yes | When `selection.kind` is `items`: string; pattern `^[A-Z0-9_-]{1,64}$` |
| `selection.subjectCode` | Yes | When `selection.kind` is `items`: string; pattern `^[A-Z0-9_-]{1,64}$` |
| `selection.majorCategoryCode` | Yes | When `selection.kind` is `condition`: string; pattern `^[A-Z0-9_-]{1,64}$` |
| `selection.subjectCode` | Yes | When `selection.kind` is `condition`: string; pattern `^[A-Z0-9_-]{1,64}$` |
| `selection.itemCode` | Yes | When `selection.kind` is `condition`: integer; minimum 0; maximum 999999 |
| `selection.evaluationType` | Yes | When `selection.kind` is `condition`: `FINALIZED`, `MUTABLE` |