Documentation Index
Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
Nested:producers → brands → product_lines.
| Action | Method | Who |
|---|---|---|
Index / show / form | GET | Any ODIS user (where not restricted) |
Create / update / aggregate / delete | POST, PATCH, DELETE | Admin or editor |
GET .../form returns a nested payload (line + variants + size assignments) suited to ODIS forms.PATCH .../aggregate applies a partial product-line and nested variant update in one transaction.
Create (POST)
Body uses product_line with optional initial_variant for the first variant and sizes.
Required for create: an initial_variant hash with either size_ids (array) or size_assignments (array of per-size rows). If initial_variant is missing or not a object, the API returns 422 with a clear message.
size_assignments under initial_variant instead of size_ids (see Variants for the row shape). Images on the line use attach_image (multipart or data URI) like elsewhere in ODIS.
Response: 201 with the product line detail (not the full form shape).
Update (PATCH — simple fields)
aggregate for nested variant and size data.
Delete (DELETE)
Removes the product line. Variants and dependent rows follow model dependent rules.
Form (GET .../form)
Returns the FormSerializer shape, including at least:
id,name,description,metadata,brand_id,category_id,subcategory_idsbottle_image_url,label_image_urlbrand(compact),producer(contextual toproducer_idin the path when present)variants: array of variant rows, each witheffective_name,effective_metadata,size_assignments, and optional image URLs (variant overrides line images when set)
size_assignments rows include the parent size (size_id, milliliters, display) plus per-row fields: upc, pricing, rarity, optionals, sb_attributes, etc.
Aggregate (PATCH .../aggregate)
Admin or editor. Sends a product_line object that may include:
- Line fields:
name,description,category_id,metadata,subcategory_ids - Optional
bottle_image/label_image(data URI or upload, same as other ODIS attach flows) variants: array of entries to create/update/destroy (see below)
200 with the same shape as GET .../form (reloads associations).
Variant entries in variants
For each object you may set:
id— existing variant to update, or omit to create_destroy: true— withid, deletes that variantproducer_id,display_name,batch_name,vintage_year,released_at,sku,proof,metadatasize_assignments— replaces all variant sizes for that variant when the key is present (empty array removes all)bottle_image/label_image— optional variant-level images
size_assignments array items match the Variants page (at minimum size_id, optional upc and other pricing fields). If the server rejects nested validation, the response is 422 and message may describe variant or size errors (often a joined string or summary).
Errors
- 403 if not admin/editor on mutating actions.
- 404 for unknown producer, brand, or product line.
- 422 for validation, missing
initial_varianton create, or failed aggregate persistence.
Example (aggregate)
size_assignments and UPC rules.
