Uplaćeno Docs
sr en

API reference

API keys

Partner API keys (live and sandbox) and scopes.

GET /v1/api-kljucevi

List API keys

Returns: List API keys. Allowed roles: per role/scope; scope: api_kljucevi:citanje.

Authentication and scopes

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

Parameters

NameInRequiredTypeDescription
X-Organizacija-Idheadernostring (uuid)Active organization. Required for user OIDC tokens with multiple orgs; for API key/client credentials the org is in the credential (header must match or be omitted).
limitquerynointeger
kursorquerynostringOpaque cursor from sledeci_kursor

Responses

200 Success
{
  "objekat": "lista",
  "podaci": [
    {
      "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
      "objekat": "api_kljuc",
      "naziv": "WooCommerce prodavnica",
      "prefiks": "upl_test_7Hk2",
      "opsezi": [
        "organizacije: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
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X GET "https://api.uplaceno.rs/api/v1/api-kljucevi" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json"
POST /v1/api-kljucevi

Create API key

Creates or triggers: Create API key. Allowed roles: per role/scope; scope: api_kljucevi:pisanje.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: api_kljucevi:pisanje
  • API key (Authorization: Bearer upl_live_…)

Parameters

NameInRequiredTypeDescription
X-Organizacija-Idheadernostring (uuid)Active organization. Required for user OIDC tokens with multiple orgs; for API key/client credentials the org is in the credential (header must match or be omitted).
Idempotency-KeyheaderyesstringRequired on every POST. Response cached 24 h (KV); same key + different body → 409 ponovljen_kljuc_idempotentnosti. Response includes Idempotent-Replayed: true on replay. Exceptions (optional key): /v1/nalog/*, /v1/nalog/pristupni-kljucevi/*, /v1/ja/sesije/opozovi-ostale, public /plati/*.

Request body

FieldTypeRequiredDescription
nazivstringyes
opseziniz (enum: organizacije:citanje | organizacije:pisanje | clanovi:citanje | clanovi:pisanje | uloge:citanje | api_kljucevi:pisanje | audit:citanje | naplata:citanje | banka:citanje | banka:pisanje | kupci:citanje | kupci:pisanje | proizvodi:citanje | proizvodi:pisanje | zahtevi_za_placanje:pisanje | profakture:citanje | profakture:pisanje | uplate:citanje | uplate:pisanje | potvrde:citanje | potvrde:pisanje | uparivanje:pisanje | prijem:pisanje)yes
isticestring,null (date-time)no

Responses

201 Success
400 Bad request
401 Missing or invalid token/key
403 Nedovoljna prava: zabranjeno, nedovoljan_opseg, funkcija_nije_u_planu, organization
422 Validation failed
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X POST "https://api.uplaceno.rs/api/v1/api-kljucevi" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"naziv":"primer","opsezi":["organizacije:citanje"]}'
DELETE /v1/api-kljucevi/{id}

Revoke API key

Deletes or revokes: Revoke API key. Allowed roles: per role/scope; scope: api_kljucevi:pisanje.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: api_kljucevi:pisanje
  • API key (Authorization: Bearer upl_live_…)

Parameters

NameInRequiredTypeDescription
X-Organizacija-Idheadernostring (uuid)Active organization. Required for user OIDC tokens with multiple orgs; for API key/client credentials the org is in the credential (header must match or be omitted).
idpathyesstring (uuid)UUID v7

Responses

204 Success, no content
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 DELETE "https://api.uplaceno.rs/api/v1/api-kljucevi/{id}" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json"
GET /v1/api-kljucevi/{id}

Get API key

Returns: Get API key. Allowed roles: per role/scope; scope: api_kljucevi:citanje.

Authentication and scopes

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

Parameters

NameInRequiredTypeDescription
X-Organizacija-Idheadernostring (uuid)Active organization. Required for user OIDC tokens with multiple orgs; for API key/client credentials the org is in the credential (header must match or be omitted).
idpathyesstring (uuid)UUID v7

Responses

200 Success
{
  "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
  "objekat": "api_kljuc",
  "naziv": "WooCommerce prodavnica",
  "prefiks": "upl_test_7Hk2",
  "opsezi": [
    "organizacije: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/api-kljucevi/{id}" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json"
POST /v1/api-kljucevi/{id}/rotiraj

Rotate API key

Previous key remains valid for 24 h.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: api_kljucevi:pisanje
  • API key (Authorization: Bearer upl_live_…)

Parameters

NameInRequiredTypeDescription
X-Organizacija-Idheadernostring (uuid)Active organization. Required for user OIDC tokens with multiple orgs; for API key/client credentials the org is in the credential (header must match or be omitted).
idpathyesstring (uuid)UUID v7
Idempotency-KeyheaderyesstringRequired on every POST. Response cached 24 h (KV); same key + different body → 409 ponovljen_kljuc_idempotentnosti. Response includes Idempotent-Replayed: true on replay. Exceptions (optional key): /v1/nalog/*, /v1/nalog/pristupni-kljucevi/*, /v1/ja/sesije/opozovi-ostale, public /plati/*.

Responses

200 Success
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)
422 Validation failed
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X POST "https://api.uplaceno.rs/api/v1/api-kljucevi/{id}/rotiraj" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)"