API Documentation (English)

API Documentation (English)


API OVERVIEW

Required request fields:

Username – Email or ID provided by MER

Password – Login password

CompanyId – Sender Identification Number (OIB or VATNr. if Sender is non-Croatian company)

CompanyBu – Sender Business Unit (only if it is registered in MER)

SoftwareID – ERP identifier provided by MER

All of these five data are interpreted as textual data. User may run multiple companies under the same account and vice-versa so “many-to-many” relationship should be considered. Business unit field should remain empty if user doesn’t require one or he doesn’t know what that is. Business unit can be described as a store, or dislocated area which one company owns or where it conducts some business activities.

PING

– Checks whether the service is up and running.
– Can be used for basic connectivity and availability checks.

REQUEST

GET https://www.moj-eracun.hr/apis/v2/Ping/

RESPONSE
{
  "Status": "ok",
  "Message": "Service is up"
}

SEND

– Uploads and submits an electronic invoice/document to the moj-eRačun platform.

– Performs validation and processing.

– After submission, the recipient immediately receives the document. Fiscalization starts afterwards, so both sender and recipient need to track fiscalization status to confirm success.

– Use QUERY INBOX/OUTBOX to check whether the document has been received.

REQUEST

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": "Test-002",
  "File": "<?xml version="1.0" encoding="UTF-8"?>..."
}
RESPONSE
{
  "ElectronicId": 394167,
  "DocumentNr": "20156256",
  "DocumentTypeId": 1,
  "DocumentTypeName": "Račun",
  "StatusId": 20,
  "StatusName": "Obrađen",
  "RecipientBusinessNumber": "99999999927",
  "RecipientBusinessUnit": "",
  "RecipientBusinessName": "Test Klising 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
}

RECEIVE

– Retrieves incoming documents/invoices from the platform.

– Only one document can be received with this API, using ElectronicID.

– Returns document in the XML format.

REQUEST

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": "99999999927",
  "SoftwareId": "Test-002",
  "ElectronicId": "123456"
}

QUERY OUTBOX / INBOX

Outbox: Lists all sent invoices/documents with status.

Inbox: Lists all received invoices/documents.

– Supports filtering by date, Electronic ID, or status.

– Returns a list (array) of documents.

– Tracking whether a document was successfully: sent, delivered ,received.

Does NOT include: Payment status, Rejection reasons, Business process state

REQUEST

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": "99999999927",
  "SoftwareId": "Test-002",
  "StatusId": "30"
}
RESPONSE
{
  "ElectronicId": 394167,
  "DocumentNr": "20156256",
  "DocumentTypeId": 1,
  "DocumentTypeName": "Račun",
  "StatusId": 20,
  "StatusName": "Obrađen",
  "RecipientBusinessNumber": "99999999927",
  "RecipientBusinessUnit": "",
  "RecipientBusinessName": "Test Klising d.o.o.",
  "Created": "2016-04-18T08:23:08.5879877+02:00",
  "Updated": "2016-04-18T08:23:08.5879877+02:00",
  "Sent": "2016-04-18T08:23:09.6730491+02:00",
  "Delivered": null,
  "Issued": "2016-01-12T00:00:00",
  "Imported": false
}
STATUS CODES
  • 20 – In Validation / U obradi: Document uploaded, pending validation.
  • 30 – Sent / Poslan: Document uploaded, signed, time-stamped; waiting for recipient to download.
  • 40 – Delivered / Preuzet: Recipient accepted and downloaded document.
  • 50 – Unsuccessful / Neuspjelo: Error occurred during processing or delivery.
  • 70 – eReporting: Invoice sent to eReporting; could not be delivered to recipient – sender must send PDF/physical copy separately to the recipient.

FISCALIZATION STATUS

– Retrieves the fiscalization status of invoices in Outbox or Inbox.

– Fiscalization status can be checked depending on whether you are the sender or recipient, using the appropriate messageType.

– Shows all fiscalization responses, because an invoice may be sent to fiscalization multiple times.

Channel type response indicates whether the invoice was fiscalized or eReported.

Success status indicates whether fiscalization/eReporting was successful.

– Can filter by success, to show only successful fiscalization messages after which no further attempts will occur.

– Fiscalization errors will be shown in the response message and in the Encoded XML.

– Useful to track MARK PAID and REJECT status, using the appropriate messageType.

REQUEST

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": "Test-002",
  "messageType": 1,
  "dateFrom": "2025-10-20",
  "dateTo": "2025-10-25",
  "ByUpdateDate": true,
  "electronicId": 11221122,
  "fiscalizationRequestId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "Success": 1
}
RESPONSE
[
  {
    "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"
    }
  }
]
MessageType
  • 0 – Retrieve fiscalization status as SENDER
  • 1 – Retrieve fiscalization status as RECEIVER
  • 2 – Retrieve rejection status
  • 3 – Retrieve payment status
  • 4 – Retrieve eReporting status
Status
  • 0 – Successful
  • 1 – Unsuccessful
  • 2 – Waiting
ChannelType
  • 0 – Fiscalization
  • 1 – eReporting
Error codes
  • None – Nema greške.
  • S001 – Sistemska greška prilikom obrade zahtjeva.
  • S002 – Lokacija potpisa nije ispravna.
  • S003 – Certifikat nije izdan od davatelja usluga s pouzdanog potpisa, ili je istekao ili je ukinut.
  • S004 – Neispravan potpis zahtjeva.
  • S005 – Poruka nije u skladu s XML shemom: element ili lista elemenata nisu ispravni prema shemi.
  • S006 – Pristupna točka nije ovlaštena za dostavu podataka.
  • S007 – OIB iz zahtjeva nije formalno ispravan.
  • S008 – Već postoji zabilježen eRačun s istim identifikatorom.
  • S009 – Ne postoji zabilježen eRačun.
  • S010 – Već postoji zabilježen status odbijanja eRačuna s istim identifikatorom.
  • S011 – Nepoznata greška.
  • S012 – Ne postoji evidentiran originalni eRačun za koji je dostavljen ispravljeni eRačun.

MARK PAID

– Used only by sender.

– Can be used with or without Electronic ID.

– After receiving payment for an invoice, sender notifies the tax authority via API that the invoice has been paid.

– Payment status can be checked via FISCALIZATION STATUS API.

Bulk processing behavior:

– A single bulk request can contain up to 100 invoices.

– If any invoice in the bulk request fails, the Tax Authority rejects the entire request and no invoices are marked as paid.

– The Tax Authority does not provide details about which invoice caused the bulk operation to fail.

REQUEST – with ElectronicId

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"
}
REQUEST – Bulk Mark Paid with ElectronicId Updated (18-12-2025)

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"
    }
  ]
}
REQUEST – without ElectronicID

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"
}
REQUEST – Bulk Mark Paid without ElectronicId Updated (18-12-2025)

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"
    }
  ]
}
RESPONSE
{
  "fiscalizationTimestamp": "2025-06-15T14:30:25Z",
  "encodedXml": "PD94bWwgdmVyc2lvbj0iMS4wIiB …",
  "fiscalizationRequestId": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}
PaymentMethod
  • “T” – Transaction account
  • “O” – Periodic payment
  • “Z” – Other

REJECT

– Used only by recipient.

– Can be used with or without Electronic ID.

– Recipient can reject an invoice/document and specify a reason.

– Rejection status can be checked via FISCALIZATION STATUS API.

Bulk processing behavior:

– A single bulk request can contain up to 100 invoices.

– If any invoice in the bulk request fails, the Tax Authority rejects the entire request and no invoices are rejected.

– The Tax Authority does not provide details about which invoice caused the bulk operation to fail.

REQUEST – with ElectronicID

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"
}
REQUEST – Bulk Reject with ElectronicId Updated (18-12-2025)

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"
    }
  ]
}
REQUEST – without ElectronicID

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
  }
}
REQUEST – Bulk Reject without ElectronicId Updated (18-12-2025)

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"
    }
  ]
}
RESPONSE
{
  "fiscalizationTimestamp": "2025-06-15T14:30:25Z",
  "encodedXml": "PD94bWwgdmVyc2lvbj0iMS4wIiB …",
  "fiscalizationRequestId": "d290f1ee-6c54-4b01-90e6-d701748f0851"
}
RejectionReasonType
  • “N” – Data discrepancy that does not affect tax calculation
  • “U” – Data discrepancy that affects tax calculation
  • “O” – Other

QUERY EXCHANGE ERROR DETAILS

NEW API (22-01-2026)

– Retrieves detailed AS4 exchange error messages when document exchange is performed between different access points.

– This API is intended to be used only for documents with status 50 (Unsuccessful).

– It returns technical and business-level error messages generated during AS4 message exchange.

– The API is queried using InternalMark (invoice number) and IssueDate, not ElectronicId.

– Using InternalMark allows retrieving exchange statuses and error details for all send attempts of the same invoice,
even when multiple ElectronicIds were generated due to repeated sending.

– This makes it possible to analyze the complete exchange history without querying each ElectronicId separately.

REQUEST

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"
}
RESPONSE
{
  "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
    }
  ]
}

eREPORTING

– Used only if the recipient does not exist in AMS.

– The same document sent via the SEND method can be sent to eReporting in JSON-escaped format.

– By default, automatic eReporting is enabled, so when a recipient is missing in AMS, the document is sent to eReporting automatically. In that case, no separate API call is needed.

– eReporting status can be retrieved via FISCALIZATION STATUS.

REQUEST

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" ...>"
}
RESPONSE
{
  "ElectronicId": 394167,
  "DocumentNr": "20156256",
  "DocumentTypeId": 1,
  "DocumentTypeName": "Račun",
  "StatusId": 20,
  "StatusName": "In validation",
  "RecipientBusinessNumber": "99999999927",
  "RecipientBusinessUnit": "",
  "RecipientBusinessName": "Test Klising 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
}


NOTE : MER will by default include feature of automatic eReporting. That means that when this feature is turned on, you won’t have to create request and send XML to eReporting API. Rather you will use only SEND API method and MER will check if customer is registered in AMS and based on response, proceed to generate fiscalization or eReporting message and send it to specific Tax Authority system. To be able to check is the document sent to eReporting or fiscalization, you will have to use API fiscalization/statusOutbox and read the value of channelType.

DOCUMENT PROCESS STATUS

– Tracking document lifecycle after delivery

– Checking whether a document is: paid, rejected, accepted and fiscalized

Update Document Process Status

– Used to update the recipient’s processing status of an incoming document.
– Only statuses 0, 1, 2, 3 can be set via API.

REQUEST

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
  }
}
{
  "Username": "test@moj-eracun.hr",
  "Password": "test123",
  "CompanyId": "99999999927",
  "SoftwareId": "Test-002",
  "ElectronicId": 4439122,
  "StatusId": 0
}
RESPONSE
{
  "ElectronicId": 4439122,
  "DokumentProcessStatus": 0,
  "UpdateDate": "2019-04-04T19:05:04.3818381+02:00"
}
Document Process Status Codes
  • 0 – APPROVED / Prihvaćen: Document is successfully approved by the recipient.
  • 1 – REJECTED / Odbijen: Document is rejected by the recipient.
  • 2 – PAYMENT_FULFILLED / Plaćeno u potpunosti: Document is fully paid.
  • 3 – PAYMENT_PARTIALLY_FULFILLED / Djelomično plaćeno: Document is partially paid.
  • 4 – RECEIVING_CONFIRMED / Potvrda zaprimanja: Document successfully downloaded by the recipient (read-only).
  • 99 – RECEIVED / Zaprimljen: Document received in recipient inbox (read-only).

Status codes 4 and 99 cannot be modified via API and are managed exclusively by the service provider.

Query Document Process Status – Inbox / Outbox

Returned information includes:

– All basic document identification data

– DocumentProcessStatus (e.g. Paid, Rejected)

– Rejection reason (if applicable)

– Additional document statuses

REQUEST

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
  },
  "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 by insert date",
    "type": "boolean",
    "mandatory": false
  }
}
{
  "username": "user@mail.com",
  "password": "mystrongpass",
  "companyId": "22222222222",
  "softwareId": "Test-002",
  "dateFrom": "2025-10-20",
  "dateTo": "2025-10-25",
  "byUpdateDate": true,
  "electronicId": 11221122
}
RESPONSE
{    
“ElectronicId“: 394162,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 30,
“StatusName“: “Poslano”,
“IssueDate“: “2016-04-18T08:13:03.177”,
“SenderBusinessNumber“: “99999999927”,
“SenderBusinessUnit“: “”,
“SenderBusinessName“: “Test Klising 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
}

CHECK IDENTIFIER

– Checks whether a given identifier is registered in the AMS system.
– If the identifier is found, the API returns a 200 OK status.
– If the identifier is not found or an error occurs, an appropriate 4xx or 5xx status is returned.
– This endpoint is typically used to verify recipient registration before sending documents but it is not necessary.

REQUEST

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": "Test-002",
  "identifierValue": "99999999927"
}
IDENTIFIER TYPE
  • 0 – OIB – Croatian personal identification number
  • 1 – GLN – Global location number
RESPONSE
200 OK

No response body is returned when the identifier is registered.
{
  "traceId": "b5feb4c7-5c58-49a9-84fe-891f4f76e659",
  "message": "Some error message"
}

NOTIFY IMPORT

– Used by ERP systems to notify Moj-eRačun that a document has been successfully imported.
– This endpoint does not change the document status or content.
– It is intended to prevent duplicate imports and to improve traceability.
– Usage of this endpoint is optional.

REQUEST

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": "Receiver GLN Code / Moj-eRačun Subject ID / Business Unit (PJ)",
    "type": "string",
    "mandatory": false
  },
  "SoftwareId": {
    "description": "Receiver software Id",
    "type": "string",
    "mandatory": true
  }
}
{
  "Username": 1083,
  "Password": "test123",
  "CompanyId": "99999999927",
  "CompanyBu": "",
  "SoftwareId": "Test-001"
}

SEARCH CLASSIFICATION

– Allows searching classification data by a specific code or by a descriptive keyword.
– Search can be performed using a full or partial classification code (e.g. 01.45).
– Search can also be performed using a keyword (e.g. ovce).

Authentication:
– All requests must include the X-API-KEY header.
– Contact Moj-eRačun support to request an API key.

Request parameters:
searchString – value used for searching (code or keyword)

REQUEST – Search by code

GET https://www.moj-eracun.hr/api/Fiscalization/GetKpdData?searchString=01.45.1

Header:
X-API-KEY: <your-api-key>

RESPONSE – Search by code
{
  "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"
    }
  ]
}
REQUEST – Search by keyword

GET https://www.moj-eracun.hr/api/Fiscalization/GetKpdData?searchString=ovce

Header:
X-API-KEY: <your-api-key>

RESPONSE – Search by keyword
[
  {
    "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"
  }
]

Newsletter subscription