DOBRUK API

Public APIs & webhooks for dobruk.pl (OPUB, daycard, integrations)

This subdomain is dedicated to HTTP APIs and webhooks (e.g., WhatsOnChain plugin endpoints).

/daycard.php

GET

Description: Daily "day card" API. Returns a calendar card for the requested date (defaults to today in Europe/Warsaw).

PARAMETERS
date (query) — optional • string • YYYY-MM-DD
Target date. If omitted or invalid, API uses today (Europe/Warsaw).
RESPONSE FIELDS
ok: boolean
date: string (YYYY-MM-DD)
offset: int (days difference relative to today)
pretty_date: string (Polish formatted date label)
week_no: int (ISO week number)
day_of_year: int
days_in_year: int (365/366)
is_today: boolean
card: object|null
card.title: string
card.lead: string
card.names: string
card.events: string[]
card.astro: string[]
NOTES
- Timezone: Europe/Warsaw.
- The card is looked up by month+day (year-independent) from table calendar__card.
- Locale is fixed to pl-PL and only active entries (status_id=1) are returned.
- If no entry exists for the date, "card" is null.
EXAMPLE RESPONSE (JSON)
{
    "ok": true,
    "date": "2025-12-10",
    "offset": 0,
    "pretty_date": "środa, 10 grudnia 2025",
    "week_no": 50,
    "day_of_year": 344,
    "days_in_year": 365,
    "is_today": true,
    "card": {
        "title": "...",
        "lead": "...",
        "names": "...",
        "events": [
            "...",
            "..."
        ],
        "astro": [
            "...",
            "..."
        ]
    }
}

/woc/opub/decode.php

GET

Description: WhatsOnChain Data Plugin webhook for OPUB / NFT.* payloads. It detects OPUB-like content (e.g., type=nft.article) and returns an HTML viewer.

PARAMETERS
network (query) — required • string • main|test|stn
Network name provided by WhatsOnChain placeholder {network}.
tx (query) — required • string • txid (64 hex)
Transaction id provided by WhatsOnChain placeholder {tx}.
voutindex (query) — required • int • >=0
Output index provided by WhatsOnChain placeholder {voutindex}.
view (query) — optional • string • debug
Optional. If set to "debug", the endpoint can show raw OP_RETURN chunks for troubleshooting.
NOTES
- Designed to be called by WhatsOnChain plugin system.
- Returns HTML (viewer).

/healthz.php

GET

Description: Simple health check endpoint (optional).