open-nav
    Preparing search index...

    Class NavClient

    Client for the NAV Online Számla 3.0 invoice service.

    Every method corresponds to one service operation and takes the generated request type minus the header, user and software blocks, which the client builds and signs.

    const client = new NavClient({ credentials, software, environment: 'test' });
    const taxpayer = await client.queryTaxpayer({ taxNumber: '12345678' });
    Index
    • Technically annul a previously submitted, erroneous data report.

      Parameters

      Returns Promise<ManageAnnulmentResponse>

    • Submit invoice data. Returns the transaction to poll for the outcome.

      Parameters

      Returns Promise<ManageInvoiceResponse>

    • Modification chain of an invoice.

      Parameters

      Returns Promise<QueryInvoiceChainDigestResponse>

    • Whether an invoice number exists in NAV's records.

      Parameters

      Returns Promise<QueryInvoiceCheckResponse>

    • Full invoice data of one invoice, inbound or outbound.

      Parameters

      Returns Promise<QueryInvoiceDataResponse>

    • Paged summary list of invoices matching a query.

      Parameters

      Returns Promise<QueryInvoiceDigestResponse>

    • Validity and registered data of a Hungarian taxpayer.

      Parameters

      Returns Promise<QueryTaxpayerResponse>

    • Transactions submitted in a time window, paged.

      Parameters

      Returns Promise<QueryTransactionListResponse>

    • Processing state and validation messages of a submitted transaction.

      Parameters

      Returns Promise<QueryTransactionStatusResponse>

    • Annul one or more previously reported invoices.

      Parameters

      Returns Promise<ManageAnnulmentResponse>

    • Exchange credentials for a single-use token required by the manage operations.

      The token arrives AES-128-ECB encrypted under the exchange key and is decrypted here. NAV keeps it valid for a few minutes; this client fetches a fresh one per manage call rather than caching, because a token consumed by a submission cannot be reused and a stale one fails opaquely.

      Returns Promise<
          {
              response: TokenExchangeResponse;
              token: string;
              validityFrom: string;
              validityTo: string;
          },
      >