Оди на содржината

Примен документ по идентификатор

GET
/api/integration/v1/inbound/{docUid}

Returns one inbound document by its identifier.

Примерот важи само за demo околината.

Request

curl -i -X GET "https://sandbox.api.earhiva.mk/api/integration/v1/inbound/<docUid>" \
  -H "X-Api-Key: <ВАШИОТ КЛУЧ>" \
  -H "X-Software-Id: <ИМЕ И ВЕРЗИЈА НА ВАШАТА АПЛИКАЦИЈА>"

Секој повик носи X-Api-Key со клуч што го има опфатот IntegrationApi, и X-Software-Id со името и верзијата на твојот софтвер. Како се бара клуч стои во Автентикација.

Parameters

Сите параметри (2)
ParameterInTypePresenceDescription
docUidpathstringalwaysIdentifier of the document, as it appears in the list.
X-Software-IdheaderstringalwaysIdentifier of the calling software, e.g. SSBFocus/4.2.1. Free text, recorded in the audit trail. Required on every call; missing means EARH-1008.

Error codes

EARH-1001 · EARH-1002 · EARH-1003 · EARH-1004 · EARH-1005 · EARH-1006 · EARH-1008 · EARH-1010 · EARH-1011 · EARH-3001

Целосниот список шифри, со што значат и што да се направи, е во Каталог на грешки.

The document, including ackedAt when it was acknowledged.

{
  "docUid": "eah_i_01M0ZZB88FT117S27PM8ZEK9RY",
  "receivedAt": "2026-08-26T09:12:04",
  "senderName": "Партнер ДООЕЛ Скопје",
  "senderEdb": "4080012600123",
  "ackedAt": null,
  "documentNumber": "2026-000318",
  "amount": 4720,
  "currency": "MKD"
}
Сите полиња во телото (11)
FieldTypePresenceDescription
docUidstringalwaysIdentifier of the document. Use it to fetch a file or to acknowledge the document.
receivedAtstring · date-timealwaysTime the document arrived.
senderNamestringnullableName of the sender, read from the received document.
senderEdbstringnullableTax number of the sender, read from the received document.
ackedAtstring · date-timenullableTime of the FIRST acknowledgement, or null while the document has not been acknowledged. A repeated acknowledgement does not move it.
documentNumberstringnullableDocument number, read from the received document.
amountnumber · doublenullableTotal amount, read from the received document.
currencystringnullableCurrency of amount, as a three-letter code.
statusinteger · int32alwaysCurrent state of the document: 110 received, 120 being processed, 140 approved, 150 rejected. The code never changes meaning and does not depend on the response language.
rejectionReasonstringnullableWhy the document was rejected. Filled in only when status is 150; null otherwise.
decisionDeadlinestring · datenullableCalendar date by which the document has to be approved or rejected, or null when no deadline is set for it. It is a date, not a moment: the field carries no time and no zone, so it never depends on the reader’s clock. Past that date the tax authority accepts the document on its own, so a caller that is still deciding has to read this to know how long it has left.

The X-Software-Id header is missing — EARH-1008.

{
  "type": "https://earhiva.mk/errors/EARH-1008",
  "title": "X-Software-Id header is missing.",
  "status": 400,
  "code": "EARH-1008"
}
Сите полиња во телото (6)
FieldTypePresenceDescription
typestringalwaysAddress of this code in the error catalogue (RFC 7807).
titlestringalwaysShort, stable English summary of the error — the same string that appears in your log.
statusinteger · int32alwaysHTTP status code, repeated in the body (RFC 7807).
detailstringnullableWhat went wrong in this particular call, when there is more to say than the title. Absent when the title already says everything.
codestringalwaysThe EARH-xxxx code. This is the contract: match on it, not on the text.
eventIdstringnullableOnly on EARH-9000. Quote it when reporting the problem — it is the same reference we record in our log, so one number identifies the event on both sides.

The API key is missing, unknown, expired or revoked — EARH-1001, EARH-1002, EARH-1003. Телото е стандардното тело на грешка — исто кај сите повици. Што да се направи со секоја шифра стои во Каталог на грешки.

The caller’s address is outside the allowed list, the key does not carry the IntegrationApi scope, the organization’s plan does not include integration access, or the key has been switched off by its owner — EARH-1004, EARH-1005, EARH-1010, EARH-1011. The last two are returned on every call and carry no Retry-After: waiting does not change the state. Телото е стандардното тело на грешка — исто кај сите повици. Што да се направи со секоја шифра стои во Каталог на грешки.

EARH-3001 — no such document. An unknown identifier and a document belonging to another tenant give an identical answer.

{
  "type": "https://earhiva.mk/errors/EARH-3001",
  "title": "Document not found.",
  "status": 404,
  "code": "EARH-3001"
}
Сите полиња во телото (6)
FieldTypePresenceDescription
typestringalwaysAddress of this code in the error catalogue (RFC 7807).
titlestringalwaysShort, stable English summary of the error — the same string that appears in your log.
statusinteger · int32alwaysHTTP status code, repeated in the body (RFC 7807).
detailstringnullableWhat went wrong in this particular call, when there is more to say than the title. Absent when the title already says everything.
codestringalwaysThe EARH-xxxx code. This is the contract: match on it, not on the text.
eventIdstringnullableOnly on EARH-9000. Quote it when reporting the problem — it is the same reference we record in our log, so one number identifies the event on both sides.

The traffic limit for this key has been reached — EARH-1006. The response carries Retry-After. The limit is counted per key, and its size comes from the organization’s plan. Телото е стандардното тело на грешка — исто кај сите повици. Што да се направи со секоја шифра стои во Каталог на грешки.

Unexpected error on our side — EARH-9000. The body carries eventId; quote it when reporting the problem. Телото е стандардното тело на грешка — исто кај сите повици. Што да се направи со секоја шифра стои во Каталог на грешки.