Teron Fiskalizacija API dokumentacijaAPI documentation Poslednje ažuriranjeLast updated: 21.06.2026

Teron Fiskalizacija — API dokumentacijaAPI documentation

Poslednji put ažurirano: 21.06.2026.

Molimo Vas da sve greške koje pronađete u dokumentaciji prijavite na razvoj@teron.rs mail.

Uvod

Ovaj dokument predstavlja uputstvo za integraciju IT sistema sa Teron rešenjima za fiskalizaciju (SUF) i eFakture (SEF) putem REST API poziva.

VAŽNO: Za uspešno korišćenje i integraciju pored tehničkog znanja neophodno je i poznavanje relevantnih propisa u domenu elektronske fiskalizacije (SUF) i elektronskog fakturisanja (SEF). Detaljne tehničke informacije za SUF se mogu naći na stranicama https://tap.sandbox.suf.purs.gov.rs/Help i https://purs.gov.rs/eFiskalizacija/tehnicki-vodic/7343/tehnicko-uputstvo-za-administrativni-i-tehnicki-pregled-funkcionalnosti-esir-a-ili-l-pfr-a-.html, dok za SEF na stranici https://www.efaktura.gov.rs/.

Teron rešenje za elektronsku fiskalizaciju i elektronsko fakturisanje se sastoji od sledećih komponenti:

  • Teron ESIR - ESIR (elektronski sistem za izdavanje računa) sertifikovan od strane PURS-a koji u sebi sadrži i modul za rad sa elektronskim fakturama (SEF)

  • Teron LPFR - LPFR (lokalni procesor fiskalnih računa) sertifikovan od strane PURS-a

Sve komponente su dostupne za Android (verzija 7+), Windows (verzija 10+) i Linux operativne sisteme.

U zavisnosti od konkretnih potreba korisnika, komponente mogu biti instalirane na jedan od sledećih načina:

  • Teron LPFR - LPFR kao samostalna komponenta u posebnoj aplikaciji

  • Teron ESIR Middleware - ESIR bez grafičkog korisničkog interfejsa (GUI) kao samostalna komponenta u posebnoj aplikaciji

  • Teron ESIR Cloud Middleware - ESIR bez grafičkog interfejsa koji se izvršava na Teron Cloud infrastrukturi

  • Teron LPFR+ESIR - LPFR i ESIR Middleware i ESIR GUI (korisnički interfejs) u okviru jedne aplikacije.

Last updated: 21.06.2026.

Please report any errors you find in the documentation to razvoj@teron.rs via email.

Introduction

This document is a guide for integrating IT systems with Teron solutions for fiscalization (SUF) and eInvoices (SEF) via REST API calls.

IMPORTANT: For successful use and integration, in addition to technical knowledge, familiarity with the relevant regulations in the domain of electronic fiscalization (SUF) and electronic invoicing (SEF) is also required. Detailed technical information for SUF can be found at https://tap.sandbox.suf.purs.gov.rs/Help and https://purs.gov.rs/eFiskalizacija/tehnicki-vodic/7343/tehnicko-uputstvo-za-administrativni-i-tehnicki-pregled-funkcionalnosti-esir-a-ili-l-pfr-a-.html, while for SEF at https://www.efaktura.gov.rs/.

The Teron solution for electronic fiscalization and electronic invoicing consists of the following components:

  • Teron ESIR - ESIR (electronic invoice issuing system) certified by PURS, which also contains a module for working with electronic invoices (SEF)

  • Teron LPFR - LPFR (local processor of fiscal invoices) certified by PURS

All components are available for Android (version 7+), Windows (version 10+) and Linux operating systems.

Depending on the specific needs of the user, the components can be installed in one of the following ways:

  • Teron LPFR - LPFR as a standalone component in a separate application

  • Teron ESIR Middleware - ESIR without a graphical user interface (GUI) as a standalone component in a separate application

  • Teron ESIR Cloud Middleware - ESIR without a graphical interface that runs on the Teron Cloud infrastructure

  • Teron LPFR+ESIR - LPFR and ESIR Middleware and ESIR GUI (user interface) within a single application.

Kako koristiti primere

How to use the examples

Svi primeri u nastavku koriste curl. Pre pokretanja zamenite vrednosti:All examples below use curl. Replace these values before running:

Oznaka u primerimaPlaceholder in examplesZnačenjeMeaning
http://127.0.0.1:3566Bazni URL Teron ESIR API-ja. Lokalno (ESIR Middleware): http://127.0.0.1:3566 (TCP port 3566). Teron LPFR sluša na portu 3565, a Teron ESIR Cloud Middleware na https://pos.teron.rs/api.Base URL of the Teron ESIR API. Locally (ESIR Middleware): http://127.0.0.1:3566 (TCP port 3566). Teron LPFR listens on port 3565, and Teron ESIR Cloud Middleware on https://pos.teron.rs/api.
<API_KEY>API ključ dodeljen uređaju/integraciji (Authorization: Bearer <API_KEY>).API key assigned to the device/integration (Authorization: Bearer <API_KEY>).

Napomene:Notes:

  • Svaki zahtev mora sadržati zaglavlje Authorization: Bearer <API_KEY>.Every request must include the Authorization: Bearer <API_KEY> header.
  • Zahtevi sa telom moraju sadržati Content-Type: application/json; charset=UTF-8.Requests with a body must include Content-Type: application/json; charset=UTF-8.
  • Kod integracije preko Teron ESIR Cloud Middleware-a obavezno je i zaglavlje X-Teron-SerialNumber: <serijski_broj>.When integrating via Teron ESIR Cloud Middleware, the X-Teron-SerialNumber: <serijski_broj> header is also required.
  • Uspešan odgovor ima HTTP status 200 OK ili 204 No Content (prazno telo). Status 4xx/5xx označava grešku — detalji su u telu odgovora i log fajlovima.A successful response has HTTP status 200 OK or 204 No Content (empty body). A 4xx/5xx status indicates an error — details are in the response body and log files.
  • U primerima odgovora su dugački base64 nizovi (npr. QR kod, potpis) i velike liste skraćeni radi preglednosti (… [skraćeno]).In the response examples, long base64 strings (e.g. QR code, signature) and large lists are truncated for readability (… [skraćeno]).

Teron ESIR API

Teron ESIR API

Integracija sa Teron ESIR-om se realizuje pozivanjem odgovarajućih operacija izloženih preko HTTP REST JSON API endpoint-a.

Teron ESIR prihvata HTTP zahteve na TCP portu 3566.

Svaki HTTP zahtev treba da pored standardnih polja sadrži i polje za autorizaciju u zaglavlju:

  • Authorization: Bearer XXX (XXX treba zameniti sa API ključem)

U slučaju integracije putem Teron ESIR Cloud Middleware-a svaki HTTP zahtev treba da sadrži i serijski broj uređaja u zaglavlju:

  • X-Teron-SerialNumber: YYY (YYY treba zameniti dodeljenim serijskim brojem)

Ukoliko zahtev sadrži i telo, neophodno je navesti i format podataka dodavanjem sledećeg polja u HTTP zahtev:

  • Content-type: application/json; charset=UTF-8

Ukoliko je operacija uspešna, svaki odgovor će imati HTTP status kod 200 (OK) ili 204 (No Content) u slučaju da je odgovor prazan. U slučajevima kada je HTTP status kod 4xx ili 5xx, došlo je do greške i u većini slučajeva će telo odgovora, kao i log fajlovi, sadržati dodatne informacije.

API dokumentacija u nastavku organizovana je tako što su prvo opisane najčešće situacije i pozivi koji se koriste prilikom integracije, dok se na kraju nalazi kompletan opis svih API poziva.

Tipovi podataka

U nastavku dokumentacije na svakom mestu gde se opisuje model podataka za svako polje se navodi i tip podatka koji može biti jedan od sledećih:

  • string - tekstualno polje
  • int - celobrojna vrednost
  • boolean - logičko polje (true ili false)
  • money - decimalni broj sa dve decimale
  • quantity - decimalni broj sa tri decimale
  • percent - decimalni broj sa dve decimale
  • timestamp - datum i vreme u ISO 8601 formatu sa vremenskom zonom (primer: 2023-11-15T13:31:50.000+01:00)
  • uuid - UUID v4
  • object - JSON objekat koji sadrži atribute i njihove vrednosti
  • list(x) - JSON niz koji sadrži elemente tipa x (gde x može biti bilo koji od navedenih tipova)

Integration with Teron ESIR is implemented by calling the appropriate operations exposed through HTTP REST JSON API endpoints.

Teron ESIR accepts HTTP requests on TCP port 3566.

In addition to the standard fields, each HTTP request should include an authorization field in the header:

  • Authorization: Bearer XXX (XXX should be replaced with the API key)

When integrating via the Teron ESIR Cloud Middleware, each HTTP request should also include the device serial number in the header:

  • X-Teron-SerialNumber: YYY (YYY should be replaced with the assigned serial number)

If the request also contains a body, you must specify the data format by adding the following field to the HTTP request:

  • Content-type: application/json; charset=UTF-8

If the operation is successful, each response will have HTTP status code 200 (OK), or 204 (No Content) if the response is empty. In cases where the HTTP status code is 4xx or 5xx, an error has occurred and in most cases the response body, as well as the log files, will contain additional information.

The API documentation below is organized so that the most common situations and calls used during integration are described first, while a complete description of all API calls is provided at the end.

Data types

Throughout the documentation below, wherever a data model is described, each field also specifies a data type, which can be one of the following:

  • string - text field
  • int - integer value
  • boolean - logical field (true or false)
  • money - decimal number with two decimal places
  • quantity - decimal number with three decimal places
  • percent - decimal number with two decimal places
  • timestamp - date and time in ISO 8601 format with time zone (example: 2023-11-15T13:31:50.000+01:00)
  • uuid - UUID v4
  • object - JSON object containing attributes and their values
  • list(x) - JSON array containing elements of type x (where x can be any of the listed types)

Konfiguracija

Configuration

Pre početka korišćenja Teron ESIR rešenja neophodno je podesiti parametre rada. Teron ESIR poseduje veliki broj različitih opcija koje se mogu podesiti, ali većina njih odgovara standardnom načinu rada. U okviru ove sekcije nalaze se opisi podešavanja parametara za koje može postojati potreba za dodatnim podešavanjem na konkretnom uređaju.

Before you start using the Teron ESIR solution, you need to configure the operating parameters. Teron ESIR has a large number of different options that can be configured, but most of them correspond to the standard mode of operation. This section describes the configuration of parameters that may require additional adjustment on a specific device.

GET/api/attention#

Provera dostupnosti

Availability check

Pre početka korišćenja Teron ESIR-a neophodno je proveriti da li je dostupan (startovan), a u isto vreme se proverava i da li je dobro podešen API KEY za pristup. Ukoliko se koristi LPFR za fiskalizaciju ovaj poziv će proveriti i da li je LPFR dostupan. Ovaj poziv vraća HTTP 200 OK ukoliko je sve u redu.

Before you start using Teron ESIR, you must check whether it is available (started), and at the same time it also checks whether the API KEY for access is configured correctly. If LPFR is used for fiscalization, this call will also check whether LPFR is available. This call returns HTTP 200 OK if everything is in order.

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/attention' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

GET/api/settings#

Očitavanje trenutne konfiguracije

Read current configuration

Namena ovog poziva je da se pročitaju vrednosti parametara trenutne konfiguracije. Neki od parametara su read-only (ne mogu se menjati) dok su neki skriveni radi sigurnosti (sadržaj sertifikata, šifra za sertifikat i sl.) ili su šifrovani (npr. API KEY). U nastavku su navedeni glavni parametri koji su bitni za produkciono korišćenje. Ukoliko neki od parametara nije opisan u nastavku, treba smatrati da je on za internu upotrebu i ne treba ga menjati.

The purpose of this call is to read the values of the current configuration parameters. Some of the parameters are read-only (cannot be changed), while some are hidden for security reasons (certificate contents, certificate password, etc.) or are encrypted (e.g. API KEY). Listed below are the main parameters that are important for production use. If a parameter is not described below, it should be considered for internal use and should not be changed.

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/settings' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "languages": [
    "sr-RS",
    "sr-Cyrl-RS",
    "en-US"
  ],
  "language": "sr-Cyrl-RS",
  "applicationLanguage": "sr-Cyrl-RS",
  "lpfrUrl": "http://127.0.0.1:3565/api/v3",
  "vpfrEnabled": false,
  "vpfrClientCertificateBase64": null,
  "vpfrClientCertificatePassword": null,
  "vpfrPac": null,
  "vpfrCertificateBusinessName": null,
  "vpfrCertificateShopName": null,
  "vpfrCertificateAddress": null,
  "vpfrCertificateCity": null,
  "vpfrCertificateCountry": null,
  "vpfrCertificateSerialNumber": null,
  "runUi": true,
  "posName": null,
  "authorizeRemoteClients": true,
  "authorizeLocalClients": false,
  "apiKey": "**********",
  "printerName": "S85",
  "printerType": "EscPos",
  "printerDpi": null,
  "paperWidth": null,
  "paperHeight": null,
  "paperMargin": null,
  "receiptLayout": "Slip",
  "receiptHeaderImage": null,
  "receiptHeaderTextLines": null,
  "receiptFooterImage": null,
  "receiptFooterTextLines": null,
  "receiptDiscountText": null,
  "receiptSplitMaxHeight": null,
  "receiptWidth": 386,
  "receiptFontSizeNormal": 19,
  "receiptFontSizeLarge": 24,
  "receiptLetterSpacingNormal": 0,
  "receiptLetterSpacingCondensed": -0.05,
  "receiptFeedLinesBegin": 0,
  "receiptFeedLinesEnd": 3,
  "receiptsDelay": 5,
  "receiptCutPaper": "CutPaper",
  "receiptOpenCashDrawer": "None",
  "receiptCustomCommandBegin": null,
  "receiptCustomCommandEnd": null,
  "qrCodeSize": null,
  "availablePrinters": [
    "WorkCentre-3225-2",
    "Cups-PDF",
    "P3",
    "S85",
    "CT-S4000"
  ],
  "availablePrinterTypes": [
    "EscPos",
    "Cpcl",
    "System"
  ],
  "allowedPaymentTypes": [
    0,
    1,
    2,
    3,
    4,
    5
  ],
  "scaleDeviceName": null,
  "scaleProtocol": null,
  "scaleDeviceRs232BaudRate": 9600,
  "scaleDeviceRs232DataBits": 8,
  "scaleDeviceRs232Parity": 0,
  "scaleDeviceRs232StopBits": 1,
  "scaleDeviceRs232HardwareFlowControl": 0,
  "availableScaleDevices": [],
  "availableScaleProtocols": [
    "Aclas PS6X D0",
    "Apollo",
    "Birotehna OB1/OP1",
    "Dialog 06",
    "Dollar",
    "Ecr-Posnet"
  ],
  "displayEnabled": false,
  "displayHandler": null,
  "displayDeviceName": null,
  "displayProtocol": null,
  "displayDeviceRs232BaudRate": null,
  "displayDeviceRs232DataBits": null,
  "displayDeviceRs232Parity": null,
  "displayDeviceRs232StopBits": null,
  "displayDeviceRs232HardwareFlowControl": null,
  "displayTextCols": null,
  "displayTextRows": null,
  "displayTextCodePage": null,
  "availableDisplayDevices": [],
  "eftPosDeviceName": null,
  "eftPosProtocol": null,
  "eftPosDeviceRs232BaudRate": null,
  "eftPosDeviceRs232DataBits": null,
  "eftPosDeviceRs232Parity": null,
  "eftPosDeviceRs232StopBits": null,
  "eftPosDeviceRs232HardwareFlowControl": null,
  "eftPosCredentials": null,
  "availableEftPosDevices": [],
  "availableEftPosProtocols": [
    "Ingenico",
    "Payten"
  ],
  "eFakturaApiKey": null,
  "eFakturaTest": true,
  "eFakturaCompanyName": null,
  "eFakturaCompanyAddress": null,
  "eFakturaCompanyCity": null,
  "eFakturaCompanyEMail": null,
  "eFakturaCompanyPhone": null,
  "eFakturaCompanyBankAccount": null,
  "eFakturaCompanyRegistrationId": null,
  "eFakturaCompanyTaxId": null,
  "syncReceipts": true,
  "lpfr": {
    "availableSmartCardReaders": [
      "HID Global OMNIKEY 3x21 Smart Card Reader [OMNIKEY 3x21 Smart Card Reader] 00 00"
    ],
    "canHaveMultipleSmartCardReaders": true,
    "smartCardReaderName": null,
    "externalStorageFolder": "/home/user/usb",
    "languages": [
      "sr-RS",
      "sr-Cyrl-RS",
      "en-US"
    ],
    "authorizeRemoteClients": true,
    "authorizeLocalClients": false,
    "username": "admin",
    "password": "**********",
    "apiKey": "**********"
  },
  "issueCopyOnRefund": false
}
POST/api/settings#

Podešavanje konfiguracije štampača

Printer configuration settings

Ukoliko se Teron ESIR koristi za štampanje računa prvi korak je ispravno podešavanje štampača. U zavisnosti od tipa štampača potrebno je podesiti neke od narednih parametara:

  • printerName (string) - naziv jednog od dostupnih štampača iz availablePrinters niza koji se dobija očitavanjem trenutne konfiguracije (prethodni API poziv).
  • printerType (string) - vrednost EscPos (za ESC/POS kompatibilne štampače), Cpcl (za CPCL kompatibilne štampače) ili System (za korišćenje sistemskog drivera za štampanje). Termalni štampači su u većini slučajeva EscPos, dok ukoliko se štampa na A4 štampač (Laser, InkJet) treba koristiti tip System. Napomena: ako je termalni štampač vezan na PC Windows računar u većini slučajeva nije potreban driver, odnosno driver treba da bude tipa "Raw" jer Teron ESIR radi pripremu odgovarajućih ESC/POS komandi za štampu i nije potrebna dodatna obrada štampe od strane drivera.
  • receiptLayout (string) - podrazumevani format štampe, Slip za fiskalni isečak (termalni štampači) odnosno Invoice za račun u A4 formatu (Laser/InkJet štampači).
  • receiptWidth (int) - samo za EscPos i Cpcl štampače, širina štampe u pikselima (najčešće 384 za 58mm štampače, odnosno 576 za 80mm štampače).
  • receiptFontSizeNormal (int) - samo za EscPos i Cpcl štampače, veličina standardnog fonta (najčešće 21 za 58mm štampače, odnosno 26 za 80mm štampače).
  • receiptFontSizeLarge (int) - samo za EscPos i Cpcl štampače, veličina većeg fonta (najčešće 24 za 58mm štampače, odnosno 32 za 80mm štampače).
  • receiptHeaderTextLines (list(string)) - niz tekstova koji se štampaju na vrhu računa.
  • receiptHeaderImage (string) - base64 kodirana GIF slika koja se štampa na vrhu računa.
  • receiptFooterTextLines (list(string)) - niz tekstova koji se štampaju na kraju računa.
  • receiptFooterImage (string) - base64 kodirana GIF slika koja se štampa na kraju računa.
  • qrCodeSize (int) - veličina QR koda za proveru fiskalnog računa u pikselima.
  • receiptFeedLinesBegin (int) - samo za EscPos i Cpcl štampače, koliko praznih linija se odštampa na početku računa, koristi se po potrebi da bi se papir adekvatno pozicionirao za početak štampe.
  • receiptFeedLinesEnd (int) - samo za EscPos i Cpcl štampače, koliko praznih linija se odštampa na kraju računa, koristi se po potrebi da bi se papir adekvatno pozicionirao za sečenje.
  • receiptCutPaper (string) - samo za EscPos i Cpcl štampače, da li se šalje komanda za sečenje i/ili izvlačenje papira na kraju štampe i može imati jednu od sledećih vrednosti: FeedAndCutPaper (izvlači se papir i preseca), CutPaper (preseca se papir), None (ne šalje se dodatna komanda na kraju štampe).
  • receiptOpenCashDrawer (string) - samo za EscPos i Cpcl štampače, da li se šalje komanda za otvaranje fioke koja je priključena na štampač i u zavisnosti od vrste štampača treba postaviti jednu od sledećih vrednosti: Epson_1 (najčešće), Epson_2, M80_1, M80_2 ili None da se ne šalje komanda za otvaranje fioke.

Napomena: na Android uređajima sa integrisanim štampačem nije potrebno vršiti dodatna podešavanja niti će promena gore navedenih vrednosti imati uticaja na ponašanje.

If Teron ESIR is used for printing invoices, the first step is to configure the printer correctly. Depending on the printer type, some of the following parameters need to be set:

  • printerName (string) - the name of one of the available printers from the availablePrinters array obtained by reading the current configuration (the previous API call).
  • printerType (string) - the value EscPos (for ESC/POS compatible printers), Cpcl (for CPCL compatible printers) or System (to use the system print driver). Thermal printers are in most cases EscPos, while if printing to an A4 printer (Laser, InkJet) the System type should be used. Note: if a thermal printer is connected to a PC Windows computer, in most cases no driver is required, i.e. the driver should be of type "Raw" because Teron ESIR prepares the appropriate ESC/POS print commands and no additional print processing by the driver is needed.
  • receiptLayout (string) - the default print format, Slip for a fiscal receipt slip (thermal printers) or Invoice for an A4 format invoice (Laser/InkJet printers).
  • receiptWidth (int) - only for EscPos and Cpcl printers, the print width in pixels (most often 384 for 58mm printers, or 576 for 80mm printers).
  • receiptFontSizeNormal (int) - only for EscPos and Cpcl printers, the size of the standard font (most often 21 for 58mm printers, or 26 for 80mm printers).
  • receiptFontSizeLarge (int) - only for EscPos and Cpcl printers, the size of the larger font (most often 24 for 58mm printers, or 32 for 80mm printers).
  • receiptHeaderTextLines (list(string)) - an array of text lines printed at the top of the invoice.
  • receiptHeaderImage (string) - a base64 encoded GIF image printed at the top of the invoice.
  • receiptFooterTextLines (list(string)) - an array of text lines printed at the bottom of the invoice.
  • receiptFooterImage (string) - a base64 encoded GIF image printed at the bottom of the invoice.
  • qrCodeSize (int) - the size in pixels of the QR code for fiscal invoice verification.
  • receiptFeedLinesBegin (int) - only for EscPos and Cpcl printers, how many blank lines are printed at the beginning of the invoice, used as needed to properly position the paper for the start of printing.
  • receiptFeedLinesEnd (int) - only for EscPos and Cpcl printers, how many blank lines are printed at the end of the invoice, used as needed to properly position the paper for cutting.
  • receiptCutPaper (string) - only for EscPos and Cpcl printers, whether a command to cut and/or feed the paper is sent at the end of printing, and it can have one of the following values: FeedAndCutPaper (the paper is fed and cut), CutPaper (the paper is cut), None (no additional command is sent at the end of printing).
  • receiptOpenCashDrawer (string) - only for EscPos and Cpcl printers, whether a command to open the cash drawer connected to the printer is sent, and depending on the printer type one of the following values should be set: Epson_1 (most common), Epson_2, M80_1, M80_2 or None so that no cash drawer open command is sent.

Note: on Android devices with an integrated printer, no additional configuration is required, nor will changing the above values have any effect on the behavior.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/settings' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "printerName": "S85",
    "printerType": "EscPos",
    "receiptWidth": 384,
    "receiptLayout": "Slip",
    "receiptFontSizeNormal": 21,
    "receiptFontSizeLarge": 24,
    "receiptHeaderTextLines": [],
    "receiptHeaderImage": null,
    "receiptFooterTextLines": [],
    "receiptFooterImage": null,
    "receiptFeedLinesBegin": 0,
    "receiptFeedLinesEnd": 3,
    "receiptCutPaper": "FeedAndCutPaper",
    "receiptOpenCashDrawer": "Epson_1",
    "qrCodeSize": 386
 }'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

POST/api/settings#

Podešavanje LPFR-a

LPFR configuration

Ukoliko se koristi LPFR za potrebe fiskalizacije, potrebno je podesiti Teron ESIR tako da zna gde se nalazi LPFR. Standardno podešavanje odgovara slučaju da se koristi Teron LPFR koji je na istom uređaju kao i Teron ESIR (što je najčešći slučaj), dok u drugim slučajevima može biti potrebno dodatno podesiti adresu na kojoj se nalazi LPFR (konsultujte dokumentaciju proizvođača LPFR-a koji koristite), pa je potrebno podesiti sledeći parametar:

  • vpfrEnabled (boolean) - podesiti na false kako bi se koristio LPFR

  • lpfrUrl (string) - URL gde se nalazi LPFR API

If LPFR is used for fiscalization, you need to configure Teron ESIR so that it knows where LPFR is located. The standard configuration corresponds to the case where Teron LPFR is used on the same device as Teron ESIR (which is the most common case), while in other cases it may be necessary to additionally configure the address where LPFR is located (consult the documentation of the LPFR manufacturer you are using), so the following parameter needs to be configured:

  • vpfrEnabled (boolean) - set to false in order to use LPFR

  • lpfrUrl (string) - URL where the LPFR API is located

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/settings' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "vpfrEnabled": false,
    "lpfrUrl": "http://127.0.0.1:3565/api/v3"
}'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

POST/api/settings#

Podešavanje VPFR-a

VPFR configuration

Ukoliko se koristi VPFR za potrebe fiskalizacije, potrebno je podesiti VPFR sertifikat podešavanjem sledećih parametara:

  • vpfrEnabled (boolean) - postaviti na true kako bi se koristio VPFR umesto LPFR-a.

  • vpfrClientCertificateBase64 (string) - Base64 kodiran klijentski sertifikat dobijen od PURS-a u p12 ili pfx formatu (ovaj fajl je u ZIP arhivi pod brojem 1, ime fajla je 2_ABCD_ImeFirme_chain.p12) ili Base64 kodiran ceo ZIP fajl, u kom slučaju će Teron ESIR samostalno izabrati ispravan sertifikat.

  • vpfrClientCertificatePassword (string) - šifra za sertifikat

  • vpfrPac (string) - PAK kod sertifikata

If VPFR is used for fiscalization, you need to configure the VPFR certificate by setting the following parameters:

  • vpfrEnabled (boolean) - set to true in order to use VPFR instead of LPFR.

  • vpfrClientCertificateBase64 (string) - Base64-encoded client certificate obtained from PURS in p12 or pfx format (this file is in the ZIP archive under number 1, the file name is 2_ABCD_ImeFirme_chain.p12) or a Base64-encoded entire ZIP file, in which case Teron ESIR will independently select the correct certificate.

  • vpfrClientCertificatePassword (string) - certificate password

  • vpfrPac (string) - certificate PAC code

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/settings' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "vpfrEnabled": true,
    "vpfrClientCertificateBase64": "UEsDBBQAAAAIAM6...",
    "vpfrClientCertificatePassword": "12345678",
    "vpfrPac": "ACBDEF"
}'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

POST/api/settings#

Podešavanje eFaktura

eInvoices configuration

Da bi Teron ESIR mogao da radi sa eFakturama (SEF), neophodno je podesiti API ključ za pristup SEF-u. Parametar za podešavanje:

  • eFakturaApiKey (string) - postaviti na odgovarajuću vrednost, odnosno na prazan string ukoliko se želi isključiti rad sa eFakturama.

Ukoliko je podešen ispravan API ključ, Teron ESIR će početi sa sinhronizacijom postojećih ulaznih i izlaznih faktura i omogućiti slanje novih izlaznih faktura. Ako kasnije promenite eFakturaApiKey, aplikacija će automatski ukloniti stare eFakture i sinhronizovane podatke.

In order for Teron ESIR to be able to work with eInvoices (SEF), you must configure the API key for accessing SEF. Configuration parameter:

  • eFakturaApiKey (string) - set to the appropriate value, or to an empty string if you want to disable working with eInvoices.

If a valid API key is configured, Teron ESIR will start synchronizing existing purchase and sales invoices and enable sending new sales invoices. If you later change eFakturaApiKey, the application will automatically remove old eInvoices and synchronized data.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/settings' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "eFakturaApiKey": "1234567-89ab-cdef-1234-56789abc"
}'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

POST/api/settings#

Podešavanje sigurnosnih parametara

Security parameters configuration

Pre korišćenja Teron ESIR rešenja u produkciji preporučuje se provera i dodatno pojačavanje sigurnosnih podešavanja preko sledećih parametara:

  • authorizeLocalClients (boolean) - vrednost true ako je potrebno da lokalni klijenti (aplikacije koje se izvršavaju na istom računaru/uređaju kao i Teron ESIR) šalju API KEY uz svaki zahtev odnosno false u suprotnom. Preporuka je da se ovaj parametar podesi na true.

  • authorizeRemoteClients (boolean) - vrednost true ako je potrebno da udaljeni klijenti (aplikacije koje se izvršavaju na drugim računarima/uređajima i pristupaju Teron ESIR API-u preko mreže/interneta) šalju API KEY uz svaki zahtev odnosno false u suprotnom. Nikako nije preporučljivo ovaj parametar staviti na false osim ukoliko ste sigurni da ste na drugi način obezbedili kontrolu pristupa Teron ESIR API-ju.

  • apiKey (string) - nova vrednost API KEY-a. Preporučuje se da promenite API KEY kako biste vi bili jedini koji ga znate.

  • webserverAddress (string) - IP adresa i port na kojima se nalazi API. Ukoliko je dovoljan samo pristup lokalnim klijentima preporuka je da se IP adresa promeni na 127.0.0.1 umesto 0.0.0.0, što će dodatno onemogućiti pristup API-u spolja. Dodatno, ovaj poziv se može iskoristiti da se promeni i port na kojem se nalazi API ukoliko je to potrebno. Nakon promene ovog parametra neophodno je restartovati Teron ESIR kako bi se novi parametri primenili.

Before using the Teron ESIR solution in production, it is recommended to review and further strengthen the security configuration through the following parameters:

  • authorizeLocalClients (boolean) - value true if local clients (applications running on the same computer/device as Teron ESIR) are required to send the API KEY with every request, or false otherwise. It is recommended to set this parameter to true.

  • authorizeRemoteClients (boolean) - value true if remote clients (applications running on other computers/devices that access the Teron ESIR API over the network/internet) are required to send the API KEY with every request, or false otherwise. It is strongly discouraged to set this parameter to false unless you are certain that you have secured access control to the Teron ESIR API in some other way.

  • apiKey (string) - the new value of the API KEY. It is recommended to change the API KEY so that you are the only one who knows it.

  • webserverAddress (string) - the IP address and port on which the API is located. If access by local clients only is sufficient, it is recommended to change the IP address to 127.0.0.1 instead of 0.0.0.0, which will additionally prevent external access to the API. In addition, this call can be used to change the port on which the API is located if needed. After changing this parameter, it is necessary to restart Teron ESIR for the new parameters to take effect.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/settings' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "authorizeLocalClients": false,
    "authorizeRemoteClients": true,
    "apiKey": "c0521663642496c82f79a55725302eba",
    "webserverAddress": "http://0.0.0.0:3566/"
}'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

POST/api/settings#

Podešavanje ostalih parametara

Configuring other parameters

U ovoj sekciji su navedena dodatna podešavanja koja mogu biti potrebna da se obave:

  • runUi (boolean) - U slučaju da je Teron ESIR API instaliran kao deo Teron LPFR+ESIR aplikacije onda se prilikom svakog startovanja pokreće i Teron ESIR korisnički interfejs (GUI) što u većini slučajeva gde se integriše spoljna aplikacija nije potrebno. Da bi se isključilo pokretanje GUI-a, neophodno je ovaj parametar postaviti na false.

This section lists additional configuration that may need to be performed:

  • runUi (boolean) - In case the Teron ESIR API is installed as part of the Teron LPFR+ESIR application, the Teron ESIR user interface (GUI) is also launched on every startup, which in most cases where an external application is integrated is not needed. To disable launching the GUI, this parameter must be set to false.
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/settings' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "authorizeLocalClients": false,
    "authorizeRemoteClients": true,
    "apiKey": "c0521663642496c82f79a55725302eba",
    "webserverAddress": "http://0.0.0.0:3566/"
}'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

Fiskalizacija

Fiscalization

Inicijalizacija

Initialization

Pre fiskalizacije računa neophodno je proveriti status PFR-a (LPFR ili VPFR u zavisnosti od podešavanja).

Na narednoj slici je predstavljen uobičajeni niz koraka koji se obavljaju pre fiskalizacije računa:

Dijagram toka inicijalizacije — slika iz originalne dokumentacije (koraci su detaljno opisani u nastavku).

  1. Proveriti da li su ESIR i PFR dostupni pozivom /api/attention (opisan u "Provera dostupnosti"). Ukoliko je odgovor negativan, treba prikazati odgovarajuću poruku korisniku i posle par sekundi pokušati ponovo. Nastaviti ovu proveru bez ograničenja dok ESIR ne postane dostupan.
  2. Samo ako se koristi LPFR: proveriti da li je bezbednosni element prisutan pozivom /api/status (opisan u "Provera statusa") i proverom da li se u spisku statusa u polju gsc nalazi kod 1300. Ukoliko se ovaj kod nalazi onda treba prikazati adekvatnu poruku korisniku da bezbednosni element nije prisutan i nastaviti ovu proveru sve dok se ne izgubi kod 1300.
  3. Samo ako se koristi LPFR: proveriti da li je neophodan unos PIN-a pozivom /api/status i proverom da li se u spisku statusa u polju gsc nalazi kod 1500. Ukoliko se ovaj kod nalazi onda treba prikazati adekvatan ekran korisniku za unos PIN-a i slanjem istog na /api/pin poziv za proveru (opisan u "Unos PIN-a bezbednosnog elementa"). Nakon uspešno unetog PIN-a se može nastaviti dalje sa radom.

  4. Obaviti standardni unos svih elemenata računa i poslati na fiskalizaciju i štampu pozivom /api/invoices(opisan u "Fiskalizacija računa"). Ukoliko je vraćena greška da bezbednosni element nije prisutan (npr. korisnik je izvukao karticu u međuvremenu) onda se vratiti na korak 2. Ukoliko je vraćena greška da je neophodan unos PIN-a (npr. korisnik je izvukao i vratio istu ili drugu karticu) onda se vratiti na korak 3. U suprotnom, ovaj API će vratiti grešku ukoliko postoji problem u sadržaju računa (koji treba prikazati korisniku adekvatno na ekranu) ili odgovor da je fiskalizacija i štampa uspešno obavljena, u kom slučaju se može pristupiti unosu novog računa od koraka 2. U slučaju da je vraćena greška, ona može biti greška pre fiskalizacije ili greška nakon fiskalizacije, ali pre štampanja računa. U slučaju da je fiskalizacija obavljena, ali je greška nastala prilikom štampe računa odgovor će pored informacija o grešci sadržati i polje invoiceResponse u kom slučaju je potrebno ispraviti grešku sa štampačem (npr. ukoliko nema papira), a potom ponoviti isti poziv ali uključiti i invoiceResponse polje što je signal Teron ESIR API-u da ne radi ponovo fiskalizaciju već samo da pokuša štampu ponovo.

Before fiscalizing an invoice, it is necessary to check the status of the PFR (LPFR or VPFR depending on the configuration).

The following image shows the usual sequence of steps performed before fiscalizing an invoice:

Initialization flow diagram — image from the original documentation (the steps are described in detail below).

  1. Check whether the ESIR and PFR are available by calling /api/attention (described in "Availability check"). If the response is negative, an appropriate message should be shown to the user and the request should be retried after a few seconds. Continue this check indefinitely until the ESIR becomes available.
  2. Only if LPFR is used: check whether the security element is present by calling /api/status (described in "Status check") and verifying whether the code 1300 is present in the list of statuses in the gsc field. If this code is present, an appropriate message should be shown to the user indicating that the security element is not present, and this check should continue until the 1300 code disappears.
  3. Only if LPFR is used: check whether PIN entry is required by calling /api/status and verifying whether the code 1500 is present in the list of statuses in the gsc field. If this code is present, an appropriate screen should be shown to the user for PIN entry, and by sending it to the /api/pin call for verification (described in "Security element PIN entry"). After the PIN has been successfully entered, work can continue.

  4. Perform the standard entry of all invoice elements and send them for fiscalization and printing by calling /api/invoices (described in "Invoice fiscalization"). If an error is returned stating that the security element is not present (e.g. the user removed the card in the meantime), then return to step 2. If an error is returned stating that PIN entry is required (e.g. the user removed and reinserted the same or a different card), then return to step 3. Otherwise, this API will return an error if there is a problem in the invoice content (which should be shown to the user appropriately on the screen) or a response that fiscalization and printing were successfully completed, in which case a new invoice can be entered starting from step 2. If an error is returned, it may be an error before fiscalization or an error after fiscalization but before printing the invoice. In case fiscalization was performed but an error occurred while printing the invoice, the response will, in addition to the error information, also contain the invoiceResponse field, in which case it is necessary to fix the printer error (e.g. if there is no paper) and then repeat the same call but include the invoiceResponse field as well, which is a signal to the Teron ESIR API not to perform fiscalization again but only to attempt printing again.

GET/api/status#

Provera statusa

Status check

Ovaj poziv vraća status sistema za fiskalizaciju (LPFR ili VPFR u zavisnosti od podešavanja). Glavna polja u odgovoru od interesa za integraciju sa Teron ESIR-om su:

  • sdcDateTime (timestamp) - trenutno vreme na PFR-u
  • gsc: (list of string) - niz statusa LPFR-a. Za spisak svih statusa konsultovati PURS dokumentaciju za LPFR, glavni statusi su opisani u prethodnoj sekciji u okviru opisa niza koraka prilikom fiskalizacije računa. Ovo polje ne postoji u slučaju korišćenja VPFR-a

  • uid (string) - UID bezbednosnog elementa (LPFR, ukoliko je ubačen) odnosno sertifikata (VPFR)

This call returns the status of the fiscalization system (LPFR or VPFR depending on the configuration). The main fields in the response of interest for integration with Teron ESIR are:

  • sdcDateTime (timestamp) - the current time on the PFR
  • gsc: (list of string) - an array of LPFR statuses. For a list of all statuses, consult the PURS documentation for LPFR; the main statuses are described in the previous section within the description of the sequence of steps during invoice fiscalization. This field does not exist when using VPFR

  • uid (string) - the UID of the security element (LPFR, if inserted) or of the certificate (VPFR)

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/status' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "isPinRequired": false,
  "auditRequired": false,
  "sdcDateTime": "2023-12-22T10:35:26.660+01:00",
  "lastInvoiceNumber": "E57ZBRSZ-E57ZBRSZ-2119",
  "protocolVersion": "1.0.0",
  "secureElementVersion": "1.1.0",
  "hardwareVersion": "1.0",
  "softwareVersion": "1.1",
  "deviceSerialNumber": "0Y-0001-F050357A81374D89B89CFDA9B1E8166E",
  "make": "Teron",
  "model": "Teron LPFR",
  "mssc": [],
  "gsc": [
    "0100",
    "0210"
  ],
  "supportedLanguages": [
    "sr-RS",
    "sr-Cyrl-RS",
    "en-US"
  ],
  "uid": "E57ZBRSZ",
  "taxCoreApi": "https://api.sandbox.suf.purs.gov.rs:443/",
  "currentTaxRates": {
    "validFrom": "2023-10-08T08:40:00.000+02:00",
    "groupId": 8,
    "taxCategories": [
      {
        "name": "ECAL",
        "categoryType": 0,
        "taxRates": [
          {
            "rate": 11,
            "label": "F"
          }
        ],
        "orderId": 1
      },
      {
        "name": "N-TAX",
        "categoryType": 0,
        "taxRates": [
          {
            "rate": 0,
            "label": "N"
          }
        ],
        "orderId": 2
      },
      {
        "name": "PBL",
        "categoryType": 2,
        "taxRates": [
          {
            "rate": 0.5,
            "label": "P"
          }
        ],
        "orderId": 3
      },
      {
        "name": "STT",
        "categoryType": 0,
        "taxRates": [
          {
            "rate": 6,
            "label": "E"
          }
        ],
        "orderId": 4
      },
      {
        "name": "TOTL",
        "categoryType": 1,
        "taxRates": [
          {
            "rate": 2,
            "label": "T"
          }
        ],
        "orderId": 5
      },
      {
        "name": "VAT",
        "categoryType": 0,
        "taxRates": [
          {
            "rate": 10,
            "label": "A"
          },
          {
            "rate": 0,
            "label": "B"
          },
          {
            "rate": 19,
            "label": "Ж"
          }
        ],
        "orderId": 6
      }
    ]
  },
  "allTaxRates": [
    {
      "validFrom": "2023-10-08T08:40:00.000+02:00",
      "groupId": 8,
      "taxCategories": [
        {
          "name": "ECAL",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 11,
              "label": "F"
            }
          ],
          "orderId": 1
        },
        {
          "name": "N-TAX",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 0,
              "label": "N"
            }
          ],
          "orderId": 2
        },
        {
          "name": "PBL",
          "categoryType": 2,
          "taxRates": [
            {
              "rate": 0.5,
              "label": "P"
            }
          ],
          "orderId": 3
        },
        {
          "name": "STT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 6,
              "label": "E"
            }
          ],
          "orderId": 4
        },
        {
          "name": "TOTL",
          "categoryType": 1,
          "taxRates": [
            {
              "rate": 2,
              "label": "T"
            }
          ],
          "orderId": 5
        },
        {
          "name": "VAT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 10,
              "label": "A"
            },
            {
              "rate": 0,
              "label": "B"
            },
            {
              "rate": 19,
              "label": "Ж"
            }
          ],
          "orderId": 6
        }
      ]
    },
    {
      "validFrom": "2023-10-05T08:45:00.000+02:00",
      "groupId": 9,
      "taxCategories": [
        {
          "name": "ECAL",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 11,
              "label": "F"
            }
          ],
          "orderId": 1
        },
        {
          "name": "N-TAX",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 0,
              "label": "N"
            }
          ],
          "orderId": 2
        },
        {
          "name": "PBL",
          "categoryType": 2,
          "taxRates": [
            {
              "rate": 0.5,
              "label": "P"
            }
          ],
          "orderId": 3
        },
        {
          "name": "STT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 6,
              "label": "E"
            }
          ],
          "orderId": 4
        },
        {
          "name": "TOTL",
          "categoryType": 1,
          "taxRates": [
            {
              "rate": 2,
              "label": "T"
            }
          ],
          "orderId": 5
        },
        {
          "name": "VAT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 11,
              "label": "A"
            },
            {
              "rate": 0,
              "label": "B"
            },
            {
              "rate": 19,
              "label": "Ж"
            }
          ],
          "orderId": 6
        }
      ]
    },
    {
      "validFrom": "2023-10-05T08:35:00.000+02:00",
      "groupId": 7,
      "taxCategories": [
        {
          "name": "ECAL",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 11,
              "label": "F"
            }
          ],
          "orderId": 1
        },
        {
          "name": "N-TAX",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 0,
              "label": "N"
            }
          ],
          "orderId": 2
        },
        {
          "name": "PBL",
          "categoryType": 2,
          "taxRates": [
            {
              "rate": 0.5,
              "label": "P"
            }
          ],
          "orderId": 3
        },
        {
          "name": "STT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 6,
              "label": "E"
            }
          ],
          "orderId": 4
        },
        {
          "name": "TOTL",
          "categoryType": 1,
          "taxRates": [
            {
              "rate": 2,
              "label": "T"
            }
          ],
          "orderId": 5
        },
        {
          "name": "VAT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 1000,
              "label": "A"
            },
            {
              "rate": 0,
              "label": "B"
            },
            {
              "rate": 19,
              "label": "Ж"
            }
          ],
          "orderId": 6
        }
      ]
    },
    {
      "validFrom": "2021-12-20T00:00:00.000+01:00",
      "groupId": 5,
      "taxCategories": [
        {
          "name": "ECAL",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 11,
              "label": "F"
            }
          ],
          "orderId": 1
        },
        {
          "name": "N-TAX",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 0,
              "label": "N"
            }
          ],
          "orderId": 2
        },
        {
          "name": "PBL",
          "categoryType": 2,
          "taxRates": [
            {
              "rate": 0.5,
              "label": "P"
            }
          ],
          "orderId": 3
        },
        {
          "name": "STT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 6,
              "label": "E"
            }
          ],
          "orderId": 4
        },
        {
          "name": "TOTL",
          "categoryType": 1,
          "taxRates": [
            {
              "rate": 2,
              "label": "T"
            }
          ],
          "orderId": 5
        },
        {
          "name": "VAT",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 9,
              "label": "A"
            },
            {
              "rate": 0,
              "label": "B"
            },
            {
              "rate": 19,
              "label": "Ж"
            }
          ],
          "orderId": 6
        }
      ]
    },
    {
      "validFrom": "2021-07-22T11:55:24.000+02:00",
      "groupId": 2,
      "taxCategories": [
        {
          "name": "ECAL",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 11,
              "label": "F"
            }
          ],
          "orderId": 1
        },
        {
          "name": "N-TAX",
          "categoryType": 0,
          "taxRates": [
            {
              "rate": 0,
              "label": "N"
            }
          ],
          "orderId": 2
        },
        {
          "name": "PBL",
          "categoryType": 2,
          "taxRates": [
            
… [skraćeno]
POST/api/pin#

Unos PIN-a bezbednosnog elementa

Entering the security element PIN

Namena ovog poziva je da otključa bezbednosni element za potrebe fiskalizacije unosom PIN koda. PIN kod se prosleđuje u zahtevu, dok odgovor sadrži status kod operacije. Ukoliko je operacija uspešna, odgovor sadrži HTTP 200 OK status, dok u svim ostalim slučajevima vraća status HTTP 4xx ili HTTP 5xx. Mogući numerički status kodovi u odgovoru su:

  • 0100 - PIN je ispravno unet
  • 1300 - Bezbednosni element nije prisutan
  • 2400 - LPFR nije spreman
  • 2800 - Pogrešan format PIN-a (očekivano 4 cifre)
  • 2806 - Pogrešan format PIN-a (očekivano 4 cifre)

Napomena: zbog uniformnosti sa LPFR API-jima koje je propisao PURS, ovo je jedini API poziv koji na ulazu prihvata čist tekst (Content-type: text/plain).

The purpose of this call is to unlock the security element for fiscalization purposes by entering the PIN code. The PIN code is passed in the request, while the response contains the operation status code. If the operation is successful, the response contains an HTTP 200 OK status, while in all other cases it returns an HTTP 4xx or HTTP 5xx status. The possible numeric status codes in the response are:

  • 0100 - PIN entered correctly
  • 1300 - Security element is not present
  • 2400 - LPFR is not ready
  • 2800 - Incorrect PIN format (4 digits expected)
  • 2806 - Incorrect PIN format (4 digits expected)

Note: for the sake of uniformity with the LPFR APIs prescribed by PURS, this is the only API call that accepts plain text as input (Content-type: text/plain).

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/pin' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '1234'
Primer odgovoraResponse example 200 OK
"0100"

Izdavanje računa

Invoice issuance

Svi računi se fiskalizuju i štampaju pozivom POST /api/invoices metode i prosleđivanjem zahteva koji detaljnije opisuje sadržaj računa.

Model podataka zahteva:

  • invoiceRequest (object): objekat koji sadrži detaljan opis sadržaja računa:

    • invoiceType (string): tip računa, može imati vrednosti: Normal (promet), Proforma (predračun), Copy (kopija), Training (trening), Advance (avans)

    • transactionType (string): tip transakcije, može imati vrednosti: Sale (prodaja), Refund (refundacija)

    • payment (list(object)): niz objekata koji opisuju metode plaćanja gde svaki element sadrži sledeća polja:

      • paymentType (string): tip plaćanja, može imati vrednosti: Cash (gotovina), Card (platna kartica), Check (ček), WireTransfer (prenos na račun), Voucher (vaučer), MobileMoney (instant plaćanje), Other (drugo bezgotovinsko plaćanje)

      • amount (money): iznos uplate po navedenom tipu plaćanja

    • dateAndTimeOfIssue (timestamp): koristi se u slučajevima da je obveznik fiskalizacije evidentirao uplatu avansa ranije (npr. za virmanski avans dat u prethodnom danu)

    • cashier (string): naziv kasira

    • buyerId (string): identifikacija kupca sa prefiksom tipa identifikacionog broja u formatu TIP:BROJ, gde tip može biti (konsultovati tehničko uputstvo na PURS sajtu za ažurnu listu tipova):

      • 10: PIB kupca

      • 11: JMBG

      • 12: PIB i JBKJS

      • 13: Kod penzionerske kartice

      • 14: PIB - poljoprivredno gazdinstvo

      • 15: JMBG - poljoprivredno gazdinstvo (domaće lice)

      • 16: BPG - broj poljoprivrednog gazdinstva (fizičko lice)

      • 20: Broj lične karte

      • 21: Broj izbegličke legitimacije

      • 22: EBS

      • 23: Broj pasoša (domaće lice)

      • 30: Broj pasoša (strano lice)

      • 31: Broj diplomatske legitimacije

      • 32: Broj lične karte (MKD)

      • 33: Broj lične karte (MNE)

    • buyerCostCenterId (string): opciono polje kupca

    • referentDocumentNumber (string): broj referentnog dokumenta (broj računa na koji se referencira ovaj račun)

    • referentDocumentDT (timestamp): vreme kada je izdat referentni dokument (vreme kada je fiskalizovan račun na koji se referencira ovaj račun)

    • items (list(object)): stavke računa gde svaka stavka sadrži:

      • name (string): naziv artikla

      • gtin (string): GTIN (barkod) artikla

      • labels (list(string)): niz poreskih stopa po kojima je oporezovana stavka (u Srbiji trenutno je uvek jedna poreska stopa)

      • unitPrice (money): jedinična cena

      • quantity (quantity): količina

      • totalPrice (money): ukupna cena

      • discount (percent): iznos uračunatog popusta u procentima

      • discountAmount (money): iznos u novcu uračunatog popusta

  • print (boolean): da li treba štampati račun nakon fiskalizacije

  • email (string): email na koji treba poslati račun nakon fiskalizacije

  • renderReceiptImage (boolean): da li odgovor treba da sadrži Base64 kodiran izgled računa u zadatom formatu u polju invoiceImagePngBase64 odnosno invoiceImagePdfBase64 u zavisnosti od izabranog formata.

  • receiptLayout (string): vrednost Slip ako se račun pravi u formatu fiskalnog isečka odnosno Invoice ako je u A4 formatu.

  • receiptImageFormat (string): vrednost Png za png format odnosno Pdf za pdf format

  • printerName (string): naziv štampača na koji se štampa; u suprotnom se koristi štampač koji je podešen

  • printerType (string): tip štampača na koji se štampa; u suprotnom se koristi tip štampača koji je podešen

  • receiptHeaderImage (string): Base64 kodirana slika koja se štampa na početku računa

  • receiptFooterImage (string): Base64 kodirana slika koja se štampa na kraju računa

  • receiptHeaderTextLines (list(string)): niz tekstova koji se štampaju na početku računa

  • receiptFooterTextLines (list(string)): niz tekstova koji se štampaju na kraju računa

  • advancePaid (money): iznos avansne uplate, kod automatskog izdavanja konačnog računa.

  • advanceTax (money): iznos poreza obračunatog na avansne uplate, kod automatskog izdavanja konačnog računa.

Svaki zahtev za fiskalizacijom opciono može u HTTP zaglavlju da uključi polje RequestId, u okviru koga se navodi jedinstven identifikator zahteva koji generiše sistem koji šalje zahtev za fiskalizacijom. Maksimalna dužina identifikatora je 32 heksadecimalna znaka (brojevi 0-9 i slova od A do F). Za više detalja pogledati API poziv "Pregled sadržaja računa po broju zahteva".

U nastavku su navedeni primeri najčešćih računa koji se pojavljuju u praksi. Teron ESIR nije ograničen samo na navedene primere, već su oni tu da olakšaju razumevanje modela podataka, kao i proces integracije. Svakako je neophodno da zahteve koje šaljete za fiskalizacijom prilagodite svojim konkretnim potrebama, uz razumevanje kompletnog modela podataka i relevantnih poreskih zakona.

Napomena: navedeni primeri računa su generisani na testnom SUF okruženju koje koristi testne poreske stope (drugačije labele i iznose poreza, npr. Ж=19%) dok poreske stope na produkcionom okruženju odgovaraju trenutno važećim poreskim zakonima i propisima.

All invoices are fiscalized and printed by calling the POST /api/invoices method and passing a request that describes the invoice content in detail.

Request data model:

  • invoiceRequest (object): object that contains a detailed description of the invoice content:

    • invoiceType (string): invoice type, can have the values: Normal (turnover), Proforma (proforma), Copy (copy), Training (training), Advance (advance)

    • transactionType (string): transaction type, can have the values: Sale (sale), Refund (refund)

    • payment (list(object)): array of objects describing payment methods, where each element contains the following fields:

      • paymentType (string): payment type, can have the values: Cash (cash), Card (payment card), Check (check), WireTransfer (transfer to account), Voucher (voucher), MobileMoney (instant payment), Other (other non-cash payment)

      • amount (money): payment amount for the specified payment type

    • dateAndTimeOfIssue (timestamp): used in cases where the fiscalization taxpayer recorded an advance payment earlier (e.g. for a wire-transfer advance given on a previous day)

    • cashier (string): cashier name

    • buyerId (string): buyer identification with a prefix indicating the type of identification number in the format TYPE:NUMBER, where the type can be (consult the technical instructions on the PURS website for the up-to-date list of types):

      • 10: buyer's PIB

      • 11: JMBG

      • 12: PIB and JBKJS

      • 13: Pensioner card code

      • 14: PIB - agricultural holding

      • 15: JMBG - agricultural holding (domestic person)

      • 16: BPG - agricultural holding number (natural person)

      • 20: ID card number

      • 21: Refugee ID number

      • 22: EBS

      • 23: Passport number (domestic person)

      • 30: Passport number (foreign person)

      • 31: Diplomatic ID number

      • 32: ID card number (MKD)

      • 33: ID card number (MNE)

    • buyerCostCenterId (string): optional buyer field

    • referentDocumentNumber (string): referent document number (the invoice number this invoice refers to)

    • referentDocumentDT (timestamp): time when the referent document was issued (time when the invoice this invoice refers to was fiscalized)

    • items (list(object)): invoice items, where each item contains:

      • name (string): article name

      • gtin (string): GTIN (barcode) of the article

      • labels (list(string)): array of tax rates by which the item is taxed (in Serbia there is currently always a single tax rate)

      • unitPrice (money): unit price

      • quantity (quantity): quantity

      • totalPrice (money): total price

      • discount (percent): amount of the applied discount in percent

      • discountAmount (money): monetary amount of the applied discount

  • print (boolean): whether the invoice should be printed after fiscalization

  • email (string): email to which the invoice should be sent after fiscalization

  • renderReceiptImage (boolean): whether the response should contain a Base64-encoded rendering of the invoice in the specified format, in the invoiceImagePngBase64 or invoiceImagePdfBase64 field depending on the chosen format.

  • receiptLayout (string): value Slip if the invoice is produced in fiscal slip format, or Invoice if in A4 format.

  • receiptImageFormat (string): value Png for png format or Pdf for pdf format

  • printerName (string): name of the printer to print on; otherwise the configured printer is used

  • printerType (string): type of the printer to print on; otherwise the configured printer type is used

  • receiptHeaderImage (string): Base64-encoded image printed at the beginning of the invoice

  • receiptFooterImage (string): Base64-encoded image printed at the end of the invoice

  • receiptHeaderTextLines (list(string)): array of texts printed at the beginning of the invoice

  • receiptFooterTextLines (list(string)): array of texts printed at the end of the invoice

  • advancePaid (money): amount of the advance payment, when automatically issuing a final invoice.

  • advanceTax (money): amount of tax calculated on advance payments, when automatically issuing a final invoice.

Each fiscalization request may optionally include the RequestId field in the HTTP header, which specifies a unique identifier of the request generated by the system sending the fiscalization request. The maximum length of the identifier is 32 hexadecimal characters (digits 0-9 and letters A to F). For more details see the API call "Invoice content overview by request number".

Below are examples of the most common invoices encountered in practice. Teron ESIR is not limited to the listed examples only; they are there to facilitate understanding of the data model as well as the integration process. It is certainly necessary to adapt the fiscalization requests you send to your specific needs, with an understanding of the complete data model and the relevant tax laws.

Note: the listed invoice examples were generated on a test SUF environment that uses test tax rates (different labels and tax amounts, e.g. Ж=19%), while the tax rates on the production environment correspond to the currently applicable tax laws and regulations.

POST/api/invoices#

Gotovinski račun

Cash invoice

Gotovinski račun sa jednim artiklom i jednim načinom plaćanja (gotovina). Ovaj račun će nakon fiskalizacije biti odštampan na štampaču.

Cash invoice with a single article and a single payment type (cash). After fiscalization, this invoice will be printed on the printer.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Normal",
        "transactionType": "Sale",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "Cash"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 100.00,
                "unitPrice": 50.00,
                "quantity": 2.000
            }
        ],
        "cashier": "Teron"
    }
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T11:23:26.574+01:00",
  "invoiceCounter": "4896/13195ПП",
  "invoiceCounterExtension": "ПП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13195",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCLMwAAIBMAAEBC...",
  "verificationQRCode": "R0lGODlhggGCAfcAAAAAAAE...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\n-------------ПРОМЕТ ПРОДАЈА-------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00          2          100,00\r\n----------------------------------------\r\nУкупан износ:                     100,00\r\nГотовина:                         100,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         15,97\r\n----------------------------------------\r\nУкупан износ пореза:               15,97\r\n========================================\r\nПФР време:          04.01.2024. 11:23:26\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13195\r\nБројач рачуна:              4896/13195ПП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13195,
  "transactionTypeCounter": 4896,
  "totalAmount": 100,
  "encryptedInternalData": "g2XLtNBryYaadyeRhrkKs9Lui0fbX...",
  "signature": "5yC7r2dBEbV5+O0kBcFoUOoyv85...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 15.9664
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Gotovinski račun sa identifikacijom kupca

Cash invoice with buyer identification

Gotovinski račun sa identifikacijom kupca sadrži iste elemente kao i prethodni račun uz dodata polja u invoiceRequest objektu:

  • buyerId (string) - identifikator kupca u formatu (TIP:BROJ)

  • buyerCostCenterId (string) - opciono polje kupca

A cash invoice with buyer identification contains the same elements as the previous invoice, with additional fields added to the invoiceRequest object:

  • buyerId (string) - buyer identifier in the format (TYPE:NUMBER)

  • buyerCostCenterId (string) - optional buyer field

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Normal",
        "transactionType": "Sale",
        "buyerId": "10:111758195",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "Cash"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 100.00,
                "unitPrice": 50.00,
                "quantity": 2.000
            }
        ],
        "cashier": "Teron"
    }
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T12:56:34.060+01:00",
  "invoiceCounter": "4898/13198ПП",
  "invoiceCounterExtension": "ПП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13198",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCOMwAAIhMAAEBCDwAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nИД купца:                   10:111758195\r\nЕСИР број:                      1060/1.2\r\n-------------ПРОМЕТ ПРОДАЈА-------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00          2          100,00\r\n----------------------------------------\r\nУкупан износ:                     100,00\r\nГотовина:                         100,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         15,97\r\n----------------------------------------\r\nУкупан износ пореза:               15,97\r\n========================================\r\nПФР време:          04.01.2024. 12:56:34\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13198\r\nБројач рачуна:              4898/13198ПП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13198,
  "transactionTypeCounter": 4898,
  "totalAmount": 100,
  "encryptedInternalData": "F+4h7GMDCraXa...",
  "signature": "mqIzaa3PIsk6hD...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 15.9664
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Gotovinski račun sa više stavki i više načina plaćanja uz slanje na email

Cash invoice with multiple items and multiple payment types, sent by email

Gotovinski račun sa više artikala i više načina plaćanja (gotovina i kartica), bez štampe na štampač i sa slanjem na email dodavanjem novih polja u zahtev:

  • print (boolean) - vrednost false da se ne štampa račun

  • email (string) - email adresa na koju će biti poslat račun

A cash invoice with multiple articles and multiple payment types (cash and card), without printing on the printer and sent by email by adding new fields to the request:

  • print (boolean) - value false so that the invoice is not printed

  • email (string) - email address to which the invoice will be sent

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "print": false,
    "email": "test@teron.rs",
    "invoiceRequest": {
        "invoiceType": "Normal",
        "transactionType": "Sale",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "Cash"
            },
            {
                "amount": 200.00,
                "paymentType": "Card"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 100.00,
                "unitPrice": 50.00,
                "quantity": 2.000
            },
            {
                "name": "Artikl 2",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 200.00,
                "unitPrice": 200.00,
                "quantity": 1.000
            }
        ],
        "cashier": "Teron"
    }
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T11:30:02.956+01:00",
  "invoiceCounter": "4897/13196ПП",
  "invoiceCounterExtension": "ПП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13196",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCMMwAAIRMAAMDGLQAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAAAAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\n-------------ПРОМЕТ ПРОДАЈА-------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00          2          100,00\r\nArtikl 2 (Ж)                            \r\n       200,00          1          200,00\r\n----------------------------------------\r\nУкупан износ:                     300,00\r\nГотовина:                         100,00\r\nПлатна картица:                   200,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         47,90\r\n----------------------------------------\r\nУкупан износ пореза:               47,90\r\n========================================\r\nПФР време:          04.01.2024. 11:30:02\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13196\r\nБројач рачуна:              4897/13196ПП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13196,
  "transactionTypeCounter": 4897,
  "totalAmount": 300,
  "encryptedInternalData": "Fd+jSqceTQ2mMe4a...",
  "signature": "xwDKGugaCpBPwjK...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 47.8992
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Kopija računa

Invoice copy

Kopija računa ima isti sadržaj kao i originalni račun sa postavljenim poljem invoiceRequest.invoiceType na Copy i uz dodata dva polja u invoiceRequest objektu koja se odnose na prvi račun:

  • referentDocumentNumber (string) - broj originalnog računa
  • referentDocumentDT (timestamp) - vreme originalnog računa

An invoice copy has the same content as the original invoice, with the invoiceRequest.invoiceType field set to Copy and with two additional fields added to the invoiceRequest object that refer to the original invoice:

  • referentDocumentNumber (string) - number of the original invoice
  • referentDocumentDT (timestamp) - time of the original invoice
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Copy",
        "transactionType": "Sale",
        "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13196",
        "referentDocumentDT": "2024-01-04T11:30:02.956+01:00",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "Cash"
            },
            {
                "amount": 200.00,
                "paymentType": "Card"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 100.00,
                "unitPrice": 50.00,
                "quantity": 2.000
            },
            {
                "name": "Artikl 2",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 200.00,
                "unitPrice": 200.00,
                "quantity": 1.000
            }
        ],
        "cashier": "Teron"
    }
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T12:29:30.307+01:00",
  "invoiceCounter": "441/13197КП",
  "invoiceCounterExtension": "КП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13197",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCNMwAAuQEAAMDGLQAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "======== ОВО НИЈЕ ФИСКАЛНИ РАЧУН =======\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13196\r\nРеф. време:         04.01.2024. 11:30:02\r\n-------------КОПИЈА ПРОДАЈА-------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00          2          100,00\r\nArtikl 2 (Ж)                            \r\n       200,00          1          200,00\r\n----------------------------------------\r\nУкупан износ:                     300,00\r\nГотовина:                         100,00\r\nПлатна картица:                   200,00\r\n========================================\r\n        ОВО НИЈЕ ФИСКАЛНИ РАЧУН         \r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         47,90\r\n----------------------------------------\r\nУкупан износ пореза:               47,90\r\n========================================\r\nПФР време:          02.01.2024. 12:29:30\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13197\r\nБројач рачуна:               441/13197КП\r\n========================================\r\n======== ОВО НИЈЕ ФИСКАЛНИ РАЧУН =======\r\n",
  "totalCounter": 13197,
  "transactionTypeCounter": 441,
  "totalAmount": 300,
  "encryptedInternalData": "vN4P2/uk9n3RX...",
  "signature": "5F2/XdIvvedXDGC...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 47.8992
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Refundacija računa

Invoice refund

Refundacija računa ima isti sadržaj kao i originalni račun sa postavljenim poljem invoiceRequest.transactionType na Refund i uz dodata dva polja u invoiceRequest objektu koja upućuju na prvi račun:

  • referentDocumentNumber (string) - broj originalnog računa
  • referentDocumentDT (timestamp) - vreme originalnog računa

Napomena: u zavisnosti od načina na koji se realizuje refundacija, može postojati potreba da se i načini plaćanja promene u odnosu na originalni račun.

An invoice refund has the same content as the original invoice, with the invoiceRequest.transactionType field set to Refund and with two additional fields added to the invoiceRequest object that refer to the original invoice:

  • referentDocumentNumber (string) - number of the original invoice
  • referentDocumentDT (timestamp) - time of the original invoice

Note: depending on the way the refund is carried out, there may be a need to change the payment types relative to the original invoice as well.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'X-Teron-SerialNumber: <serijski_broj>' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Normal",
        "transactionType": "Refund",
        "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13195",
        "referentDocumentDT": "2024-01-04T11:23:26.574+01:00",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "Cash"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 100.00,
                "unitPrice": 50.00,
                "quantity": 2.000
            }
        ],
        "cashier": "Teron"
    }
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T13:00:59.986+01:00",
  "invoiceCounter": "1217/13199ПР",
  "invoiceCounterExtension": "ПР",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13199",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCPMwAAwQQAAEBCDwAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13195\r\nРеф. време:         02.01.2024. 11:23:26\r\n-----------ПРОМЕТ РЕФУНДАЦИЈА-----------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00          2         -100,00\r\n----------------------------------------\r\nУкупна рефундација:               100,00\r\nГотовина:                         100,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         15,97\r\n----------------------------------------\r\nУкупан износ пореза:               15,97\r\n========================================\r\nПФР време:          04.01.2024. 13:00:59\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13199\r\nБројач рачуна:              1217/13199ПР\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13199,
  "transactionTypeCounter": 1217,
  "totalAmount": 100,
  "encryptedInternalData": "zJcxdRxyrGMh...",
  "signature": "mS+3P6HAGWW...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 15.9664
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Avansni račun

Advance invoice

Avansni račun se izdaje na sličan način kao i regularan gotovinski račun, osim što se invoiceRequest.invoiceType postavlja na Advance i dodaje se dodatno polje koje opisuje iznos koji je uplaćen avansno:

  • advancePayment (list(object)): niz koji opisuje avansne uplate po poreskim stopama
    • amount (money): iznos avansne uplate
    • label (string): oznaka poreske stope po kojoj se obračunava porez na ovu uplatu

Pre fiskalizacije Teron ESIR će konvertovati ovaj račun prema PURS propisima tako da stavke računa odgovaraju navedenim avansnim uplatama po poreskim stopama, dok će prave stavke računa biti odštampane na dnu računa van fiskalnog dela računa.

An advance invoice is issued in a similar way to a regular cash invoice, except that invoiceRequest.invoiceType is set to Advance and an additional field is added that describes the amount paid in advance:

  • advancePayment (list(object)): an array describing advance payments by tax rates
    • amount (money): the advance payment amount
    • label (string): the label of the tax rate by which tax on this payment is calculated

Before fiscalization, Teron ESIR will convert this invoice in accordance with PURS regulations so that the invoice items correspond to the specified advance payments by tax rates, while the actual invoice items will be printed at the bottom of the invoice, outside the fiscal part of the invoice.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Advance",
        "transactionType": "Sale",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "WireTransfer"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 600.00,
                "unitPrice": 50.00,
                "quantity": 12
            },
            {
                "name": "Artikl 2",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 400.00,
                "unitPrice": 200.00,
                "quantity": 2
            }
        ],
        "cashier": "Teron"
    },
    "advancePayment": [
        {
            "label": "Ж",
            "amount": 100.00
        }
    ]
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T14:19:06.827+01:00",
  "invoiceCounter": "2436/13200АП",
  "invoiceCounterExtension": "АП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13200",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCQMwAAhAkAAEBCDwAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\n-------------АВАНС ПРОДАЈА--------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nАванс (Ж)                               \r\n       100,00          1          100,00\r\n----------------------------------------\r\nУкупан износ:                     100,00\r\nПренос на рачун:                  100,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         15,97\r\n----------------------------------------\r\nУкупан износ пореза:               15,97\r\n========================================\r\nПФР време:          04.01.2024. 14:19:06\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13200\r\nБројач рачуна:              2436/13200АП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13200,
  "transactionTypeCounter": 2436,
  "totalAmount": 100,
  "encryptedInternalData": "Rd21x9hY6M9bvGAA...",
  "signature": "fYVTyD1pEoT3BP...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 15.9664
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Naredni avansni račun

Subsequent advance invoice

Naredni avansni račun se izdaje kao i pravi avansni račun uz referenciranje na prethodni avansni račun dodavanjem sledećih polja u invoiceRequest objektu:

  • referentDocumentNumber (string) - broj prethodnog avansnog računa
  • referentDocumentDT (timestamp) - vreme prethodnog avansnog računa

Pre fiskalizacije Teron ESIR će konvertovati ovaj račun prema PURS propisima tako da stavke računa odgovaraju navedenim avansnim uplatama po poreskim stopama, dok će prave stavke računa biti odštampane na dnu računa van fiskalnog dela računa.

Napomena: izdavanje narednog avansnog računa na ovaj način je moguće samo ukoliko su svi prethodni avansni računi izdati kroz isti Teron ESIR i postoje u internoj bazi računa.

A subsequent advance invoice is issued in the same way as a regular advance invoice, with a reference to the previous advance invoice by adding the following fields to the invoiceRequest object:

  • referentDocumentNumber (string) - number of the previous advance invoice
  • referentDocumentDT (timestamp) - time of the previous advance invoice

Before fiscalization, Teron ESIR will convert this invoice in accordance with PURS regulations so that the invoice items correspond to the specified advance payments by tax rates, while the actual invoice items will be printed at the bottom of the invoice, outside the fiscal part of the invoice.

Note: issuing a subsequent advance invoice in this way is only possible if all previous advance invoices were issued through the same Teron ESIR and exist in the internal invoice database.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Advance",
        "transactionType": "Sale",
        "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13200",
        "referentDocumentDT": "2024-01-04T14:19:06.827+01:00",
        "payment": [
            {
                "amount": 400.00,
                "paymentType": "WireTransfer"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 600.00,
                "unitPrice": 50.00,
                "quantity": 12
            },
            {
                "name": "Artikl 2",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 400.00,
                "unitPrice": 200.00,
                "quantity": 2
            }
        ],
        "cashier": "Teron"
    },
    "advancePayment": [
        {
            "label": "Ж",
            "amount": 400.00
        }
    ]
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T15:21:24.027+01:00",
  "invoiceCounter": "2437/13201АП",
  "invoiceCounterExtension": "АП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13201",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCRMwAAhQkAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13200\r\nРеф. време:         02.01.2024. 14:19:06\r\n-------------АВАНС ПРОДАЈА--------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nАванс (Ж)                               \r\n       400,00          1          400,00\r\n----------------------------------------\r\nУкупан износ:                     400,00\r\nПренос на рачун:                  400,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         63,87\r\n----------------------------------------\r\nУкупан износ пореза:               63,87\r\n========================================\r\nПФР време:          04.01.2024. 15:21:24\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13201\r\nБројач рачуна:              2437/13201АП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13201,
  "transactionTypeCounter": 2437,
  "totalAmount": 400,
  "encryptedInternalData": "Je3w0nu8y2hf...",
  "signature": "P++3SxtCHoopXQ...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 63.8655
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices/final#

Konačni račun

Final invoice

Izdavanje konačnog računa se vrši slanjem sledećeg zahteva na /api/invoices/final endpoint:

  • advanceLastInvoiceNumber (string) - broj poslednjeg avansnog računa
  • payment (list(object)): niz koji opisuje avansne uplate
    • paymentType (string): tip plaćanja
    • amount (money): iznos avansne uplate

Pored ovih polja, u zahtevu se mogu opciono navesti i sledeća polja:

  • print (boolean) - da li se računi štampaju
  • email (string) - email na koji će biti poslati računi
  • printerName (string) - naziv štampača na koji se štampa; u suprotnom se koristi štampač koji je podešen
  • printerType (string) - tip štampača na koji se štampa; u suprotnom se koristi tip štampača koji je podešen
  • receiptHeaderImage (string) - Base64 kodirana slika koja se štampa na početku računa
  • receiptFooterImage (string) - Base64 kodirana slika koja se štampa na kraju računa
  • receiptHeaderTextLines (list(string)) - niz tekstova koji se štampaju na početku računa
  • receiptFooterTextLines (list(string)) - niz tekstova koji se štampaju na kraju računa

Prilikom izdavanja konačnog računa Teron ESIR će automatski izdati "Promet/Refundacija" u iznosu svih prethodnih avansnih uplata, a potom "Promet/Prodaja" račun na ukupan iznos računa.

Napomena: izdavanje konačnog računa na ovaj način je moguće samo ukoliko su svi prethodni avansni računi izdati kroz isti Teron ESIR i postoje u internoj bazi računa.

A final invoice is issued by sending the following request to the /api/invoices/final endpoint:

  • advanceLastInvoiceNumber (string) - number of the last advance invoice
  • payment (list(object)): array describing the advance payments
    • paymentType (string): payment type
    • amount (money): amount of the advance payment

In addition to these fields, the following fields can optionally be specified in the request:

  • print (boolean) - whether the invoices are printed
  • email (string) - email to which the invoices will be sent
  • printerName (string) - name of the printer to print on; otherwise the configured printer is used
  • printerType (string) - type of the printer to print on; otherwise the configured printer type is used
  • receiptHeaderImage (string) - Base64 encoded image printed at the beginning of the invoice
  • receiptFooterImage (string) - Base64 encoded image printed at the end of the invoice
  • receiptHeaderTextLines (list(string)) - array of texts printed at the beginning of the invoice
  • receiptFooterTextLines (list(string)) - array of texts printed at the end of the invoice

When issuing a final invoice, Teron ESIR will automatically issue a "Sale/Refund" in the amount of all previous advance payments, and then a "Sale/Sale" invoice for the total invoice amount.

Note: issuing a final invoice in this way is only possible if all previous advance invoices were issued through the same Teron ESIR and exist in the internal invoice database.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices/final' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "advanceLastInvoiceNumber": "4TCASQVE-Dt1Ov1o0-13201",
    "payment": [
        {
            "paymentType": "Cash",
            "amount": 500.00
        }
    ]
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T15:33:48.966+01:00",
  "invoiceCounter": "4899/13203ПП",
  "invoiceCounterExtension": "ПП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13203",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCTMwAAIxMAAICWmAAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                                  \r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13202\r\nРеф. време:         02.01.2024. 15:33:48\r\n-------------ПРОМЕТ ПРОДАЈА-------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00         12          600,00\r\nArtikl 2 (Ж)                            \r\n       200,00          2          400,00\r\n----------------------------------------\r\nУкупан износ:                   1.000,00\r\nГотовина:                         500,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%        159,66\r\n----------------------------------------\r\nУкупан износ пореза:              159,66\r\n========================================\r\nПФР време:          04.01.2024. 15:33:48\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13203\r\nБројач рачуна:              4899/13203ПП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13203,
  "transactionTypeCounter": 4899,
  "totalAmount": 1000,
  "encryptedInternalData": "Udy4dsVb51tk...",
  "signature": "eFyUx2tz03yMT...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 159.6638
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Avansni račun (bez automatizma)

Advance invoice (without automation)

U slučaju da prethodni avansni račun nije evidentiran kroz istu Teron ESIR aplikaciju ili postoji neki drugi razlog zbog koga nije moguće koristiti automatizovan način izdavanja avansnih računa opisan u prethodnim koracima, avansni račun se formira ručno prema tehničkoj specifikaciji PURS-a:

  • Stavke računa (invoiceRequest.items) sadrže razbijenu uplatu po poreskim stopama, gde naziv artikla treba da bude Аванс sa prefiksom prema donjoj tabeli, količinom 1, jediničnom cenom i ukupnim iznosom koji odgovaraju iznosu koji je uplaćen po toj poreskoj stopi. Prefiksi za naziv artikla:
    • 10: za poresku stopu Ђ
    • 11: za poresku stopu Е
    • 12: za poresku stopu Г
    • 13: za poresku stopu А
  • Dodaje se polje:
    • originalItems (list(object)) - niz pravih stavki računa u istom formatu kao što bi se našle na računu u okviru invoiceRequest.items polja. Ovi podaci će biti odštampani na kraju računa.

Napomena: s obzirom na to da je primer napravljen na testnom PURS okruženju koje koristi druge poreske stope za koje nije definisan prefiks, on se ne pojavljuje u stavkama artikla.

In case the previous advance invoice was not recorded through the same Teron ESIR application, or there is another reason why it is not possible to use the automated method of issuing advance invoices described in the previous steps, the advance invoice is created manually according to the PURS technical specification:

  • The invoice items (invoiceRequest.items) contain the payment broken down by tax rates, where the article name should be Аванс with a prefix according to the table below, a quantity of 1, and a unit price and total amount that correspond to the amount paid for that tax rate. Prefixes for the article name:
    • 10: for tax rate Ђ
    • 11: for tax rate Е
    • 12: for tax rate Г
    • 13: for tax rate А
  • The following field is added:
    • originalItems (list(object)) - array of the actual invoice items in the same format as they would appear on the invoice within the invoiceRequest.items field. This data will be printed at the end of the invoice.

Note: since the example was created on the PURS test environment, which uses different tax rates for which no prefix is defined, the prefix does not appear in the article items.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Advance",
        "transactionType": "Sale",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "WireTransfer"
            }
        ],
        "items": [
            {
                "name": "Аванс",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 100.00,
                "unitPrice": 100.00,
                "quantity": 1
            }
        ],
        "cashier": "Teron"
    },
    "originalItems": [
        {
            "name": "Artikl 1",
            "labels": [
                "Ж"
            ],
            "totalAmount": 600.00,
            "unitPrice": 50.00,
            "quantity": 12
        },
        {
            "name": "Artikl 2",
            "labels": [
                "Ж"
            ],
            "totalAmount": 400.00,
            "unitPrice": 200.00,
            "quantity": 2
        }
    ]
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T17:41:35.005+01:00",
  "invoiceCounter": "2438/13204АП",
  "invoiceCounterExtension": "АП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13204",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCUMwAAhgkAAEBCDwAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\n-------------АВАНС ПРОДАЈА--------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nАванс (Ж)                               \r\n       100,00          1          100,00\r\n----------------------------------------\r\nУкупан износ:                     100,00\r\nПренос на рачун:                  100,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         15,97\r\n----------------------------------------\r\nУкупан износ пореза:               15,97\r\n========================================\r\nПФР време:          04.01.2024. 17:41:35\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13204\r\nБројач рачуна:              2438/13204АП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13204,
  "transactionTypeCounter": 2438,
  "totalAmount": 100,
  "encryptedInternalData": "uoKIEjaR0AyiGLMXnR...",
  "signature": "V1WiuAJg+twkJl...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 15.9664
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Naredni avansni račun (bez automatizma)

Subsequent advance invoice (without automation)

Naredni avansni račun izdaje se kao i pravi avansni račun, uz referenciranje na prethodni avansni račun, dodavanjem sledećih polja u invoiceRequest objektu:

  • referentDocumentNumber (string) - broj prethodnog avansnog računa

  • referentDocumentDT (timestamp) - vreme prethodnog avansnog računa

A subsequent advance invoice is issued just like a regular advance invoice, with a reference to the previous advance invoice, by adding the following fields to the invoiceRequest object:

  • referentDocumentNumber (string) - number of the previous advance invoice

  • referentDocumentDT (timestamp) - time of the previous advance invoice

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Advance",
        "transactionType": "Sale",
        "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13204",
        "referentDocumentDT": "2024-01-04T17:41:35.005+01:00",
        "payment": [
            {
                "amount": 400.00,
                "paymentType": "WireTransfer"
            }
        ],
        "items": [
            {
                "name": "Аванс",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 400.00,
                "unitPrice": 400.00,
                "quantity": 1
            }
        ],
        "cashier": "Teron"
    },
    "originalItems": [
        {
            "name": "Artikl 1",
            "labels": [
                "Ж"
            ],
            "totalAmount": 600.00,
            "unitPrice": 50.00,
            "quantity": 12
        },
        {
            "name": "Artikl 2",
            "labels": [
                "Ж"
            ],
            "totalAmount": 400.00,
            "unitPrice": 200.00,
            "quantity": 2
        }
    ]
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T17:45:45.806+01:00",
  "invoiceCounter": "2439/13205АП",
  "invoiceCounterExtension": "АП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13205",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCVMwAAhwkAAAAJPQAAAAAAAAABjMsRHc4EAABqspX8TJFCyj5Ocybga01lIlO5KvBjCFzU9PQaKhEmBlRbsDrC7sXgekT6YzCjTf… [skraćeno]",
  "verificationQRCode": "R0lGODlhggGCAfcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEhISIiIiMj… [skraćeno]",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13204\r\nРеф. време:         04.01.2024. 17:41:35\r\n-------------АВАНС ПРОДАЈА--------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nАванс (Ж)                               \r\n       400,00          1          400,00\r\n----------------------------------------\r\nУкупан износ:                     400,00\r\nПренос на рачун:                  400,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         63,87\r\n----------------------------------------\r\nУкупан износ пореза:               63,87\r\n========================================\r\nПФР време:          04.01.2024. 17:45:45\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13205\r\nБројач рачуна:              2439/13205АП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13205,
  "transactionTypeCounter": 2439,
  "totalAmount": 400,
  "encryptedInternalData": "arKV/EyRQso+TnMm4GtNZSJTuSrwYwhc1PT0GioRJgZUW7A6wu7F4HpE+mMwo035uRU3/5TwCTyOVzIA3eotgwyD5rRmRNXqjNGqMGmcyPniDvbCX9Mu7G8/85m5bU69iuZIqQTtPCbBduzveFDiQs1gxYcfV70e… [skraćeno]",
  "signature": "NC4Wyw1/0PPTu2EJA7u7ilyBYPbr0Xtb1gLYDaZf98+WrfOs3G4PPJ7hEUIGQLiDQa/MXAC5h2QbY4zXA8mOgJn8o3IOTbHCR3+0lth1zVHn1Dt5asNiMyQ+THmVRU8urqI1aaBORt1XuaBXRRPeMxYyr89LCt5e… [skraćeno]",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 63.8655
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Refundacija prethodno izdatih avansnih računa (bez automatizma)

Refund of previously issued advance invoices (without automation)

Pre izdavanja konačnog računa, neophodno je refundirati prethodno izdate avansne račune tako što se sumiraju sve prethodno izdate avansne uplate po poreskim stopama u jedan Avans/Refundacija račun koji se referencira na poslednji avansni račun u nizu.

Before issuing the final invoice, it is necessary to refund the previously issued advance invoices by summing all previously issued advance payments by tax rates into a single Advance/Refund invoice that references the last advance invoice in the sequence.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Advance",
        "transactionType": "Refund",
        "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13205",
        "referentDocumentDT": "2024-01-04T17:41:35.005+01:00",
        "payment": [
            {
                "amount": 500.00,
                "paymentType": "WireTransfer"
            }
        ],
        "items": [
            {
                "name": "Аванс",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 500.00,
                "unitPrice": 500.00,
                "quantity": 1
            }
        ],
        "cashier": "Teron"
    }
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T19:13:39.691+01:00",
  "invoiceCounter": "1921/13206АР",
  "invoiceCounterExtension": "АР",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13206",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCWMwAAgQcAAEBLTAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13205\r\nРеф. време:         02.01.2024. 17:41:35\r\n-----------АВАНС РЕФУНДАЦИЈА------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nАванс (Ж)                               \r\n       500,00          1         -500,00\r\n----------------------------------------\r\nУкупна рефундација:               500,00\r\nПренос на рачун:                  500,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         79,83\r\n----------------------------------------\r\nУкупан износ пореза:               79,83\r\n========================================\r\nПФР време:          02.01.2024. 19:13:39\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13206\r\nБројач рачуна:              1921/13206АР\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13206,
  "transactionTypeCounter": 1921,
  "totalAmount": 500,
  "encryptedInternalData": "JhrJpkklesZjL8z...",
  "signature": "zGEuw0pW8pPmCYK...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 79.8319
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Konačni račun (bez automatizma)

Final invoice (without automation)

Na kraju se izdaje konačni račun koji sadrži iznos preostale uplate, odnosno iznos uplate koja se vrši u momentu izdavanja konačnog računa, sadrži prave stavke računa, referencira se na prethodno izdat Avans/Refundacija račun i uključuje dodatne informacije:

  • advancePaid (money) - iznos koliko je uplaćeno avansno
  • advanceTax (money) - iznos poreza koji je obračunat na avansne uplate
  • advanceLastInvoiceNumber (string) - broj poslednjeg izdatog avansnog računa
  • advanceLastInvoiceDateTime (timestamp) - vreme izdavanja poslednjeg avansnog računa

Finally, a final invoice is issued containing the amount of the remaining payment, i.e. the amount of the payment made at the moment the final invoice is issued; it contains the actual invoice items, references the previously issued Advance/Refund invoice, and includes additional information:

  • advancePaid (money) - the amount paid in advance
  • advanceTax (money) - the amount of tax calculated on the advance payments
  • advanceLastInvoiceNumber (string) - the number of the last issued advance invoice
  • advanceLastInvoiceDateTime (timestamp) - the time the last advance invoice was issued
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Normal",
        "transactionType": "Sale",
        "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13206",
        "referentDocumentDT": "2024-01-04T19:13:39.691+01:00",
        "payment": [
            {
                "amount": 500.00,
                "paymentType": "Cash"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 600.00,
                "unitPrice": 50.00,
                "quantity": 12
            },
            {
                "name": "Artikl 2",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 400.00,
                "unitPrice": 200.00,
                "quantity": 2
            }
        ],
        "cashier": "Teron"
    },
    "advancePaid": 500.00,
    "advanceTax": 79.8319,
    "advanceLastInvoiceNumber": "4TCASQVE-Dt1Ov1o0-13205",
    "advanceLastInvoiceDateTime": "2024-01-04T17:45:45.806+01:00"
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T19:27:50.343+01:00",
  "invoiceCounter": "4900/13207ПП",
  "invoiceCounterExtension": "ПП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13207",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCXMwAAJBMAAICWmAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13206\r\nРеф. време:         02.01.2024. 19:13:39\r\n-------------ПРОМЕТ ПРОДАЈА-------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00         12          600,00\r\nArtikl 2 (Ж)                            \r\n       200,00          2          400,00\r\n----------------------------------------\r\nУкупан износ:                   1.000,00\r\nГотовина:                         500,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%        159,66\r\n----------------------------------------\r\nУкупан износ пореза:              159,66\r\n========================================\r\nПФР време:          04.01.2024. 19:27:50\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13207\r\nБројач рачуна:              4900/13207ПП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13207,
  "transactionTypeCounter": 4900,
  "totalAmount": 1000,
  "encryptedInternalData": "OeUcmZBviHhory1K...",
  "signature": "RVpf8F+cXQvCLj769...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 159.6638
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices#

Avansni račun za virmanski avans u prethodnom danu

Advance invoice for a bank transfer advance from a previous day

U slučaju da je avansna uplata evidentirana pre nego što je bilo moguće izdati fiskalni račun, neophodno je iskoristiti naredno polje prilikom fiskalizacije takvog avansnog računa:

  • dateAndTimeOfIssue (timestamp): datum i vreme kada je evidentirana avansna uplata

In case an advance payment was recorded before it was possible to issue a fiscal receipt, the following field must be used when fiscalizing such an advance invoice:

  • dateAndTimeOfIssue (timestamp): the date and time when the advance payment was recorded
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'RequestId: 12345' \
  -H 'Content-Type: application/json' \
  -d '{
    "invoiceRequest": {
        "invoiceType": "Advance",
        "transactionType": "Sale",
        "dateAndTimeOfIssue": "2024-01-04T15:10:00.000+01:00",
        "payment": [
            {
                "amount": 100.00,
                "paymentType": "WireTransfer"
            }
        ],
        "items": [
            {
                "name": "Artikl 1",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 600.00,
                "unitPrice": 50.00,
                "quantity": 12
            },
            {
                "name": "Artikl 2",
                "labels": [
                    "Ж"
                ],
                "totalAmount": 400.00,
                "unitPrice": 200.00,
                "quantity": 2
            }
        ],
        "cashier": "Teron"
    },
    "advancePayment": [
        {
            "label": "Ж",
            "amount": 100.00
        }
    ]
}'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-05T09:09:00.702+01:00",
  "invoiceCounter": "2440/13208АП",
  "invoiceCounterExtension": "АП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13208",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCYMwAAiAkAAEBCDwAAA...",
  "verificationQRCode": "R0lGODlhggGCAfcAAA...",
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nЕСИР време:         04.01.2024. 15:10:00\r\n-------------АВАНС ПРОДАЈА--------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nАванс (Ж)                               \r\n       100,00          1          100,00\r\n----------------------------------------\r\nУкупан износ:                     100,00\r\nПренос на рачун:                  100,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%         15,97\r\n----------------------------------------\r\nУкупан износ пореза:               15,97\r\n========================================\r\nПФР време:           05.01.2024. 9:09:00\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13208\r\nБројач рачуна:              2440/13208АП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13208,
  "transactionTypeCounter": 2440,
  "totalAmount": 100,
  "encryptedInternalData": "ym9kDh78Ea/kxa...",
  "signature": "hXXolx3gX77c8WDzL...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 15.9664
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}

Pregled računa

Invoice overview

U ovoj sekciji su opisane razne operacije za pregled i pretragu prethodno izdatih računa.

This section describes various operations for viewing and searching previously issued invoices.

GET/api/invoices/:invoiceNumber?receiptLayout=Slip&imageFormat=Png&includeHeaderAndFooter=true#

Pregled sadržaja računa

Invoice content overview

Namena ovog API poziva je da se preuzme kompletan sadržaj računa, uključujući i sliku računa u zadatom formatu.

The purpose of this API call is to retrieve the complete content of an invoice, including the invoice image in the specified format.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceNumber4TCASQVE-Dt1Ov1o0-13203Fiskalni broj računaFiscal invoice number
Query parametriQuery parameters
ParametarParameterPrimerExampleOpisDescription
receiptLayoutSlipIzgled računa (Slip — fiskalni isečak, Invoice — A4 format) — opcioni parametar; ukoliko nije naveden, koristi se vrednost iz podešavanjaInvoice layout (Slip — fiscal receipt, Invoice — A4 format) — optional parameter; if not specified, the value from the configuration is used
imageFormatPngSlika računa u PNG ili PDF formatu — opcioni parametar; ukoliko nije naveden, koristi se vrednost iz podešavanjaInvoice image in PNG or PDF format — optional parameter; if not specified, the value from the configuration is used
includeHeaderAndFootertrueDa li slika računa uključuje tekst/sliku u zaglavlju i podnožju računa — opcioni parametar; ukoliko nije naveden, vrednost je falseWhether the invoice image includes the text/image in the invoice header and footer — optional parameter; if not specified, the value is false
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/invoices/4TCASQVE-Dt1Ov1o0-13203?receiptLayout=Slip&imageFormat=Png&includeHeaderAndFooter=true' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "invoiceRequest": {
    "dateAndTimeOfIssue": null,
    "invoiceType": "Normal",
    "transactionType": "Sale",
    "payment": [
      {
        "amount": 500,
        "paymentType": "Cash"
      }
    ],
    "cashier": null,
    "buyerId": null,
    "buyerCostCenterId": null,
    "invoiceNumber": "1060/1.2",
    "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13202",
    "referentDocumentDT": "2024-01-04T15:33:48.669+01:00",
    "items": [
      {
        "gtin": null,
        "name": "Artikl 1",
        "quantity": 12,
        "unitPrice": 50,
        "labels": [
          "Ж"
        ],
        "totalAmount": 600,
        "plu": null,
        "articleUuid": null,
        "discount": null,
        "discountAmount": null
      },
      {
        "gtin": null,
        "name": "Artikl 2",
        "quantity": 2,
        "unitPrice": 200,
        "labels": [
          "Ж"
        ],
        "totalAmount": 400,
        "plu": null,
        "articleUuid": null,
        "discount": null,
        "discountAmount": null
      }
    ],
    "options": {
      "omitQRCodeGen": 1,
      "omitTextualRepresentation": null
    }
  },
  "invoiceResponse": {
    "requestedBy": "4TCASQVE",
    "signedBy": "Dt1Ov1o0",
    "sdcDateTime": "2024-01-04T15:33:48.966+01:00",
    "invoiceCounter": "4899/13203ПП",
    "invoiceCounterExtension": "ПП",
    "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13203",
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCTMwAAIxMAAICWmAAA...",
    "verificationQRCode": "R0lGODlhggGCAfcAAA...",
    "journal": null,
    "totalCounter": 13203,
    "transactionTypeCounter": 4899,
    "totalAmount": 1000,
    "encryptedInternalData": null,
    "signature": null,
    "taxItems": [
      {
        "label": "Ж",
        "categoryName": "VAT",
        "categoryType": 0,
        "rate": 19,
        "amount": 159.6638
      }
    ],
    "businessName": "Teron doo",
    "locationName": "Teron doo",
    "address": "Ustanička 196",
    "tin": "RS111758195",
    "district": "Београд",
    "taxGroupRevision": 8,
    "mrc": "99-3411-Dt1Ov1o0",
    "messages": "Success",
    "invoiceImagePngBase64": null,
    "invoiceImagePdfBase64": null,
    "invoiceImageHtml": null
  },
  "advancePaid": 500,
  "advanceTax": 79.8319,
  "advanceLastInvoiceNumber": "4TCASQVE-Dt1Ov1o0-13201",
  "advanceLastInvoiceDateTime": "2024-01-04T15:21:24.027+01:00",
  "print": true,
  "issueCopy": false,
  "receiptLayout": "Slip",
  "renderReceiptImage": false,
  "receiptImageFormat": "Png",
  "receiptImageBase64": "iVBORw0KGgoAAA...",
  "autoGenerated": true,
  "skipEftPos": false,
  "skipEftPosPrint": false
}
GET/api/invoices/last?receiptLayout=Slip&imageFormat=Png&includeHeaderAndFooter=true#

Pregled sadržaja poslednjeg računa

Last invoice content overview

Namena ovog API poziva je da se preuzme kompletan sadržaj poslednjeg fiskalizovanog računa.

The purpose of this API call is to retrieve the complete content of the last fiscalized invoice.

Query parametriQuery parameters
ParametarParameterPrimerExampleOpisDescription
receiptLayoutSlipIzgled računa (Slip — fiskalni isečak, Invoice — A4 format) — opcioni parametar; ukoliko nije naveden, koristi se vrednost iz podešavanjaInvoice layout (Slip — fiscal receipt, Invoice — A4 format) — optional parameter; if not specified, the value from the configuration is used
imageFormatPngSlika računa u PNG ili PDF formatu — opcioni parametar; ukoliko nije naveden, koristi se vrednost iz podešavanjaInvoice image in PNG or PDF format — optional parameter; if not specified, the value from the configuration is used
includeHeaderAndFootertrueDa li slika računa uključuje tekst/sliku u zaglavlju i podnožju računa — opcioni parametar; ukoliko nije naveden, vrednost je falseWhether the invoice image includes the text/image in the invoice header and footer — optional parameter; if not specified, the value is false
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/invoices/last?receiptLayout=Slip&imageFormat=Png&includeHeaderAndFooter=true' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "invoiceRequest": {
    "dateAndTimeOfIssue": null,
    "invoiceType": "Normal",
    "transactionType": "Sale",
    "payment": [
      {
        "amount": 500,
        "paymentType": "Cash"
      }
    ],
    "cashier": "Teron",
    "buyerId": null,
    "buyerCostCenterId": null,
    "invoiceNumber": "1060/1.2",
    "referentDocumentNumber": "4TCASQVE-Dt1Ov1o0-13206",
    "referentDocumentDT": "2024-01-04T19:13:39.691+01:00",
    "items": [
      {
        "gtin": null,
        "name": "Artikl 1",
        "quantity": 12,
        "unitPrice": 50,
        "labels": [
          "Ж"
        ],
        "totalAmount": 600,
        "plu": null,
        "articleUuid": null,
        "discount": null,
        "discountAmount": null
      },
      {
        "gtin": null,
        "name": "Artikl 2",
        "quantity": 2,
        "unitPrice": 200,
        "labels": [
          "Ж"
        ],
        "totalAmount": 400,
        "plu": null,
        "articleUuid": null,
        "discount": null,
        "discountAmount": null
      }
    ],
    "options": {
      "omitQRCodeGen": 1,
      "omitTextualRepresentation": null
    }
  },
  "invoiceResponse": {
    "requestedBy": "4TCASQVE",
    "signedBy": "Dt1Ov1o0",
    "sdcDateTime": "2024-01-04T19:27:50.343+01:00",
    "invoiceCounter": "4900/13207ПП",
    "invoiceCounterExtension": "ПП",
    "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13207",
    "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCXMwAAJBMAAICWmAAAA...",
    "verificationQRCode": "R0lGODlhggGCAfcAAA...",
    "journal": null,
    "totalCounter": 13207,
    "transactionTypeCounter": 4900,
    "totalAmount": 1000,
    "encryptedInternalData": null,
    "signature": null,
    "taxItems": [
      {
        "label": "Ж",
        "categoryName": "VAT",
        "categoryType": 0,
        "rate": 19,
        "amount": 159.6638
      }
    ],
    "businessName": "Teron doo",
    "locationName": "Teron doo",
    "address": "Ustanička 196",
    "tin": "RS111758195",
    "district": "Београд",
    "taxGroupRevision": 8,
    "mrc": "99-3411-Dt1Ov1o0",
    "messages": "Success",
    "invoiceImagePngBase64": null,
    "invoiceImagePdfBase64": null,
    "invoiceImageHtml": null
  },
  "advancePaid": 500,
  "advanceTax": 79.8319,
  "advanceLastInvoiceNumber": "4TCASQVE-Dt1Ov1o0-13205",
  "advanceLastInvoiceDateTime": "2024-01-04T17:45:45.806+01:00",
  "print": true,
  "issueCopy": false,
  "receiptLayout": "Slip",
  "renderReceiptImage": false,
  "receiptImageFormat": "Png",
  "receiptImageBase64": "iVBORw0KGgoAAA...",
  "autoGenerated": false,
  "skipEftPos": false,
  "skipEftPosPrint": false
}
GET/api/invoices/request/:requestId#

Pregled sadržaja računa po broju zahteva

Invoice content overview by request number

U situacijama kada je poslat zahtev za fiskalizaciju računa, ali zbog mrežnih ili drugih neočekivanih problema nije dobijen odgovor od ESIR-a, neophodno je proveriti da li je fiskalizacija izvršena, kako bi se izbegla dvostruka fiskalizacija istog računa.

Prilikom slanja zahteva za fiskalizaciju, u HTTP header polju RequestId može se navesti proizvoljan jedinstven identifikator zahteva, na osnovu koga se preko ovog poziva može dobiti odgovor. U slučaju da je fiskalizacija uspela, ovaj poziv će vratiti kompletan sadržaj računa, a ako se fiskalizacija nije desila, ovaj poziv će vratiti prazan odgovor.

In situations where an invoice fiscalization request has been sent, but no response was received from the ESIR due to network or other unexpected problems, it is necessary to check whether the fiscalization was performed, in order to avoid double fiscalization of the same invoice.

When sending a fiscalization request, an arbitrary unique request identifier may be specified in the RequestId HTTP header field, based on which a response can be obtained through this call. If the fiscalization succeeded, this call will return the complete content of the invoice, and if the fiscalization did not occur, this call will return an empty response.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
requestId12345Broj zahteva iz HTTP polja RequestId prilikom fiskalizacije (maksimalno 32 heksadecimalna karaktera)Request number from the RequestId HTTP field during fiscalization (maximum 32 hexadecimal characters)
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/invoices/request/12345' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "requestedBy": "4TCASQVE",
  "signedBy": "Dt1Ov1o0",
  "sdcDateTime": "2024-01-04T19:33:33.179+01:00",
  "invoiceCounter": "4900/13207ПП",
  "invoiceCounterExtension": "ПП",
  "invoiceNumber": "4TCASQVE-Dt1Ov1o0-13207",
  "verificationUrl": "https://sandbox.suf.purs.gov.rs/v/?vl=AzRUQ0FTUVZFRHQxT3YxbzCXMwAAJBMAAICWmAAA...",
  "verificationQRCode": null,
  "journal": "============ ФИСКАЛНИ РАЧУН ============\r\nRS111758195\r\nTeron doo\r\nTeron doo\r\nUstanička 196\r\nБеоград\r\nКасир:                             Teron\r\nЕСИР број:                      1060/1.2\r\nРеф. број:       4TCASQVE-Dt1Ov1o0-13206\r\nРеф. време:         02.01.2024. 19:13:39\r\n-------------ПРОМЕТ ПРОДАЈА-------------\r\nАртикли\r\n========================================\r\nНазив   Цена         Кол.         Укупно\r\nArtikl 1 (Ж)                            \r\n        50,00         12          600,00\r\nArtikl 2 (Ж)                            \r\n       200,00          2          400,00\r\n----------------------------------------\r\nУкупан износ:                   1.000,00\r\nГотовина:                         500,00\r\n========================================\r\nОзнака       Име      Стопа        Порез\r\nЖ             VAT   19,00%        159,66\r\n----------------------------------------\r\nУкупан износ пореза:              159,66\r\n========================================\r\nПФР време:          02.01.2024. 19:27:50\r\nПФР број рачуна: 4TCASQVE-Dt1Ov1o0-13207\r\nБројач рачуна:              4900/13207ПП\r\n========================================\r\n======== КРАЈ ФИСКАЛНОГ РАЧУНА =========\r\n",
  "totalCounter": 13207,
  "transactionTypeCounter": 4900,
  "totalAmount": 1000,
  "encryptedInternalData": "OeUcmZBviHhory1K...",
  "signature": "RVpf8F+cXQvCLj769/epdEf/UUz...",
  "taxItems": [
    {
      "label": "Ж",
      "categoryName": "VAT",
      "categoryType": 0,
      "rate": 19,
      "amount": 159.6638
    }
  ],
  "businessName": "Teron doo",
  "locationName": "Teron doo",
  "address": "Ustanička 196",
  "tin": "RS111758195",
  "district": "Београд",
  "taxGroupRevision": 8,
  "mrc": "99-3411-Dt1Ov1o0",
  "messages": "Success",
  "invoiceImagePngBase64": null,
  "invoiceImagePdfBase64": null,
  "invoiceImageHtml": null
}
POST/api/invoices/search#

Pretraga računa

Invoice search

Ovaj API poziv omogućava pretragu baze izdatih računa po raznim kriterijumima koji se mogu kombinovati:

  • fromDate (date): računi koji su izdati na ovaj dan ili kasnije
  • toDate (date): računi koji su izdati na ovaj dan ili ranije
  • amountFrom (money): računi sa ukupnim iznosom istim ili većim od navedenog iznosa
  • amountTo (money): računi sa ukupnim iznosom istim ili manjim od navedenog iznosa
  • invoiceTypes (list(string)): računi čiji se tip računa nalazi u zadatom nizu
  • transactionTypes (list(string)): računi čiji se tip transakcije nalazi u zadatom nizu
  • paymentTypes (list(string)): računi koji sadrže bar jedan od navedenih tipova plaćanja
  • referentDocumentNumber (string): računi koji se referenciraju na zadati broj računa
  • buyerId (string): računi sa navedenim brojem kupca
  • buyerCostCenterId (string): računi sa navedenim opcionim poljem kupca

Sadržaj je u CSV formatu gde svaki red označava po jedan račun i sadrži sledeće kolone:

  • invoiceNumber (string): broj računa

  • invoiceType (string): tip računa

  • transactionType (string): tip transakcije

  • sdcDateTime (timestamp): vreme fiskalizacije

  • totalAmount (money): ukupan iznos računa

This API call allows searching the database of issued invoices by various criteria that can be combined:

  • fromDate (date): invoices issued on this day or later
  • toDate (date): invoices issued on this day or earlier
  • amountFrom (money): invoices with a total amount equal to or greater than the specified amount
  • amountTo (money): invoices with a total amount equal to or less than the specified amount
  • invoiceTypes (list(string)): invoices whose invoice type is in the given array
  • transactionTypes (list(string)): invoices whose transaction type is in the given array
  • paymentTypes (list(string)): invoices that contain at least one of the specified payment types
  • referentDocumentNumber (string): invoices that reference the given invoice number
  • buyerId (string): invoices with the specified buyer number
  • buyerCostCenterId (string): invoices with the specified optional buyer field

The content is in CSV format where each row represents one invoice and contains the following columns:

  • invoiceNumber (string): invoice number

  • invoiceType (string): invoice type

  • transactionType (string): transaction type

  • sdcDateTime (timestamp): time of fiscalization

  • totalAmount (money): total invoice amount

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/invoices/search' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-01-31",
    "amountFrom": 10.00,
    "amountTo": 10000.00,
    "invoiceTypes": ["Normal","Advance"],
    "transactionTypes": ["Sale","Refund"],
    "paymentTypes": ["Cash","WireTransfer"]
}'
Primer odgovoraResponse example 200 OK
4TCASQVE-Dt1Ov1o0-13195,Normal,Sale,2024-01-04T11:23:26.574+01:00,100.00
4TCASQVE-Dt1Ov1o0-13196,Normal,Sale,2024-01-04T11:30:02.956+01:00,300.00
4TCASQVE-Dt1Ov1o0-13198,Normal,Sale,2024-01-04T12:56:34.060+01:00,100.00
4TCASQVE-Dt1Ov1o0-13199,Normal,Refund,2024-01-04T13:00:59.986+01:00,100.00
4TCASQVE-Dt1Ov1o0-13200,Advance,Sale,2024-01-04T14:19:06.827+01:00,100.00
4TCASQVE-Dt1Ov1o0-13201,Advance,Sale,2024-01-04T15:21:24.027+01:00,400.00
4TCASQVE-Dt1Ov1o0-13202,Advance,Refund,2024-01-04T15:33:48.669+01:00,500.00
4TCASQVE-Dt1Ov1o0-13203,Normal,Sale,2024-01-04T15:33:48.966+01:00,1000.00
4TCASQVE-Dt1Ov1o0-13204,Advance,Sale,2024-01-04T17:41:35.005+01:00,100.00
4TCASQVE-Dt1Ov1o0-13205,Advance,Sale,2024-01-04T17:45:45.806+01:00,400.00
4TCASQVE-Dt1Ov1o0-13206,Advance,Refund,2024-01-04T19:13:39.691+01:00,500.00
4TCASQVE-Dt1Ov1o0-13207,Normal,Sale,2024-01-04T19:27:50.343+01:00,1000.00

Blagajna

Cash register

Teron ESIR prilikom izdavanja računa vodi evidenciju o stanju blagajne shodno tipu računa (promet ili refundacija), uzimajući u obzir načine plaćanja i eventualni povrat gotovine.

U nastavku su opisane glavne API operacije za rad sa blagajnom.

When issuing invoices, Teron ESIR keeps a record of the cash register balance according to the invoice type (turnover or refund), taking into account the payment methods and any cash returned.

The main API operations for working with the cash register are described below.

POST/api/financial/deposit#

Deponovanje gotovine u blagajnu

Cash deposit into the cash register

Ovaj API poziv služi za prijavljivanje iznosa gotovine koji je deponovan u blagajnu:

  • amount (money) - iznos gotovine koji se deponuje

This API call is used to report the amount of cash deposited into the cash register:

  • amount (money) - the amount of cash being deposited
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/deposit' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 150.00
}'
Primer odgovoraResponse example 204 No Content

Prazno telo odgovora.Empty response body.

POST/api/financial/withdraw#

Povlačenje gotovine iz blagajne

Cash withdrawal from the cash register

Ovaj API poziv služi za prijavljivanje iznosa gotovine koji se povlači iz blagajne:

  • amount (money) - iznos gotovine koji se povlači

This API call is used to report the amount of cash being withdrawn from the cash register:

  • amount (money) - the amount of cash being withdrawn
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/withdraw' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "amount": 100.00
}'
Primer odgovoraResponse example 204 No Content

Prazno telo odgovora.Empty response body.

GET/api/financial/summary#

Promet od poslednjeg preseka stanja

Turnover since the last financial summary report

Ovaj API poziv vraća promet po raznim kategorijama od poslednjeg preseka stanja. Rezultat sadrži sledeća polja:

  • startOfPeriod (timestamp) - kada je urađen poslednji presek stanja

  • total (money) - ukupan promet

  • totalCash (money) - ukupan promet u gotovini

  • totalByTax (list) - ukupan promet po poreskim kategorijama

  • totalByCashier (list) - ukupan promet po kasirima

  • totalByPaymentType (list) - ukupan promet po vrstama plaćanja

  • totalByArticle (list) - ukupan promet po artiklima

  • totalByArticleAdvance (list) - ukupan promet po artiklima na avansnim računima

This API call returns the turnover by various categories since the last financial summary report. The result contains the following fields:

  • startOfPeriod (timestamp) - when the last financial summary report was performed

  • total (money) - total turnover

  • totalCash (money) - total turnover in cash

  • totalByTax (list) - total turnover by tax categories

  • totalByCashier (list) - total turnover by cashiers

  • totalByPaymentType (list) - total turnover by payment types

  • totalByArticle (list) - total turnover by articles

  • totalByArticleAdvance (list) - total turnover by articles on advance invoices

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/financial/summary' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'X-Teron-SerialNumber: <serijski_broj>'
Primer odgovoraResponse example 200 OK
{
  "startOfPeriod": "2023-11-13T22:25:07.073+01:00",
  "total": 67102,
  "totalCash": 10582,
  "totalByTax": [
    {
      "amount": 10710.2533,
      "category": "VAT",
      "label": "Ж",
      "rate": 19
    },
    {
      "amount": 0,
      "category": "N-TAX",
      "label": "N",
      "rate": 0
    }
  ],
  "totalByCashier": [
    {
      "amount": 1400,
      "name": "Postman"
    },
    {
      "amount": 10602,
      "name": "Prodavac 1"
    },
    {
      "amount": 2000,
      "name": "Teron"
    }
  ],
  "totalByPaymentType": [
    {
      "amount": 92,
      "paymentType": "Other"
    },
    {
      "amount": 11032,
      "paymentType": "Cash"
    },
    {
      "amount": 55140,
      "paymentType": "Card"
    },
    {
      "amount": 50,
      "paymentType": "Check"
    },
    {
      "amount": 661,
      "paymentType": "WireTransfer"
    },
    {
      "amount": 60,
      "paymentType": "Voucher"
    }
  ],
  "totalByArticle": [
    {
      "amount": 49200,
      "articleName": "1 Jednodnevna Odrasli",
      "gtin": null,
      "plu": null,
      "taxLabel": "Ж",
      "quantity": 17
    },
    {
      "amount": 900,
      "articleName": "Artikl 1 /kom",
      "gtin": null,
      "plu": "1",
      "taxLabel": "Ж",
      "quantity": 9
    },
    {
      "amount": 800,
      "articleName": "3D saksija 1 /ком",
      "gtin": null,
      "plu": "331",
      "taxLabel": "Ж",
      "quantity": 4
    },
    {
      "amount": 8000,
      "articleName": "3D saksija Kat 1 /ком",
      "gtin": null,
      "plu": "331",
      "taxLabel": "Ж",
      "quantity": 40
    },
    {
      "amount": 22,
      "articleName": "EF test /ком",
      "gtin": null,
      "plu": "332",
      "taxLabel": "N",
      "quantity": 1
    },
    {
      "amount": 200,
      "articleName": "3D saksija 1 /ком",
      "gtin": "12345678",
      "plu": "890006",
      "taxLabel": "Ж",
      "quantity": 1
    },
    "… [još 5 stavki]"
  ],
  "totalByArticleAdvance": [
    {
      "amount": -520,
      "articleName": "Аванс",
      "gtin": null,
      "plu": null,
      "taxLabel": "Ж",
      "quantity": 3
    }
  ]
}
DELETE/api/financial/summary#

Presek stanja

Financial summary report

Namena ovog API poziva je da sva stanja svede na nulu (npr. na početku ili kraju dana). Jedino se stanje blagajne ne resetuje jer se ono prenosi u naredni dan.

The purpose of this API call is to reset all balances to zero (e.g. at the start or end of the day). Only the cash register balance is not reset, since it is carried over to the next day.

Primer zahtevaRequest example
curl -X DELETE 'http://127.0.0.1:3566/api/financial/summary' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 204 No Content

Prazno telo odgovora.Empty response body.

Izveštaji

Reports

U ovoj sekciji su opisani API pozivi za pravljenje različitih izveštaja. Osim ukoliko nije drugačije objašnjeno u nastavku, zahtev sadrži sledeće parametre:

  • fromDate (date) - datum početka izveštaja
  • toDate (date) - datum kraja izveštaja
  • print (boolean) - da li se izveštaj štampa (true) ili ne (false)
  • email (string) - email adresa na koju se šalje izveštaj (opciono)
  • file (string) - puna putanja do datoteke u koju treba snimiti izveštaj (snimanje u file je moguće samo na PC platformi)

  • format (string) - format izveštaja pdf, xlsx, csv, html, png

  • cashier (string) - naziv radnika koji je napravio izveštaj (opciono)
  • language (string) - jezik na kome je napravljen izveštaj
    • Srpski ćirilica (sr-Cyrl-RS)
    • Srpski latinica (sr-RS)
    • Engleski (en-US)

Odgovor sadrži sadržaj generisanog izveštaja u odgovarajućem polju u zavisnosti od zahtevanog formata izveštaja:

  • reportPdfBase64 (string) - Base64 kodiran PDF izveštaj
  • reportXlsxBase64 (string) - Base64 kodiran XLSX izveštaj
  • reportCsv (string) - izveštaj u CSV formatu
  • reportHtml (string) - izveštaj u HTML formatu
  • reportImagePngBase64 (string) - Base64 kodiran izveštaj u PNG formatu

Pored navedenih polja odgovor sadrži i sledeća polja:

  • reportName (string) - Naziv izveštaja
  • filename (string) - Puna putanja do datoteke gde je izveštaj snimljen ukoliko je zahtevano

This section describes the API calls for generating various reports. Unless otherwise explained below, the request contains the following parameters:

  • fromDate (date) - report start date
  • toDate (date) - report end date
  • print (boolean) - whether the report is printed (true) or not (false)
  • email (string) - email address to which the report is sent (optional)
  • file (string) - full path to the file in which the report should be saved (saving to a file is only possible on the PC platform)

  • format (string) - report format pdf, xlsx, csv, html, png

  • cashier (string) - name of the cashier who generated the report (optional)
  • language (string) - language in which the report is generated
    • Serbian Cyrillic (sr-Cyrl-RS)
    • Serbian Latin (sr-RS)
    • English (en-US)

The response contains the content of the generated report in the corresponding field depending on the requested report format:

  • reportPdfBase64 (string) - Base64-encoded PDF report
  • reportXlsxBase64 (string) - Base64-encoded XLSX report
  • reportCsv (string) - report in CSV format
  • reportHtml (string) - report in HTML format
  • reportImagePngBase64 (string) - Base64-encoded report in PNG format

In addition to the listed fields, the response also contains the following fields:

  • reportName (string) - Report name
  • filename (string) - Full path to the file where the report was saved, if requested
POST/api/financial/report/summary#

Presek stanja

Financial summary report

U slučaju ovog izveštaja polja fromDate i toDate su opciona i, ukoliko nisu navedena, izveštaj će raditi nad svim podacima od poslednjeg preseka, dok će u suprotnom biti generisan nad podacima iz zadatog datumskog opsega.

For this report, the fromDate and toDate fields are optional, and if they are not specified, the report will run over all data since the last financial summary report, whereas otherwise it will be generated over the data from the given date range.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/summary' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0...",
  "reportName": "ДНЕВНИ ИЗВЕШТАЈ",
  "filename": "DNEVNI IZVEŠTAJ - 01.01 - 31.03.2024.pdf"
}
POST/api/financial/report/summaryByTax#

Promet po poreskim stopama

Turnover by tax rates

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/summaryByTax' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0xL...",
  "reportName": "ИЗВЕШТАЈ ПО ПОРЕСКИМ СТОПАМА",
  "filename": "IZVEŠTAJ PO PORESKIM STOPAMA - 01.01 - 31.03.2024.pdf"
}
POST/api/financial/report/summaryByCashiers#

Promet po radnicima

Turnover by cashiers

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/summaryByCashiers' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0xL...",
  "reportName": "ИЗВЕШТАЈ ПО КАСИРИМА",
  "filename": "IZVEŠTAJ PO KASIRIMA - 01.01 - 31.03.2024.pdf"
}
POST/api/financial/report/summaryByPaymentTypes#

Promet po vrstama plaćanja

Turnover by payment types

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/summaryByPaymentTypes' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0xLjUKJ....",
  "reportName": "ИЗВЕШТАЈ ПО ВРСТАМА ПЛАЋАЊА",
  "filename": "IZVEŠTAJ PO VRSTAMA PLAĆANJA - 01.01 - 31.03.2024.pdf"
}
POST/api/financial/report/summaryByArticles#

Promet po artiklima

Turnover by articles

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/summaryByArticles' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'X-Teron-SerialNumber: <serijski_broj>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0xLjUK...",
  "reportName": "ИЗВЕШТАЈ ПО АРТИКЛИМА",
  "filename": "IZVEŠTAJ PO ARTIKLIMA - 01.01 - 31.03.2024.pdf"
}
POST/api/financial/report/summaryByCategories#

Promet po kategorijama i artiklima

Turnover by categories and articles

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/summaryByCategories' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'X-Teron-SerialNumber: <serijski_broj>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0xLjU...",
  "reportName": "ИЗВЕШТАЈ ПО КАТЕГОРИЈАМА",
  "filename": "IZVEŠTAJ PO KATEGORIJAMA - 01.01 - 31.03.2024.pdf"
}
POST/api/financial/report/transactions#

Transakcije

Transactions

Zbog obimnosti podataka, ovaj izveštaj je dostupan isključivo u XLSX formatu i nije ga moguće štampati.

Due to the volume of data, this report is available exclusively in XLSX format and cannot be printed.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/transactions' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'X-Teron-SerialNumber: <serijski_broj>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.xlsx",
    "format": "xlsx",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportXlsxBase64": "UEsDBBQACAgIA...",
  "reportName": "ИЗВЕШТАЈ ПО РАЧУНИМА",
  "filename": "IZVEŠTAJ PO RAČUNIMA - 01.01 - 31.03.2024.xlsx"
}
POST/api/financial/report/inventory#

Lager lista

Inventory

Ovaj izveštaj sadrži trenutno stanje po artiklima i nije vezan za datumski opseg, tako da polja fromDate i toDate u zahtevu nisu potrebna.

This report contains the current stock by articles and is not tied to a date range, so the fromDate and toDate fields are not required in the request.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/inventory' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0xLjUKJ...",
  "reportName": "ЛАГЕР ЛИСТА (СВИ АРТИКЛИ)",
  "filename": "LAGER LISTA (SVI ARTIKLI).pdf"
}
POST/api/financial/report/advance-receipts#

Avansni računi

Advance invoices

Pored standardnih polja, u zahtevu za generisanje ovog izveštaja neophodno je navesti i polje:

  • status (string) - može da ima vrednost Open, u kom slučaju će izveštaj sadržati otvorene avansne račune, ili Closed za zatvorene avansne račune

In addition to the standard fields, the request for generating this report must also specify the field:

  • status (string) - can have the value Open, in which case the report will contain open advance invoices, or Closed for closed advance invoices
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/financial/report/advance-receipts' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'X-Teron-SerialNumber: <serijski_broj>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-03-31",
    "status": "Open",
    "print": false,
    "email": "test@teron.rs",
    "file": "/tmp/izvestaj.pdf",
    "format": "pdf",
    "cashier": "Postman",
    "language": "sr-Cyrl-RS"
}'
Primer odgovoraResponse example 200 OK
{
  "reportPdfBase64": "JVBERi0xLjUKJ...",
  "reportName": "ОТВОРЕНИ АВАНСНИ РАЧУНИ",
  "filename": "OTVORENI AVANSNI RAČUNI - 01.01 - 31.03.2024.pdf"
}

eFakture

eInvoices

U okviru ove sekcije su opisani API pozivi za rad sa eFakturama (SEF-om). Preduslov za njihovo korišćenje je ispravno podešen API KEY za SEF (pogledajte sekciju "Podešavanja eFaktura").

This section describes the API calls for working with eInvoices (SEF). A prerequisite for their use is a correctly configured API KEY for SEF (see the "eInvoices configuration" section).

GET/api/efaktura/company/:taxId/isRegistered#

Provera da li je kompanija registrovana na SEF-u

Check whether a company is registered on SEF

Ovaj poziv možete iskoristiti da pre slanja fakture na SEF proverite da li je kompanija registrovana na SEF-u. Odgovor ovog poziva je boolean vrednost true (kompanija je registrovana) ili false (kompanija nije registrovana).

You can use this call to check whether a company is registered on SEF before sending an invoice to SEF. The response of this call is a boolean value true (the company is registered) or false (the company is not registered).

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
taxId111758195PIB kompanije ili JMBG fizičkog licaCompany's PIB or individual's JMBG
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/company/111758195/isRegistered' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
true
POST/api/efaktura/companies#

Pretraga kompanija na SEF-u

Search for companies on SEF

Putem ovog API poziva možete vršiti pretragu kompanija koje su registrovane na SEF-u navodeći jedan ili više kriterijuma:

  • taxId (string): PIB kompanije
  • registrationId (string): matični broj kompanije
  • budgetId (string): JBKJS
  • name (string): naziv kompanije

Odgovor sadrži niz kompanija koje odgovaraju zadatom kriterijumu.

Through this API call you can search for companies registered on SEF by specifying one or more criteria:

  • taxId (string): company's PIB
  • registrationId (string): company's registration number
  • budgetId (string): JBKJS
  • name (string): company name

The response contains an array of companies that match the given criteria.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/efaktura/companies' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "taxId": "111758195"
}'
Primer odgovoraResponse example 200 OK
[
  {
    "Name": "TERON DOO BEOGRAD",
    "BugetCompanyNumber": null,
    "RegistrationCode": "21535222",
    "VatRegistrationCode": "111758195"
  }
]
GET/api/efaktura/unit-measures#

Jedinice mere

Units of measure

Svaki artikal na izlaznoj fakturi mora da sadrži odgovarajuću jedinicu mere, a putem ovog poziva možete preuzeti sve registrovane jedinice mere kao i njihove šifre.

Each article on a sales invoice must contain a corresponding unit of measure, and through this call you can retrieve all registered units of measure as well as their codes.

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/unit-measures' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
[
    {
        "Code": "H87",
        "Symbol": null,
        "NameEng": "pc",
        "NameSrbLtn": "kom",
        "NameSrbCyr": "kом",
        "IsOnShortList": true
    },
    {
        "Code": "KGM",
        "Symbol": null,
        "NameEng": "kg",
        "NameSrbLtn": "kg",
        "NameSrbCyr": "kг",
        "IsOnShortList": true
    },
    ...
]
GET/api/efaktura/vat-exemption-reasons#

Razlozi za oslobođenje poreza

Tax exemption reasons

Namena ovog poziva je da se preuzmu dostupni razlozi za oslobođenje poreza.

The purpose of this call is to retrieve the available tax exemption reasons.

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/vat-exemption-reasons' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
[
    {
        "ReasonId": 1,
        "Key": "PDV-RS-10-2-1",
        "Law": "Zakon o Porezu na dodatu vrednost",
        "Article": "10",
        "Paragraph": "2",
        "Point": "1",
        "Subpoint": null,
        "Text": "Poreski dužnik je primalac dobara ili usluga, obveznik PDV, za promet sekundarnih sirovina i usluga koje su neposredno povezane sa tim dobrima, izvršen od strane drugog obveznika PDV",
        "FreeFormNote": null,
        "ActiveFrom": "1900-01-01T01:00:00.000+01:00",
        "ActiveTo": null,
        "Category": "AE"
    },
    {
        "ReasonId": 2,
        "Key": "PDV-RS-10-2-2",
        "Law": "Zakon o Porezu na dodatu vrednost",
        "Article": "10",
        "Paragraph": "2",
        "Point": "2",
        "Subpoint": null,
        "Text": "Poreski dužnik je primalac dobara, obveznik PDV, za promet građevinskih objekata i ekonomski deljivih celina u okviru tih objekata, uključujući i vlasničke udele na tim dobrima, izvršen od strane drugog obveznika PDV, u slučaju kada je ugovorom na osnovu kojeg se vrši promet tih dobara predviđeno da će se na taj promet obračunati PDV u skladu sa ovim zakonom",
        "FreeFormNote": null,
        "ActiveFrom": "1900-01-01T01:00:00.000+01:00",
        "ActiveTo": null,
        "Category": "AE"
    },
    ...
]
POST/api/efaktura/sales-invoice#

Registrovanje izlazne fakture

Registering a sales invoice

  • supplier (object) - podaci o prodavcu (obavezno):

    • name (string) - naziv prodavca

    • address (string) - adresa prodavca

    • city (string) - grad prodavca

    • taxId (string) - PIB prodavca

    • registrationId (string) - matični broj prodavca

  • customer (object) - podaci o kupcu (obavezno)

    • name (string) - naziv kupca

    • address (string) - adresa kupca

    • city (string) - grad kupca

    • taxId (string) - PIB kupca

    • registrationId (string) - matični broj kupca

  • sendToCir (boolean) - vrednost true ako se faktura šalje na CRF, odnosno false ako se ne šalje (obavezno)

  • invoiceNumber (string) - broj fakture (obavezno)

  • actualDeliveryDate (date) - datum prometa (obavezno)

  • paymentDueDate (date) - datum valute (obavezno)

  • payeeFinancialAccount (string) - broj računa u banci prodavca (obavezno)

  • invoicePeriodCode (number) - datum obračuna PDV-a (obavezno), može imati jednu od sledećih vrednosti:

    • 3 - na datum slanja fakture

    • 35 - na datum prometa

    • 432 - na dan plaćanja

    • 0 - ne nastaje obaveza obračuna PDV-a

  • buyerReference (string) - referenca kupca (opciono)

  • orderReference (string) - broj porudžbenice (opciono)

  • contractDocumentReference (string) - referenca na ugovor (opciono)

  • note (string) - tekst/komentar na fakturi (opciono)

  • items (list(object)) - stavke fakture (obavezno):

    • name (string) - naziv stavke (obavezno)

    • unitPrice (money) - jedinična cena sa porezom (obavezno)

    • quantity (quantity) - količina (obavezno)

    • totalAmount (money) - ukupan iznos sa porezom (obavezno)

    • taxCategory (string) - oznaka poreske kategorije (obavezno), može imati jednu od sledećih vrednosti:

      • S - Standardno obračunavanje PDV,

      • AE - Obrnuto obračunavanje PDV,

      • Z - Poresko oslobođenje sa pravom na odbitak prethodnog poreza,

      • E - Poresko oslobođenje bez prava na odbitak prethodnog poreza,

      • R - Izuzimanje od PDV,

      • O - Nije predmet oporezivanja PDV

      • OE - Nije predmet oporezivanja PDV 2

      • SS - Posebni postupci oporezivanja

      • N - Anuliranje

    • taxPercent (percent) - procentualni iznos poreza (obavezno)

    • taxExemptionReasonCode (string) - šifra razloga za oslobođenje poreza (obavezno ako artikl nije oporezovan standardno), prema tabeli iz odgovora API poziva "Razlozi za oslobođenje poreza" iz polja Key.

    • taxExemptionReason (string) - opis poreskog oslobođenja (opciono)

  • attachments (list(object)) - dodatna dokumenta koja se prilažu uz fakturu (opciono), niz objekata gde svaki sadrži sledeća polja:

    • id (string) - naziv dokumenta

    • data (string) - base64 kodiran sadržaj dokumenta u PDF formatu

U slučaju uspešne registracije izlazne fakture odgovor sadrži sledeća polja:

  • InvoiceId (number) - interni ID fakture u SEF-u

  • PurchaseInvoiceId (number) - interni ID ulazne fakture kod primaoca

  • SalesInvoiceId (number) - interni ID izlazne fakture kod pošiljaoca (ovaj broj ćete koristiti kasnije kada u drugim API pozivima budete želeli da se referišete na ovu fakturu)

  • supplier (object) - supplier data (required):

    • name (string) - supplier name

    • address (string) - supplier address

    • city (string) - supplier city

    • taxId (string) - supplier PIB

    • registrationId (string) - supplier registration number

  • customer (object) - customer data (required)

    • name (string) - customer name

    • address (string) - customer address

    • city (string) - customer city

    • taxId (string) - customer PIB

    • registrationId (string) - customer registration number

  • sendToCir (boolean) - value true if the invoice is sent to CRF, or false if it is not sent (required)

  • invoiceNumber (string) - invoice number (required)

  • actualDeliveryDate (date) - delivery date (required)

  • paymentDueDate (date) - due date (required)

  • payeeFinancialAccount (string) - supplier's bank account number (required)

  • invoicePeriodCode (number) - VAT calculation date (required), can have one of the following values:

    • 3 - on the invoice submission date

    • 35 - on the delivery date

    • 432 - on the payment date

    • 0 - no VAT calculation obligation arises

  • buyerReference (string) - buyer reference (optional)

  • orderReference (string) - purchase order number (optional)

  • contractDocumentReference (string) - contract reference (optional)

  • note (string) - text/comment on the invoice (optional)

  • items (list(object)) - invoice items (required):

    • name (string) - item name (required)

    • unitPrice (money) - unit price including tax (required)

    • quantity (quantity) - quantity (required)

    • totalAmount (money) - total amount including tax (required)

    • taxCategory (string) - tax category code (required), can have one of the following values:

      • S - Standard VAT calculation,

      • AE - Reverse VAT calculation,

      • Z - Tax exemption with the right to deduct input tax,

      • E - Tax exemption without the right to deduct input tax,

      • R - VAT exclusion,

      • O - Not subject to VAT taxation

      • OE - Not subject to VAT taxation 2

      • SS - Special taxation procedures

      • N - Annulment

    • taxPercent (percent) - tax percentage amount (required)

    • taxExemptionReasonCode (string) - tax exemption reason code (required if the article is not taxed at the standard rate), according to the table from the response of the "Tax exemption reasons" API call from the Key field.

    • taxExemptionReason (string) - tax exemption description (optional)

  • attachments (list(object)) - additional documents attached to the invoice (optional), an array of objects where each contains the following fields:

    • id (string) - document name

    • data (string) - base64 encoded document content in PDF format

In case of successful sales invoice registration, the response contains the following fields:

  • InvoiceId (number) - internal invoice ID in SEF

  • PurchaseInvoiceId (number) - internal purchase invoice ID at the recipient

  • SalesInvoiceId (number) - internal sales invoice ID at the sender (you will use this number later when you want to reference this invoice in other API calls)

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/efaktura/sales-invoice' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "supplier": {
        "name": "TERON DOO BEOGRAD",
        "address": "USTANIČKA 194",
        "city": "Beograd (Zvezdara)",
        "taxId": "111758195",
        "registrationId": "21535222"
    },
    "customer": {
        "name": "TERON DOO BEOGRAD",
        "address": "USTANIČKA 194",
        "city": "Beograd (Zvezdara)",
        "registrationId": "21535222",
        "taxId": "111758195"
    },
    "sendToCir": false,
    "invoiceNumber": "2024-01",
    "actualDeliveryDate": "2024-01-08",
    "paymentDueDate": "2024-01-15",
    "payeeFinancialAccount": "205-0070100535597-91",
    "invoicePeriodCode": 3,
    "note": "Ovo je test",
    "items": [
        {
            "name": "Artikl 1",
            "unitPrice": 1200,
            "quantity": 1,
            "totalAmount": 1200,
            "unitCode": "H87",
            "taxCategory": "S",
            "taxPercent": 20
        }
    ],
    "attachments": [
        {
            "id": "Prilog 1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EzIDAgUl0KL1RvVW5pY29kZSAxNCAwIFI+PgplbmRvYmoKeHJlZgowIDE1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDA0NzM0IDAwMDAwIG4gCjAwMDAwMDAxMDEgMDAwMDAgbiAKMDAwMDAwMDEzOCAwMDAwMCBuIAowMDAwMDAyOTUzIDAwMDAwIG4gCjAwMDAwMTA0MzcgMDAwMDAgbiAKMDAwMDAwNDM5NCAwMDAwMCBuIAowMDAwMDA0OTY1IDAwMDAwIG4gCjAwMDAwMDUwMjAgMDAwMDAgbiAKMDAwMDAwNTA3NyAwMDAwMCBuIAowMDAwMDA1MTM4IDAwMDAwIG4gCjAwMDAwMDk2MDQgMDAwMDAgbiAKMDAwMDAwOTgwMyAwMDAwMCBuIAowMDAwMDEwMDk4IDAwMDAwIG4gCnRyYWlsZXIKPDwvU2l6ZSAxNQovUm9vdCAxMCAwIFIKL0luZm8gMSAwIFI+PgpzdGFydHhyZWYKMTA1ODEKJSVFT0YK"
        }
    ]
}'
Primer odgovoraResponse example 200 OK
{
  "InvoiceId": 2579657,
  "PurchaseInvoiceId": 2579657,
  "SalesInvoiceId": 2670151
}
POST/api/efaktura/sales-invoice/:invoiceId/storno#

Storniranje izlazne fakture

Cancellation of a sales invoice

Namena ovog API poziva je da se poništi izlazna faktura uz obavezno navođenje u telu zahteva:

  • comment (string) - komentar

  • stornoNumber (string) - storno broj

The purpose of this API call is to cancel a sales invoice, with the following mandatory fields in the request body:

  • comment (string) - comment

  • stornoNumber (string) - storno number

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2670151broj faktureinvoice number
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/efaktura/sales-invoice/2670151/storno' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "comment": "Stornirana test faktura",
    "stornoNumber": "123"
}
'
Primer odgovoraResponse example 200 OK

Prazno telo odgovora.Empty response body.

GET/api/efaktura/sales-invoice/:invoiceId#

Podaci o izlaznoj fakturi

Sales invoice data

Namena ovog poziva je da preuzmete osnovne podatke o izlaznoj fakturi i odgovor sadrži sledeća polja:

  • invoiceId (number) - interni broj izlazne fakture u SEF-u
  • invoiceNumber (string) - broj fakture
  • type (string) - tip fakture, može biti Invoice (fakture) ili CreditNote (knjižno odobrenje).
  • issueDate (date) - datum kada je faktura izdata
  • createdAt (timestamp) - datum i vreme kada je faktura napravljena
  • totalAmount (money) - ukupan iznos fakture
  • currency (string) - valuta
  • supplier (object) - podaci o prodavcu (isti model podataka kao i prilikom registrovanja fakture)
  • customer (object) - podaci o kupcu (isti model podataka kao i prilikom registrovanja fakture)
  • status (string) - trenutni status izlazne fakture, konsultovati SEF dokumentaciju za spisak i opis statusa.
  • comment (string) - napomena od strane kupca prilikom prihvatanja fakture
  • stornoComment (string) - napomena od prodavca prilikom storniranja fakture
  • attachments (list(string)) - spisak naziva priloga

The purpose of this call is to retrieve the basic data about a sales invoice, and the response contains the following fields:

  • invoiceId (number) - internal number of the sales invoice in SEF
  • invoiceNumber (string) - invoice number
  • type (string) - invoice type, which can be Invoice (invoices) or CreditNote (credit note).
  • issueDate (date) - the date when the invoice was issued
  • createdAt (timestamp) - the date and time when the invoice was created
  • totalAmount (money) - total invoice amount
  • currency (string) - currency
  • supplier (object) - seller data (same data model as when registering an invoice)
  • customer (object) - buyer data (same data model as when registering an invoice)
  • status (string) - current status of the sales invoice; consult the SEF documentation for the list and description of statuses.
  • comment (string) - note from the buyer when accepting the invoice
  • stornoComment (string) - note from the seller when cancelling the invoice
  • attachments (list(string)) - list of attachment names
Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2670151broj faktureinvoice number
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/sales-invoice/2670151' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "invoiceId": 2670151,
  "invoiceNumber": "2024-01",
  "type": "Invoice",
  "issueDate": "2024-01-08",
  "createdAt": "2024-01-08T12:23:06.000+01:00",
  "totalAmount": 1200,
  "currency": "RSD",
  "supplier": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "customer": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "status": "Sent",
  "comment": null,
  "cancelComment": "",
  "stornoComment": "",
  "lastModifiedUtc": "2024-01-08T13:23:04.078+01:00",
  "attachments": [
    "Prilog 1"
  ]
}
GET/api/efaktura/sales-invoice/:invoiceId/pdf#

Izlazna faktura u PDF formatu

Sales invoice in PDF format

Ovaj poziv vraća izgled izlazne fakture u PDF formatu.

This call returns the layout of the sales invoice in PDF format.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2670151broj faktureinvoice number
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/sales-invoice/2670151/pdf' \
  -H 'Authorization: Bearer <API_KEY>'
GET/api/efaktura/sales-invoice/:invoiceId/xml#

Izlazna faktura u XML formatu

Sales invoice in XML format

Ovaj poziv vraća kompletan sadržaj izlazne fakture u XML formatu.

This call returns the complete content of the sales invoice in XML format.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2670151broj faktureinvoice number
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/sales-invoice/2670151/xml' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
<?xml version="1.0" encoding="utf-8"?>
<env:DocumentEnvelope xmlns:env="urn:eFaktura:MinFinrs:envelop:schema">
    <env:DocumentHeader>
        <env:SalesInvoiceId>2670151</env:SalesInvoiceId>
        <env:PurchaseInvoiceId>2579657</env:PurchaseInvoiceId>
        <env:DocumentId>b9ce92a6-b706-4c98-b0fb-88de612c1360</env:DocumentId>
        <env:CreationDate>2024-01-08</env:CreationDate>
        <env:SendingDate>2024-01-08</env:SendingDate>
        <env:DocumentPdf mimeCode="application/pdf">JVBERi0xLjcNCiWhs...</env:DocumentPdf>
    </env:DocumentHeader>
    <env:DocumentBody>
        <Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:sbt="http://mfin.gov.rs/srbdt/srbdtext" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:mfin.gov.rs:srbdt:2021</cbc:CustomizationID>
            <cbc:ID>2024-01</cbc:ID>
            <cbc:IssueDate>2024-01-08</cbc:IssueDate>
            <cbc:DueDate>2024-01-15</cbc:DueDate>
            <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
            <cbc:Note>Ovo je test</cbc:Note>
            <cbc:DocumentCurrencyCode>RSD</cbc:DocumentCurrencyCode>
            <cac:InvoicePeriod>
                <cbc:DescriptionCode>3</cbc:DescriptionCode>
            </cac:InvoicePeriod>
            <cac:AdditionalDocumentReference>
                <cbc:ID>Prilog 1</cbc:ID>
                <cac:Attachment>
                    <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf">JVBERi0xLjQKJdPr6eEKMSAwI...</cbc:EmbeddedDocumentBinaryObject>
                </cac:Attachment>
            </cac:AdditionalDocumentReference>
            <cac:AccountingSupplierParty>
                <cac:Party>
                    <cbc:EndpointID schemeID="9948">111758195</cbc:EndpointID>
                    <cac:PartyName>
                        <cbc:Name>TERON DOO BEOGRAD</cbc:Name>
                    </cac:PartyName>
                    <cac:PostalAddress>
                        <cbc:StreetName>USTANIČKA 194</cbc:StreetName>
                        <cbc:CityName>Beograd (Zvezdara)</cbc:CityName>
                        <cac:Country>
                            <cbc:IdentificationCode>RS</cbc:IdentificationCode>
                        </cac:Country>
                    </cac:PostalAddress>
                    <cac:PartyTaxScheme>
                        <cbc:CompanyID>RS111758195</cbc:CompanyID>
                        <cac:TaxScheme>
                      
… [skraćeno]
GET/api/efaktura/sales-invoice/:invoiceId/attachment/:attacmentId/pdf#

Prilog izlazne fakture u PDF formatu

Sales invoice attachment in PDF format

Ovaj poziv vraća prilog izlazne fakture u PDF formatu.

This call returns the sales invoice attachment in PDF format.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2670151broj faktureinvoice number
attacmentId0redni broj priloga (prvi prilog je broj 0)ordinal number of the attachment (the first attachment is number 0)
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/sales-invoice/2670151/attachment/0/pdf' \
  -H 'Authorization: Bearer <API_KEY>'
GET/api/efaktura/sales-invoice/last#

Poslednja izlazna faktura

Last sales invoice

Namena ovog poziva je da na jednostavan način preuzmete poslednju registrovanu izlaznu fakturu. Najčešće se koristi u situacijama kada je potrebno ustanoviti broj poslednje fakture kako bi se odredio broj naredne izlazne fakture.

The purpose of this call is to easily retrieve the last registered sales invoice. It is most commonly used in situations where it is necessary to determine the number of the last invoice in order to determine the number of the next sales invoice.

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/sales-invoice/last' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "invoiceId": 2670151,
  "invoiceNumber": "2024-01",
  "type": "Invoice",
  "issueDate": "2024-01-08",
  "createdAt": "2024-01-08T12:23:06.000+01:00",
  "totalAmount": 1200,
  "currency": "RSD",
  "supplier": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "customer": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "status": "Sent",
  "comment": null,
  "cancelComment": "",
  "stornoComment": "",
  "lastModifiedUtc": "2024-01-08T13:23:04.078+01:00",
  "attachments": [
    "Prilog 1"
  ]
}
GET/api/efaktura/sales-invoice/:invoiceId?refresh=true#

Osvežavanje statusa izlazne fakture

Refreshing the status of a sales invoice

Teron ESIR povremeno proverava da li je izlaznim fakturama u SEF-u promenjen status i u skladu s tim ažurira internu bazu. Ovaj poziv možete iskoristiti ukoliko je potrebno da odmah izvršite proveru statusa izlazne fakture.

Teron ESIR periodically checks whether the status of sales invoices in SEF has changed and updates its internal database accordingly. You can use this call if you need to immediately check the status of a sales invoice.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2670151broj faktureinvoice number
Query parametriQuery parameters
ParametarParameterPrimerExampleOpisDescription
refreshtrue
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/sales-invoice/2670151?refresh=true' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "comment": "Odbijeno test 1"
}'
Primer odgovoraResponse example 200 OK
{
  "invoiceId": 2670151,
  "invoiceNumber": "2024-01",
  "type": "Invoice",
  "issueDate": "2024-01-08",
  "createdAt": "2024-01-08T12:23:06.000+01:00",
  "totalAmount": 1200,
  "currency": "RSD",
  "supplier": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "customer": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "status": "Sent",
  "comment": null,
  "cancelComment": "",
  "stornoComment": "",
  "lastModifiedUtc": "2024-01-08T13:23:04.078+01:00",
  "attachments": [
    "Prilog 1"
  ]
}
POST/api/efaktura/sales-invoice/search#

Pretraga izlaznih faktura

Search of sales invoices

Ovaj API poziv omogućava pretragu lokalne baze izlaznih faktura. Zahtev sadrži jedan ili više kriterijuma po kojima se vrši pretraga i biće izabrane fakture koje ispunjavaju sledeće uslove:

  • fromDate (date) - fakture koje su izdate na ovaj datum ili kasnije
  • toDate (date) - fakture koje su izdate na ovaj datum ili ranije
  • amountFrom (money) - fakture čiji ukupan iznos je isti ili veći od navedenog iznosa
  • amountTo (money) - fakture čiji ukupan iznos je isti ili manji od navedenog iznosa
  • supplierName (string) - naziv prodavca
  • supplierTaxId (string) - PIB prodavca
  • supplierRegistrationId (string) - matični broj prodavca
  • customerName (string) - naziv kupca
  • customerTaxId (string) - PIB kupca
  • customerRegistrationId (string) - matični broj kupca
  • type (string) - tip fakture, može biti Invoice (faktura) ili CreditNote (knjižno odobrenje)
  • statuses (list(string)) - trenutni status fakture se nalazi u navedenom nizu

This API call enables searching the local database of sales invoices. The request contains one or more criteria by which the search is performed, and the invoices that meet the following conditions will be selected:

  • fromDate (date) - invoices that were issued on this date or later
  • toDate (date) - invoices that were issued on this date or earlier
  • amountFrom (money) - invoices whose total amount is equal to or greater than the specified amount
  • amountTo (money) - invoices whose total amount is equal to or less than the specified amount
  • supplierName (string) - seller name
  • supplierTaxId (string) - seller PIB
  • supplierRegistrationId (string) - seller registration number
  • customerName (string) - buyer name
  • customerTaxId (string) - buyer PIB
  • customerRegistrationId (string) - buyer registration number
  • type (string) - invoice type, which can be Invoice (invoice) or CreditNote (credit note)
  • statuses (list(string)) - the current status of the invoice is contained in the specified array
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/efaktura/sales-invoice/search' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-01-31"
}'
Primer odgovoraResponse example 200 OK
[
  {
    "invoiceId": 2670151,
    "invoiceNumber": "2024-01",
    "type": "Invoice",
    "issueDate": "2024-01-08",
    "createdAt": "2024-01-08T12:23:06.000+01:00",
    "totalAmount": 1200,
    "currency": "RSD",
    "supplier": {
      "name": "TERON DOO BEOGRAD",
      "address": "USTANIČKA 194",
      "city": "Beograd (Zvezdara)",
      "country": "RS",
      "email": null,
      "registrationId": "21535222",
      "taxId": "111758195"
    },
    "customer": {
      "name": "TERON DOO BEOGRAD",
      "address": "USTANIČKA 194",
      "city": "Beograd (Zvezdara)",
      "country": "RS",
      "email": null,
      "registrationId": "21535222",
      "taxId": "111758195"
    },
    "status": "Sent",
    "comment": null,
    "cancelComment": "",
    "stornoComment": "",
    "lastModifiedUtc": "2024-01-08T13:23:04.078+01:00",
    "attachments": [
      "Prilog 1"
    ]
  }
]
GET/api/efaktura/purchase-invoice/:invoiceId#

Podaci o ulaznoj fakturi

Purchase invoice data

Namena ovog poziva je da preuzmete osnovne podatke o ulaznoj fakturi i odgovor sadrži sledeća polja:

  • invoiceId (number) - interni broj ulazne fakture u SEF-u

  • invoiceNumber (string) - broj fakture

  • type (string) - tip fakture, može biti Invoice (faktura) ili CreditNote (knjižno odobrenje).

  • issueDate (date) - datum kad je faktura izdata

  • createdAt (timestamp) - datum i vreme kada je faktura napravljena

  • totalAmount (money) - ukupan iznos fakture

  • currency (string) - valuta

  • supplier (object) - podaci o prodavcu (isti model podataka kao i prilikom registrovanja fakture)

  • customer (object) - podaci o kupcu (isti model podataka kao i prilikom registrovanja fakture)

  • status (string) - trenutni status ulazne fakture, konsultovati SEF dokumentaciju za spisak i opis statusa.

  • comment (string) - napomena od strane kupca prilikom prihvatanja fakture

  • stornoComment (string) - napomena od prodavca prilikom storniranja fakture

  • attachments (list(string)) - spisak naziva priloga

The purpose of this call is to retrieve basic data about a purchase invoice, and the response contains the following fields:

  • invoiceId (number) - internal number of the purchase invoice in SEF

  • invoiceNumber (string) - invoice number

  • type (string) - invoice type, can be Invoice (invoice) or CreditNote (credit note).

  • issueDate (date) - the date the invoice was issued

  • createdAt (timestamp) - the date and time the invoice was created

  • totalAmount (money) - total invoice amount

  • currency (string) - currency

  • supplier (object) - seller data (same data model as when registering an invoice)

  • customer (object) - buyer data (same data model as when registering an invoice)

  • status (string) - current status of the purchase invoice, consult the SEF documentation for the list and description of statuses.

  • comment (string) - note from the buyer when accepting the invoice

  • stornoComment (string) - note from the seller when cancelling the invoice

  • attachments (list(string)) - list of attachment names

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2579657broj faktureinvoice number
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/2579657' \
  -H 'Authorization: Bearer <API_KEY>'
GET/api/efaktura/purchase-invoice/:invoiceId/pdf#

Ulazna faktura u PDF formatu

Purchase invoice in PDF format

Ovaj API poziv vraća izgled ulazne fakture u PDF formatu

This API call returns the layout of the purchase invoice in PDF format

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2579657broj faktureinvoice number
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/2579657/pdf' \
  -H 'Authorization: Bearer <API_KEY>'
GET/api/efaktura/purchase-invoice/:invoiceId/xml#

Ulazna faktura u XML formatu

Purchase invoice in XML format

Ovaj API poziv vraća kompletan sadržaj ulazne fakture u XML formatu

This API call returns the complete content of the purchase invoice in XML format

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2579657broj faktureinvoice number
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/2579657/xml' \
  -H 'Authorization: Bearer <API_KEY>'
GET/api/efaktura/purchase-invoice/:invoiceId/attachment/:attachmentId/pdf#

Prilog ulazne fakture u PDF formatu

Purchase invoice attachment in PDF format

Ovaj poziv vraća prilog ulazne fakture u PDF formatu.

This call returns the purchase invoice attachment in PDF format.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2579657broj faktureinvoice number
attachmentId0redni broj priloga (prvi prilog je broj 0)ordinal number of the attachment (the first attachment is number 0)
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/2579657/attachment/0/pdf' \
  -H 'Authorization: Bearer <API_KEY>'
GET/api/efaktura/purchase-invoice/:invoiceId?refresh=true#

Osvežavanje statusa ulazne fakture

Refreshing the status of a purchase invoice

Teron ESIR povremeno proverava da li je ulaznim fakturama u SEF-u promenjen status i u skladu sa tim ažurira internu bazu. Ovaj poziv možete iskoristiti ukoliko je potrebno da odmah izvršite proveru statusa ulazne fakture.

Teron ESIR periodically checks whether the status of purchase invoices in SEF has changed and updates the internal database accordingly. You can use this call if you need to immediately check the status of a purchase invoice.

Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2579657Osveži status ulazne faktureRefresh the status of the purchase invoice
Query parametriQuery parameters
ParametarParameterPrimerExampleOpisDescription
refreshtrue
Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/2579657?refresh=true' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "comment": "Odbijeno test 1"
}'
Primer odgovoraResponse example 200 OK
{
  "invoiceId": 2579657,
  "invoiceNumber": "2024-01",
  "type": "Invoice",
  "issueDate": "2024-01-08",
  "createdAt": "2024-01-08T12:23:07.000+01:00",
  "totalAmount": 1200,
  "currency": "RSD",
  "supplier": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "customer": {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "Beograd (Zvezdara)",
    "country": "RS",
    "email": null,
    "registrationId": "21535222",
    "taxId": "111758195"
  },
  "status": "Seen",
  "comment": null,
  "cancelComment": "",
  "stornoComment": "",
  "lastModifiedUtc": "2024-01-08T13:23:06.567+01:00",
  "attachments": [
    "Prilog 1"
  ],
  "isRead": true
}
POST/api/efaktura/purchase-invoice/search#

Pretraga ulaznih faktura

Search of purchase invoices

Ovaj API poziv omogućava pretragu lokalne baze ulaznih faktura. Zahtev sadrži jedan ili više kriterijuma po kojima se vrši pretraga, pa će biti izabrane fakture koje ispunjavaju sledeće uslove:

  • fromDate (date) - fakture koje su izdate na ovaj datum ili kasnije

  • toDate (date) - fakture koje su izdate na ovaj datum ili ranije

  • amountFrom (money) - fakture čiji ukupan iznos je isti ili veći od navedenog iznosa

  • amountTo (money) - fakture čiji ukupan iznos je isti ili manji od navedenog iznosa

  • supplierName (string) - naziv prodavca

  • supplierTaxId (string) - PIB prodavca

  • supplierRegistrationId (string) - matični broj prodavca

  • customerName (string) - naziv kupca

  • customerTaxId (string) - PIB kupca

  • customerRegistrationId (string) - matični broj kupca

  • type (string) - tip fakture, može biti Invoice (faktura) ili CreditNote (knjižno odobrenje)

  • statuses (list(string)) - trenutni status fakture se nalazi u navedenom nizu

This API call enables searching the local database of purchase invoices. The request contains one or more criteria by which the search is performed, so invoices that meet the following conditions will be selected:

  • fromDate (date) - invoices issued on this date or later

  • toDate (date) - invoices issued on this date or earlier

  • amountFrom (money) - invoices whose total amount is equal to or greater than the specified amount

  • amountTo (money) - invoices whose total amount is equal to or less than the specified amount

  • supplierName (string) - seller name

  • supplierTaxId (string) - seller tax ID (PIB)

  • supplierRegistrationId (string) - seller registration number

  • customerName (string) - buyer name

  • customerTaxId (string) - buyer tax ID (PIB)

  • customerRegistrationId (string) - buyer registration number

  • type (string) - invoice type, can be Invoice (invoice) or CreditNote (credit note)

  • statuses (list(string)) - the current status of the invoice is contained in the specified array

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/search' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'X-Teron-SerialNumber: <serijski_broj>' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromDate": "2024-01-01",
    "toDate": "2024-01-31"
}'
Primer odgovoraResponse example 200 OK
[
  {
    "invoiceId": 2572991,
    "invoiceNumber": "46-5980714",
    "type": "Invoice",
    "issueDate": "2024-01-04",
    "createdAt": "2024-01-08T08:57:59.000+01:00",
    "totalAmount": 5843.5,
    "currency": "RSD",
    "supplier": {
      "name": "JAVNO KOMUNALNO PREDUZEĆE BEOGRADSKE ELEKTRANE, BEOGRAD (NOVI BEOGRAD)",
      "address": "САВСКИ НАСИП 11",
      "city": "БЕОГРАД (НОВИ БЕОГРАД)",
      "country": "RS",
      "email": "fakturisanje@bgdel.rs",
      "registrationId": "07020210",
      "taxId": "100139344"
    },
    "customer": {
      "name": "TERON DOO BEOGRAD",
      "address": "УСТАНИЧКА 194",
      "city": "БЕОГРАД",
      "country": "RS",
      "email": null,
      "registrationId": "21535222",
      "taxId": "111758195"
    },
    "status": "Seen",
    "comment": null,
    "cancelComment": "",
    "stornoComment": "",
    "lastModifiedUtc": "2024-01-04T16:12:15.662+01:00",
    "attachments": [
      "46-5980714.pdf"
    ],
    "isRead": true
  },
  {
    "invoiceId": 2579657,
    "invoiceNumber": "2024-01",
    "type": "Invoice",
    "issueDate": "2024-01-08",
    "createdAt": "2024-01-08T12:23:07.000+01:00",
    "totalAmount": 1200,
    "currency": "RSD",
    "supplier": {
      "name": "TERON DOO BEOGRAD",
      "address": "USTANIČKA 194",
      "city": "Beograd (Zvezdara)",
      "country": "RS",
      "email": null,
      "registrationId": "21535222",
      "taxId": "111758195"
    },
    "customer": {
      "name": "TERON DOO BEOGRAD",
      "address": "USTANIČKA 194",
      "city": "Beograd (Zvezdara)",
      "country": "RS",
      "email": null,
      "registrationId": "21535222",
      "taxId": "111758195"
    },
    "status": "Seen",
    "comment": null,
    "cancelComment": "",
    "stornoComment": "",
    "lastModifiedUtc": "2024-01-08T13:23:06.567+01:00",
    "attachments": [
      "Prilog 1"
    ],
    "isRead": true
  }
]
POST/api/efaktura/purchase-invoice/:invoiceId/reject#

Odbijanje ulazne fakture

Rejection of a purchase invoice

Namena ovog API poziva je da se odbije ulazna faktura uz navođenje komentara u telu zahteva:

  • comment (string) - komentar

The purpose of this API call is to reject a purchase invoice while providing a comment in the request body:

  • comment (string) - comment
Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2579657broj faktureinvoice number
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/2579657/reject' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "comment": "Komentar"
}'
POST/api/efaktura/purchase-invoice/:invoiceId/accept#

Prihvatanje ulazne fakture

Acceptance of a purchase invoice

Namena ovog API poziva je da se prihvati ulazna faktura uz opciono navođenje komentara u telu zahteva:

  • comment (string) - komentar

The purpose of this API call is to accept a purchase invoice with an optional comment in the request body:

  • comment (string) - comment
Path parametriPath parameters
ParametarParameterPrimerExampleOpisDescription
invoiceId2579657broj faktureinvoice number
Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/efaktura/purchase-invoice/2579657/accept' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "comment": "Komentar"
}'

Ostale operacije

Other operations

POST/api/companies#

Pretraga baze kompanija

Company database search

Ovaj API poziv omogućava pretragu baze kompanija po sledećim kriterijumima:

  • name (string): naziv kompanije
  • city (string): grad kompanije
  • taxId (string): PIB kompanije
  • registrationId (string): matični broj kompanije
  • budgetId (string): JBKJS kompanije

Pretraga se vrši kombinovanjem rezultata NBS i SEF baze kompanija. Rezultati koje dobijete mogu biti limitirani ograničenjima implementacija ovih baza:

  • NBS baza ne sadrži podatke o korisnicima javnih sredstava (JBKJS brojeve)
  • Pretraga NBS baze po kratkim nazivima ne vraća očekivane rezultate
  • SEF baza ne sadrži podatke o adresi i gradu kompanije

Napomena: za korišćenje ovog API poziva je neophodna Teron Plus licenca.

This API call enables searching the company database by the following criteria:

  • name (string): company name
  • city (string): company city
  • taxId (string): company PIB
  • registrationId (string): company registration number
  • budgetId (string): company JBKJS

The search is performed by combining results from the NBS and SEF company databases. The results you receive may be limited by the implementation constraints of these databases:

  • The NBS database does not contain data on public funds users (JBKJS numbers)
  • Searching the NBS database by short names does not return the expected results
  • The SEF database does not contain data on the company's address and city

Note: a Teron Plus license is required to use this API call.

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/companies' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "taxId": "111758195"
}'
Primer odgovoraResponse example 200 OK
[
  {
    "name": "TERON DOO BEOGRAD",
    "address": "USTANIČKA 194",
    "city": "BEOGRAD (ZVEZDARA)",
    "taxId": "111758195",
    "registrationId": "21535222",
    "budgetId": null
  }
]
POST/api/device/print#

Direktna štampa

Direct print

Ovaj API poziv omogućava direktan pristup štampaču. U okviru zahteva mogu se navesti sledeći podaci koji će biti odštampani:

  • textLines (list(string)): niz tekstova koji će biti odštampani svaki u posebnoj liniji

  • imagePngBase64 (string): Base64 kodirana PNG slika koja će biti odštampana na štampaču

  • rawBase64 (string): Base64 kodirane komande koje će biti direktno poslate na štampač (najčešće ESC/POS komande)

This API call provides direct access to the printer. The following data can be specified in the request to be printed:

  • textLines (list(string)): an array of texts, each of which will be printed on a separate line

  • imagePngBase64 (string): a Base64-encoded PNG image that will be printed on the printer

  • rawBase64 (string): Base64-encoded commands that will be sent directly to the printer (most commonly ESC/POS commands)

Primer zahtevaRequest example
curl -X POST 'http://127.0.0.1:3566/api/device/print' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "textLines": [
        "Line 1",
        "Line 2",
        "Line 3",
        "Line 4"
    ],
    "imagePngBase64": "iVBORw0KGgoAAAA...",
    "rawBase64": "iVBORw0KGgoAAAA..."
}'
Primer odgovoraResponse example 204 No Content

Prazno telo odgovora.Empty response body.

DELETE/api/device/print#

Oslobađanje štampača

Releasing the printer

U slučaju da je potrebno pristupiti štampaču iz neke druge aplikacije, pozivom ove API metode Teron ESIR će osloboditi štampač i ponovo ga zauzeti kada se zahteva naredna štampa.

In case the printer needs to be accessed from another application, calling this API method will make Teron ESIR release the printer and reclaim it again when the next print is requested.

Primer zahtevaRequest example
curl -X DELETE 'http://127.0.0.1:3566/api/device/print' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 204 No Content

Prazno telo odgovora.Empty response body.

GET/api/certificate#

Podaci o vlasniku sertifikata

Certificate owner data

Ovaj API poziv će vratiti podatke o vlasniku bezbednosnog elementa (u slučaju kada se koristi Teron LPFR), odnosno sertifikata u fajlu (kada se koristi VPFR).

This API call returns data about the owner of the security element (when Teron LPFR is used), i.e. of the certificate in the file (when VPFR is used).

Primer zahtevaRequest example
curl -X GET 'http://127.0.0.1:3566/api/certificate' \
  -H 'Authorization: Bearer <API_KEY>'
Primer odgovoraResponse example 200 OK
{
  "name": "Teron doo",
  "location": "Teron doo",
  "address": "Ustanička 196",
  "city": "Beograd",
  "country": "RS",
  "serialNumber": "4TCASQVE",
  "tin": "RS111758195",
  "taxCoreApiBaseUri": "https://api.sandbox.suf.purs.gov.rs"
}

Teron LPFR API

Teron LPFR API

Integracija na Teron LPFR se realizuje pozivanjem odgovarajućih operacija izloženih preko HTTP REST JSON API endpoint-a.

Teron LPFR prihvata HTTP zahteve na TCP portu 3565.

Svaki HTTP zahtev treba da pored standardnih polja sadrži i polje za autorizaciju u zaglavlju:

  • Authorization: Bearer XXX (XXX treba zameniti sa API ključem)

Ukoliko zahtev sadrži i telo neophodno je navesti i format podataka dodavanjem sledećeg polja u HTTP zahtev:

  • Content-type: application/json; charset=UTF-8

Ukoliko je operacija uspešna svaki odgovor će imati HTTP status kod 200 (OK) ili 204 (No Content) u slučaju da je odgovor prazan. U slučajevima gde je HTTP status kod 4xx ili 5xx došlo je do greške i u većini slučajeva telo odgovora će sadržati dodatne informacije kao i log fajlovi.

Teron LPFR implementira API koji je specificiran od strane PURS-a. Detaljnu dokumentaciju možete naći na sajtu: https://tap.sandbox.suf.purs.gov.rs/Help/view/159282994/Readme/en-US (prebacite na engleski jezik, sekcija "Technical Documentation / EFD Vendors / General Information / Protocol / POS to SDC Protocol).

Podržani endpointi ("localhost" po potrebi zameniti sa IP adresom uređaja na kome se nalazi LPFR):

  • GET http://localhost:3565/api/v3/attention

  • GET http://localhost:3565/api/v3/status

  • POST http://localhost:3565/api/v3/pin

  • POST http://localhost:3565/api/v3/invoices

  • GET http://localhost:3565/api/v3/invoices/{requestId}

Integration with Teron LPFR is performed by calling the appropriate operations exposed through HTTP REST JSON API endpoints.

Teron LPFR accepts HTTP requests on TCP port 3565.

In addition to the standard fields, every HTTP request should include an authorization field in the header:

  • Authorization: Bearer XXX (XXX should be replaced with the API key)

If the request also contains a body, you must specify the data format by adding the following field to the HTTP request:

  • Content-type: application/json; charset=UTF-8

If the operation is successful, every response will have HTTP status code 200 (OK), or 204 (No Content) if the response is empty. In cases where the HTTP status code is 4xx or 5xx, an error has occurred and in most cases the response body, as well as the log files, will contain additional information.

Teron LPFR implements the API specified by PURS. You can find detailed documentation on the website: https://tap.sandbox.suf.purs.gov.rs/Help/view/159282994/Readme/en-US (switch to English, section "Technical Documentation / EFD Vendors / General Information / Protocol / POS to SDC Protocol").

Supported endpoints (replace "localhost" with the IP address of the device on which the LPFR is running, if needed):

  • GET http://localhost:3565/api/v3/attention

  • GET http://localhost:3565/api/v3/status

  • POST http://localhost:3565/api/v3/pin

  • POST http://localhost:3565/api/v3/invoices

  • GET http://localhost:3565/api/v3/invoices/{requestId}

Instalacija

Installation

Procedura za instalaciju, konfigurisanje i održavanje Teron ESIR-a zavisi od načina instalacije kao i operativnog sistema. U nastavku su opisane najčešće kombinacije.

The procedure for installing, configuring, and maintaining Teron ESIR depends on the installation method as well as the operating system. The most common combinations are described below.

Teron LPFR+ESIR (Android)

Teron LPFR+ESIR (Android)

Instalacija kompletnog Teron LPFR+ESIR rešenja u okviru jedne aplikacije se obavlja tako što se prvo preuzme i instalira Teron Start APK fajl teron-start-YYMMDDNN-android-generic.apk.

Pokretanje

Pokrenite Teron Start aplikaciju i na ekranu će biti prikazan serijski broj uređaja koji je potrebno da bude registrovan i licenciran na Teron serveru. Kada je uređaj ispravno licenciran, pojaviće se dugme za preuzimanje poslednje verzije Teron LPFR+ESIR aplikacije, a potom i njenu instalaciju. Prvi put nakon instalacije Teron Start aplikacije će biti neophodno da dozvolite Teron Start aplikaciji da instalira druge aplikacije. Po uspešno okončanom postupku instalacije možete pokrenuti Teron LPFR+ESIR pritiskom na dugme, dok će se svaki naredni put Teron LPFR+ESIR Middleware automatski pokrenuti pri startovanju uređaja, što će biti označeno odgovarajućom ikonicom u notifikacijama.

Ažuriranje

Kada postane dostupna nova verzija Teron LPFR+ESIR aplikacije pokrenite ponovo Teron Start aplikaciju i pojaviće se dugme za preuzimanje i instalaciju nove verzije. Na isti način se obavlja i ažuriranje same Teron Start aplikacije na novu verziju.

Rezervna kopija podataka

Pravljenje rezervne kopije podataka se obavlja kroz samu Teron LPFR+ESIR aplikaciju, u okviru sekcije "Podešavanja / Rezervna kopija podataka". Pogledajte korisničko uputstvo na doc.teron.rs za više informacija.

Deinstalacija

Deinstalacija Teron LPFR+ESIR aplikacije kao i Teron Start aplikacije se obavlja na isti način kao i za sve druge Android aplikacije. Deinstalacija Teron LPFR+ESIR aplikacije će obrisati i sve Teron LPFR+ESIR podatke, napravite rezervnu kopiju pre deinstalacije ukoliko je potrebno.

Installation of the complete Teron LPFR+ESIR solution within a single application is performed by first downloading and installing the Teron Start APK file teron-start-YYMMDDNN-android-generic.apk.

Startup

Launch the Teron Start application and the screen will display the device serial number that needs to be registered and licensed on the Teron server. Once the device is correctly licensed, a button will appear for downloading the latest version of the Teron LPFR+ESIR application, followed by its installation. The first time after installing the Teron Start application, it will be necessary to allow the Teron Start application to install other applications. Once the installation procedure has been successfully completed, you can launch Teron LPFR+ESIR by pressing the button, while each subsequent time the Teron LPFR+ESIR Middleware will start automatically when the device is started up, which will be indicated by the corresponding icon in the notifications.

Updating

When a new version of the Teron LPFR+ESIR application becomes available, launch the Teron Start application again and a button will appear for downloading and installing the new version. The Teron Start application itself is updated to a new version in the same way.

Data backup

Creating a data backup is performed through the Teron LPFR+ESIR application itself, within the "Settings / Data backup" section. See the user manual at doc.teron.rs for more information.

Uninstallation

Uninstalling the Teron LPFR+ESIR application as well as the Teron Start application is performed in the same way as for all other Android applications. Uninstalling the Teron LPFR+ESIR application will also delete all Teron LPFR+ESIR data; create a backup before uninstalling if necessary.

Teron LPFR+ESIR (Windows)

Teron LPFR+ESIR (Windows)

Instalacija kompletnog Teron LPFR+ESIR rešenja u okviru jedne aplikacije se obavlja tako što se preuzme i instalira Teron LPFR+ESIR instalacioni fajl teron-lpfr-esir-installer-YYMMDDNN-win-x64.exe.

Prva intalacija

Prilikom prve instalacije pojaviće se ekran za unos dodeljenog serijskog broj uređaja na kome se obavlja ova instalacija.

NAPOMENA: korišćenje istog serijskog broja na dva ili više uređaja nije dozvoljeno i dovodi do toga da Teron LPFR+ESIR prestane da radi.

Pokretanje

Teron LPFR+ESIR se pokreće automatski kao Windows Servis a u okviru systray-a će se pojaviti ikonica u obliku kruga koja označava trenutni status LPFR-a kao i dodatne akcije koje možete pokrenuti desnim klikom na systray ikonicu.

Ažuriranje

Ažuriranje Teron LPFR+ESIR aplikacije se obavlja automatski tako što će se pojaviti obaveštenje da je nova aplikacija dostupna i kroz par klikova ista se automatski preuzima i instalira.

Rezervna kopija podataka

Pravljenje rezervne kopije podataka se obavlja kroz samu Teron LPFR+ESIR aplikaciju, u okviru sekcije "Podešavanja / Rezervna kopija podataka". Pogledajte korisničko uputstvo na doc.teron.rs za više informacija.

Deinstalacija

Deinstalacija Teron LPFR+ESIR aplikacije se obavlja na standardni način kao i za sve druge Windows aplikacije. Deinstalacija Teron LPFR+ESIR aplikacije će obrisati i sve Teron LPFR+ESIR podatke, napravite rezervnu kopiju pre deinstalacije ukoliko je potrebno.

Installation of the complete Teron LPFR+ESIR solution within a single application is performed by downloading and installing the Teron LPFR+ESIR installation file teron-lpfr-esir-installer-YYMMDDNN-win-x64.exe.

First installation

During the first installation, a screen will appear for entering the assigned serial number of the device on which this installation is being performed.

NOTE: using the same serial number on two or more devices is not allowed and causes Teron LPFR+ESIR to stop working.

Startup

Teron LPFR+ESIR starts automatically as a Windows Service, and a circle-shaped icon will appear in the system tray indicating the current status of the LPFR as well as additional actions you can trigger by right-clicking the system tray icon.

Updating

Updating the Teron LPFR+ESIR application is performed automatically: a notification will appear indicating that a new application is available, and with a few clicks it is automatically downloaded and installed.

Data backup

Creating a data backup is performed through the Teron LPFR+ESIR application itself, within the "Settings / Data backup" section. See the user manual at doc.teron.rs for more information.

Uninstallation

Uninstalling the Teron LPFR+ESIR application is performed in the standard way as for all other Windows applications. Uninstalling the Teron LPFR+ESIR application will also delete all Teron LPFR+ESIR data; create a backup before uninstalling if necessary.

Teron LPFR+ESIR (Linux)

Teron LPFR+ESIR (Linux)

Instalacija kompletnog Teron LPFR+ESIR rešenja u okviru jedne aplikacije se obavlja tako što se prvo preuzme i raspakuje na željeno mesto Teron Start fajl teron-start-YYMMDDNN-linux-x64.tar.gz, u nastavku ćemo koristiti pretpostavku da je fajl raspakovan u /usr/local folder.

Pokretanje

Teron Start se može pokrenuti startovanjem /usr/local/bin/teron-start-1.0/bin/teron-start.sh. Automatsko pokretanje Teron Start-a zavisi od konkretnog okruženja i potreba korisnika i nije predmet ove dokumentacije. Konsultujte dokumentaciju za operativni sistem koji koristite.

Prvi put nakon pokretanja Teron Start-a biće neophodno da unesete vaš serijski broj nakon čega se može automatski preuzeti i instalirati poslednja verzija Teron LPFR+ESIR klikom na jedno dugme, a potom je i pokrenuti.

NAPOMENA: korišćenje istog serijskog broja na dva ili više uređaja nije dozvoljeno i dovodi do toga da Teron LPFR+ESIR prestane da radi.

Ažuriranje

Ažuriranje Teron LPFR+ESIR aplikacije se obavlja startovanjem Teron Start aplikacije i ukoliko je nova verzija dostupna pojaviće se dugme za preuzimanje i instalaciju iste. Neophodno je prvo zaustaviti Teron LPFR+ESIR a potom klikom na dugme pokrenuti ažuriranje nakon čega se može ponovo pokrenuti Teron LPFR+ESIR.

Ažuriranje Teron Start aplikacije

Ažuriranje Teron Start aplikacije sa novom verzijom se obavlja tako što se preuzme instalacioni fajl sa novom verzijom, zaustavi Teron Start i Teron LPFR+ESIR, obavi raspakivanje arhive na isto mesto kao što je opisano na početku, a potom ponovo pokrene Teron Start. U većini slučajeva neće biti potrebno ažurirati Teron Start aplikaciju nakon inicijalne instalacije.

Rezervna kopija podataka

Pravljenje rezervne kopije podataka (backup) se obavlja tako što se prvo zaustavi Teron LPFR+ESIR, a potom kompletan sadržaj foldera /usr/local/teron-start-1.0/data/teron-lpfr-esir se kopira/arhivira i ponovo pokrene Teron LPFR+ESIR. Vraćanje podataka iz rezervne kopije (restore) se obavlja tako što se prvo instalira Teron Start na računaru na koji želite da prenesete podatke, potom vratite arhivirane podatke u /usr/local/teron-start-1.0/data/teron-lpfr-esir folder (ukoliko ovaj folder postoji na novom računaru, neophodno ga je prvo očistiti, a potom vratiti podatke iz arhive), preuzmite i instalirajte Teron LPFR+ESIR preko Teron Start aplikacije i pokrenite.

Log datoteke

Log datoteke sa detaljnijim informacijama o radu aplikacije se nalaze u /usr/local/teron-start-1.0/log/teron-lpfr-esir folderu. Naziv svake datoteke sadrži nivo informacija (debug, info ili error) kao i datum u formatu YYMMDD i ekstenziju log. Log fajlovi error sadrže samo greške u radu, info log fajlovi sadrže greške i glavne informacije dok debug log fajlovi sadrže error, info kao i sve ostale informacije. U slučaju problema u radu neophodno je konsultovati log fajlove za više informacija koje najčešće mogu pomoći u otklanjanju problema. Log fajlovi se automatski brišu (debug nakon 7 dana, info nakon 15 dana, error nakon 30 dana). U slučaju da je potrebno osloboditi prostor na disku log fajlovi se mogu obrisati ručno što ne utiče na rad sistema i nije neophodno zaustavljati rad aplikacije tokom brisanja.

Privremene datoteke

Privremene datoteke se nalaze u /usr/local/teron-start-1.0/temp folderu. Većina privremenih datoteka će biti automatski uklonjena kad više nisu potrebne. U posebnim situacijama se može desiti da privremene datoteke ne budu uklonjene što ne utiče na rad sistema. U slučaju da je potrebno osloboditi prostor na disku privremene datoteke starije od 1h se mogu obrisati ručno što ne utiče na rad sistema i nije neophodno zaustavljati rad aplikacije tokom brisanja.

Deinstalacija

Deinstalacija Teron LPFR+ESIR i Teron Start aplikacija se vrši tako što se prvo zaustavi Teron LPFR+ESIR i Teron Start, a potom obriše /usr/local/teron-start-1.0/apps/rs.teron.esir.android. Nakon završene deinstalacije ukoliko nisu potrebni podaci može se obrisati i kompletan /usr/local/teron-start-1.0 folder. Ova akcija će obrisati i sve Teron LPFR+ESIR podatke, napravite rezervnu kopiju pre deinstalacije ukoliko je potrebno.

Installation of the complete Teron LPFR+ESIR solution within a single application is performed by first downloading and extracting the Teron Start file teron-start-YYMMDDNN-linux-x64.tar.gz to the desired location; in the following we will assume that the file is extracted into the /usr/local folder.

Startup

Teron Start can be launched by running /usr/local/bin/teron-start-1.0/bin/teron-start.sh. Automatic startup of Teron Start depends on the specific environment and the user's needs and is not covered by this documentation. Consult the documentation for the operating system you are using.

The first time after starting Teron Start, you will need to enter your serial number, after which the latest version of Teron LPFR+ESIR can be automatically downloaded and installed with a single button click and then started.

NOTE: using the same serial number on two or more devices is not allowed and causes Teron LPFR+ESIR to stop working.

Update

Updating the Teron LPFR+ESIR application is performed by running the Teron Start application, and if a new version is available, a button to download and install it will appear. It is necessary to first stop Teron LPFR+ESIR and then click the button to start the update, after which Teron LPFR+ESIR can be started again.

Updating the Teron Start application

Updating the Teron Start application to a new version is performed by downloading the installation file with the new version, stopping Teron Start and Teron LPFR+ESIR, extracting the archive to the same location as described at the beginning, and then starting Teron Start again. In most cases it will not be necessary to update the Teron Start application after the initial installation.

Data backup

Creating a data backup is performed by first stopping Teron LPFR+ESIR, and then copying/archiving the entire contents of the /usr/local/teron-start-1.0/data/teron-lpfr-esir folder and starting Teron LPFR+ESIR again. Restoring data from a backup is performed by first installing Teron Start on the computer to which you want to transfer the data, then restoring the archived data into the /usr/local/teron-start-1.0/data/teron-lpfr-esir folder (if this folder exists on the new computer, it must first be cleared and then the data from the archive restored), downloading and installing Teron LPFR+ESIR via the Teron Start application, and starting it.

Log files

Log files with more detailed information about the application's operation are located in the /usr/local/teron-start-1.0/log/teron-lpfr-esir folder. The name of each file contains the information level (debug, info, or error) as well as the date in YYMMDD format and the log extension. error log files contain only operational errors, info log files contain errors and main information, while debug log files contain error, info, and all other information. In case of operational problems, it is necessary to consult the log files for more information, which can most often help in resolving the issue. Log files are automatically deleted (debug after 7 days, info after 15 days, error after 30 days). If disk space needs to be freed up, log files can be deleted manually, which does not affect the operation of the system, and it is not necessary to stop the application during deletion.

Temporary files

Temporary files are located in the /usr/local/teron-start-1.0/temp folder. Most temporary files will be automatically removed when they are no longer needed. In special situations it may happen that temporary files are not removed, which does not affect the operation of the system. If disk space needs to be freed up, temporary files older than 1h can be deleted manually, which does not affect the operation of the system, and it is not necessary to stop the application during deletion.

Uninstallation

Uninstallation of the Teron LPFR+ESIR and Teron Start applications is performed by first stopping Teron LPFR+ESIR and Teron Start, and then deleting /usr/local/teron-start-1.0/apps/rs.teron.esir.android. After the uninstallation is complete, if the data is not needed, the entire /usr/local/teron-start-1.0 folder can also be deleted. This action will also delete all Teron LPFR+ESIR data; make a backup before uninstalling if necessary.

Teron ESIR Cloud Middleware

Teron ESIR Cloud Middleware

Teron ESIR Cloud Middleware se izvršava u okviru Teron Cloud infrastrukture i Teron brine o dostupnosti i ispravnosti rada sistema. Neophodno je da dobijete serijski broj i API KEY, nakon čega možete odmah pristupiti integraciji.

Produkcioni bazni API URL: https://pos.teron.rs/api

NAPOMENA: U slučaju integracije sa Teron ESIR Cloud Middleware-om svaki zahtev mora imati dodatno polje X-Teron-SerialNumber kojie sadrži dodeljeni serijski broj uređaja.

Teron ESIR Cloud Middleware runs within the Teron Cloud infrastructure, and Teron takes care of the availability and correct operation of the system. You need to obtain a serial number and an API KEY, after which you can immediately proceed with the integration.

Production base API URL: https://pos.teron.rs/api

NOTE: In the case of integration with Teron ESIR Cloud Middleware, every request must include an additional X-Teron-SerialNumber field containing the assigned device serial number.