Skip to Content
API ReferenceReceived invoices

Received invoices

List the invoices other businesses issued to the organisation

GET /i/v1/inbound-invoices

invoice.inbound.read; free. Served from the organisation’s mirror of the authority gateway’s feed in the token’s mode, narrowed to its own tax ids (taxpayer.taxIds). Filters: seller, accessPoint, transmissionStatus, paymentStatus (paid|unpaid|partial|rejected|overdue), issueDateFrom/To, receivedFrom/To, amountMin/Max (major units), currency, q, taxId; sort -receivedAt (default) | receivedAt | issueDate | -issueDate | amount | -amount; page, limit ≤ 100 with meta.pagination. A first view reads the feed’s head before answering and the rest in the background (sync.syncing); a gateway outage serves the mirror with sync.error, never an error.

Who can call it: API key or signed-in user.

Parameters

NameInTypeRequiredDescription
sellerquerystringNoThe seller: a name (substring, any case) or a TIN (prefix). At most 100 characters.
accessPointquerystringNoThe seller’s access point (supplier.app_reference), exact. At most 256 characters.
transmissionStatusquerystringNoAs the gateway reports it, exact. At most 64 characters.
paymentStatusquerystringNooverdue: a due date before today and not paid. One of paid | unpaid | partial | rejected | overdue.
issueDateFromquerystringNoInclusive.
issueDateToquerystringNoInclusive.
receivedFromquerystringNoInclusive (an instant or a day).
receivedToquerystringNoExclusive for an instant; a calendar day includes that whole day.
amountMinquerystringNoPayable amount, MAJOR units, inclusive.
amountMaxquerystringNoPayable amount, MAJOR units, inclusive.
currencyquerystringNo
qquerystringNoSeller name or TIN, IRN, or the seller’s invoice number (substring, any case). At most 100 characters.
taxIdquerystringNoOne of taxpayer.taxIds (the organisation’s own tax ids in this mode); any other is 400. At most 32 characters.
sortquerystringNoOne of -receivedAt | receivedAt | issueDate | -issueDate | amount | -amount. Default: -receivedAt.
pagequerynumberNoDefault: 1. At least 1.
limitquerynumberNoDefault: 25. Between 1 and 100.

Example request

bash
curl https://gp.useyona.com/i/v1/inbound-invoices \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

One page: data {items, taxpayer, sync}, meta.pagination the page block.

Errors: 400, 401, 403, 429


One received invoice

GET /i/v1/inbound-invoices/{id}

invoice.inbound.read; free. From the mirror; document (the decrypted authority copy) is read from the gateway once, on the first view, when the mirror does not hold it. 503 only for a row the mirror never held while the gateway is down.

Who can call it: API key or signed-in user.

Parameters

NameInTypeRequiredDescription
idpathstringYesAt most 128 characters.

Example request

bash
curl https://gp.useyona.com/i/v1/inbound-invoices/9f8e7d6c-5b4a-3210-fedc-ba9876543210 \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

The received invoice.

Errors: 401, 403, 404, 429, 503


Analytics over the received invoices

GET /i/v1/inbound-invoices/analytics

invoice.inbound.read; free. The same filters as the list (no sort or page); from the mirror. Amounts are MINOR units in reportingCurrency (the currency filter, else the most common); byCurrency gives each currency’s own.

Who can call it: API key or signed-in user.

Parameters

NameInTypeRequiredDescription
sellerquerystringNoThe seller: a name (substring, any case) or a TIN (prefix). At most 100 characters.
accessPointquerystringNoThe seller’s access point (supplier.app_reference), exact. At most 256 characters.
transmissionStatusquerystringNoAs the gateway reports it, exact. At most 64 characters.
paymentStatusquerystringNooverdue: a due date before today and not paid. One of paid | unpaid | partial | rejected | overdue.
issueDateFromquerystringNoInclusive.
issueDateToquerystringNoInclusive.
receivedFromquerystringNoInclusive (an instant or a day).
receivedToquerystringNoExclusive for an instant; a calendar day includes that whole day.
amountMinquerystringNoPayable amount, MAJOR units, inclusive.
amountMaxquerystringNoPayable amount, MAJOR units, inclusive.
currencyquerystringNo
qquerystringNoSeller name or TIN, IRN, or the seller’s invoice number (substring, any case). At most 100 characters.
taxIdquerystringNoOne of taxpayer.taxIds (the organisation’s own tax ids in this mode); any other is 400. At most 32 characters.

Example request

bash
curl https://gp.useyona.com/i/v1/inbound-invoices/analytics \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

The figures.

Errors: 400, 401, 403, 429


Load older received invoices from the authority

POST /i/v1/inbound-invoices/load-older

invoice.inbound.read; free. Reads ONE more page of the gateway’s feed past where the mirror’s walk stopped (it may reach the authority’s own history, and be slow) and stores it; then list the received invoices again. hasMore: false — nothing older to read.

Who can call it: API key or signed-in user.

Example request

bash
curl -X POST https://gp.useyona.com/i/v1/inbound-invoices/load-older \
  -H "Authorization: Bearer sk_test_your_key_here"

Responses

What the page held.

Errors: 401, 403, 429, 503