PrealertEntity: CDEK prealerts with PHP in Joomla

WT CDEK library - Documentation
Category: Libraries

PrealertEntity in WT CDEK for Joomla covers prealert registration and status lookup. This reference explains its purpose, parameters and PHP examples for Joomla extensions.

PrealertEntity notifies CDEK that a batch of shipments will be delivered to a warehouse.

Access the entity through the Cdek facade:

$prealert = $cdek->prealert();

register()

Signature

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

REST API

  • POST /v2/prealert

Purpose

Registers a prealert.

Parameters

The library checks for a nonempty options array. CDEK performs full validation.

Returns

Asynchronous response with prealert UUID and processing status.

Example

<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->prealert()->register([
    'date'   => '2026-04-20',
    'number' => 'PREALERT-1001',
    'orders' => [
        ['number' => 'ORDER-10001'],
        ['number' => 'ORDER-10002'],
    ],
]);

getByUuid()

Signature

public function getByUuid(string $uuid): array

REST API

  • GET /v2/prealert/{uuid}

Purpose

Retrieves one prealert.

Parameters

$uuid: prealert UUID.

Returns

Prealert details and current status.

Example

<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->prealert()->getByUuid('11111111-1111-1111-1111-111111111111');

Overview and getting started

WT CDEK 1.4.0 source code on GitHub

WebTolk Joomla Extensions

113 Extensions
12 Categories
587 Versions released
920737 Downloads