---
title: "OrdersEntity: CDEK orders with PHP API in Joomla | WT CDEK - WebTolk websites development, Joomla Extensions"
description: "OrdersEntity for Joomla: order creation, updates and customer returns. WT CDEK documentation with CDEK API parameters and PHP integration examples."
url: "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-orders"
date: "2026-11-02T12:18:37+00:00"
language: "en-GB"
---

## Breadcrumbs

[Home](https://web-tolk.ru/en) > [Joomla extensions](https://web-tolk.ru/en/dev) > [Libraries](/en/dev/biblioteki) > [WT CDEK library](/en/dev/biblioteki/wt-cdek-library-for-joomla-developers) > [Documentation](/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation) > OrdersEntity: CDEK orders with PHP API in Joomla

# OrdersEntity: CDEK orders with PHP API in Joomla

WT CDEK library - Documentation

**Category:** [Libraries](https://web-tolk.ru/en/dev/biblioteki)

[Project](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers)[Versions](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/versions)[Documentation](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation)[GitHub](https://github.com/WebTolk/WT-CDEK-Joomla-PHP-library)

OrdersEntity in WT CDEK for Joomla covers order creation, updates and customer returns. This reference explains its purpose, parameters and PHP examples for Joomla extensions.

OrdersEntity creates, reads, updates and deletes orders, registers client returns and refusals, and retrieves related courier requests.

Access the entity through the Cdek facade:

```
$orders = $cdek->orders();
```

## `createOrder()`

### Signature

```
public function createOrder(array $request_options): array
```

### REST API

- `POST /v2/orders`

### Purpose

Creates a CDEK order.

### Parameters

Required by the library: `tariff_code`, `recipient`, `packages`, `recipient.name`, `packages[].number`, `packages[].weight`. If recipient.phones is supplied, each phone must have number. CDEK performs the remaining business validation.

### Returns

Asynchronous API response with request UUID and order creation status.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->orders()->createOrder([
    'type'          => 1,
    'number'        => 'ORDER-10001',
    'tariff_code'   => 136,
    'recipient'     => [
        'name'   => 'Иван Иванов',
        'phones' => [
            ['number' => '+79990000000'],
        ],
    ],
    'from_location' => ['code' => 44],
    'to_location'   => ['code' => 270],
    'packages'      => [
        [
            'number' => '1',
            'weight' => 1000,
        ],
    ],
]);
```

## `getOrderInfo()`

### Signature

```
public function getOrderInfo(?string $uuid = '', ?string $cdek_number = '', ?string $im_number = ''): array
```

### REST API

- `GET /v2/orders/{uuid}`
- `GET /v2/orders?cdek_number=...`
- `GET /v2/orders?im_number=...`

### Purpose

Retrieves an existing order.

### Parameters

Supply at least one of `$uuid`, `$cdek_number`, `$im_number`. UUID uses GET /v2/orders/{uuid}; other identifiers use cdek_number or im_number query parameters.

### Returns

Order details and statuses.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$order = $cdek->orders()->getOrderInfo('', '1234567890');
```

## `updateOrder()`

### Signature

```
public function updateOrder(array $request_options = []): array
```

### REST API

- `PATCH /v2/orders`

### Purpose

Updates an order while its current status permits changes.

### Parameters

Required: `type`, `recipient`, and either `uuid` or `cdek_number`.

### Returns

API response array.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->orders()->updateOrder([
    'uuid'      => '11111111-1111-1111-1111-111111111111',
    'type'      => 1,
    'recipient' => [
        'name' => 'Петр Петров',
    ],
]);
```

## `getIntakes()`

### Signature

```
public function getIntakes(string $order_uuid): array
```

### REST API

- `GET /v2/orders/{orderUuid}/intakes`

### Purpose

Retrieves courier collection requests associated with an order.

### Parameters

`$order_uuid`: order UUID.

### Returns

Related collection requests.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->orders()->getIntakes('11111111-1111-1111-1111-111111111111');
```

## `deleteOrder()`

### Signature

```
public function deleteOrder(string $uuid): array
```

### REST API

- `DELETE /v2/orders/{uuid}`

### Purpose

Deletes an order if its status permits deletion.

### Parameters

`$uuid`: order UUID.

### Returns

API response array.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->orders()->deleteOrder('11111111-1111-1111-1111-111111111111');
```

## `clientReturn()`

### Signature

```
public function clientReturn(string $uuid, array $request_options = []): array
```

### REST API

- `POST /v2/orders/{uuid}/clientReturn`

### Purpose

Registers a client return for a store order.

### Parameters

`$uuid`: original order UUID; required return `tariff_code` in request_options.

### Returns

API response array.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->orders()->clientReturn(
    '11111111-1111-1111-1111-111111111111',
    [
        'tariff_code' => 136,
    ]
);
```

## `refuse()`

### Signature

```
public function refuse(string $uuid): array
```

### REST API

- `POST /v2/orders/{uuid}/refusal`

### Purpose

Registers an order refusal followed by return.

### Parameters

`$uuid`: order UUID.

### Returns

API response array.

### Example

```
<?php

declare(strict_types=1);

use Webtolk\Cdekapi\Cdek;

defined('_JEXEC') or die;

$cdek = new Cdek();

$result = $cdek->orders()->refuse('11111111-1111-1111-1111-111111111111');
```

[Overview and getting started](https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-library-joomla-form-fields)

[WT CDEK 1.4.0 source code on GitHub](https://github.com/WebTolk/WT-CDEK-Joomla-PHP-library/blob/v.1.4.0/lib_webtolk_wtcdek/src/Entities/OrdersEntity.php)

## JSON-LD Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://web-tolk.ru/en",
                "name": "Home"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://web-tolk.ru/en/dev",
                "name": "Joomla extensions"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "/en/dev/biblioteki",
                "name": "Libraries"
            }
        },
        {
            "@type": "ListItem",
            "position": 4,
            "item": {
                "@id": "/en/dev/biblioteki/wt-cdek-library-for-joomla-developers",
                "name": "WT CDEK library "
            }
        },
        {
            "@type": "ListItem",
            "position": 5,
            "item": {
                "@id": "/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation",
                "name": "Documentation"
            }
        },
        {
            "@type": "ListItem",
            "position": 6,
            "item": {
                "name": "OrdersEntity: CDEK orders with PHP API in Joomla"
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "@id": "https://web-tolk.ru/#/schema/Organization/base",
            "name": "WebTolk",
            "url": "https://web-tolk.ru/",
            "logo": {
                "@type": "ImageObject",
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo",
                "url": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "contentUrl": "https://web-tolk.ru/images/webtolk-1080p.jpg",
                "width": 1920,
                "height": 1080
            },
            "image": {
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo"
            },
            "sameAs": [
                "https://github.com/WebTolk",
                "https://github.com/sergeytolkachyov",
                "https://vk.com/web_tolk",
                "https://vk.com/webtolkru",
                "https://tenchat.ru/sergeytolkachyov",
                "https://t.me/sergeytolkachyov",
                "https://t.me/webtolkru"
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://web-tolk.ru/#/schema/WebSite/base",
            "url": "https://web-tolk.ru/",
            "name": "WebTolk websites development, Joomla Extensions",
            "publisher": {
                "@id": "https://web-tolk.ru/#/schema/Organization/base"
            }
        },
        {
            "@type": "WebPage",
            "@id": "https://web-tolk.ru/#/schema/WebPage/base",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-orders",
            "name": "OrdersEntity: CDEK orders with PHP API in Joomla | WT CDEK - WebTolk websites development, Joomla Extensions",
            "description": "OrdersEntity for Joomla: order creation, updates and customer returns. WT CDEK documentation with CDEK API parameters and PHP integration examples.",
            "isPartOf": {
                "@id": "https://web-tolk.ru/#/schema/WebSite/base"
            },
            "about": {
                "@id": "https://web-tolk.ru/#/schema/TechArticle/base"
            },
            "inLanguage": "en-GB",
            "breadcrumb": {
                "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17"
            }
        },
        {
            "@type": "TechArticle",
            "headline": "OrdersEntity: CDEK orders with PHP API in Joomla",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-orders",
            "description": "OrdersEntity in WT CDEK for Joomla covers order creation, updates and customer returns. This reference explains its purpose, parameters and PHP examples for Joomla extensions.",
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/en/dev/biblioteki/wt-cdek-library-for-joomla-developers/documentation/wt-cdek-entities-orders"
            },
            "keywords": [
                "Joomla",
                " PHP",
                " CDEK API",
                " WT CDEK",
                " OrdersEntity",
                " order creation",
                " updates and customer returns"
            ]
        }
    ]
}
```
