PHPackages                             always-open/shipengine - 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. always-open/shipengine

ActiveLibrary[API Development](/categories/api)

always-open/shipengine
======================

Wrapper around ShipEngine API

v3.2.1(2y ago)34.4k2MITPHPPHP ^8.0.0|^8.1.0CI failing

Since Dec 29Pushed 2y ago5 watchersCompare

[ Source](https://github.com/always-open/ShipEngine)[ Packagist](https://packagist.org/packages/always-open/shipengine)[ Docs](https://github.com/always-open/shipengine)[ RSS](/packages/always-open-shipengine/feed)WikiDiscussions 3.x Synced yesterday

READMEChangelog (10)Dependencies (19)Versions (37)Used By (0)

ShipEngine
==========

[](#shipengine)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d6e46cf70464eb0b1809c2b43ad286ba67226c8c987d9c241233231cbb00dd9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616c776179732d6f70656e2f73686970656e67696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/always-open/shipengine)[![GitHub Tests Action Status](https://camo.githubusercontent.com/0a7dfdb9f7dea8b3af313432011cd8127eb833ac87e48a9a2d37500771e3dded/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f616c776179732d6f70656e2f73686970656e67696e652f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/always-open/shipengine/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/46091b773162d13dd7ae089da0daed8162ccd4164acba13461621008b9b9fa3c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f616c776179732d6f70656e2f73686970656e67696e652f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/always-open/shipengine/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a6a3b9c64091cc9f707c140bb225f4d214968725ed86c0e95cf8b9bce53cbb6e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616c776179732d6f70656e2f73686970656e67696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/always-open/shipengine)[![](https://camo.githubusercontent.com/d20a5def87ecfff6bc445bb85fd4f5e4e59df0d5ae24dff3c38e9dbf0172212c/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36383137616430363938306335326138333433642f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/always-open/ShipEngine/maintainability)

Wrapper around ShipEngine API

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

[](#installation)

You can install the package via composer:

```
composer require always-open/shipengine
```

You can publish the config file with:

```
php artisan vendor:publish --tag="shipengine-config"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | ShipEngine configurations
    |--------------------------------------------------------------------------
    |
    | API Key used to authenticate with ShipEngine APIs.
    | https://www.shipengine.com/docs/auth/
    |
    */
    'credentials' => [
        'key' => env('SHIP_ENGINE_API_KEY'),
    ],

    /*
    |--------------------------------------------------------------------------
    | ShipEngine configurations
    |--------------------------------------------------------------------------
    |
    | Values used to set configuration of ShipEngine API integration.
    |
    */
    'endpoint' => [
        'version'  => env('SHIP_ENGINE_API_VERSION', 'v1'),
        'base'     => env('SHIP_ENGINE_ENDPOINT', 'https://api.shipengine.com/'),
    ],
    'retries'  => env('SHIP_ENGINE_RETRIES', 1),
    'response' => [
        'as_object' => env('SHIP_ENGINE_RESPONSE_AS_OBJECT', false),
        'page_size' => env('SHIP_ENGINE_RESPONSE_PAGE_SIZE', 50),
    ],
    'timeout' => 'PT10S',
];
```

Usage
-----

[](#usage)

### Config

[](#config)

To use the ShipEngine wrapper you must first instantiate a new instance.

By default, the config information is read out of the config file but can be overridden on the fly. This can be done when instantiating a new instance, which will impact all subsequent calls, or when making the call.

```
// Use default config settings from `config/shipengine.php`
$shipengine = new AlwaysOpen\ShipEngine\ShipEngine();
// Override config which will impact all calls made with this instance
$config = new \AlwaysOpen\ShipEngine\ShipEngineConfig(['asObject' => true]);
$custom_shipengine = new AlwaysOpen\ShipEngine\ShipEngine($config);
// Override config on a single specific call
$shipengine->listShipments(config: ['asObject' => true]);
```

### Making calls

[](#making-calls)

To make calls to the ShipEngine API you must have credentials setup within ShipEngine itself. Those API credentials will then be used by this library to handle the calls and responses.

***NOTE:*** This library is still in the 0.x.x stages and not all endpoints are fully mapped. We are working towards 100% coverage of existing API endpoints.

Method names should match documentation names of API endpoints from official [ShipEngine API Docs](https://shipengine.github.io/shipengine-openapi/).

#### Example calls

[](#example-calls)

Here is a sample of how to get a listing of shipments as well as the difference between `asObject => false` and `asObject => true`.

```
$shipengine = new AlwaysOpen\ShipEngine\ShipEngine();
$shipengine->listShipments();
//[
//    "shipments" => [
//        [
//            "shipment_id" => "se-123456789",
//            "carrier_id" => "se-123456",
//            ...
//        ],
//        [...],
//    ],
//    "total" => 12,
//    "page" => 1,
//    "pages" => 1,
//    "links" => [
//        "first" => [
//             "href" => "https://api.shipengine.com/v1/shipments?page=1&page_size=25",
//        ],
//        "last" => [
//             "href" => "https://api.shipengine.com/v1/shipments?page=1&page_size=25",
//        ],
//        "prev" => [],
//        "next" => [],
//     ],
//];
$shipengine->listShipments(config: ['asObject' => true]);
// [
//     "shipments" => [
//       AlwaysOpen\ShipEngine\DTO\Shipment {#4070
//           +shipment_id: "se-123456789",
//           +carrier_id: "se-123456",
//            ...
//        ],
//        [...],
//    ],
//    "total" => 12,
//    "page" => 1,
//    "pages" => 1,
//    "links" => [
//        "first" => [
//             "href" => "https://api.shipengine.com/v1/shipments?page=1&page_size=25",
//        ],
//        "last" => [
//             "href" => "https://api.shipengine.com/v1/shipments?page=1&page_size=25",
//        ],
//        "prev" => [],
//        "next" => [],
//     ],
//];
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [AlwaysOpen](https://github.com/AlwaysOpen)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~23 days

Recently: every ~139 days

Total

34

Last Release

866d ago

Major Versions

v0.9.0 → 1.x-dev2022-05-10

v0.9.1 → v2.0.12022-05-10

v2.3.0 → v3.0.02022-08-02

PHP version history (2 changes)v0.1.0PHP ^8.0|^8.1

v2.0.0PHP ^8.0.0|^8.1.0

### Community

Maintainers

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

---

Top Contributors

[![qschmick](https://avatars.githubusercontent.com/u/5342767?v=4)](https://github.com/qschmick "qschmick (8 commits)")[![solflare](https://avatars.githubusercontent.com/u/8484449?v=4)](https://github.com/solflare "solflare (5 commits)")[![chieft3ch](https://avatars.githubusercontent.com/u/38211102?v=4)](https://github.com/chieft3ch "chieft3ch (1 commits)")

---

Tags

hacktoberfestlaravelphpshipenginelaravelalways-openshipengineAlwaysOpen

###  Code Quality

TestsPest

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/always-open-shipengine/health.svg)

```
[![Health](https://phpackages.com/badges/always-open-shipengine/health.svg)](https://phpackages.com/packages/always-open-shipengine)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k91](/packages/nativephp-mobile)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)

PHPackages © 2026

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