Skip to content
10% off any project with promo code10% off with code

Nova Poshta API v4 in OpenCart: Step-by-Step Integration

Contents
  1. Getting an API key
  2. A basic API request
  3. The methods that matter for integration
  4. 1. City list (autocomplete)
  5. 2. Branches in a city
  6. 3. Cost calculation
  7. Cash on delivery (COD)
  8. Syncing the branch database
Published
Reading time
~2 min
Views
178
Reader rating
9 reviews
Author
Yevhen Fostenko
Senior Backend & DevOps Engineer
Nova Poshta API v4 in OpenCart: Step-by-Step Integration Article
Need help with your website?
Describe the task on Telegram — I will assess it and suggest where to start. Reply within a day.
Message on Telegram
Free consultation and estimate. I reply quickly.

The Nova Poshta API v4 is a JSON-RPC API that lets you pull the list of cities and branches, calculate shipping cost and track a parcel straight from your OpenCart store.

Getting an API key

Go to your Nova Poshta account → Settings → API → Generate key. The key looks like a UUID.

A basic API request

POST https://api.novaposhta.ua/v2.0/json/
{
  "apiKey": "your_api_key",
  "modelName": "Address",
  "calledMethod": "getCities",
  "methodProperties": {
    "FindByString": "Kyiv"
  }
}

The methods that matter for integration

1. City list (autocomplete)

modelName: "Address", calledMethod: "getCities"

2. Branches in a city

modelName: "AddressGeneral", calledMethod: "getWarehouses",
methodProperties: { CityRef: "city_uuid" }

3. Cost calculation

modelName: "InternetDocument", calledMethod: "getDocumentPrice",
methodProperties: {
  CitySender: "...", CityRecipient: "...",
  Weight: "1", ServiceType: "WarehouseWarehouse",
  Cost: "500", CargoType: "Cargo", SeatsAmount: "1"
}

Cash on delivery (COD)

When creating the waybill, add PaymentMethod: "Cash" and AfterpaymentOnGoodsCost with the COD amount.

Syncing the branch database

The Nova Poshta branch database updates daily. I recommend running the sync from cron at 03:00:

0 3 * * * php /path/to/opencart/index.php route=extension/module/novaposhta/sync

Want the integration done for you? Order Nova Poshta integration for OpenCart.

Tags: nova poshtaopencartapi v4shippingintegration
Need help with your website?
Describe the task on Telegram — I will assess it and suggest where to start. Reply within a day.
Message on Telegram
Free consultation and estimate. I reply quickly.

Related Articles

XML / YML Product Feed Development for OpenCart Article

XML / YML Product Feed Development for OpenCart

To sell on marketplaces and run ads you need a product feed — a structured XML/YML file describing your products. Every platform (Google Merchant, Facebook…

03/06/2026 141

Reader reviews

5.0
Write a review