PHPackages                             mimicak/shipway-php-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. mimicak/shipway-php-sdk

ActiveLibrary[API Development](/categories/api)

mimicak/shipway-php-sdk
=======================

PHP client for Shipway API

v1.0.1(3mo ago)29MITPHP

Since Jan 30Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/MimicAk/shipway-php-sdk)[ Packagist](https://packagist.org/packages/mimicak/shipway-php-sdk)[ RSS](/packages/mimicak-shipway-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (7)Versions (4)Used By (0)

Shipway PHP SDK
===============

[](#shipway-php-sdk)

A clean, structured PHP SDK for interacting with the **Shipway API**, providing support for order management, courier services, rate calculation, tracking, and manifests.

This SDK is designed as a **Composer package**, following PSR-4 autoloading and a clear separation of concerns (Config → Client → Resources → Models).

---

📦 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require mimicak/shipway-php-sdk
```

Or include it manually by adding it to your `composer.json`.

---

🔧 Requirements
--------------

[](#-requirements)

- PHP &gt;= 7.4
- Composer
- cURL enabled

---

🧠 Architecture Overview
-----------------------

[](#-architecture-overview)

The SDK is structured into logical layers:

```
src/
├── Client          # HTTP & response handling
├── Config          # API configuration & endpoints
├── Exceptions      # Domain-specific exceptions
├── Models
│   ├── Request     # Request DTOs
│   ├── Response    # Response DTOs
│   └── Core models (Order, Address, Product, etc.)
├── Resources       # API feature modules
└── Shipway.php     # SDK entry point

```

---

🚀 Quick Start
-------------

[](#-quick-start)

### 1️⃣ Create Configuration

[](#1️⃣-create-configuration)

```
use Shipway\Config\Configuration;

$config = new Configuration([
    'api_key' => 'YOUR_API_KEY',
    'base_url' => 'https://app.shipway.com/api'
]);
```

---

### 2️⃣ Initialize SDK

[](#2️⃣-initialize-sdk)

```
use Shipway\Shipway;

$shipway = new Shipway($config);
```

The `Shipway` class is the **main entry point**. All API interactions go through resource accessors.

---

📦 Resources &amp; Usage
-----------------------

[](#-resources--usage)

### 🧾 Orders

[](#-orders)

```
$orders = $shipway->orders();
```

Supported operations:

- Create order
- Fetch order details
- Fetch order list
- Cancel shipment
- Generate manifest

Example:

```
use Shipway\Models\Request\ShipmentBooking\GetOrdersRequest;

$request = new GetOrdersRequest([
    'from_date' => '2025-01-01',
    'to_date'   => '2025-01-31'
]);

$response = $shipway->orders()->getOrders($request);
```

---

### 🚚 Courier Services

[](#-courier-services)

```
$courier = $shipway->courier();
```

Supported operations:

- Get courier list
- Rate calculation
- Pincode serviceability
- Shipment tracking

Example – Rate Calculation:

```
use Shipway\Models\Request\Carriers\GetCarrierRates;

$request = new GetCarrierRates([
    'pickup_pincode'   => '560001',
    'delivery_pincode' => '110001',
    'weight'           => 1.5,
    'cod'              => true
]);

$response = $shipway->courier()->getRates($request);
```

---

### 🏭 Warehouse

[](#-warehouse)

```
$warehouse = $shipway->warehouse();
```

Handles warehouse-related Shipway APIs such as listing or configuration (based on API availability).

---

📚 Models
--------

[](#-models)

### Core Models

[](#core-models)

- `Order`
- `OrderListItem`
- `Address`
- `Product`
- `ShipmentStatusScan`

### Request Models

[](#request-models)

Located in:

```
src/Models/Request/

```

These classes encapsulate API request payloads and prevent passing raw arrays.

### Response Models

[](#response-models)

Located in:

```
src/Models/Response/

```

These map API responses into typed PHP objects.

---

⚠️ Exception Handling
---------------------

[](#️-exception-handling)

All exceptions extend `Shipway\Exceptions\ShipwayException`.

Possible exceptions include:

- `AuthenticationException`
- `ValidationException`
- `RateLimitException`
- `NetworkException`
- `ConfigurationException`
- `ApiException`
- `WebhookException`

Example:

```
try {
    $shipway->orders()->getOrders($request);
} catch (\Shipway\Exceptions\ShipwayException $e) {
    echo $e->getMessage();
}
```

---

🔐 Configuration Errors
----------------------

[](#-configuration-errors)

If the SDK is misconfigured (missing API key, invalid base URL), a `ConfigurationException` is thrown during initialization or request execution.

---

🧪 Examples
----------

[](#-examples)

The `examples/` directory is reserved for future usage samples and integration demos.

---

🧩 Extensibility
---------------

[](#-extensibility)

- All API modules extend `AbstractResource`
- HTTP logic is centralized in `HttpClient`
- Response parsing is handled by `ResponseHandler`
- Exception mapping is centralized in `ExceptionFactory`

This makes the SDK easy to extend without breaking existing functionality.

---

📄 License
---------

[](#-license)

MIT License.

---

🤝 Contributing
--------------

[](#-contributing)

Pull requests are welcome. Please ensure:

- PSR-12 compliance
- Typed models for requests/responses
- No breaking changes without version bumps

---

📬 Support
---------

[](#-support)

For issues, feature requests, or API changes, open an issue on the repository.

###  Health Score

36

—

LowBetter than 81% of packages

Maintenance87

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity36

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

Total

3

Last Release

94d ago

Major Versions

v0.0.1\_beta → v1.0.02026-02-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/e76cc75e16d745f70565c61b847581a85564b8335a29f6822ebc9472301c906c?d=identicon)[MimicAk](/maintainers/MimicAk)

---

Top Contributors

[![MimicAk](https://avatars.githubusercontent.com/u/91793533?v=4)](https://github.com/MimicAk "MimicAk (12 commits)")

---

Tags

apisdkshippinglogisticsshipway

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mimicak-shipway-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/mimicak-shipway-php-sdk/health.svg)](https://phpackages.com/packages/mimicak-shipway-php-sdk)
```

###  Alternatives

[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M467](/packages/saloonphp-saloon)[theodo-group/llphant

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

1.5k311.5k5](/packages/theodo-group-llphant)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[square/square

Use Square APIs to manage and run business including payment, customer, product, inventory, and employee management.

793.4M20](/packages/square-square)[bushlanov-dev/max-bot-api-client-php

Max Bot API Client library

281.6k](/packages/bushlanov-dev-max-bot-api-client-php)

PHPackages © 2026

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