Strain

Create or update a strain

Create or update a strain through a single endpoint: omit id to create a new strain, or pass the id of an existing one to update it in place. A strain is a catalog/reference record used to classify products by genetics — it holds no inventory and is not pushed to Metrc or BioTrack, so calling this never moves stock or touches state-compliance traceability. What it does affect is your product catalog and menus: products are grouped under a strain, so renaming a strain or changing its type reflects everywhere that strain is shown, without altering the products themselves. To remove a strain from your catalog entirely, use the delete endpoint instead.

Updates are sparse. Only the fields you send are changed; any field you omit keeps its current value (sending id with just name renames the strain and leaves strain_type untouched). The whole write is a single all-or-nothing operation — if validation fails, nothing is persisted and a 400 is returned with the field errors.

name must be unique within your company; reusing an existing strain's name is rejected with a 400. On success the response is the full created or updated strain, the same shape as show.

Required permission: settings_permissions_strains.

post/public/v1/strains

Request

  • Base URL
    https://app.distru.com
  • Auth
    HTTP bearer

Request body

idstring

The Distru id of the strain to update, as returned by list/show/upsert. Omit to create a new strain instead. When present, the strain must belong to your company or the request returns 404. Not a Metrc or other external identifier.

namestring

Display name of the strain (e.g. "Blue Dream"). Required when creating (no id); optional when updating, where omitting it leaves the current name unchanged. Leading/trailing whitespace is trimmed before it is stored and checked. Must be unique within your company — uniqueness is compared exactly and case-sensitively on the trimmed value, so "Blue Dream" and "blue dream" are treated as different names. May not contain special characters. A duplicate or invalid name returns 400.

strain_type'INDICA' | 'INDICA_DOMINANT' | 'SATIVA' | 'SATIVA_DOMINANT' | 'HYBRID' | 'HIGH_CBD'

The strain's genetic classification, SCREAMING_CASE: INDICA or SATIVA for a pure variety, INDICA_DOMINANT or SATIVA_DOMINANT for a leaning hybrid, HYBRID for a balanced hybrid, or HIGH_CBD. Optional — a strain may have no classification, and omitting this on update leaves the current value unchanged.

Response

The created or updated strain

Changes

No recorded changes to this operation across all 17 revisions of this API.