02.06.2026
122
2 min read

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

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

    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.

    Related Articles
    Write a review
    Please login or register to review