Uplaćeno Docs
sr en

API reference

Proforma line items

Line items on a proforma.

GET /v1/profakture/{profaktura_id}/stavke

Stavke

Returns: Stavke. Allowed roles: per role/scope; scope: profakture:citanje.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: profakture: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).
profaktura_idpathyesstring (uuid)
limitquerynointeger
kursorquerynostringOpaque cursor from sledeci_kursor

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)
429 Too many requests
default Unexpected error

Example (curl)

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

Add line item (new version)

Amount change → new version (v+1), new PDF/QR, status back to izdata; customer gets an updated email. Forbidden if a payment exists (409 nedozvoljen_prelaz_statusa). Number and poziv_na_broj unchanged.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: profakture: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).
profaktura_idpathyesstring (uuid)
If-Matchheadernostringverzija_reda proformas; nepoklapanje → 409 version_conflict
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
proizvod_idstring,null (uuid)no
opisstringno
kolicinastringyes
jedinica_merestringno
jedinicna_cenastringnoAmount in RSD as a decimal string with 2 fraction digits; currency is always RSD (no currency field)
stopa_pdvenum: 10 | 20 | nullnoStopa PDV-a u %. Ako organization ima u_sistemu_pdv=true, obavezno 10 ili 20; ako je false, mora biti null (bez PDV-a), inace 422 vat_rate_not_allowed.
popust_procenatstringno

Responses

201 Success
{
  "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
  "objekat": "profaktura",
  "broj": "0123",
  "verzija": 1,
  "iznos": "12000.00",
  "placeno_iznos": "12000.00",
  "poziv_na_broj": {
    "model": "97",
    "vrednost": "4800042012301",
    "kontrolni_broj": "48"
  },
  "status": "nacrt",
  "url_placanja": "https://pay.uplaceno.rs/pay/pt_Xk29aQ",
  "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)
409 Konflikt: konflikt, konflikt_verzije, nedozvoljen_prelaz_statusa, ponovljen_kljuc_idempotentnosti, opseg_brojeva_potrosen, duplikat_potvrde
422 Validation failed
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X POST "https://api.uplaceno.rs/api/v1/profakture/{profaktura_id}/stavke" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"kolicina":"1"}'
DELETE /v1/profakture/{profaktura_id}/stavke/{id}

Delete line item (new version)

Amount change → new version (v+1), new PDF/QR, status back to izdata; customer gets an updated email. Forbidden if a payment exists (409 nedozvoljen_prelaz_statusa). Number and poziv_na_broj unchanged.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: profakture: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).
profaktura_idpathyesstring (uuid)
idpathyesstring (uuid)UUID v7
If-Matchheadernostringverzija_reda proformas; nepoklapanje → 409 version_conflict

Responses

200 Success
{
  "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
  "objekat": "profaktura",
  "broj": "0123",
  "verzija": 1,
  "iznos": "12000.00",
  "placeno_iznos": "12000.00",
  "poziv_na_broj": {
    "model": "97",
    "vrednost": "4800042012301",
    "kontrolni_broj": "48"
  },
  "status": "nacrt",
  "url_placanja": "https://pay.uplaceno.rs/pay/pt_Xk29aQ",
  "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)
409 Konflikt: konflikt, konflikt_verzije, nedozvoljen_prelaz_statusa, ponovljen_kljuc_idempotentnosti, opseg_brojeva_potrosen, duplikat_potvrde
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X DELETE "https://api.uplaceno.rs/api/v1/profakture/{profaktura_id}/stavke/{id}" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json"
PATCH /v1/profakture/{profaktura_id}/stavke/{id}

Izmena stavke (nova verzija)

Amount change → new version (v+1), new PDF/QR, status back to izdata; customer gets an updated email. Forbidden if a payment exists (409 nedozvoljen_prelaz_statusa). Number and poziv_na_broj unchanged.

Authentication and scopes

  • Session (HttpOnly cookie)
  • OAuth2: profakture: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).
profaktura_idpathyesstring (uuid)
idpathyesstring (uuid)UUID v7
If-Matchheadernostringverzija_reda proformas; nepoklapanje → 409 version_conflict

Request body

FieldTypeRequiredDescription
proizvod_idstring,null (uuid)no
opisstringno
kolicinastringno
jedinica_merestringno
jedinicna_cenastringnoAmount in RSD as a decimal string with 2 fraction digits; currency is always RSD (no currency field)
stopa_pdvenum: 10 | 20 | nullnoStopa PDV-a u %. Ako organization ima u_sistemu_pdv=true, obavezno 10 ili 20; ako je false, mora biti null (bez PDV-a), inace 422 vat_rate_not_allowed.
popust_procenatstringno

Responses

200 Success
{
  "id": "0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01",
  "objekat": "profaktura",
  "broj": "0123",
  "verzija": 1,
  "iznos": "12000.00",
  "placeno_iznos": "12000.00",
  "poziv_na_broj": {
    "model": "97",
    "vrednost": "4800042012301",
    "kontrolni_broj": "48"
  },
  "status": "nacrt",
  "url_placanja": "https://pay.uplaceno.rs/pay/pt_Xk29aQ",
  "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)
409 Konflikt: konflikt, konflikt_verzije, nedozvoljen_prelaz_statusa, ponovljen_kljuc_idempotentnosti, opseg_brojeva_potrosen, duplikat_potvrde
422 Validation failed
429 Too many requests
default Unexpected error

Example (curl)

curl -sS -X PATCH "https://api.uplaceno.rs/api/v1/profakture/{profaktura_id}/stavke/{id}" \
  -H "Authorization: Bearer upl_live_VAS_KLJUC" \
  -H "Content-Type: application/json" \
  -d '{"proizvod_id":"0192e4a1-7c3b-7d4e-9a10-3f5b2c8d9e01","opis":"Izrada sajta","kolicina":"1","jedinica_mere":"kom","jedinicna_cena":"12000.00","stopa_pdv":"10","popust_procenat":"0"}'