Brise sacuvani API kljuc za okruzenje (query, podrazumevano aktivno). Ne brise istoriju dokumenata.
Authentication and scopes
Session (HttpOnly cookie)
OAuth2: sef:pisanje
API key (Authorization: Bearer upl_live_…)
Parameters
Name
In
Required
Type
Description
X-Organizacija-Id
header
no
string (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).
okruzenje
query
no
SefOkruzenje
Okruzenje ciji se kljuc brise; bez parametra brise aktivno.
Returns aktivno okruzenje i masku API kljuca (kljuc_poslednje4) po okruzenju. Pun kljuc se nikad ne vraca.
Authentication and scopes
Session (HttpOnly cookie)
OAuth2: sef:citanje
API key (Authorization: Bearer upl_live_…)
Parameters
Name
In
Required
Type
Description
X-Organizacija-Id
header
no
string (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).
Postavlja API kljuc za okruzenje (test|live) i/ili aktivno_okruzenje. Za prelazak na live obavezni su aktivno_okruzenje=live i potvrda_live=true. Odgovor vraca samo kljuc_poslednje4.
Authentication and scopes
Session (HttpOnly cookie)
OAuth2: sef:pisanje
API key (Authorization: Bearer upl_live_…)
Parameters
Name
In
Required
Type
Description
X-Organizacija-Id
header
no
string (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-Key
header
yes
string
Required 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
Field
Type
Required
Description
okruzenje
SefOkruzenje
no
Okruzenje za koje se cuva api_kljuc
api_kljuc
string
no
SEF API kljuc; cuva se sifrovan (AES-GCM); u odgovoru samo poslednje4
aktivno_okruzenje
SefOkruzenje
no
SEF API okruzenje (demo=test, produkcija=live)
potvrda_live
boolean
no
Obavezno true kada se aktivno_okruzenje postavlja na live
Proverava da li sacuvani API kljuc za aktivno (ili navedeno) okruzenje radi. Ne salje fakture.
Authentication and scopes
Session (HttpOnly cookie)
OAuth2: sef:pisanje
API key (Authorization: Bearer upl_live_…)
Parameters
Name
In
Required
Type
Description
X-Organizacija-Id
header
no
string (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-Key
header
yes
string
Required 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
Field
Type
Required
Description
okruzenje
SefOkruzenje
no
SEF API okruzenje (demo=test, produkcija=live)
Responses
200 Rezultat testa
{
"objekat": "sef_test",
"okruzenje": "test",
"uspesno": true,
"poruka": "Veza sa SEF demo okruzenjem je uspesna."
}
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).
id
path
yes
string (uuid)
UUID v7
Idempotency-Key
header
yes
string
Required 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/*.
Generise UBL 2.1 SRB CIUS i salje na SEF (sales-invoice/ubl) sa stabilnim requestId (idempotentnost). sendToCir=Yes kada kupac ima JBKJS. Emituje racun.sef_poslat ili racun.sef_greska.
Authentication and scopes
Session (HttpOnly cookie)
OAuth2: sef:pisanje
API key (Authorization: Bearer upl_live_…)
Parameters
Name
In
Required
Type
Description
X-Organizacija-Id
header
no
string (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).
id
path
yes
string (uuid)
UUID v7
Idempotency-Key
header
yes
string
Required 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/*.
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).
id
path
yes
string (uuid)
UUID v7
Idempotency-Key
header
yes
string
Required 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/*.
Proverava registraciju pravnog lica na SEF-u po PIB-u (kes u sef_kupci_kes). Ako nije na SEF-u, nacin izdavanja za pdv_obveznik+pravno_lice pada na pdf_racun.
Authentication and scopes
Session (HttpOnly cookie)
OAuth2: sef:citanje
API key (Authorization: Bearer upl_live_…)
Parameters
Name
In
Required
Type
Description
X-Organizacija-Id
header
no
string (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).