Scope-y
Zoznam všetkých dostupných scope-ov pre API kľúč a aké endpointy odomykajú.
Každý API kľúč má scope-y vo formáte {resource}: ['read' | 'write']. Pri každom request handler skontroluje, či má kľúč potrebnú kombináciu. Bez scope-u → 403 FORBIDDEN.
Príklad konfigurácie
Scope objectjson
{
"contacts": ["read", "write"],
"documents": ["read", "write"],
"expenses": ["read"],
"catalog": ["read", "write"],
"categories": ["read"],
"tags": ["read", "write"],
"series": ["read"],
"bank_accounts": ["read"],
"cash_registers": ["read", "write"],
"business_records": ["read", "write"],
"calendar": ["read", "write"]
}Dostupné resources a actions
HodnotaActionsPopis
contactsread, writeKontakty + ich documents/stats sub-endpointy.documentsread, writeFaktúry, ponuky, dobropisy, ... + PDF + send.expensesread, writeNáklady + PDF stiahnutie pôvodného účtu.catalogread, writeKatalóg produktov a služieb.categoriesread, writeKategórie nákladov a príjmov.tagsread, writeŠtítky.seriesreadČíselné rady (read-only).bank_accountsreadBankové účty (read-only).cash_registersread, writePokladne, movements, receipts a stats.business_recordsread, writeObchodné záznamy + upload + annotations + PDF.calendarread, writeManuálne kalendárové udalosti.Search a OpenAPI
/search nemá vlastný scope – hľadá v entitách na ktoré má kľúč scope read.
/openapi.json a /docs sú verejné – bez autentifikácie, bez scope-ov.
Kombinácia s typom kľúča
Aj keď má kľúč write scope, ale je typu read_only, write requesty (POST/PATCH/DELETE) vrátia 403. Read-only typ je tvrdší override.