{"id":20084795,"url":"https://github.com/maddsua/novaposhtarest","last_synced_at":"2025-09-05T03:41:59.136Z","repository":{"id":165818625,"uuid":"641232843","full_name":"maddsua/NovaPoshtaREST","owner":"maddsua","description":"Typings and functional interface for Nova Poshta (Нова Пошта) REST API","archived":false,"fork":false,"pushed_at":"2023-05-18T05:47:42.000Z","size":43,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T09:39:11.555Z","etag":null,"topics":["api-client","deno","integration","logistics","nodejs","novaposhta","rest-api","typescript","typings"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/novaposhtarest","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maddsua.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-16T03:52:50.000Z","updated_at":"2024-08-07T23:48:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d57f0f8-42c7-4a4b-a20b-fa19e43d43e4","html_url":"https://github.com/maddsua/NovaPoshtaREST","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maddsua/NovaPoshtaREST","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddsua%2FNovaPoshtaREST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddsua%2FNovaPoshtaREST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddsua%2FNovaPoshtaREST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddsua%2FNovaPoshtaREST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maddsua","download_url":"https://codeload.github.com/maddsua/NovaPoshtaREST/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maddsua%2FNovaPoshtaREST/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273708979,"owners_count":25153728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","deno","integration","logistics","nodejs","novaposhta","rest-api","typescript","typings"],"created_at":"2024-11-13T15:53:18.273Z","updated_at":"2025-09-05T03:41:59.115Z","avatar_url":"https://github.com/maddsua.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typings and functional interface for Nova Poshta (Нова Пошта) REST API\n\nThis package provides typing and functions to call Nova Poshta api methods.\n\nCurrently supporting NodeJS in ESM mode and Deno. From the same npm package 🤘\n\nOfficial API references are here: https://developers.novaposhta.ua/documentation\n\n## Status\n\nThe package is in early stage and is not thoroughly tested. Bugs and inconsistencies may occur. Any contribution is appreciated.\n\n## Submodules\n\nImport them like this:\n\n```typescript\nimport { getStatusDocuments } from 'novaposhtarest/TrackingDocument'\n```\n\nSubmodules list:\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ Address\u003c/summary\u003e\n  \n- ✅ searchSettlements\n- ✅ searchSettlementStreets\n- ✅ save\n- ✅ delete\n- ✅ update\n- ✅ getSettlements\n- ✅ getCities\n- ✅ getAreas\n- ✅ getWarehouses\n- ✅ getWarehouseTypes\n- ✅ getStreet\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ Counterparty\u003c/summary\u003e\n  \n- ✅ save\n- ✅ delete\n- ✅ update\n- ✅ getCounterpartyAddresses\n- ✅ getCounterpartyOptions\n- ✅ getCounterpartyContactPersons\n- ✅ getCounterparties\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ ContactPerson\u003c/summary\u003e\n  \n- ✅ save\n- ✅ delete\n- ✅ update\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ ScanSheet\u003c/summary\u003e\n  \n- ✅ insertDocuments\n- ✅ getScanSheet\n- ✅ getScanSheetList\n- ✅ deleteScanSheet\n- ✅ removeDocuments\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ Common\u003c/summary\u003e\n  \n- ✅ getTimeIntervals\n- ✅ getCargoTypes\n- ✅ getBackwardDeliveryCargoTypes\n- ✅ getPalletsList\n- ✅ getTypesOfPayersForRedelivery\n- ✅ getPackList\n- ✅ getTiresWheelsList\n- ✅ getCargoDescriptionList\n- ✅ getMessageCodeText\n- ✅ getServiceTypes\n- ✅ getOwnershipFormsList\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ AdditionalService\u003c/summary\u003e\n  \n- ✅ CheckPossibilityCreateReturn\n- ✅ getReturnReasons\n- ✅ getReturnReasonsSubtypes\n- ✅ orderCargoReturn\n- ✅ getReturnOrdersList\n- ✅ deleteAdditionalService\n- ✅ CheckPossibilityChangeEW\n- ✅ getChangeEWOrdersList\n- ✅ checkPossibilityForRedirecting\n- ✅ getRedirectionOrdersList\n- ✅ getOwnershipFormsList\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ InternetDocument\u003c/summary\u003e\n  \n- ✅ getDocumentPrice\n- ✅ getDocumentDeliveryDate\n- ✅ save\n- ✅ update\n- ✅ delete\n- ✅ getDocumentList\n- ✅ generateReport\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003e✅ TrackingDocument\u003c/summary\u003e\n  \n- ✅ getStatusDocuments\n  \n\u003c/details\u003e\n\n## Compatibility\n\nYou can use this single package with NodeJS, Deno and Cloudflare Workers (not a runtime, but in this case it matters).\n\nIf you're building for NodeJS 18 and newer or CF Wrokers, use the normal import:\n\n```typescript\nimport { getStatusDocuments } from 'novaposhtarest/TrackingDocument'\n```\n\nFor older versions of Node that don't support the fetch API, use `compat` branch (just add `compat/` after the package name):\n\n```typescript\nimport { getStatusDocuments } from 'novaposhtarest/compat/TrackingDocument'\n```\n\nAnd for the cool bois who use Deno, do it like this:\n\n```typescript\nimport { getStatusDocuments } from './node_modules/novaposhtarest/dist/deno/models/TrackingDocument.ts'\n```\n\nYeah, not very pretty but heeey\n\n## Examples\n\n### Ex. 1: Retrieve delivery status\n\nYour code (NodeJS + TSC or CF Workers):\n\n```typescript\n\nimport { getStatusDocuments } from 'novaposhtarest/TrackingDocument'\n\nconst token = process.env['NPTOKEN']\n\nconst { success, data, errors } = await getStatusDocuments(token, {\n\tDocuments: [\n\t\t{\n\t\t\tDocumentNumber: '20000000000000',\n\t\t\tPhone: '+380960000000'\n\t\t}\n\t]\n})\n\nconsole.log(success ? data[0].Status : errors)\n\n```\n\nOutput:\n\n```javascript\n[\n  {\n    Number: \"20000000000000\",\n    StatusCode: \"0000\",\n    Status: \"Test status\",\n    PossibilityCreateRedirecting: false,\n    PossibilityCreateReturn: false,     \n    PossibilityCreateRefusal: false,    \n    PossibilityChangeEW: false,\n...\n```\n\n### Ex. 2: Get list of geographic areas\n\nYour code (NodeJS + TSC or CF Workers):\n\n```typescript\n\nimport { getAreas } from 'novaposhtarest/Address'\n\n//\tworks without api token for now\nconst { success, data, errors } = await getAreas('')\n\nconsole.log(success ? data : errors)\n\n```\n\nOutput:\n\n```javascript\n[\n  {\n    Ref: \"71508128-9b87-11de-822f-000c2965ae0e\",\n    AreasCenter: \"db5c88b7-391c-11dd-90d9-001a92567626\",\n    DescriptionRu: \"АРК\",\n    Description: \"АРК\"\n  },\n  {\n    Ref: \"71508129-9b87-11de-822f-000c2965ae0e\",\n    AreasCenter: \"db5c88de-391c-11dd-90d9-001a92567626\",\n    DescriptionRu: \"Винницкая\",\n    Description: \"Вінницька\"\n  },\n...\n```\n\n### Ex. 3: Find city\n\nYour code (Deno):\n\n```typescript\n\nimport \"https://deno.land/x/dotenv@v3.2.2/load.ts\"\n\nimport { Address } from './node_modules/novaposhtarest/dist/deno/index.ts'\n\nconst nptoken = Deno.env.get('NOVAPOSHTA') as string\n\nconst { success, data, errors } = await Address.getCities(nptoken, {\n\tFindByString: 'Харьков'\n})\n\nconsole.log(success ? data : errors)\n\n```\n\nOutput:\n\n```javascript\n[\n  {\n    Description: \"Харків\",\n    DescriptionRu: \"Харьков\",\n    Ref: \"db5c88e0-391c-11dd-90d9-001a92567626\",\n    Delivery1: \"1\",\n    Delivery2: \"1\",\n    Delivery3: \"1\",\n    Delivery4: \"1\",\n    Delivery5: \"1\",\n    Delivery6: \"1\",\n    Delivery7: \"1\",\n    Area: \"7150813b-9b87-11de-822f-000c2965ae0e\",\n    SettlementType: \"563ced10-f210-11e3-8c4a-0050568002cf\",\n    IsBranch: \"1\",\n    PreventEntryNewStreetsUser: \"0\",\n    CityID: \"13\",\n    SettlementTypeDescription: \"місто\",\n    SettlementTypeDescriptionRu: \"город\",\n    SpecialCashCheck: 1,\n    AreaDescription: \"Харківська\",\n    AreaDescriptionRu: \"Харьковская\"\n  },\n...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddsua%2Fnovaposhtarest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaddsua%2Fnovaposhtarest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaddsua%2Fnovaposhtarest/lists"}