Uplaćeno Docs
sr en

API reference

Roles and permissions

Built-in roles and the permission catalog.

GET /v1/dozvole

Permission catalog

Returns: Permission catalog. Allowed roles: per role/scope; scope: uloge:citanje.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: uloge:citanje
  • API key (Authorization: Bearer upl_live_…)

Parameters

NameInRequiredTypeDescription
limitquerynointeger
kursorquerynostringOpaque cursor from sledeci_kursor

Responses

200 Success
{
  "objekat": "lista",
  "podaci": [
    {
      "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
      "objekat": "dozvola",
      "kljuc": "profakture:otkazivanje",
      "minimalni_plan": "osnovni",
      "oauth_opsezi": [
        "primer"
      ],
      "kreirano": "2026-11-01T08:00:00Z"
    }
  ],
  "ima_jos": true,
  "sledeci_kursor": "eyJpZCI6IjAxOTJlNGExIn0"
}
400 Bad request
401 Missing or invalid token/key
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X GET "https://api.uplaceno.rs/api/v1/dozvole" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json"
GET /v1/organizacije/{organizacija_id}/uloge

List roles

MVP/Basic: built-in roles only (owner, admin, accountant, viewer). POST/PATCH/DELETE return 403 funkcija_nije_u_planu and are outside the MVP contract.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: uloge:citanje
  • API key (Authorization: Bearer upl_live_…)

Parameters

NameInRequiredTypeDescription
organizacija_idpathyesstring (uuid)
limitquerynointeger
kursorquerynostringOpaque cursor from sledeci_kursor

Responses

200 Success
{
  "objekat": "lista",
  "podaci": [
    {
      "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
      "objekat": "uloga",
      "kljuc": "knjigovodja",
      "naziv": "Knjigovođa",
      "ugradjena": true,
      "dozvole": [
        "profakture:citanje",
        "uplate:citanje"
      ],
      "kreirano": "2026-11-01T08:00:00Z"
    }
  ],
  "ima_jos": true,
  "sledeci_kursor": "eyJpZCI6IjAxOTJlNGExIn0"
}
400 Bad request
401 Missing or invalid token/key
403 Nedovoljna prava: zabranjeno, nedovoljan_opseg, funkcija_nije_u_planu, organization
404 Not found (or not in this organization/environment)
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X GET "https://api.uplaceno.rs/api/v1/organizacije/{organizacija_id}/uloge" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json"
GET /v1/organizacije/{organizacija_id}/uloge/{id}

Get role

Returns: Get role. Allowed roles: per role/scope; scope: uloge:citanje.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: uloge:citanje
  • API key (Authorization: Bearer upl_live_…)

Parameters

NameInRequiredTypeDescription
organizacija_idpathyesstring (uuid)
idpathyesstring (uuid)UUID v7

Responses

200 Success
{
  "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
  "objekat": "uloga",
  "kljuc": "knjigovodja",
  "naziv": "Knjigovođa",
  "ugradjena": true,
  "dozvole": [
    "profakture:citanje",
    "uplate:citanje"
  ],
  "kreirano": "2026-11-01T08:00:00Z"
}
401 Missing or invalid token/key
403 Nedovoljna prava: zabranjeno, nedovoljan_opseg, funkcija_nije_u_planu, organization
404 Not found (or not in this organization/environment)
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X GET "https://api.uplaceno.rs/api/v1/organizacije/{organizacija_id}/uloge/{id}" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json"