> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

## Bug fix: Missing Fields in Oligo Serialization for Container Contents

### Bug Description

When DNA or RNA oligos appeared as entities in plate well contents or container contents (via the `/v2/plates/{plate_id}` or `/v2/containers/{container_id}/contents` endpoints), the API response was missing several fields.

**Missing fields:**

* `nucleotideType` - The type of nucleotide (DNA or RNA)
* `helm` - HELM notation representation of the oligo
* `customNotation` - Custom vendor notation (if specified)
* `customNotationName` - Name of the custom notation (if specified)

Without these fields, the generated API client couldn't interpret the entities in the API Response as oligos. Additionally, the Entity union was missing a discriminator, making it difficult for API clients to determine the concrete entity type. Without a discriminator, the client would try each possible type and take the first that works. Since the oligo types didn't work, `DnaSequence` and `CustomEntity` would be selected.

### Changes to API Behavior

#### Container Content Entity Responses

When retrieving containers or plates, any oligos in the `contents[].entity` field now include all oligo-specific fields (`nucleotideType`, `helm`, `customNotation`, `customNotationName`)

#### Entity Discriminator

All entity objects now include an `entityType` discriminator field that identifies the concrete entity type:

* DNA sequences: `"entityType": "dna_sequence"`
* RNA sequences: `"entityType": "rna_sequence"`
* AA sequences: `"entityType": "aa_sequence"`
* Mixtures: `"entityType": "mixture"`
* DNA oligos: `"entityType": "dna_oligo"`
* RNA oligos: `"entityType": "rna_oligo"`
* Molecules: `"entityType": "molecule"`
* Custom entities: `"entityType": "custom_entity"`

This discriminator is now present in:

* Container content entities (`/v2/containers/{container_id}/contents`)
* Plate well content entities (`/v2/plates/{plate_id}`)
* Request response sample entities (`/v2/requests/{request_id}/response`)

### Changes to OpenAPI Schema

In a forthcoming SDK release, the API client will use the discriminator for type differentiation rather than the list of present fields. As a result of the discriminator's presence, the `Entity` will resolve into a `*WithEntityType` object:

* `DnaSequence --> DnaSequenceWithEntityType`
* `RnaSequence --> RnaSequenceWithEntityType`
* `AaSequence --> AaSequenceWithEntityType`
* `Mixture --> MixtureWithEntityType`
* `DnaOligo --> DnaOligoWithEntityType`
* `RnaOligo --> RnaOligoWithEntityType`
* `Molecule --> MoleculeWithEntityType`
* `CustomEntity --> CustomEntityWithEntityType`