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

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

tcgunel/omniship-hepsijet
=========================

HepsiJet carrier for Omniship shipping library

v0.0.2(1w ago)03↓100%MITPHPPHP ^8.2

Since Mar 12Pushed 1w agoCompare

[ Source](https://github.com/tcgunel/omniship-hepsijet)[ Packagist](https://packagist.org/packages/tcgunel/omniship-hepsijet)[ RSS](/packages/tcgunel-omniship-hepsijet/feed)WikiDiscussions main Synced today

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

Omniship HepsiJet
=================

[](#omniship-hepsijet)

HepsiJet (Hepsiburada Logistics) carrier driver for [Omniship](https://github.com/tcgunel/omniship-common).

Uses HepsiJet's REST/JSON API with token-based authentication.

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

[](#installation)

```
composer require tcgunel/omniship-hepsijet
```

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

[](#quick-start)

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

$carrier = Omniship::create('HepsiJet');
$carrier->initialize([
    'username' => 'your-username',
    'password' => 'your-password',
    'companyName' => 'YourCompany',
    'abbreviationCode' => 'YRCMPNY',
    'companyAddressId' => 'ADDR-001',
    'currentXDockCode' => 'XD_CENTER',
    'testMode' => true,
]);
```

Configuration Parameters
------------------------

[](#configuration-parameters)

ParameterDescriptionRequired`username`HepsiJet API usernameYes`password`HepsiJet API passwordYes`companyName`Company name (provided by HepsiJet during onboarding)Yes`abbreviationCode`Company abbreviation code (provided by HepsiJet)Yes`companyAddressId`Sender address ID (provided by HepsiJet)Yes`currentXDockCode`Cross-dock/sorting center code (provided by HepsiJet)Yes`testMode`Use sandbox environmentNo (default: false)Operations
----------

[](#operations)

### Create Shipment

[](#create-shipment)

HepsiJet requires the caller to provide a unique barcode/tracking number (`customerDeliveryNo`). This must be 9-16 characters, prefixed with your company abbreviation code.

```
$response = $carrier->createShipment([
    'customerDeliveryNo' => 'YRCMPNY123456789',
    'shipFrom' => new Address(
        name: 'Ahmet Yılmaz',
        street1: 'Atatürk Cad. No:42',
        city: 'İstanbul',
        district: 'Kadıköy',
    ),
    'shipTo' => new Address(
        name: 'Mehmet Demir',
        street1: 'Kızılay Mah. 123. Sok. No:5',
        city: 'Ankara',
        district: 'Çankaya',
        postalCode: '06420',
        phone: '05559876543',
        email: 'mehmet@example.com',
    ),
    'packages' => [
        new Package(
            weight: 2.5,
            length: 30,
            width: 20,
            height: 15,
            description: 'Elektronik ürün',
        ),
    ],
    'deliveryType' => 'RETAIL',   // RETAIL, MARKET_PLACE, EXPRESS, RETURNED
    'productCode' => 'HX_STD',   // HX_STD, HX_SD, HX_ND, HX_EX
])->send();

if ($response->isSuccessful()) {
    echo $response->getTrackingNumber();  // "YRCMPNY123456789"
    echo $response->getBarcode();         // Same as tracking number
    echo $response->getShipmentId();      // Same as tracking number
}
```

### Track Shipment

[](#track-shipment)

```
$response = $carrier->getTrackingStatus([
    'trackingNumber' => 'YRCMPNY123456789',
])->send();

if ($response->isSuccessful()) {
    $info = $response->getTrackingInfo();
    echo $info->status->name;         // "DELIVERED"
    echo $info->trackingNumber;       // "YRCMPNY123456789"
    echo $info->signedBy;             // "Mehmet Demir" (if delivered)

    foreach ($info->events as $event) {
        echo $event->description;     // "ACCEPTED", "OUT_FOR_DELIVERY", etc.
        echo $event->occurredAt->format('Y-m-d H:i');
        echo $event->location;        // "Istanbul", "Ankara", etc.
    }
}
```

### Cancel Shipment

[](#cancel-shipment)

Cancels a shipment before it has been picked up by HepsiJet.

```
$response = $carrier->cancelShipment([
    'trackingNumber' => 'YRCMPNY123456789',
    'deleteReason' => 'IPTAL',       // Optional, defaults to "IPTAL"
])->send();

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

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

[](#api-details)

### Endpoints

[](#endpoints)

EnvironmentURLTest`https://integration-apitest.hepsijet.com`Production`https://integration.hepsijet.com`### Authentication

[](#authentication)

Two-step token authentication:

1. `GET /auth/getToken` with HTTP Basic Auth (`username:password`)
2. All subsequent requests use `X-Auth-Token: {token}` header

Token expires after 60 minutes.

### Key Features

[](#key-features)

- **REST/JSON API**: Modern JSON-based API
- **Caller-provided barcode**: You generate the tracking number (`customerDeliveryNo`), 9-16 chars, prefixed with abbreviation code
- **Nested address format**: `city.name`, `town.name`, `district.name` structure
- **Delivery types**: RETAIL, MARKET\_PLACE, EXPRESS, RETURNED
- **Product codes**: HX\_STD (Standard), HX\_SD (Same Day), HX\_ND (Next Day), HX\_EX (Express)
- **Delivery slots**: 0=Off, 1=Morning(09-13), 2=Noon(13-18), 3=Evening(18-23)
- **Separate label endpoint**: Labels are not returned in the create response; use `/delivery/barcodes-label` separately

### API Methods

[](#api-methods)

OperationMethodEndpointCreate ShipmentPOST`/rest/delivery/sendDeliveryOrderEnhanced`Track ShipmentPOST`/rest/delivery/integration/track`Cancel ShipmentPOST`/rest/delivery/deleteDeliveryOrder/{barcode}`Get LabelPOST`/delivery/barcodes-label?format=PDF`### Status Mapping

[](#status-mapping)

HepsiJet StatusShipmentStatusNEOPRE\_TRANSITACCEPTEDPICKED\_UPOUT\_FOR\_DELIVERYOUT\_FOR\_DELIVERYDELIVEREDDELIVEREDFAILED\_ATTEMPTFAILURERETURNEDRETURNEDCANCELLEDCANCELLEDDELETEDCANCELLED### Response Format

[](#response-format)

All responses follow the envelope:

```
{
    "status": "OK",
    "data": { ... },
    "message": null
}
```

Testing
-------

[](#testing)

```
vendor/bin/pest
```

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 86% of packages

Maintenance98

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

10d 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-hepsijet/health.svg)

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

###  Alternatives

[symfony/routing

Maps an HTTP request to a set of configuration variables

7.6k775.6M1.6k](/packages/symfony-routing)[friendsofsymfony/rest-bundle

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

2.8k72.4M291](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

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

1.3k302.1M1.1k](/packages/php-http-discovery)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k62.5M217](/packages/nelmio-api-doc-bundle)[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k47.0M207](/packages/api-platform-core)[react/http

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

78125.8M380](/packages/react-http)

PHPackages © 2026

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