MER API DOKUMENTACIJA
Username – E-mail ili ID dodijeljen od strane MER-a
Password – Lozinka za prijavu
CompanyId – Identifikacijski broj pošiljatelja (OIB ili PDV ID / VAT broj ako pošiljatelj nije hrvatska tvrtka)
CompanyBu – Poslovna jedinica pošiljatelja (samo ako je registrirana u MER-u)
SoftwareID – ERP identifikator dodijeljen od strane MER-a
– Provjerava da li je servis aktivan.
– Može se koristiti za osnovne provjere povezivosti i dostupnosti.
GET https://www.moj-eracun.hr/apis/v2/Ping/
{
"Status": "ok",
"Message": "Service is up"
}
– Učitava i šalje elektronički račun/dokument na platformu moj-eRačun.
– Izvršava validaciju i obradu.
– XML treba biti u Json escaped formatu
– Uspješno slanje dokumenta na servis vraća jedinstveni ElectronicID
Header: content-type: application/json; charset: utf-8
Live – POST https://www.moj-eracun.hr/apis/v2/send
Demo – POST https://demo.moj-eracun.hr/apis/v2/send
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"File": {
"description": "Utf-8 encoded and JSON escaped XML file",
"type": "string",
"mandatory": true
}
}
{
"Username": 1083,
"Password": "test123",
"CompanyId": "99999999927",
"CompanyBu": "",
"SoftwareId": "software-123",
"File": "<?xml version="1.0" encoding="UTF-8"?>..."
}
{
"ElectronicId": 3239400,
"DocumentNr": "e26000007/1/2",
"DocumentTypeId": 1,
"DocumentTypeName": "Račun",
"StatusId": 20,
"StatusName": "Obrađen",
"RecipientBusinessNumber": "99999999999",
"RecipientBusinessUnit": "",
"RecipientBusinessName": "Test d.o.o.",
"Created": "2026-02-11T11:32:43.8254386+01:00",
"Sent": "2026-02-11T11:32:43.9174186+01:00",
"Modified": "2026-02-11T11:32:43.9174186+01:00",
"Delivered": null
}
– Dohvaća dolazne dokumente/račune s platforme.
– Putem ovog API-ja moguće je preuzeti samo jedan dokument koristeći ElectronicID.
– Vraća dokument u XML formatu.
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/apis/v2/receive
Demo – POST https://demo.moj-eracun.hr/apis/v2/receive
{
"Username": {
"description": "Receiver Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Receiver Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Receiver Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Business Unit name (used only if it is registered in MER)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"ElectronicId": {
"description": "Electronic Document Id",
"type": "int",
"mandatory": true
}
}
{
"Username": "test@moj-eracun.hr",
"Password": "test123",
"CompanyId": "99999999999",
"SoftwareId": "software-123",
"ElectronicId": "123456"
}
– Outbox: Prikazuje sve izlazne račune/dokumente.
– Inbox: Prikazuje sve ulazne račune/dokumente.
– Podržava filtriranje po datumu, Electronic ID-u ili statusu.
– Vraća popis (niz ili array) dokumenata.
– Praćenje da li je dokument uspješno: poslan, isporučen, primljen.
– NE uključuje status plaćanja, razlog odbijanja, stanje poslovnog procesa.
Header: “content-type:application/json; charset:utf-8”
OUTBOX
Live – POST https://www.moj-eracun.hr/apis/v2/queryOutbox
Demo – POST https://demo.moj-eracun.hr/apis/v2/queryOutbox
INBOX
Live – POST https://www.moj-eracun.hr/apis/v2/queryInbox
Demo – POST https://demo.moj-eracun.hr/apis/v2/queryInbox
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"ElectronicId": {
"description": "Filters single document",
"type": "int",
"mandatory": false
},
"StatusId": {
"description": "Filters status based on the status code.",
"type": "int",
"mandatory": false
},
"From": {
"description": "YYYY-MM-DDThh:mm:ss or YYYY-MM-DD",
"type": "ISO datetime",
"mandatory": false
},
"To": {
"description": "YYYY-MM-DDThh:mm:ss or YYYY-MM-DD",
"type": "ISO datetime",
"mandatory": false
},
}
{
"Username": "test@moj-eracun.hr",
"Password": "test123",
"CompanyId": "99999999999",
"SoftwareId": "software-123",
"StatusId": "20"
}
Outbox Response
{
"ElectronicId": 394167,
"DocumentNr": "20156256",
"DocumentTypeId": 1,
"DocumentTypeName": "Račun",
"StatusId": 20,
"StatusName": "Obrađen",
"RecipientBusinessNumber": "99999999999",
"RecipientBusinessUnit": "",
"RecipientBusinessName": "Test d.o.o.",
"Created": "2026-01-28T15:18:54.5458301",
"Updated": "2026-01-29T08:03:20.0566665",
"Sent": "2026-01-28T15:18:56.4864434",
"Delivered": "2026-01-29T07:06:38.1786133",
"Issued": "2026-01-28T00:00:00",
"Imported": false
}
Inbox Response
{
"ElectronicId": 394167,
"DocumentNr": "20156256",
"DocumentTypeId": 1,
"DocumentTypeName": "Račun",
"StatusId": 20,
"StatusName": "Obrađen",
"SenderBusinessNumber": "99999999999",
"SenderBusinessUnit": "",
"SenderBusinessName": "Test d.o.o.",
"Updated": "2026-01-29T08:03:20.0566665",
"Sent": "2026-01-28T15:18:56.4864434",
"Delivered": "2026-01-29T07:06:38.1786133",
"Imported": false
}
– Dohvaća odgovore Porezne uprave (PU) isključivo za radnje koje je inicirao sam korisnik (na temelju korisničkog imena i OIB-a tvrtke), dok uvid u akcije druge strane nije moguć.
– Služi za provjeru odgovora PU o uspješnosti evidentiranja naplate izlaznog računa (markPaid) te uspješnosti evidentiranja odbijanja ulaznog računa (reject).
– Prilikom slanja računa, vrsta izvještavanja ovisi o registraciji primatelja u AMS-u. Ako su obje strane u AMS-u, dokument se fiskalizira. Ako primatelja nema u AMS-u, provodi se e-Izvještavanje (eReporting). U oba slučaja, API vraća povratni odgovor PU o uspješnosti te obrade.
– Parametar MessageType definira za koju se točno akciju dohvaća status: 0 (fiskalizacija kao pošiljatelj), 1 (fiskalizacija kao primatelj), 2 (status odbijanja), 3 (status plaćanja) ili 4 (status za eReporting).
– Parametar ChannelType dodatno označava kroz koji je kanal dokument prijavljen Poreznoj upravi: 0 (Fiscalization) ili 1 (eReporting).
– Parametar Status prikazuje konačni rezultat obrade tog specifičnog zahtjeva od strane Porezne uprave: 0 (Uspješno), 1 (Neuspješno) ili 2 (Na čekanju).
Header: “content-type:application/json; charset:utf-8”
OUTBOX
Live – POST https://www.moj-eracun.hr/api/fiscalization/statusOutbox
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/statusOutbox
INBOX
Live – POST https://www.moj-eracun.hr/api/fiscalization/statusInbox
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/statusInbox
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"ElectronicId": {
"description": "Filters single document",
"type": "int",
"mandatory": false
},
"MessageType": {
"description": "Filters by MessageType in the table below",
"type": "string",
"mandatory": false
},
"DateFrom": {
"description": "YYYY-MM-DDThh:mm:ss or YYYY-MM-DD",
"type": "ISO datetime",
"mandatory": false
},
"DateTo": {
"description": "YYYY-MM-DDThh:mm:ss or YYYY-MM-DD",
"type": "ISO datetime",
"mandatory": false
},
"ByUpdateDate": {
"description": "If true, filters by document update date; otherwise filters by insert date",
"type": "boolean",
"mandatory": false
},
"FiscalizationRequestID": {
"description": "Filters single document based on FiscalizationRequestID",
"type": "string",
"mandatory": false
},
"Status": {
"description": "Filters by Status in the table below",
"type": "int",
"mandatory": false
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "22222222222",
"SoftwareId": "software-123",
"MessageType": 1,
"DateFrom": "2025-10-20",
"DateTo": "2025-10-25",
"ByUpdateDate": true,
"ElectronicId": 11221122,
"FiscalizationRequestId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"Status": 1
}
[
{
"electronicID": "100",
"recipientIdentificationValue": "11111111111",
"recipientName": "Kompanija d.o.o.",
"channelType": 0,
"channelTypeDescription": "Fiskalizacija",
"businessStatusReason": "Some reason",
"messages": {
"status": 2,
"statusDescription": "Na čekanju",
"fiscalizationRequestId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"dateOfFiscalization": "2025-06-20T16:45:30Z",
"encodedXml": "PD94bWwgdmVyc2lvbj0iMS4wIiB…",
"errorCode": "S001",
"errorCodeDescription": "Sistemska greška prilikom obrade zahtjeva",
"messageType": 0,
"messageTypeDescription": "Kao POŠILJATELJ dohvati status fiskalizacijske poruke"
}
}
]
– Koristi samo pošiljatelj.
– Ukoliko imate ElectronicID, uvijek koristite API koji ima ElectronicID kao parametar
– API bez ElectronicID-a će biti zabilježen u poreznom sustavu, ali neće biti vidljiv u Mer servisu
– Nakon primitka uplate za račun, pošiljatelj putem API-ja obavještava Poreznu upravu da je račun plaćen.
Ponašanje pri skupnoj obradi (Bulk processing):
– Jedan skupni zahtjev (bulk request) može sadržavati do 100 računa.
– Ako obrada bilo kojeg računa u skupnom zahtjevu ne uspije, Porezna uprava odbija cijeli zahtjev i nijedan račun se ne označava kao plaćen.
– Porezna uprava ne pruža detalje o tome koji je račun uzrokovao neuspjeh skupne operacije.
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/markPaid
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/markPaid
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"ElectronicId": {
"description": "Electronic Document Id",
"type": "int",
"mandatory": true
},
"PaymentDate": {
"description": "Payment date",
"type": "date",
"mandatory": true
},
"PaymentAmount": {
"description": "Payment amount",
"type": "decimal",
"mandatory": true
},
"PaymentMethod": {
"description": "Filters by PaymentMethod in the table below",
"type": "string",
"mandatory": true
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "11111111111",
"CompanyBU": null,
"SoftwareId": "software-123",
"ElectronicId": 101,
"PaymentDate": "2024-06-01T00:00:00",
"PaymentAmount": 500.00,
"PaymentMethod": "T"
}
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/bulkMarkPaid
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/bulkMarkPaid
{
"username": "user@mail.com",
"password": "mystrongpass",
"companyId": "11111111111",
"companyBU": null,
"softwareId": "software-123",
"invoices": [
{
"electronicId": 101,
"paymentDate": "2024-06-01T00:00:00",
"paymentAmount": 500.00,
"paymentMethod": "T"
},
{
"electronicId": 102,
"paymentDate": "2024-06-02T00:00:00",
"paymentAmount": 250.50,
"paymentMethod": "O"
},
{
"electronicId": 103,
"paymentDate": "2024-06-03T00:00:00",
"paymentAmount": 100.99,
"paymentMethod": "Z"
}
]
}
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/markPaidWithoutElectronicID
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/markPaidWithoutElectronicID
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"DateOfFiscalization": {
"description": "Date when the fiscalization was done for the eInvoice",
"type": "date",
"mandatory": false
},
"InternalMark": {
"description": "Fiscaliscal invoice number",
"type": "string",
"mandatory": true
},
"IssueDate": {
"description": "Issue date of the document from XML file (not date of sending the document to MER)",
"type": "date",
"mandatory": true
},
"SenderIdentifierValue": {
"description": "Sender identification number (OIB or GLN)",
"type": "string",
"mandatory": true
},
"RecipientIdentifierValue": {
"description": "Recipient identification number (OIB or GLN)",
"type": "string",
"mandatory": true
},
"PaymentDate": {
"description": "Payment date",
"type": "date",
"mandatory": true
},
"PaymentAmount": {
"description": "Payment amount",
"type": "decimal",
"mandatory": true
},
"PaymentMethod": {
"description": "Filters by PaymentMethod in the table below",
"type": "string",
"mandatory": true
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "11111111111",
"CompanyBU": null,
"SoftwareId": "software-123",
"DateOfFiscalization": "2024-06-01",
"InternalMark": "INV-001",
"IssueDate": "2024-05-30",
"SenderIdentifierValue": "12345678901",
"RecipientIdentifierValue": "10987654321",
"PaymentDate": "2024-06-01",
"PaymentAmount": 500.00,
"PaymentMethod": "T"
}
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/bulkMarkPaidWithoutElectronicId
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/bulkMarkPaidWithoutElectronicId
{
"username": "user@mail.com",
"password": "mystrongpass",
"companyId": "11111111111",
"companyBU": null,
"softwareId": "software-123",
"invoices": [
{
"dateOfFiscalization": "2024-06-01T10:00:00",
"internalMark": "INV-001",
"issueDate": "2024-05-30T00:00:00",
"senderIdentifierValue": "12345678901",
"recipientIdentifierValue": "10987654321",
"paymentDate": "2024-06-01T10:00:00",
"paymentAmount": 500.00,
"paymentMethod": "T"
},
{
"dateOfFiscalization": "2024-06-02T11:00:00",
"internalMark": "INV-002",
"issueDate": "2024-05-31T00:00:00",
"senderIdentifierValue": "12345678901",
"recipientIdentifierValue": "10987654321",
"paymentDate": "2024-06-02T11:00:00",
"paymentAmount": 250.50,
"paymentMethod": "O"
},
{
"dateOfFiscalization": "2024-06-03T12:00:00",
"internalMark": "INV-003",
"issueDate": "2024-06-01T00:00:00",
"senderIdentifierValue": "12345678901",
"recipientIdentifierValue": "10987654321",
"paymentDate": "2024-06-03T12:00:00",
"paymentAmount": 100.99,
"paymentMethod": "Z"
}
]
}
{
"fiscalizationTimestamp": "2025-06-15T14:30:25Z",
"encodedXml": "PD94bWwgdmVyc2lvbj0iMS4wIiB …",
"fiscalizationRequestId": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}
– Koristi samo primatelj.
– Ukoliko imate ElectronicID, uvijek koristite API koji ima ElectronicID kao parametar
– API bez ElectronicID-a će biti zabilježen u poreznom sustavu, ali neće biti vidljiv u Mer servisu
– Primatelj može odbiti račun/dokument i navesti razlog.
Ponašanje pri skupnoj obradi (Bulk processing):
– Jedan skupni zahtjev (bulk request) može sadržavati do 100 računa.
– Ako obrada bilo kojeg računa u skupnom zahtjevu ne uspije, Porezna uprava odbija cijeli zahtjev i nijedan račun se ne odbija.
– Porezna uprava ne pruža detalje o tome koji je račun uzrokovao neuspjeh skupne operacije.
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/reject
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/reject
{
"Username": {
"description": "Receiver Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Receiver Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Receiver Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Receiver Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"ElectronicId": {
"description": "Electronic Document Id",
"type": "int",
"mandatory": true
},
"RejectionDate": {
"description": "Date when rejection of the electronic document is performed",
"type": "date",
"mandatory": true
},
"RejectionReasonType": {
"description": "Type of rejection, see table 5.2.",
"type": "string",
"mandatory": true
},
"RejectionReasonDescription": {
"description": "Text description with rejection note",
"type": "string",
"mandatory": true
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "11111111111",
"CompanyBU": null,
"SoftwareId": "software-123",
"ElectronicId": 201,
"RejectionDate": "2024-06-01T10:05:00",
"RejectionReasonType": "N",
"RejectionReasonDescription": "Data mismatch without tax impact"
}
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/bulkReject
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/bulkReject
{
"username": "user@mail.com",
"password": "mystrongpass",
"companyId": "11111111111",
"companyBU": null,
"softwareId": "software-123",
"invoices": [
{
"electronicId": 201,
"rejectionDate": "2024-06-01T10:00:00",
"rejectionReasonType": "N",
"rejectionDescription": "Data mismatch without tax impact"
},
{
"electronicId": 202,
"rejectionDate": "2024-06-02T11:00:00",
"rejectionReasonType": "U",
"rejectionDescription": "Data mismatch with tax impact"
},
{
"electronicId": 203,
"rejectionDate": "2024-06-03T12:00:00",
"rejectionReasonType": "O",
"rejectionDescription": "Other reason"
}
]
}
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/rejectWithoutElectronicID
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/rejectWithoutElectronicID
{
"Username": {
"description": "Receiver Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Receiver Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Receiver Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Receiver Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"DateOfFiscalization": {
"description": "Date when the fiscalization was done for the eInvoice",
"type": "date",
"mandatory": false
},
"InternalMark": {
"description": "Fiscaliscal invoice number",
"type": "string",
"mandatory": true
},
"IssueDate": {
"description": "Issue date of the document from XML file (not date of sending the document to MER)",
"type": "date",
"mandatory": true
},
"SenderIdentifierValue": {
"description": "Sender identification number (OIB or GLN)",
"type": "string",
"mandatory": true
},
"RecipientIdentifierValue": {
"description": "Recipient identification number (OIB or GLN)",
"type": "string",
"mandatory": true
},
"RejectionDate": {
"description": "Date when rejection of the electronic document is performed",
"type": "date",
"mandatory": true
},
"RejectionReasonType": {
"description": "Filter by RejectionReasonType in the table below",
"type": "string",
"mandatory": true
},
"RejectionReasonDescription": {
"description": "Text description with rejection note",
"type": "string",
"mandatory": true
}
}
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/bulkRejectWithoutElectronicId
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/bulkRejectWithoutElectronicId
{
"username": "user@mail.com",
"password": "mystrongpass",
"companyId": "11111111111",
"companyBU": null,
"softwareId": "software-123",
"invoices": [
{
"dateOfFiscalization": "2024-06-01T10:00:00",
"internalMark": "INV-001",
"issueDate": "2024-05-30T00:00:00",
"senderIdentifierValue": "HR12345678901",
"recipientIdentifierValue": "HR10987654321",
"rejectionDate": "2024-06-01T10:05:00",
"rejectionReasonType": "N",
"rejectionReasonDescription": "Data mismatch without tax impact"
},
{
"dateOfFiscalization": "2024-06-02T11:00:00",
"internalMark": "INV-002",
"issueDate": "2024-05-31T00:00:00",
"senderIdentifierValue": "HR12345678901",
"recipientIdentifierValue": "HR10987654321",
"rejectionDate": "2024-06-02T11:10:00",
"rejectionReasonType": "U",
"rejectionReasonDescription": "Data mismatch with tax impact"
},
{
"dateOfFiscalization": "2024-06-03T12:00:00",
"internalMark": "INV-003",
"issueDate": "2024-06-01T00:00:00",
"senderIdentifierValue": "HR12345678901",
"recipientIdentifierValue": "HR10987654321",
"rejectionDate": "2024-06-03T12:15:00",
"rejectionReasonType": "O",
"rejectionReasonDescription": "Other reason"
}
]
}
{
"fiscalizationTimestamp": "2025-06-15T14:30:25Z",
"encodedXml": "PD94bWwgdmVyc2lvbj0iMS4wIiB …",
"fiscalizationRequestId": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}
– Koristi se za ažuriranje statusa obrade dolaznog dokumenta od strane primatelja.
– Putem API-ja mogu se postaviti samo statusi 0, 1, 2 i 3.
POST https://www.moj-eracun.hr/apis/v2/UpdateDokumentProcessStatus
Header: content-type: application/json; charset:utf-8
{
"Username": {
"description": "Recipient Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Recipient Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Recipient Company Id (OIB)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Recipient Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (ERP) Id",
"type": "string",
"mandatory": true
},
"ElectronicId": {
"description": "Electronic ID of the document for which the process status is updated",
"type": "int",
"mandatory": true
},
"StatusId": {
"description": "Document process status. Allowed values: 0, 1, 2, 3",
"type": "int",
"mandatory": true
},
"RejectReason": {
"description": "Reason for rejection (required when StatusId = 1)",
"type": "string",
"mandatory": false
},
"RejectionReasonCode": {
"description": "Reason code for rejection (relevant when StatusId = 1). Allowed values: N, U, O. See options below",
"type": "string",
"mandatory": false
}
}
{
"Username": "test@moj-eracun.hr",
"Password": "test123",
"CompanyId": "99999999999",
"SoftwareId": "software-123",
"ElectronicId": 4439122,
"StatusId": 1,
"RejectReason":"Razlog odbijanja",
"RejectionReasonCode": "N"
}
{
"ElectronicId": 4439122,
"DokumentProcessStatus": 0,
"UpdateDate": "2019-04-04T19:05:04.3818381+02:00"
}
Status codes 4 and 99 cannot be modified via API and are managed exclusively by the service provider.
– Služi za praćenje životnog ciklusa dokumenta nakon isporuke.
– Provjera je li dokument: plaćen, odbijen ili fiskaliziran.
– Povratne informacije uključuju: sve osnovne identifikacijske podatke dokumenta, DocumentProcessStatus (npr. Plaćen, Odbijen), razlog odbijanja (ako je primjenjivo) te dodatne statuse dokumenta.
Header: “content-type:application/json; charset:utf-8”
OUTBOX
Live – POST https://www.moj-eracun.hr/apis/v2/queryDocumentProcessStatusOutbox
Demo – POST https://demo.moj-eracun.hr/apis/v2/queryDocumentProcessStatusOutbox
INBOX
Live – POST https://www.moj-eracun.hr/apis/v2/queryDocumentProcessStatusInbox
Demo – POST https://demo.moj-eracun.hr/apis/v2/queryDocumentProcessStatusInbox
{
"Username": {
"description": "Sender or Recipient Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Login password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Company Id (OIB)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (ERP) Id",
"type": "string",
"mandatory": true
},
"ElectronicId": {
"description": "Filters a single document",
"type": "int",
"mandatory": false
},
"StatusId": {
"description": "Filters by document process status",
"type": "int",
"mandatory": false
},
"InvoiceYear": {
"description": "Filters by invoice year",
"type": "int",
"mandatory": false
},
"InvoiceNumber": {
"description": "Filters by invoice number",
"type": "string",
"mandatory": false
},
"From": {
"description": "YYYY-MM-DDThh:mm:ss or YYYY-MM-DD",
"type": "ISO datetime",
"mandatory": false
},
"To": {
"description": "YYYY-MM-DDThh:mm:ss or YYYY-MM-DD",
"type": "ISO datetime",
"mandatory": false
},
"ByUpdateDate": {
"description": "If true, filters by document update date; otherwise by insert date",
"type": "boolean",
"mandatory": false
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "22222222222",
"SoftwareId": "software-123",
"From": "2025-10-20",
"To": "2025-10-25",
"ByUpdateDate": true,
"ElectronicId": 11221122
}
{
"ElectronicId": 394162,
"DocumentNr": "3-1-1",
"DocumentTypeId": 1,
"DocumentTypeName": "Račun",
"StatusId": 30,
"StatusName": "Poslano",
"IssueDate": "2016-04-18T08:13:03.177",
"SenderBusinessNumber": "99999999999",
"SenderBusinessUnit": "",
"SenderBusinessName": "Test d.o.o.",
"Sent": "2016-04-18T08:13:03.177",
"Delivered": null,
"IssueDate": "2016-04-18T00:00:00",
"DocumentProcessStatusId": 99,
"DocumentProcessStatusName": "Zaprimljen",
"AdditionalDokumentStatusId": null,
"RejectReason": null,
"OutboundFiscalizationStatus": 2
}
– Služi za validaciju XML dokumenta na temelju UBL 2.1 strukture.
– Vraća uspješan status (OK) ako je dokument ispravan ili popis grešaka ukoliko validacija ne prođe.
– XML treba biti u Json escaped formatu.
Header: content-type: application/json; charset: utf-8
Live – POST https://www.moj-eracun.hr/apis/V2/Validate
Demo – POST https://demo.moj-eracun.hr/apis/V2/Validate
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"File": {
"description": "Utf-8 encoded and JSON escaped XML file",
"type": "string",
"mandatory": true
}
}
{
"Username": 11111,
"Password": "MyStrongPassword",
"CompanyId": "99999999999",
"CompanyBu": "",
"SoftwareId": "Software-123",
"File": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>..."
}
Uspješna validacija:
HTTP 200 OK
Neuspješna validacija (Primjer s greškama):
{
"File": {
"Value": "<?xml version='1.0' encoding='UTF-8'?>\r\n<Invoice xmlns='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'...>\n...\n</Invoice>\r\n",
"Messages": [
"[HR-BR-37] - Račun mora sadržavati oznaku operatera (HR-BT-4); [HR-BR-9] - Račun mora sadržavati ispravan OIB operatera (HR-BT-5). Trace ID: 81d0831g-8181-4125-a151-b82e1983c3ee"
]
}
}
– NOVI API (02-04-2026)
– Dohvaća poslovnice javnih naručitelja.
– Ako poslovni subjekt ima poslovnice, vraća popis poslovnica. Ako nema, vraća samo OIB tvrtke.
– Ako subjekt nije registriran na Centralnoj platformi (CP), dobiva se prazan odgovor.
– Oznaka schemeName definira vrstu identifikatora: “0088” označava GLN, dok “9934” označava OIB.
– U polju businessBranchCode, dio koji dolazi nakon oznake HR99: predstavlja oznaku poslovne jedinice.
Header: content-type: application/json; charset: utf-8
Live – POST https://www.moj-eracun.hr/apis/V2/GetReceiversByOib
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"VatNumber": {
"description": "Receiver Vat Number (Oib) to check",
"type": "string",
"mandatory": true
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "11111111111",
"SoftwareId": "software-123",
"VatNumber": "12345678901"
}
[
{
"receiverId": "12345678901",
"schemeName": "9934",
"receiptTypes": null,
"businessBranchCode": "9934:12345678901",
"businessBranchName": "Testna Tvrtka d.o.o.",
"address": {
"streetName": "Glavna ulica 3",
"buildingNumber": null,
"postalCode": "10000",
"cityName": "Zagreb",
"country": "Republika Hrvatska",
"addressLine": "Glavna ulica 3, 10000, Zagreb, Republika Hrvatska"
},
"activity": "1"
},
{
"receiverId": "12345678901",
"schemeName": "9934",
"receiptTypes": null,
"businessBranchCode": "9934:12345678901::HR99:088",
"businessBranchName": "Testna Poslovnica 1",
"address": {
"streetName": "Testna ulica 1",
"buildingNumber": null,
"postalCode": "10000",
"cityName": "Zagreb",
"country": "Republika Hrvatska",
"addressLine": "Testna ulica 1, 10000, Zagreb, Republika Hrvatska"
},
"activity": "1"
},
{
"receiverId": "12345678901",
"schemeName": "9934",
"receiptTypes": null,
"businessBranchCode": "9934:12345678901::HR99:ZZ079",
"businessBranchName": "Testna Poslovnica 2",
"address": {
"streetName": "Testna ulica 2",
"buildingNumber": null,
"postalCode": "10000",
"cityName": "Zagreb",
"country": "Republika Hrvatska",
"addressLine": "Testna ulica 2, 10000, Zagreb, Republika Hrvatska"
},
"activity": "1"
},
{
"receiverId": "3851234567890",
"schemeName": "0088",
"receiptTypes": null,
"businessBranchCode": "3851234567890",
"businessBranchName": "Testna tvrtka",
"address": {
"streetName": "Glavni trg 18",
"buildingNumber": null,
"postalCode": "10000",
"cityName": "Zagreb",
"country": "Republika Hrvatska",
"addressLine": "Glavni trg 18, 10000, Zagreb, Republika Hrvatska"
},
"activity": "1"
}
]
– Dohvaća detaljne poruke o greškama pri AS4 razmjeni kada se razmjena dokumenata obavlja između različitih pristupnih točaka.
– Ovaj API namijenjen je za korištenje isključivo za dokumente sa statusom 50 (Neuspješno).
– Vraća tehničke i poslovne poruke o greškama generirane tijekom AS4 razmjene poruka.
– API se pretražuje korištenjem parametara InternalMark (broj računa) i IssueDate, a ne preko ElectronicId-a.
– Korištenje parametra InternalMark omogućuje dohvaćanje statusa razmjene i detalja o greškama za sve pokušaje slanja istog računa, čak i kada je generirano više ElectronicId-eva zbog ponovljenog slanja.
Header: “content-type:application/json; charset:utf-8”
LIVE – POST https://www.moj-eracun.hr/apis/as4details/queryexchangeErrorDetails
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (OIB)",
"type": "string",
"mandatory": true
},
"SoftwareId": {
"description": "Business Software (ERP) Id",
"type": "string",
"mandatory": true
},
"InternalMark": {
"description": "Invoice number",
"type": "string",
"mandatory": true
},
"IssueDate": {
"description": "Issue date of an invoice",
"type": "date",
"mandatory": true
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "22222222222",
"SoftwareId": "Test-002",
"InternalMark": "1/1/1",
"IssueDate": "2026-01-22"
}
{
"items": [
{
"shortErrorDetail": "Greška od drugog informacijskog posrednika.",
"errorCode": 6,
"errorCodeDescription": "EBMS_0004",
"errorDetail": "Document not valid: Element Invoice/AccountingSupplierParty/SellerContact/ID mora sadržavati ispravan OIB operatera",
"role": 1,
"roleDescription": "Zaprimanje",
"timestamp": "2026-01-22T08:44:19",
"recipientAccessPoint": "Recipient Access Point Name",
"recipientFriendlyName": "Recipient Access Point Name",
"ElectronicId": 1212121212
},
{
"shortErrorDetail": "Neuspješno slanje prema pristupnoj točki 'Recipient Access Point Name'. Molimo Vas da ponovite slanje.",
"errorCode": 7,
"errorCodeDescription": "EBMS_0005",
"errorDetail": "Error dispatching message to https://prod.as4.eposlovanje.hr/services/msh",
"role": 0,
"roleDescription": "Slanje",
"timestamp": "2026-01-22T08:44:19",
"recipientAccessPoint": "Recipient Access Point Name",
"recipientFriendlyName": "Recipient Access Point Name",
"ElectronicId": 1212121212
}
]
}
– Koristi se samo ako primatelj ne postoji u AMS-u.
– Isti dokument poslan putem SEND metode može se poslati u eReporting u JSON-escaped formatu.
– Status za eReporting može se dohvatiti putem FISCALIZATION STATUS-a.
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/api/fiscalization/eReporting
Demo – POST https://demo.moj-eracun.hr/api/fiscalization/eReporting
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"File": {
"description": "JSON escaped XML",
"type": "string",
"mandatory": true
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "22222222222",
"CompanyBU": null,
"File": "<?xml version="1.0" ...>"
}
{
"ElectronicId": 394167,
"DocumentNr": "20156256",
"DocumentTypeId": 1,
"DocumentTypeName": "Račun",
"StatusId": 20,
"StatusName": "In validation",
"RecipientBusinessNumber": "99999999999",
"RecipientBusinessUnit": "",
"RecipientBusinessName": "Test d.o.o.",
"Created": "2016-04-18T08:23:08.5879877+02:00",
"Sent": "2016-04-18T08:23:09.6730491+02:00",
"Modified": "2016-04-18T08:23:09.6840519+02:00",
"Delivered": null
}
– Provjerava da li je zadani identifikator registriran u AMS sustavu.
– Ako je identifikator pronađen, API vraća status 200 OK.
– Ako identifikator nije pronađen ili dođe do pogreške, vraća se status 400/500.
– Ovaj se endpoint obično koristi za provjeru registracije primatelja prije slanja dokumenata, ali to nije nužno zbog uključene postavke automatskog eIzvještavanja.
Header: “content-type:application/json; charset:utf-8”
POST https://www.moj-eracun.hr/api/mps/check
{
"Username": {
"description": "Sender Username",
"type": "string",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"IdentifierType": {
"description": "For possible values of identifier type, check below",
"type": "string",
"mandatory": true
},
"IdentifierValue": {
"description": "Identifier under which the organization is registered in AMS",
"type": "string",
"mandatory": true
}
}
{
"Username": "user@mail.com",
"Password": "mystrongpass",
"CompanyId": "22222222222",
"CompanyBU": null,
"SoftwareId": "software-123",
"IdentifierType": "0",
"IdentifierValue": "99999999999"
}
200 OK Tijelo odgovora se ne vraća kada je identifikator registriran.
{
"traceId": "b5feb4c7-5c58-49a9-84fe-891f4f76e659",
"message": "Some error message"
}
– Koriste ga ERP sustavi kako bi obavijestili Moj-eRačun da je dokument uspješno uvezen.
– Ovaj endpoint ne mijenja status ni sadržaj dokumenta.
– Namijenjen je sprječavanju dvostrukog uvoza i poboljšanju sljedivosti.
– Korištenje ovog endpointa je opcionalno.
Header: “content-type:application/json; charset:utf-8”
POST https://www.moj-eracun.hr/apis/v2/notifyimport/{DocumentId}
Example https://www.moj-eracun.hr/apis/v2/notifyimport/189919
{
"Username": {
"description": "Receiver Username",
"type": "integer",
"mandatory": true
},
"Password": {
"description": "Receiver Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Receiver Company Id (OIB)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Receiver software Id",
"type": "string",
"mandatory": true
}
}
{
"Username": 1083,
"Password": "test123",
"CompanyId": "99999999999",
"CompanyBu": "",
"SoftwareId": "software-123"
}
– Omogućuje pretraživanje klasifikacijskih podataka prema specifičnoj šifri ili prema opisnoj ključnoj riječi.
– Pretraživanje se može izvršiti korištenjem pune ili djelomične klasifikacijske šifre (npr. 01.45).
– Pretraživanje se također može izvršiti korištenjem ključne riječi (npr. ovce).
Autentikacija:
– Svi zahtjevi moraju uključivati X-API-KEY zaglavlje.
– Kontaktirajte Moj-eRačun podršku kako biste zatražili API ključ.
Request parameters:
– searchString – value used for searching (code or keyword)
GET https://www.moj-eracun.hr/api/Fiscalization/GetKpdData?searchString=01.45.1
Header:
X-API-KEY: <your-api-key>
{
"status": "success",
"results": [
{
"code": "01.45.1",
"name": "Ovce i koze, žive"
},
{
"code": "01.45.11",
"name": "Ovce, žive"
},
{
"code": "01.45.12",
"name": "Koze, žive"
}
]
}
GET https://www.moj-eracun.hr/api/Fiscalization/GetKpdData?searchString=ovce
Header:
X-API-KEY: <your-api-key>
[
{
"code": "01.45",
"name": "Ovce i koze, žive; sirovo ovčje i kozje mlijeko i šišana ovčja i kozja vuna"
},
{
"code": "01.45.1",
"name": "Ovce i koze, žive"
},
{
"code": "01.45.11",
"name": "Ovce, žive"
}
]
Za korištenje API metoda u nastavku potrebno je potpisati NDA (Ugovor o povjerljivosti) koji možete zatražiti od odjela podrške za integracije. Ugovor potpisuje tvrtka održavatelj programskog rješenja. Za pojedine API metode potrebno je imati aktiviranu uslugu mer BI.
– Potrebno je aktivirati mer BI uslugu za korištenje API-a
– Status blokade: Prikazuje informaciju o tome da li je poslovni subjekt trenutno blokiran ili je bio blokiran u zadnjih 180 dana.
– Vlasnička struktura: Vraća popis ovlaštenih zastupnika, osnivača tvrtke te članova nadzornog odbora.
– Financijski podaci (GFI): Prikazuje višegodišnje povijesne podatke o prihodima, rashodima, dobiti, broju zaposlenih, kreditnom rejtingu te prosječnom vremenu plaćanja.
– Pretraživanje subjekta vrši se prema OIB-u (OibToQuery).
– Služi za Business Intelligence provjeru poslovnih partnera i procjenu rizika poslovanja.
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/apis/v2/GetSubjectBIDetails
{
"Username": {
"description": "Sender Username",
"type": "integer",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"OibToQuery": {
"description": "Company ID (OIB) of a customer",
"type": "string",
"mandatory": true
}
}
{
"Username": 1083,
"Password": "test123",
"CompanyId": "99999999927",
"SoftwareId": "Test-001",
"OibToQuery": "99999999927"
}
Success Response Example
{
"Data": {
"OIB": "99999999927",
"CompanyShortName": "Test d.o.o.",
"IsBlocked": false,
"BlockedOn": null,
"WasBlockedInLast180Days": false,
"SubjectFullDetailsOwnersStructure": {
"CompanyAuthorizedRepresentatives": [
{
"OIB": "99999997799",
"Name": "Pero Maric",
"Function": "direktor"
}
],
"CompanyFoundingMembers": [
{
"OIB": "99999997799",
"Name": "Pero Maric",
"Function": "jedini osnivač d.o.o."
}
],
"CompanySupervisoryBoard": []
},
"SubjectFullDetailsGFIItems": [
{
"Year": 2017,
"TotalIncome": 321,
"TotalExpense": 321,
"TotalProfit": 321,
"EBITDAMargin": 0.1913584,
"AverageNumberOfEmployees": 11,
"IncomePerEmployee": 321.55,
"AverageNetSalary": 123.235,
"LongTermBusinessRating": "A",
"VendorPaymentTime": 123
},
{
"Year": 2018,
"TotalIncome": 1,
"TotalExpense": 1,
"TotalProfit": 1,
"EBITDAMargin": 0.095269352,
"AverageNumberOfEmployees": 11,
"IncomePerEmployee": 1.64,
"AverageNetSalary": 1.689,
"LongTermBusinessRating": "D",
"VendorPaymentTime": 2
},
{
"Year": 2019,
"TotalIncome": 1,
"TotalExpense": 1,
"TotalProfit": 1,
"EBITDAMargin": 0.18612383,
"AverageNumberOfEmployees": 1,
"IncomePerEmployee": 21.82,
"AverageNetSalary": 2.098,
"LongTermBusinessRating": "CCC-",
"VendorPaymentTime": 1
}
]
},
"Message": "Success",
"Success": true
}
Error Response Example
{
"Error": "Error",
"Message": "Greška servera",
"Success": false
}
– Potrebno je aktivirati mer BI uslugu za korištenje API-a
– Status blokade: Ova API metoda koristi se isključivo za provjeru da li je poslovni subjekt (kupac) trenutno blokiran.
– Pretraživanje subjekta vrši se prema OIB-u (OibToQuery).
– Vraća točan datum zadnje provjere/informacije (InformationDate).
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/apis/v2/isSubjectBlocked
{
"Username": {
"description": "Sender Username",
"type": "integer",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"OibToQuery": {
"description": "Company ID (OIB) of a customer",
"type": "string",
"mandatory": true
}
}
{
"Username": 1083,
"Password": "test123",
"CompanyId": "99999999999",
"SoftwareId": "Test-001",
"OibToQuery": "99999999999"
}
Success Response Example
{
"ResponseType": "SubjectBlockedResponse",
"ResponseContent": {
"Oib": "99999999999",
"Blocked": false,
"InformationDate": "2020-10-07T00:00:00"
}
}
Error Response Example
{
"ResponseType": "ErrorResponse",
"ResponseContent": {
"Code": 0,
"Message": "Blockade info on subject with OIB 99999999999 can't be retrieved. Service response: {\"type\":\"https://tools.ietf.org/html/rfc7231#section-6.5.4\",\"title\":\"Not Found\",\"status\":404,\"traceId\":\"|f915b6f2-4dfa5fe24d129990.\"}"
}
}
– Opće informacije: Ova API metoda koristi se za dohvaćanje osnovnih informacija o poslovnom subjektu.
– Vraća podatke kao što su naziv tvrtke, adresa, grad, kontakt e-mail adrese.
– Dodatne informacije: Prikazuje da li je subjekt registriran kao primatelj eRačuna (IsReceiver) te radi li se o javnom naručitelju (IsPublicEntity).
– Pretraživanje subjekta vrši se prema OIB-u (SubjectVatNumber).
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/apis/v2/GetSubjectGeneralInformation
{
"Username": {
"description": "Sender Username",
"type": "integer",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"SubjectVatNumber": {
"description": "Company ID (VatNumber,OIB)",
"type": "string",
"mandatory": true
}
}
{
"Username": 1083,
"Password": "test123",
"CompanyId": "99999999999",
"SoftwareId": "Test-001",
"SubjectVatNumber": "99999999999"
}
Success Response Example
{
"ResponseType": "SubjectGeneralInformation",
"ResponseContent": {
"VatNumber": "99999999999",
"Name": "Test d.o.o.",
"Address": "Ulica Test 8",
"City": "10000 Zagreb",
"Email": "mail@mail.com;mail2@mail.com",
"IsReceiver": true,
"IsPublicEntity": false
}
}
Error Response Example
{
"ResponseType": "ErrorResponse",
"ResponseContent": {
"Code": 0,
"Message": "Subject with VatNumber (OIB): 99999999999 does not exists!"
}
}
– Status primatelja: Ova API metoda koristi se za provjeru da li je poslovni subjekt registriran kao primatelj na servisu moj-eracun.hr.
– Vraća podatke o kontakt e-mail adresama (više adresa odvojeno je znakom ‘;’) i logičke (bool) vrijednosti koje označavaju da li je subjekt primatelj (IsReceiver) te je li javni naručitelj (IsPublicEntity).
– Poslovne jedinice: Vraća popis poslovnih jedinica subjekta (BusinessUnits) zajedno s pripadajućim nazivom, ID-jem i adresom.
– Pretraživanje subjekta vrši se prema OIB-u (SubjectVatNumber).
Header: “content-type:application/json; charset:utf-8”
Live – POST https://www.moj-eracun.hr/apis/v2/GetSubjectReceivingInformation
{
"Username": {
"description": "Sender Username",
"type": "integer",
"mandatory": true
},
"Password": {
"description": "Sender Password",
"type": "string",
"mandatory": true
},
"CompanyId": {
"description": "Sender Company Id (Oib)",
"type": "string",
"mandatory": true
},
"CompanyBu": {
"description": "Sender Business Unit (PJ)",
"type": "string",
"mandatory": false
},
"SoftwareId": {
"description": "Business Software (Erp) Id",
"type": "string",
"mandatory": true
},
"SubjectVatNumber": {
"description": "Company ID (VatNumber,OIB)",
"type": "string",
"mandatory": true
}
}
{
"Username": 1083,
"Password": "test123",
"CompanyId": "99999999999",
"SoftwareId": "Test-001",
"SubjectVatNumber": "99999999999"
}
Success Response Example
{
"ResponseType": "SubjectReceivingInformation",
"ResponseContent": {
"Email": "mail@mail.com;mail2@mail.com",
"IsReceiver": true,
"IsPublicEntity": false,
"BusinessUnits": [
{
"Name": "odjel 1",
"BusinessUnitId": null,
"Address": "Ulica 13, Zagreb"
},
{
"Name": "odjel 2",
"BusinessUnitId": null,
"Address": "Ulica 13, Zagreb"
},
{
"Name": "odjel 3",
"BusinessUnitId": "3851111111111",
"Address": "Ulica 13, Zagreb"
},
{
"Name": "odjel 4",
"BusinessUnitId": null,
"Address": "Ulica 13, Zagreb"
},
{
"Name": "racunovodstvo",
"BusinessUnitId": "3855123456789",
"Address": "Ulica 13, Zagreb"
}
]
}
}
Error Response Example
{
"ResponseType": "ErrorResponse",
"ResponseContent": {
"Code": 0,
"Message": "Subject with VatNumber (OIB): 99999999929 does not exists!"
}
}