Состојба на испратен документ
Returns one outbound document by its identifier.
Примерот важи само за demo околината.
Request
curl -i -X GET "https://sandbox.api.earhiva.mk/api/integration/v1/outbound/<docUid>" \
-H "X-Api-Key: <ВАШИОТ КЛУЧ>" \
-H "X-Software-Id: <ИМЕ И ВЕРЗИЈА НА ВАШАТА АПЛИКАЦИЈА>"
Секој повик носи X-Api-Key со клуч што го има опфатот IntegrationApi, и X-Software-Id со името и верзијата на твојот софтвер. Како се бара клуч стои во Автентикација.
Parameters
Сите параметри (2)
| Parameter | In | Type | Presence | Description |
|---|---|---|---|---|
docUid | path | string | always | Identifier returned when the document was submitted. |
X-Software-Id | header | string | always | Identifier 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
Целосниот список шифри, со што значат и што да се направи, е во Каталог на грешки.
Responses
Дел со наслов „ Responses “The document, with the UJP answer in its own field.
{
"docUid": "eah_o_01M0ZZB88FT117S27PM8ZEK9RY",
"status": 210,
"failureCode": null,
"failureMessage": null,
"createdAt": "2026-08-26T23:24:16",
"partnerEdb": null,
"documentNumber": null,
"amount": null,
"currency": null,
"ujp": null
}
Сите полиња во телото (12)
| Field | Type | Presence | Description |
|---|---|---|---|
docUid | string | always | Identifier of the document, the same one returned when it was submitted. |
status | integer · int32 | always | Current numeric status. The status list is part of the contract; match on the number, not on any text. |
failureCode | string | nullable | The EARH-xxxx code of the last failure; null when nothing has failed. One of EARH-4001 (the document did not pass validation), EARH-4002 (the tax authority refused it), EARH-4003 (the buyer refused it), EARH-4004 (processing failed on our side), EARH-4005 (the recipient could not be resolved). These carry no HTTP status of their own — they arrive inside a successful answer, alongside status 250. |
failureMessage | string | nullable | Short English text belonging to failureCode. Informational — the field to act on is the code. |
createdAt | string · date-time | always | Time the document was taken over. |
partnerEdb | string | nullable | Tax number of the recipient, read from the submitted document. null when the document does not carry one. |
documentNumber | string | nullable | Document number, read from the submitted document. |
amount | number · double | nullable | Total amount, read from the submitted document. |
currency | string | nullable | Currency of amount, as a three-letter code. |
validationErrors | низа од објект | always | Field-level reasons the document did not go through. Branch on each entry’s code (EARH-5xxx) — the path next to it points at the field in the composed UJP message and is a hint, not part of the contract. Filled alongside failureCodeEARH-4001 (the rules of the pre-submission check, EARH-5001…EARH-5012) and, since CR-0127, alongside EARH-4005 as well (EARH-5020 — the recipient is not a registered partner); empty otherwise. |
ujp | — | nullable | The answer received from UJP. null while the document has not been forwarded to them yet. |
failedStep | string | nullable | Name of the processing step that failed, e.g. ConvertFormat, ResolvePartner, UjpEFaktura. null when nothing has failed. This is what tells apart the two meanings of EARH-4004: ConvertFormat means the document could not be converted — the cause is in the body you sent — while a failure in a later step is usually ours. Informational: the step names may gain new members, so read it, do not branch a state machine on it. |
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)
| Field | Type | Presence | Description |
|---|---|---|---|
type | string | always | Address of this code in the error catalogue (RFC 7807). |
title | string | always | Short, stable English summary of the error — the same string that appears in your log. |
status | integer · int32 | always | HTTP status code, repeated in the body (RFC 7807). |
detail | string | nullable | What went wrong in this particular call, when there is more to say than the title. Absent when the title already says everything. |
code | string | always | The EARH-xxxx code. This is the contract: match on it, not on the text. |
eventId | string | nullable | Only 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)
| Field | Type | Presence | Description |
|---|---|---|---|
type | string | always | Address of this code in the error catalogue (RFC 7807). |
title | string | always | Short, stable English summary of the error — the same string that appears in your log. |
status | integer · int32 | always | HTTP status code, repeated in the body (RFC 7807). |
detail | string | nullable | What went wrong in this particular call, when there is more to say than the title. Absent when the title already says everything. |
code | string | always | The EARH-xxxx code. This is the contract: match on it, not on the text. |
eventId | string | nullable | Only 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. Телото е стандардното тело на грешка — исто кај сите повици. Што да се направи со секоја шифра стои во Каталог на грешки.