PHPackages                             tcgunel/omniship-horoz - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. tcgunel/omniship-horoz

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tcgunel/omniship-horoz
======================

Horoz Lojistik carrier for Omniship shipping library

v0.0.2(2mo ago)03↓100%MITPHPPHP ^8.2

Since Mar 12Pushed 2mo agoCompare

[ Source](https://github.com/tcgunel/omniship-horoz)[ Packagist](https://packagist.org/packages/tcgunel/omniship-horoz)[ RSS](/packages/tcgunel-omniship-horoz/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

Omniship Horoz Lojistik
=======================

[](#omniship-horoz-lojistik)

Horoz Lojistik carrier driver for the [Omniship](https://github.com/tcgunel/omniship) shipping library.

Uses the Horoz B2B REST API with process key authentication.

Installation
------------

[](#installation)

```
composer require tcgunel/omniship-horoz
```

Usage
-----

[](#usage)

### Initialize

[](#initialize)

```
use Omniship\Omniship;

$carrier = Omniship::create('Horoz');
$carrier->initialize([
    'processKey' => 'your-process-key',
    'senderCode' => 12345,
    'testMode' => true, // false for production
]);
```

### Create Shipment

[](#create-shipment)

Horoz uses a **two-step** shipment creation flow:

1. `createShipment()` — registers the shipment
2. `createBarcode()` — generates tracking number, barcode, and ZPL label

> **Note:** All string values are automatically uppercased per Horoz API requirements.

```
use Omniship\Common\Address;
use Omniship\Common\Package;
use Omniship\Common\Enum\PaymentType;

// Step 1: Create the shipment
$response = $carrier->createShipment([
    'shipFrom' => new Address(
        name: 'Ahmet Yilmaz',
        street1: 'Ataturk Cad. No:42',
        city: 'Istanbul',
        district: 'Kadikoy',
        postalCode: '34710',
        country: 'TR',
        phone: '05551234567',
    ),
    'shipTo' => new Address(
        name: 'Mehmet Demir',
        street1: 'Kizilirmak Cad. No:5',
        city: 'Ankara',
        district: 'Cankaya',
        postalCode: '06420',
        country: 'TR',
        phone: '05559876543',
    ),
    'packages' => [
        new Package(weight: 2.5, length: 30, width: 20, height: 15),
    ],
    'reference' => 'ORDER-001',
    'paymentType' => PaymentType::SENDER,
])->send();

if ($response->isSuccessful()) {
    $requestNumber = $response->getShipmentId(); // Horoz request number

    // Step 2: Create barcode to get tracking number and label
    $barcodeResponse = $carrier->createBarcode([
        'requestNumber' => $requestNumber,
        'partNumber' => 1,
        'quantity' => 1,
        'desi' => 3.0,
        'weightInKg' => 2.5,
    ])->send();

    if ($barcodeResponse->isSuccessful()) {
        echo $barcodeResponse->getTrackingNumber(); // tracking number
        echo $barcodeResponse->getBarcode();         // barcode string

        $label = $barcodeResponse->getLabel();       // ZPL label
        if ($label !== null) {
            echo $label->format->value; // "ZPL"
        }
    }
}
```

### Cancel Shipment

[](#cancel-shipment)

```
$response = $carrier->cancelShipment([
    'requestNumber' => 'REQ-001',
])->send();

if ($response->isCancelled()) {
    echo 'Shipment cancelled';
}
```

API Details
-----------

[](#api-details)

- **Transport**: REST/JSON via PSR-18 HTTP client
- **Auth**: `processKey` header
- **Base URL**: `http://b2b.horoz.com.tr:7800/horozshipping/v1` (prod)
- **Test URL**: `http://b2b.horoz.com.tr:7800/horozshipping_test/v1`
- **Create Shipment**: `POST /createShipping`
- **Create Barcode**: `POST /createBarcode`
- **Cancel**: `POST /cancelShipping`

> **Note:** Horoz does not provide a tracking query endpoint. Tracking information is returned in the `createBarcode` response.

Testing
-------

[](#testing)

```
vendor/bin/pest
```

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance88

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~0 days

Total

2

Last Release

61d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/36dffe883e88aeef07c26067af3d6a7eda1c2a81f1ae45fdd430b721665131da?d=identicon)[Mobius Studio](/maintainers/Mobius%20Studio)

---

Top Contributors

[![tcgunel](https://avatars.githubusercontent.com/u/3923425?v=4)](https://github.com/tcgunel "tcgunel (2 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tcgunel-omniship-horoz/health.svg)

```
[![Health](https://phpackages.com/badges/tcgunel-omniship-horoz/health.svg)](https://phpackages.com/packages/tcgunel-omniship-horoz)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48247.0M384](/packages/php-http-curl-client)

PHPackages © 2026

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