PHPackages                             tcgunel/omniship-yurtici - 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. tcgunel/omniship-yurtici

ActiveLibrary

tcgunel/omniship-yurtici
========================

Yurtiçi Kargo carrier for Omniship

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

Since Mar 12Pushed 2mo agoCompare

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

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

Omniship Yurtiçi Kargo
======================

[](#omniship-yurtiçi-kargo)

Yurtiçi Kargo carrier driver for [Omniship](https://github.com/tcgunel/omniship-common).

Uses the **Giden Kargo** (outbound) SOAP API via `ShippingOrderDispatcherServices` WSDL.

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

[](#installation)

```
composer require tcgunel/omniship-yurtici
```

Quick Start
-----------

[](#quick-start)

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

$carrier = Omniship::create('Yurtici');
$carrier->initialize([
    'username' => 'YKTEST',     // Test credentials
    'password' => 'YK',
    'userLanguage' => 'TR',     // TR or EN
    'testMode' => true,
]);
```

Operations
----------

[](#operations)

### Create Shipment

[](#create-shipment)

```
$response = $carrier->createShipment([
    'cargoKey' => 'ORDER-001',
    'invoiceKey' => 'INV-001',
    'shipTo' => new Address(
        name: 'Mehmet Demir',
        street1: 'Kızılay Mah. 123. Sok. No:5',
        city: 'Ankara',
        district: 'Çankaya',
        postalCode: '06420',
        country: 'TR',
        phone: '05559876543',
        email: 'mehmet@example.com',
        taxId: '1234567890',
    ),
    'packages' => [
        new Package(weight: 2.5, desi: 3),
    ],
    'description' => 'Elektronik ürün',
    'specialField1' => 'Özel alan 1',
])->send();

if ($response->isSuccessful()) {
    echo $response->getShipmentId();     // jobId
    echo $response->getTrackingNumber(); // cargoKey
}
```

### Cash on Delivery (Kapıda Ödeme)

[](#cash-on-delivery-kapıda-ödeme)

```
$response = $carrier->createShipment([
    'cargoKey' => 'COD-001',
    'invoiceKey' => 'INV-COD',
    'cashOnDelivery' => true,
    'codAmount' => 150.50,
    'codCollectionType' => 0,         // Collection type
    'codDocumentId' => 'DOC-001',     // Optional: document reference
    'codDocumentSaveType' => '1',     // Optional: save type
    'shipTo' => new Address(/* ... */),
    'packages' => [new Package(weight: 1.0)],
])->send();
```

### Track Shipment

[](#track-shipment)

```
$response = $carrier->getTrackingStatus([
    'trackingNumber' => '330012345678',
    'keyType' => 0,                // 0 = cargoKey (default)
    'addHistoricalData' => true,   // Include movement history (default: true)
    'onlyTracking' => false,       // Tracking data only (default: false)
])->send();

if ($response->isSuccessful()) {
    $info = $response->getTrackingInfo();
    echo $info->trackingNumber;     // docId (YK tracking number)
    echo $info->status->name;       // DELIVERED, IN_TRANSIT, etc.

    foreach ($info->events as $event) {
        echo $event->occurredAt->format('Y-m-d H:i');
        echo $event->description;   // "Teslim edildi"
        echo $event->location;      // "Ankara Çankaya Şube"
        echo $event->status->name;  // DELIVERED
    }
}
```

### Cancel Shipment

[](#cancel-shipment)

```
$response = $carrier->cancelShipment([
    'cargoKeys' => 'ORDER-001',
    // or use 'trackingNumber' as fallback
])->send();

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

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

[](#api-details)

### WSDL Endpoints

[](#wsdl-endpoints)

EnvironmentURLTest`http://testwebservices.yurticikargo.com:9090/KOPSWebServices/ShippingOrderDispatcherServices?wsdl`Production`https://ws.yurticikargo.com/KOPSWebServices/ShippingOrderDispatcherServices?wsdl`### Test Credentials

[](#test-credentials)

FieldValueUsername`YKTEST`Password`YK`### SOAP Methods

[](#soap-methods)

MethodDescription`createShipment`Create one or more shipments (ShippingOrderVO)`queryShipment`Track shipment status (ShippingDeliveryVO)`cancelShipment`Cancel shipment(s)### Tracking Status Codes (operationCode)

[](#tracking-status-codes-operationcode)

CodeStatusDescription0PRE\_TRANSITKayıt alındı / Henüz işlem yapılmadı1PICKED\_UPKabul edildi2IN\_TRANSITAktarmada / Şubede3CANCELLEDİptal edildi4OUT\_FOR\_DELIVERYDağıtımda5DELIVEREDTeslim edildi6RETURNEDİade edildi### Response Format

[](#response-format)

All responses include:

- `outFlag`: `0` = at least one success, `1` = all errors, `2` = unexpected error
- `outResult`: Human-readable result message
- Detail VO with per-shipment `operationCode` and `operationMessage`

### ShippingOrderVO Fields

[](#shippingordervo-fields)

Required: `cargoKey`, `invoiceKey`, `receiverCustName`, `receiverAddress`, `receiverPhone1`, `cityName`, `townName`

Optional: `emailAddress`, `taxNumber`, `taxOfficeId`, `taxOfficeName`, `desi`, `kg`, `cargoCount`, `specialField1/2/3`, `description`, `custProdId`, `waybillNo`

COD: `ttInvoiceAmount`, `ttCollectionType`, `ttDocumentId`, `ttDocumentSaveType`

Notes
-----

[](#notes)

- Yurtiçi has two APIs: **Giden Kargo** (outbound, this package) and **Öder Modeli** (inbound/NgiShipment, not implemented)
- The `queryShipment` method uses `wsLanguage` parameter (not `userLanguage`)
- Barcode/tracking number (`docId`) is only available after `queryShipment`, not at creation time
- Batch operations are supported: pass multiple ShippingOrderVO items

Testing
-------

[](#testing)

```
vendor/bin/pest
```

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 79% 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 ~1 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 (5 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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