The site content, as described in the API V2 Integrators Manual, outlines the functionalities of an API for managing electronic documents, primarily focusing on e-invoicing. The API, referred to as “MER service” in the context of sending documents, enables integrators to perform a variety of operations related to electronic document exchange and status tracking.
User (ERP system integrator or end user) who will use API for communicating with MER will identify through 5 fields:
API V1 (depreciated)
Id – User credential username
Pass – User credential password
Oib – Sender CompanyID
PJ – Sender Company Business Unit
SoftwareID – ERP identifier provided by MER
API V2 (current version)
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.
Key features and functionalities provided by the API include:
Electronic Document Management
Document Status and Process Tracking
Document-Related Actions
Fiscalization-Related API methods
The APIs uses POST requests for most operations with JSON as the content type for requests. Error responses are provided to help users understand issues like invalid credentials, company not being registered, or incorrect parameters.
Checks if service is up.
Ping Example
Ping Response
{
“Status“: “ok”,
“Message“: “Service is up”
}
Send electronic document to a recipient.
Send action will upload document to MER server, validate, digitally sign and timestamp document and then send notification emails to customers or send it into the system of another information provider / access point. This method processes documents asyncronous. That means that first response for successfuly processed document on MER is Status 20 after you need to implement APIs QueryOutbox or Fiscalization/Status to get the status of your sent document.
Send Parameters
{
“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”,
“required“: true
}
}
Send Example Request
{
“Username“: “test@moj-eracun.hr”,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“CompanyBu“: “”,
“SoftwareId“: “Test-001”,
“File“: “<?xml version=\”1.0\” encoding=\”UTF-8\”?><OutgoingInvoicesData>…</OutgoingInvoicesData></?xml>”
}
Send Example response
{
“ElectronicId“: 394167,
“DocumentNr“: “20156256”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 30,
“StatusName“: “Sent”,
“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
}
Error examples can be found in on a site https://manual.moj-eracun.hr/documentation/api-specification/error-codes/
Status description. Query methods are refered as basic MER document statuses. When receiving response from query methods, you will get croatian names of statuses (U obradi, Poslan, Preuzet, Povučeno preuzimanje, Neuspjelo).
Query inbox is used to discover new documents sent to your company or business unit. For this method, the API returns 10.000 results.
Query Inbox Parameters
{
“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
},
“Filter“: {
“value“: “‘Undelivered’ | Undelivered filters status 30-Sent”,
“type“: “string”,
“mandatory“: false
},
“ElectronicId“: {
“description“: “Filters single document”,
“type“: “int”,
“mandatory“: false
},
“StatusId“: {
“description“: “Filters status. Valid options 30-Sent or 40-Delivered”,
“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
}
}
Query Inbox Example
Query outbox is used to monitor sent documents statuses.
Request:
{
“Username“: “test@moj-eracun.hr“,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“SoftwareId“: “Test-001”,
“StatusId“: “30”
}
Response:
{
“ElectronicId“: 394162,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 30,
“StatusName“: “Poslan”,
“SenderBusinessNumber“: “99999999927”,
“SenderBusinessUnit“: “”,
“SenderBusinessName“: “Test Klising d.o.o.”,
“Updated“: “2016-04-18T08:13:03.177”,
“Sent“: “2016-04-18T08:13:03.177”,
“Delivered“: null
“Imported“: false
},
{
“ElectronicId“: 394163,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 40,
“StatusName“: “Preuzet”,
“SenderBusinessNumber“: “99999999927”,
“SenderBusinessUnit“: “”,
“SenderBusinessName“: “Test Klising d.o.o.”,
“Updated“: “2016-04-18T08:17:22.937”,
“Sent“: “2016-04-18T08:17:22.937”,
“Delivered“: “2016-04-19T08:17:00”,
“Imported“: true
},
{
“ElectronicId“: 394166,
“DocumentNr“: “20156256”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Invoice”,
“StatusId“: 30,
“StatusName“: “Sent”,
“SenderBusinessNumber“: “99999999927”,
“SenderBusinessUnit“: “”,
“SenderBusinessName“: “Test Klising d.o.o.”,
“Updated“: “2016-04-18T08:17:22.937”,
“Sent“: “2016-04-18T08:18:47.33”,
“Delivered“: null
“Imported“: false
}
]
Error examples can be found in on a site https://manual.moj-eracun.hr/documentation/api-specification/error-codes/
Query outbox is used to check the statuses of your sent documents. For this method, the API returns 10.000 results.
Query Outbox Parameters
{
“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. Valid options 20, 30, 40, 45, 50”,
“type“: “int”,
“mandatory“: false
},
“InvoiceYear“: {
“description“: “Filters documents based on the year in which an invoice was sent”,
“type“: “int”,
“mandatory“: false
},
“InvoiceNumber“: {
“description“: “Filters single document based on its 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
}
}
Query Outbox Example
Request:
{
“Username“: “test@moj-eracun.hr“,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“SoftwareId“: “Test-001”,
“From“: “2014-09-01T00:00:00”,
“To“: “2014-10-01T00:00:00”
}
Response:
{
“ElectronicId“: 394162,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 30,
“StatusName“: “Poslan”,
“RecipientBusinessNumber“: “99999999927”,
“RecipientBusinessUnit“: “”,
“RecipientBusinessName“: “Test Klising d.o.o.”,
“Created“: “2016-04-18T08:13:03.177”,
“Updated“: “2016-04-18T08:13:03.177”,
“Sent“: “2016-04-18T08:13:03.177”,
“Delivered“: null
“Issued“: “2016-04-18T00:00:00”,
“Imported“: false,
},
{
“ElectronicId“: 394163,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 30,
“StatusName“: “Preuzet”,
“RecipientBusinessNumber“: “99999999927”,
“RecipientBusinessUnit“: “”,
“RecipientBusinessName“: “Test Klising d.o.o.”,
“Created“: “2016-04-18T08:13:03.177”,
“Updated“: “2016-04-18T08:13:03.177”,
“Sent“: “2016-04-18T08:13:03.177”,
“Delivered“: “2016-04-19T08:00:04”,
“Issued“: “2016-04-18T00:00:00”,
“Imported“: true,
},
{
“ElectronicId“: 394166,
“DocumentNr“: “20156256”,
“DocumentTypeId“: 381,
“DocumentTypeName“: “Odobrenje”,
“StatusId“: 30,
“StatusName“: “Sent”,
“RecipientBusinessNumber“: “99999999927”,
“RecipientBusinessUnit“: “”,
“RecipientBusinessName“: “Test Klising d.o.o.”,
“Created“: “2016-04-18T08:13:03.177”,
“Updated“: “2016-04-18T08:13:03.177”,
“Sent“: “2016-04-18T08:13:03.177”,
“Delivered“: null
“Issued“: “2016-04-18T00:00:00”,
“Imported“: false,
}
]
Receive method is used for downloading documents. Both sent and incoming, eg. Inbox and Outbox documents.
You have an option to download your sent to MER which are digitaly signed documents for the purpose of archiving them locally.
NOTE: If costumer that is the sender or the recipient of the document haven’t signed automated archiving with MER, documents can be downloaded 60 days in the past from the send date. After that point, in case you try to download document which is archived, you wil get an error message and is no longer accessible via API.
Receive Parameters
{
“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
}
}
Receive Document Example
Following examples show how to POST a receive request using all possible values for CompanyBu parameter.
Example with no Business Unit:
{
“Username“: “test@moj-eracun.hr“,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“SoftwareId“: “Test-001”,
“ElectronicId“: “123456”
}
Example with GLN Code:
{
“Username“: “test@moj-eracun.hr”,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“CompanyBu“: “3855500180014”,
“SoftwareId“: “Test-001”,
“ElectronicId“: “123456”
}
Example with the name of the Business Unit:
{
“Username“: “test@moj-eracun.hr”,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“CompanyBu“: “Poslovnica 1”,
“SoftwareId“: “Test-001”,
“ElectronicId“: “123456”
}
Receive response document
Receive document response contains whole XML document containing electronic document. Inside you will always find PDF of the electronic document which is base64 encoded and embedded into EmbeddedDocumentBinaryObject.
To be able to read and transform PDF, you need to decode base64 of a document together with other attachment if they are present in XML of the electronic document.
Error examples can be found in on a site https://manual.moj-eracun.hr/documentation/api-specification/error-codes/
Document process status codes are used to update status of document after it has been downloaded or received in the system of the another information provider / access points. They are also referred as business document statuses.
Status description
Document process status is used to update the status of the recipients process of an incoming document.
Statuses 4 (RECEIVING_CONFIRMED) and 99 (RECEIVED) can’t be modified via API. Main reason why this isn’t possible is that changes in these statuses must be monitored by the service provider.
In response to QueryDocumentProcessStatuses, you will get names of the basic MER statuses as well DocumentProcessStatusNames written in Croatian.
Update Document Process Status Parameters
{
“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 a document for which you want to update the status”,
“type“: “int”,
“mandatory“: true
},
“StatusId“: {
“description“: “Defines status. Valid options 0, 1, 2, 3”,
“type“: “int”,
“mandatory“: true
},
“RejectReason“: {
“description“: “If a document is rejected, one must send the reason why it was rejected”,
“type“: “string”,
“mandatory“: false
}
}
Document Process Status Example
{
“Username“: “test@moj-eracun.hr“,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“SoftwareId“: “Test-001”,
“ElectronicId“: 4439122,
“StatusId“: 0
}
Response Example
{
“ElectronicId“: 4439122,
“DokumentProcessStatus“: 0,
“UpdateDate“: “2019-04-04T19:05:04.3818381+02:00”
}
Error examples can be found in on a site https://manual.moj-eracun.hr/documentation/api-specification/error-codes/
Query inbox is used to discover new documents sent to your company or business unit. For this method, the API returns 20.000 results.
Query document process Status inbox parametars
{
“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“: “Filters single document”,
“type“: “int”,
“mandatory“: false
},
“StatusId“: {
“description“: “Filters status. Valid options 0, 1, 2, 3”,
“type“: “int”,
“mandatory“: false
},
“InvoiceYear“: {
“description“: “Filters documents based on the year in which an invoice was sent”,
“type“: “int”,
“mandatory“: false
},
“InvoiceNumber“: {
“description“: “Filters single document based on its 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“: “Filters documents based on their update
date rather than the date when they were sent”,
“type“: “bool”,
“mandatory“: false
}
}
Example
{
“Username“: “test@moj-eracun.hr“,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“SoftwareId“: “Test-001”,
“From“: “2014-09-01T00:00:00”,
“To“: “2014-10-01T00:00:00”
}
Response Example
[
{
“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
},
{
“ElectronicId“: 394163,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 40,
“StatusName“: “Dostavljeno”,
“SenderBusinessNumber“: “99999999927”,
“SenderBusinessUnit“: “”,
“SenderBusinessName“: “Test Klising d.o.o.”,
“Sent“: “2018-04-18T08:17:22.937”,
“Delivered“: “2018-04-19T18:03:27.457”,
“IssueDate“: “2016-04-18T00:00:00”,
“DocumentProcessStatusId“: 0,
“DocumentProcessStatusName“: “Prihvaćeno”
“AdditionalDokumentStatusId“: null
“RejectReason“: null
},
{
“ElectronicId“: 394166,
“DocumentNr“: “20156256”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 40,
“StatusName“: “Dostavljeno”,
“SenderBusinessNumber“: “99999999927”,
“SenderBusinessUnit“: “”,
“SenderBusinessName“: “Test Klising d.o.o.”,
“Sent“: “2016-04-18T08:18:47.33”,
“Delivered“: “2018-04-18T09:38:33.47”,
“IssueDate“: “2016-04-18T08:13:03.177”,
“DocumentProcessStatusId“: 2,
“DocumentProcessStatusName“: “Plaćeno u potpunosti”
“AdditionalDokumentStatusId“: null
“RejectReason“: null
}
]
Error examples can be found in on a site https://manual.moj-eracun.hr/documentation/api-specification/error-codes/
Query outbox is used to discover the statuses of your sent documents. For this method, the API returns 20.000 results.
Query Document process status Outbox parameters
{
“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. Valid options 0, 1, 2, 3”,
“type“: “int”,
“mandatory“: false
},
“InvoiceYear“: {
“description“: “Filters documents based on the year in which an invoice was sent”,
“type“: “int”,
“mandatory“: false
},
“InvoiceNumber“: {
“description“: “Filters single document based on its 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“: “Filters documents based on their update date
rather than the date when they were sent”,
“type“: “bool”,
“mandatory“: false
}
}
Example
{
“Username“: “test@moj-eracun.hr“,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“SoftwareId“: “Test-001”,
“From“: “2014-09-01T00:00:00”,
“To“: “2014-10-01T00:00:00”
}
Response Example
[{
“ElectronicId“: 394162,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 30,
“StatusName“: “Poslano”,
“IssueDate“: “2016-04-18T08:13:03.177”,
“ReceiverBusinessNumber“: “99999999927”,
“ReceiverBusinessUnit“: “”,
“ReceiverBusinessName“: “Test Klising d.o.o.”,
“Created“: “2016-04-18T08:13:03.177”,
“Updated“: “2016-04-18T08:13:03.177”,
“IssueDate“: “2016-04-18T08:13:03.177”,
“Sent“: “2016-04-18T08:13:03.177”,
“Delivered“: null,
“DocumentProcessStatusId“: 99,
“DocumentProcessStatusName“: “Zaprimljen”
“AdditionalDokumentStatusId“: null,
“RejectReason“: null
},
{
“ElectronicId“: 394163,
“DocumentNr“: “3-1-1”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 40,
“StatusName“: “Preuzet”,
“ReceiverBusinessNumber“: “99999999927”,
“ReceiverBusinessUnit“: “”,
“ReceiverBusinessName“: “Test Klising d.o.o.”,
“Created“: “2016-04-18T08:13:03.177”,
“Updated“: “2016-04-18T08:13:03.177”,
“IssueDate“: “2016-04-18T08:13:03.177”,
“Sent“: “2018-04-18T08:17:22.937”,
“Delivered“: “2018-04-19T18:03:27.457”,
“DocumentProcessStatusId“: 0,
“DocumentProcessStatusName“: “Prihvaćen”
“AdditionalDokumentStatusId“: null,
“RejectReason“: null
},
{
“ElectronicId“: 394166,
“DocumentNr“: “20156256”,
“DocumentTypeId“: 1,
“DocumentTypeName“: “Račun”,
“StatusId“: 40,
“StatusName“: “Dostavljen”,
“ReceiverBusinessNumber“: “99999999927”,
“ReceiverBusinessUnit“: “”,
“ReceiverBusinessName“: “Test Klising d.o.o.”,
“Created“: “2016-04-18T08:13:03.177”,
“Updated“: “2016-04-18T08:13:03.177”,
“IssueDate“: “2016-04-18T08:13:03.177”,
“Sent“: “2016-04-18T08:18:47.33”,
“IssueDate“: “2016-04-18T08:13:03.177”,
“Delivered“: “2018-04-18T09:38:33.47”,
“DocumentProcessStatusId“: 2,
“DocumentProcessStatusName“: “Plaćeno u potpunosti”
“AdditionalDokumentStatusId“: null,
“RejectReason“: null
}
]
Error examples can be found in on a site https://manual.moj-eracun.hr/documentation/api-specification/error-codes/
Notify import method is used for sending an information that an invoice is imported into an ERP. You can use it to update which document you have successfully imported and to make procedure for importing only documents that you previously didn’t download and import. For that purpose, you can use queryInbox response with parametar Imported to get ElectronicID list of only those you still haven’t download and import.
NotifyImport Parametars
{
“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“: “Receiver software Id”,
“type“: “string”,
“mandatory“: true
}
}
NotifyImport Example
{
“Username“: “test@moj-eracun.hr“,
“Password“: “test123”,
“CompanyId“: “99999999927”,
“CompanyBu“: “”,
“SoftwareId“: “Test-001”
}
Response
{
“Status“: “ok”,
}
Error examples can be found in on a site https://manual.moj-eracun.hr/documentation/api-specification/error-codes/
Methods for sending payment information for sent documents.
There are two options to use, based on the information if sent electronic document is sent via MER and you have ElectronicID of the sent document.
MarkPaid – when you have ElectronicID of the sent document
MarkPaidwithoutElectronicID – when you don’t have ElectronicID of the sent document
MarkPaid parameters
{
“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
},
“PaymentDate“: {
“description“: “Payment date”,
“type“: “date”,
“mandatory“: true
},
“PaymentAmount“: {
“description“: “Payment amount”,
“type“: “decimal”,
“mandatory“: true
},
“PaymentMethod“: {
“description“: “Payment method, see list 5.1 bellow”,
“type“: “string”,
“mandatory“: true
}
Example of response:
Success ( 200 OK)
Error ( 4xx / 5xx Not OK )
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “: ” Some error message “,
}
Endpoint: POST /api/fiscalization/markPaidWithoutElectronicID
Header: contentType=”application/json; charset=utf-8″
MarkPaidWithoutElectronicID parameters
{
“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
},
“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“: “Payment method, see list 5.1 bellow”,
“type“: “string”,
“mandatory“: true
}
Response:
Success ( 200 OK)
Error ( 4xx / 5xx Not OK )
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “: ” Some error message “,
}
5.1 PaymentMethod
Value – HR Description
”T” – Transakcijski racun
”O” – Obracunsko placanje
”Z” – Ostalo
(Update 2025-09-24)
Methods for sending information regarding rejection for received electronic documents.
There are two options to use, based on the information if electronic document was received via MER and you have ElectronicID of the e-document.
Reject– when you have ElectronicID of the received electronic document
RejectwithoutElectronicID – when you don’t have ElectronicID of the sent electronic document
Endpoint: POST /api/fiscalization/reject
Header: contentType=”application/json; charset=utf-8″
Request example
{
“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
}
Response example
Success ( 200 OK)
{
” isSuccess “: true ,
” fiscalizationTimestamp “: “2025-06-15T14:30:25Z”,
” encodedXml “: “PD94 bWwgdmVyc 2 lvbj 0iMS4 wIiB …”
}
Error ( 4xx / 5xx Not OK )
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “: ” Some error message “,
}
Endpoint: POST /api/fiscalization/rejectWithoutElectronicID
Header: contentType=”application/json; charset=utf-8″
Request example:
{
“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
},
“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“: “Type of rejection, see table 5.2.“,
“type“: “string”,
“mandatory“: true
},
“RejectionReasonDescription“: {
“description“: “Text description with rejection note“,
“type“: “string”,
“mandatory“: true
}
5.2 RejectionReasonType
Value Description
”N” Data discrepancy that does not affect tax calculation
”U” Data discrepancy that affects tax calculation
”O” Other
Report operation is only used in case of unsuccessful fiscalization using API method SEND. When sending document gets rejected from SEND method, you need to create API request for sending electronic document to eReporting system of Tax Authority via MER service. After you got success response from sending document to this API, you have an option do deliver document to the customer in any format and send option (paper, PDF as an attachment to an email)
Endpoint: POST /api/fiscalization/eReporting
Header: contentType=”application/json; charset=utf-8″
Request example:
{
“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
},
“xmlInvoice“: {
“description“: “JSON escaped XML”,
“type“: “string”,
“mandatory“: true
},
“DeliveryDate“: {
“description“: “Issue date of the document from XML file
(not date of sending the document to MER) “,
“type“: “date”,
“mandatory“: true
},
“IsCopy“: {
“description“: “Information is the document a copy or the original”,
“type“: “boolean”,
“mandatory“: true
},
“InvoiceType“: {
“description“: “For possible types of invoices, check table 5.3 bellow”,
“type“: “string”,
“mandatory“: true
}
Response:
Success ( 200 OK)
{
” isSuccess “: true ,
” reportingTimestamp “: “2025-06-15T14:30:25Z”,
” encodedXml “: “PD94 bWwgdmVyc 2 lvbj 0iMS4 wIiB …”
}
Error ( 4xx / 5xx Not OK )
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “: ” Some error message “,
}
5.3 InvoiceType
Value Description
”U” An incoming invoice
”I” An outgoing invoice
”IR” An outgoing invoice for which an eInvoice was not issued
This endpoint checks if a given identifier is registered in the AMS system and returns its
registration status. If the identifier is found, it returns a 200 OK status; otherwise, it returns an appropriate error status.
POST /api/ mps/ check
Header: contentType=”application/json; charset=utf-8″
Response statuses:
200 OK — The identifier is registered in the system.
4xx / 5xx NOT OK — Error occurred (e.g., identifier not found, invalid input, server error).
Request example :
{
“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
},
“IdentifierType“: {
“description“: “For possible values of identifier type, check table 5.4 bellow”,
“type“: “string”,
“mandatory“: true
},
“Identifiervalue“: {
“description“: “Identifier which have organization registered in AMS“,
“type“: “string”,
“mandatory“: true
}
Response:
Success ( 200 OK)
{
//no data
}
Error ( 4xx / 5xx Not OK )
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “: ” Some error message “,
}
5.4 IdentifierType
Value – Description
0 – OIB – Croatian personal identification number
1 – GLN Global Location Number
This endpoint retrieves the fiscalization status of a document using its ElectronicId and MessageType.
Response statuses:
200 OK — Fiscalization status retrieved successfully.
4xx / 5xx NOT OK — Error occurred (e.g., fiscalization status not found, invalid input, server error).
Request example:
POST /api/ fiscalization / status
Header: contentType=”application/json; charset=utf-8″
{
“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“: true
},
“MessageType“: {
“description“: “For possible value of message type, check table 5.5 bellow”,
“type“: “string”,
“mandatory“: true
}
Response example:
Success ( 200 OK)
{
” isSuccess “: true ,
” fiscalizationTimestamp “: “2025-06-20T16:45:30Z”,
” encodedXml “: “PD94 bWwgdmVyc 2 lvbj 0iMS4 wIiB …”
}
Error ( 4xx / 5xx Not OK )
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “: ” Some error message “,
}
Error ( 401 Unauthorized )
Cases:
1. Invalid username or password
2. Invoice SENDER trying to get fiscalization status as RECIPIENT
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “ : ” Some error message “,
}
5.5 MessageType
Value – Description
0 – As SENDER get the status of the fiscalization message
1 – As RECIPIENT get the status of the fiscalization message
2 – Get the rejection status
3 – Get the payment status
This endpoint allows you to search classification data by either a specific code or a descriptive keyword.
Search by code — e.g., 01.45.
Search by keyword — e.g., ovce
Authentication
All requests must include the X-API-KEY header with a valid API key.
Send us email request to issue X-API-KEY and send it to you.
Header: X-API-KEY — required for authentication
Query Parameter: searchString — the value to search for
Example Requests
GET api / Fiscalization / GetKpdData ? searchString =01.45.1
X-API – KEY: <your -api -key >
Response
{
” 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 api / Fiscalization / GetKpdData ? searchString = ovce
X-API – KEY: <your -api -key >
Response
[
{
” 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”
}
]
Possible Errors
Error ( 4xx / 5xx Not OK )
{
” traceId “: “b5 feb4c7-5c58-49a9-84fe -891f4f76e659”,
” message “: ” Some error message “,
}