PHPackages                             alex-nzr/bit-umc-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. alex-nzr/bit-umc-sdk

ActiveLibrary[API Development](/categories/api)

alex-nzr/bit-umc-sdk
====================

PHP library for the typical BIT-UMC SOAP API

v2.0.2(2d ago)270MITPHPPHP &gt;=8.1

Since Jan 30Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/alex-nzr/bit-umc-php-sdk)[ Packagist](https://packagist.org/packages/alex-nzr/bit-umc-sdk)[ Docs](https://github.com/alex-nzr/bit-umc-php-sdk/)[ RSS](/packages/alex-nzr-bit-umc-sdk/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (5)Versions (12)Used By (0)

SDK for 1C BIT.UMC
==================

[](#sdk-for-1c-bitumc)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- ext-soap
- ext-json
- ext-xmlreader

Version 2 API
-------------

[](#version-2-api)

The SDK is built around a single public entry point: `ANZ\\BitUmc\\SDK\\BitUmcClient`.

### Principles

[](#principles)

- Credentials and access data are passed at runtime.
- The SDK does not read `.env`, ini files or databases.
- Transport type is selected explicitly through `TransportType`.
- SOAP is implemented now.
- HTTP transport is reserved in the architecture for the next stage.
- SOAP XML responses are parsed through `XMLReader` to reduce peak memory usage on large payloads.
- Successful calls return normalized arrays.
- Failures throw typed exceptions from `ANZ\\BitUmc\\SDK\\Domain\\Exception`.

Usage
-----

[](#usage)

```
use ANZ\BitUmc\SDK\BitUmcClient;
use ANZ\BitUmc\SDK\Transport\Auth\BasicAuth;
use ANZ\BitUmc\SDK\Transport\ConnectionOptions;
use ANZ\BitUmc\SDK\Transport\Protocol;
use ANZ\BitUmc\SDK\Transport\TransportType;

$client = new BitUmcClient(
    TransportType::SOAP,
    new ConnectionOptions(
        protocol: Protocol::HTTP,
        host: '127.0.0.1:3500',
        baseName: 'umc',
        auth: new BasicAuth('1cUser', '1cUserPassword'),
        apiKey: null,
    )
);
```

Available operations
--------------------

[](#available-operations)

```
$client->getClinics();
$client->getEmployees();
$client->getNomenclature($clinicUid);
$client->getSchedule($scheduleQuery);
$client->getAppointmentStatus($appointmentUid);
$client->sendReserve($reserveRequest);
$client->sendWaitList($waitListRequest);
$client->sendAppointment($bookAppointmentRequest);
$client->deleteAppointment($appointmentUid);
```

Request DTOs
------------

[](#request-dtos)

- `ANZ\\BitUmc\\SDK\\Domain\\Request\\ScheduleQuery`
- `ANZ\\BitUmc\\SDK\\Domain\\Request\\ReserveRequest`
- `ANZ\\BitUmc\\SDK\\Domain\\Request\\WaitListRequest`
- `ANZ\\BitUmc\\SDK\\Domain\\Request\\BookAppointmentRequest`

See [examples/index.php](examples/index.php) for a complete example.

Returned data
-------------

[](#returned-data)

### `getClinics(): array`

[](#getclinics-array)

```
[
    'f679444a-22b7-11df-8618-002618dcef2c' => [
        'uid' => 'f679444a-22b7-11df-8618-002618dcef2c',
        'name' => 'Центральная клиника',
    ],
    '66abf7b4-2ff9-11df-8625-002618dcef2c' => [
        'uid' => '66abf7b4-2ff9-11df-8625-002618dcef2c',
        'name' => 'Третий центр',
    ],
]
```

### `getEmployees(): array`

[](#getemployees-array)

```
[
    '2eb1f97b-6a3c-11e9-936d-1856809fe650' => [
        'uid' => '2eb1f97b-6a3c-11e9-936d-1856809fe650',
        'name' => 'Юрий',
        'surname' => 'Безногов',
        'middleName' => 'Сергеевич',
        'fullName' => 'Безногов Юрий Сергеевич',
        'clinicUid' => 'f679444a-22b7-11df-8618-002618dcef2c',
        'photo' => 'base64_encoded_photo',
        'description' => 'Краткое описание из 1С',
        'rating' => '',
        'specialtyName' => 'Офтальмология',
        'specialtyUid' => '0j7rhngc0ldqu9gm0lzqvtc70l7qs9c40y8',
        'services' => [
            '5210c9dc-65a2-11e9-936d-1856809fe650' => [
                'uid' => '5210c9dc-65a2-11e9-936d-1856809fe650',
                'personalDuration' => 0,
            ],
        ],
    ],
]
```

### `getNomenclature(string $clinicUid): array`

[](#getnomenclaturestring-clinicuid-array)

```
[
    'a0230570-3ef7-11de-8086-001485c0d477' => [
        'uid' => 'a0230570-3ef7-11de-8086-001485c0d477',
        'name' => 'Массаж век',
        'typeOfItem' => 'Услуга',
        'artNumber' => '',
        'price' => '160',
        'duration' => 1800,
        'measureUnit' => 'мин',
        'parent' => '5210c9bf-65a2-11e9-936d-1856809fe650',
    ],
    'a0230571-3ef7-11de-8086-001485c0d477' => [
        'uid' => 'a0230571-3ef7-11de-8086-001485c0d477',
        'name' => 'Гель для массажа',
        'typeOfItem' => 'Материал',
        'artNumber' => '101-55',
        'price' => '100',
        'duration' => 900,
        'measureUnit' => 'мл',
        'parent' => '00000000-0000-0000-0000-000000000000',
    ],
]
```

### `getSchedule(?ScheduleQuery $query = null): array`

[](#getscheduleschedulequery-query--null-array)

```
[
    'f679444a-22b7-11df-8618-002618dcef2c' => [
        '0j7rhngc0ldqu9gm0lzqvtc70l7qs9c40y8' => [
            'ac30e13a-3087-11dc-8594-005056c00008' => [
                'specialtyName' => 'Офтальмология',
                'employeeName' => 'Барбышева Евгения Петровна',
                'durationFrom1C' => '0001-01-01T00:15:00',
                'durationInSeconds' => 900,
                'timetable' => [
                    'freeFormatted' => [
                        '05-04-2026' => [
                            [
                                'typeOfTimeUid' => '624f2a40-5aa8-4f01-83f4-0f38535364bb',
                                'date' => '2026-04-05T00:00:00',
                                'timeBegin' => '2026-04-05T09:00:00',
                                'timeEnd' => '2026-04-05T09:15:00',
                                'formattedDate' => '05-04-2026',
                                'formattedTimeBegin' => '09:00',
                                'formattedTimeEnd' => '09:15',
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
]
```

### `getAppointmentStatus(string $appointmentUid): array`

[](#getappointmentstatusstring-appointmentuid-array)

```
[
    'statusId' => '6',
    'statusTitle' => 'Резерв времени',
]
```

### `sendReserve(ReserveRequest $request): array`

[](#sendreservereserverequest-request-array)

```
[
    'uid' => '432a40a2-2ea3-11f1-9bf7-8fedb1ae9f50',
]
```

### `sendWaitList(WaitListRequest $request): array`

[](#sendwaitlistwaitlistrequest-request-array)

```
[
    'uid' => '432a40ab-2ea3-11f1-9bf7-8fedb1ae9f50',
]
```

### `sendAppointment(BookAppointmentRequest $request): array`

[](#sendappointmentbookappointmentrequest-request-array)

```
[
    'success' => true,
]
```

### `deleteAppointment(string $appointmentUid): array`

[](#deleteappointmentstring-appointmentuid-array)

```
[
    'success' => true,
]
```

Error handling
--------------

[](#error-handling)

```
use ANZ\BitUmc\SDK\Domain\Exception\BitUmcException;

try {
    $clinics = $client->getClinics();
} catch (BitUmcException $e) {
    echo $e->getMessage();
}
```

Tests
-----

[](#tests)

### What is covered

[](#what-is-covered)

Current test suite covers these cases.

Unit and fixture-based tests:

- endpoint resolution
- request mapping for schedule, appointment status and appointment creation
- parsing of clinics
- parsing of employees and employee services
- parsing of nomenclature
- parsing of schedule
- parsing of common result payloads
- parsing of appointment status payloads
- SOAP response handling for:
    - `Ok`
    - `Error`
    - plain text error responses
    - XML responses with `ОписаниеОшибки`

Live integration tests:

- `getClinics()`
- `getEmployees()`
- search for `Центральная клиника`
- search for doctor `Барбышева`
- `getNomenclature()` for the central clinic with lookup of `Первичная консультация офтальмолога`
- `sendReserve()` -&gt; `getAppointmentStatus()` -&gt; `deleteAppointment()`
- `sendWaitList()`
- `sendAppointment()`
- negative transport cases:
    - wrong base name
    - wrong web-service name

### How unit tests work

[](#how-unit-tests-work)

Unit tests do not connect to 1C. They work on local fixtures from `tests/Fixtures/soap`. These fixtures are raw XML or raw text responses captured from a real 1C test instance.

This means:

- unit tests are deterministic and fast
- parser behaviour is checked against real responses, not synthetic examples
- you do not need any runtime credentials to run unit tests

Run unit tests:

```
vendor/bin/phpunit --testsuite unit
```

### How to refresh fixtures from a real 1C instance

[](#how-to-refresh-fixtures-from-a-real-1c-instance)

Fixture capture script:

- [CaptureSoapFixtures.php](tests/Tools/CaptureSoapFixtures.php)

Before running it, set environment variables:

- `BIT_UMC_TEST_PROTOCOL` = `HTTP` or `HTTPS`
- `BIT_UMC_TEST_HOST`
- `BIT_UMC_TEST_BASE_NAME`
- `BIT_UMC_TEST_LOGIN`
- `BIT_UMC_TEST_PASSWORD`

Example PowerShell:

```
$env:BIT_UMC_TEST_PROTOCOL='HTTP'
$env:BIT_UMC_TEST_HOST='example.com'
$env:BIT_UMC_TEST_BASE_NAME='umc'
$env:BIT_UMC_TEST_LOGIN='login'
$env:BIT_UMC_TEST_PASSWORD='password'
php tests/Tools/CaptureSoapFixtures.php
```

### How to run integration tests against a real 1C instance

[](#how-to-run-integration-tests-against-a-real-1c-instance)

Integration tests use live network calls and require env variables.

Supported env variables:

- `BIT_UMC_RUN_INTEGRATION_TESTS=1`
- `BIT_UMC_TEST_PROTOCOL=HTTP` or `HTTPS`
- `BIT_UMC_TEST_HOST`
- `BIT_UMC_TEST_BASE_NAME`
- `BIT_UMC_TEST_LOGIN`
- `BIT_UMC_TEST_PASSWORD`

Example PowerShell:

```
$env:BIT_UMC_RUN_INTEGRATION_TESTS='1'
$env:BIT_UMC_TEST_PROTOCOL='HTTP'
$env:BIT_UMC_TEST_HOST='example.com'
$env:BIT_UMC_TEST_BASE_NAME='umc'
$env:BIT_UMC_TEST_LOGIN='login'
$env:BIT_UMC_TEST_PASSWORD='password'
vendor/bin/phpunit --testsuite integration
```

Important:

- integration tests assume that the target test base contains data similar to the fixtures used when they were written
- they are currently oriented on clinic `Центральная клиника`, doctor `Барбышева` and service `Первичная консультация офтальмолога`
- on another base those exact entities may not exist, so tests that check for them may fail even if transport and parsing work correctly
- generic transport-negative tests can still be reused on any base

Transport notes
---------------

[](#transport-notes)

`ConnectionOptions` already reserves the `apiKey` field for the future HTTP transport. SOAP ignores this field.

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~125 days

Recently: every ~78 days

Total

11

Last Release

2d ago

Major Versions

v0.1.0 → v1.0.02023-12-01

v1.0.6 → v2.0.02026-04-02

PHP version history (2 changes)v0.1.0PHP &gt;=7.4

v1.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7981080f0b3a9ebb8daa0ebb1062595d3481db24f8a1f3fdc277acd35c2df256?d=identicon)[alex-nzr](/maintainers/alex-nzr)

---

Top Contributors

[![alex-nzr](https://avatars.githubusercontent.com/u/53831251?v=4)](https://github.com/alex-nzr "alex-nzr (3 commits)")

---

Tags

phpapisoapBit-Umc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alex-nzr-bit-umc-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/alex-nzr-bit-umc-sdk/health.svg)](https://phpackages.com/packages/alex-nzr-bit-umc-sdk)
```

###  Alternatives

[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M159](/packages/algolia-algoliasearch-client-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k409.0k6](/packages/theodo-group-llphant)[deeplcom/deepl-php

Official DeepL API Client Library

2607.3M114](/packages/deeplcom-deepl-php)[api-platform/metadata

API Resource-oriented metadata attributes and factories

275.0M219](/packages/api-platform-metadata)[comgate/sdk

Comgate PHP SDK

13373.6k](/packages/comgate-sdk)[wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

4262.9k](/packages/wtfzdotnet-php-tmdb-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
