Uplaćeno Docs
sr en

API

API introduction

Integration guide: quick start, API keys, errors (RFC 9457), pagination, filters, idempotency, rate limits, sandbox and versioning. Full OpenAPI: API reference (MVP 1.6.1-mvp). Outbound events: Webhooks (Beta).

Quick start

Use a sandbox key prefix upl_test_…. Environment is determined by the credential, not a query flag.

curl -sS \
  -H "Authorization: Bearer upl_test_YOUR_KEY" \
  -H "Accept: application/json" \
  "https://api.uplaceno.rs/api/v1/profakture?limit=10"
const res = await fetch(
  "https://api.uplaceno.rs/api/v1/profakture?limit=10",
  { headers: { Authorization: "Bearer upl_test_YOUR_KEY", Accept: "application/json" } },
);
const lista = await res.json();

Base URL and environment

Paths under /api/v1/…. UUID v7 IDs; amounts are decimal strings in RSD. Prefer /api/v1/nalog/… over legacy auth paths.

Authentication (API keys)

Authorization: Bearer upl_test_… or upl_live_…. Key scopes replace role permissions. Rotate via POST /v1/api-kljucevi/{id}/rotiraj (old key valid 24 h). See API keys reference.

Errors

application/problem+json with stable kod. Full list: error codes.

Pagination

limit (default 50, max 200) and opaque kursor → sledeci_kursor, ima_jos.

List filters

Per-endpoint query params in OpenAPI (e.g. GET /v1/profakture: status, kupac_id, dates).

Idempotency

Required Idempotency-Key on every POST (24 h cache). Body mismatch → ponovljen_kljuc_idempotentnosti.

Rate limit

RateLimit-* headers; 429 previse_zahteva with Retry-After. Default 600 req/min per credential (see OpenAPI info).

Sandbox and payment simulation

POST /v1/sandbox/simulacija-uplate with sandbox key only — see Sandbox API.

Webhooks

Versioning and changelog

Contract 1.6.1-mvp; additive → 1.x, breaking → 2.0. Downloads: openapi.yaml. Docs history: Changelog.