Skip to main content

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

GET    /odis/v1/sizes
GET    /odis/v1/sizes/:id
POST   /odis/v1/sizes
PATCH  /odis/v1/sizes/:id
DELETE /odis/v1/sizes/:id
MethodPathNotes
GET/odis/v1/sizesPaginated list; any ODIS user
GET/odis/v1/sizes/:idShow one
POST/odis/v1/sizesAdmin or editor
PATCH/odis/v1/sizes/:idAdmin or editor
DELETE/odis/v1/sizes/:idAdmin or editor; may fail if sizes are still in use

Request bodies

Create (POST):
{
  "size": {
    "milliliters": 750,
    "display": "750 ml"
  }
}
  • milliliters — integer, required, unique in the table.
  • display — string, required, unique case-insensitively.
Update (PATCH): same size object with fields to change.

Responses

  • List: { "total", "has_more", "data" } where each row includes id, milliliters, display.
  • Show / create / update: a single Size object with those fields.

Errors

  • 422 — validation (duplicate milliliters or display, blank display, etc.), or database uniqueness on milliliters surfaced as a clear message in some cases.
  • 403 on mutating methods if the user is not admin or editor.
  • Deleting a size that is still referenced may return 422 with a message that the size is still linked to variants.
See Spirits catalog overview for auth and message error shape.

Example

GET /odis/v1/sizes
curl -sS -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  "https://api.onlydrams.app/odis/v1/sizes?page=1&per=20"
POST /odis/v1/sizes
curl -sS -X POST "https://api.onlydrams.app/odis/v1/sizes" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"size":{"milliliters":500,"display":"500 ml"}}'