npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

api-novaposhta

v1.1.0

Published

Library for simple using API NovaPoshta

Downloads

31

Readme

API NovaPoshta

👀 Provides easy access to api novaposhta. API has 6 controllers which is got from Official Documentation. Also each of controller has own methods that are listed below.

📖 Table of Contents

🧰 Setup

Installing by npm

npm install api-novaposhta

Installing by yarn

yarn add api-novaposhta

🕹 Controllers

  • 📦 Internet Document - methods for receiving information about waybills.
  • 🏡 Address - it's help you work with addresses of counterparty, cities or streets where has novaposhta.
  • 🥸 Counterparty - easy way to control counterparty in account.
  • 🛠 Common - ways to receive common data for options to other methods.
  • ⚙️ Service - services as redelivery, backward or change information in account.
  • 🗃 Registry - better way to working with internet document in registry.

⛓ Methods

🔒 Designation that you need an api key for a method or controller

  1. Internet Document 🔒
    • getListDocument - get list of internet document in account
    • getParcelDeliveryDate - get forecast about delivery date
    • getParcelPrice - get parcel price from entered params
    • createDocument - create a internet document
    • deleteDocument - delete internet document
    • generateReport - generate report of all internet documents
    • updateDocument - update information in internet document
    • getStatusDocuments - get status of internet document(s)
    • getTrackingInfo - get tracking information about internet document
    • getTrackingHistory - get tracking history where the parcel passed
  2. Address
    • 🔒 getSettlements - get settlements where has novaposhta
    • 🔒 getAreas - get areas by params in Ukraine
    • 🔒 getCities - same as getAreas but for cities
    • searchCity - search city with branch by params in request
    • 🔒searchStreet - same as searchCity but for street
    • 🔒 getWarehouses - get branches in Ukraine or by params in request
    • 🔒 getWarehouseStreet - get branches in Ukraine by name street
    • 🔒 deleteContractorAddress - delete counterparty address
    • 🔒 createContractorAddress - create counterparty address
    • 🔒 updateContractorAddress - update existed counterparty address
  3. Counterparty 🔒
    • getCounterpartyAddresses - get counterparty addresses in account
    • getCounterpartyOptions - get options for create internet document with additional service
    • getCounterpartyContactPerson - get contacts of counterparty in account
    • getCounterparties - get list of counterparties
    • updateContactPerson - update contacts of counterparty
    • updateCounterparty - update information about counterparty
    • createContactPerson - create contact for counterparty
    • createCounterparty - create counterparty
    • createLegalCounterparty - create counterparty for legal entity
    • createThirdPersonCounterparty - create counterparty for third person
    • deleteContactPerson - delete contact for counterparty
    • deleteCounterparty - delete counterparty
  4. Common
    • getTimeIntervals - get time intervals for service time intervals in internet document
    • 🔒 getCargoTypes - get types of cargo for create internet document
    • 🔒 getBackwardDeliveryCargoTypes - same as getCargoTypes but for service backward delivery
    • 🔒 getPalletsList - get list of pallets
    • 🔒 getPayersType - get types of payers who could pay
    • 🔒 getRedeliveryPayersType - same as getPayersType but for service redelivery
    • getPackList - get list of packs for create internet document
    • 🔒 getTiresWheelsList - get dimensions and other info about wheels
    • 🔒 getCargoDescriptionList - get details about cargo type
    • 🔒 getMessageCodeText - get descriptions of codes from request
    • 🔒 getServiceTypes - get types of service
    • 🔒 getTypesOfCounterparties - get types of counterparties
    • 🔒 getPaymentForms - get types of payments
    • 🔒 getOwnershipFormsList - get list of ownership
  5. Service 🔒
    • canCreateRequest - check possibility using one of services
    • createServiceRequest - create request to one of services
    • deleteServiceRequest - delete request one of services
    • getListServiceRequests - get list of services which is api provide
  6. Registry 🔒
    • addDocumentToRegistry - add internet document to registry
    • getRegistryInfo - get all information about registry in account
    • getListRegistryInfo - same as getRegistryInfo but returns list
    • deleteRegistry - delete registry in account
    • deleteDocumentFromRegistry - delete internet document from registry

📝 Examples

Options Base API

{
   "apiKey": "<YOUR_API_KEY>",
   "apiUrl": "<YOUR_API_URL>",
   "formatResponse": "json or xml"
}

Using API Controllers

All controllers are accepted base api options. Example below is shown using for address api and get areas method in two variants.

Classic Variant

In this variant you can import and use each of one controllers as individual class with own methods.

const api = new ApiAddress({
   apiKey: '<API_KEY>',
});
await api.getAreas();

Modern Variant

But in this variant you don't need to import extra controllers, you only need a main controller and using method get with param as api controller class and after all, access to methods will be allowed.

const api = new NovaPoshta({
   apiKey: '<API_KEY>',
});
await api.get(ApiAddress).getAreas();

Some methods in api has options, in that nothing too hard, all options have types declared for better understanding and avoid mistake for using methods.

Using method without params

const api = new ApiAddress({    
  apiKey: '<API_KEY>',    
});  
await api.getAreas();  

Using method with params

const api = new NovaPoshta({
   apiKey: '<API_KEY>',
});
await api.get(ApiAddress).getCities({
   FindByString: 'Kiev',
});