InternationalEntity: international CDEK shipping in Joomla

WT CDEK library - Documentation
Category: Libraries

InternationalEntity in WT CDEK for Joomla covers international shipment restrictions. This reference explains its purpose, parameters and PHP examples for Joomla extensions.

InternationalEntity checks restrictions for an international route, tariff and packages before creating an order.

Access the entity through the Cdek facade:

$international = $cdek->international();

checkPackagesRestrictions()

Signature

public function checkPackagesRestrictions(array $request_options = []): array

REST API

  • POST /v2/international/package/restrictions

Purpose

Checks international shipment restrictions.

Parameters

A nonempty options array; typically route, tariff and package characteristics. Full validation belongs to the CDEK API.

Returns

API response describing whether restrictions apply and any reported problem.

Example

<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->international()->checkPackagesRestrictions([
    'tariff_code'   => 7,
    'from_location' => ['country_code' => 'RU'],
    'to_location'   => ['country_code' => 'KZ'],
    'packages'      => [
        ['weight' => 500],
    ],
]);

Overview and getting started

WT CDEK 1.4.0 source code on GitHub

WebTolk Joomla Extensions

113 Extensions
12 Categories
587 Versions released
920740 Downloads