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

Список на испратени документи

GET
/api/integration/v1/outbound

Lists outbound documents, newest first.

The order is by creation time descending, and by identifier when two documents share the same time — independent of the filter and of the page size. Documents created before the integration API existed carry no docUid and are neither returned nor counted.

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

Request

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

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

Parameters

Сите параметри (8)
ParameterInTypePresenceDescription
dateFromquerystring · date-timeoptionalLower bound on the time selected by by; omit for no lower bound. Inclusive.
dateToquerystring · date-timeoptionalUpper bound on the time selected by by; omit for no upper bound. Exclusive.
byquery—optionalWhat dateFrom and dateTo measure: created (default) is the time the document was created, updated is the time we last recorded a change to it. Use updated to pull incrementally — a document created last month whose status changed yesterday is returned by updated and not by created. With updated the response also carries nextFrom.
statusqueryниза од integer · int32optionalNumeric status codes; repeat the parameter for more than one.
partnerEdbquerystringoptionalTax number of the recipient.
pagequeryinteger · int32optional1-based page index; defaults to 1.
pageSizequeryinteger · int32optionalDocuments per page; defaults to 100, maximum 500.
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-1010 · EARH-1011 · EARH-2020 · EARH-3005

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

The page of documents; an empty result is 200 with totalCount 0.

{
  "items": [
    {
      "docUid": "eah_o_01M0ZZB88FT117S27PM8ZEK9RY",
      "status": 210,
      "createdAt": "2026-08-26T23:24:16",
      "partnerEdb": "4030006612345",
      "documentNumber": "0001-2026",
      "amount": 12360,
      "currency": "MKD"
    }
  ],
  "totalCount": 1,
  "page": 1,
  "pageSize": 100,
  "totalPages": 1
}
Сите полиња во телото (6)
FieldTypePresenceDescription
itemsниза од објектalwaysDocuments on the requested page, newest first.
totalCountinteger · int32alwaysNumber of documents matching the filter across all pages.
pageinteger · int32always1-based index of the returned page.
pageSizeinteger · int32alwaysNumber of documents per page (default 100, maximum 500).
totalPagesinteger · int32alwaysNumber of pages available for the current filter and page size.
nextFromstring · date-timenullableStarting point for your next incremental call: pass it back as dateFrom with by=updated. Returned only when you asked for by=updated, null otherwise. IT IS VALID ONLY AFTER YOU HAVE READ EVERY PAGE of this result — the list is ordered newest first, so a value taken after page 1 would skip every older change. The lower bound is inclusive and the value is deliberately set slightly in the past, so the next call will return some documents again; drop the repeats by docUid.

EARH-3005 — the requested page size exceeds the allowed one; the response names it.

EARH-2020 — a parameter cannot be read: a status outside the published list, a date that is not a date, or an unknown value for by. The response names the parameter, and for a status it lists the allowed values.

{
  "type": "https://earhiva.mk/errors/EARH-3005",
  "title": "Requested page size exceeds the allowed maximum.",
  "status": 400,
  "code": "EARH-3005"
}
Сите полиња во телото (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. Телото е стандардното тело на грешка — исто кај сите повици. Што да се направи со секоја шифра стои во Каталог на грешки.

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. Телото е стандардното тело на грешка — исто кај сите повици. Што да се направи со секоја шифра стои во Каталог на грешки.