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(3mo ago)03MITPHPPHP ^8.2

Since Mar 12Pushed 3mo 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 3w 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

33

—

LowBetter than 72% of packages

Maintenance80

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

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

107d 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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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