PHPackages                             zeeshanali/laravel-shipstation - 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. zeeshanali/laravel-shipstation

ActiveLibrary[API Development](/categories/api)

zeeshanali/laravel-shipstation
==============================

ShipStation API package Laravel 10.

0108PHP

Since May 8Pushed 2y agoCompare

[ Source](https://github.com/Zeeshansaaab/laravel-shipstation)[ Packagist](https://packagist.org/packages/zeeshanali/laravel-shipstation)[ RSS](/packages/zeeshanali-laravel-shipstation/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

LaravelShipStation
==================

[](#laravelshipstation)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b455521a99482326258c60f0247473e163a3db367980cfac0ba5f4dc0c0e5c5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63616d706f2f6c61726176656c2d7368697073746174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/campo/laravel-shipstation)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Latest Version on Packagist](https://camo.githubusercontent.com/a0100e6aaa8100ed66d5e7f0e0f24657a0f0839b89639fc4806b7fc66796616b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63616d706f2f6c61726176656c2d7368697073746174696f6e2e737667)](https://packagist.org/packages/campo/laravel-shipstation)[![Build Status](https://camo.githubusercontent.com/094fdd391b42746ae8bd48bf40fa0143f5457b04f13b9a1362be4861a337df72/68747470733a2f2f7472617669732d63692e6f72672f6a6f6563616d706f2f6c61726176656c2d7368697073746174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/joecampo/laravel-shipstation)

A simple PHP API wrapper for [ShipStation](http://shipstation.com) built for Laravel 10.\*.

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

[](#installation)

```
composer require zeeshanali/laravel-shipstation
```

Second, add the LaravelShipStation service provider to your providers array located in `config/app.php`

```
Zeeshan\LaravelShipStation\ShipStationServiceProvider::class,
```

After installing via composer you will need to publish the configuration:

```
php artisan vendor:publish --tag=shipstation
```

This will create the configuration file for your API key and API secret key at `config/shipstation.php`. You will need to obtain your API &amp; Secret key from ShipStation: [How can I get access to ShipStation's API?](https://help.shipstation.com/hc/en-us/articles/206638917-How-can-I-get-access-to-ShipStation-s-API-)

Dependencies
------------

[](#dependencies)

LaravelShipStation uses `GuzzleHttp\Guzzle`

Endpoints
---------

[](#endpoints)

Endpoints for the API are accessed via properties (e.g. `$shipStation->orders->get($options)` will make a GET request to `/orders/{$options}`). The default endpoint is /orders/. Valid endpoints include:

- accounts
- carriers
- customers
- fulfillments
- orders
- products
- shipments
- stores
- users
- warehouses
- webhooks

Methods
-------

[](#methods)

### GET

[](#get)

```
$shipStation->{$endpoint}->get($options = [], $endpoint = '');
```

Example of getting an order with the orderId of 1.

```
use rajarizwan2007\LaravelShipStation\ShipStation;

$shipStation = new ShipStation();

// Fetch an order by orderId == 123, orderId is defined by ShipStation
$order = $shipStation->orders->get([], $endpoint = 123); // returns \stdClass

// Fetch an orderId by the orderNumber, which may be user defined
$order = $shipStation->orders->getOrderId('ORD-789'); // returns integer
```

### POST

[](#post)

```
$shipStation->{$endpoint}->post($options = [], $endpoint = '');
```

The second parameter ($endpoint) is for any additional endpoints that need to be added. For example, to create an order the POST request would go to /orders/createorder. "createorder" is the additional endpoint since we specify the root endpoint as a property: `$shipstation->orders->post($options, 'createorders')`

There are models that contain all of the properties available via the API. These models will be converted to arrays when passed to the API.

An example on how to create a new order to be shipped:

```
    use rajarizwan2007\LaravelShipStation\ShipStation;
    $shipStation = new ShipStation();

    $address = new LaravelShipStation\Models\Address();

    $address->name = "Joe Campo";
    $address->street1 = "123 Main St";
    $address->city = "Cleveland";
    $address->state = "OH";
    $address->postalCode = "44127";
    $address->country = "US";
    $address->phone = "2165555555";

    $item = new LaravelShipStation\Models\OrderItem();

    $item->lineItemKey = '1';
    $item->sku = '580123456';
    $item->name = "Awesome sweater.";
    $item->quantity = '1';
    $item->unitPrice  = '29.99';
    $item->warehouseLocation = 'Warehouse A';

    $order = new LaravelShipStation\Models\Order();

    $order->orderNumber = '1';
    $order->orderDate = '2016-05-09';
    $order->orderStatus = 'awaiting_shipment';
    $order->amountPaid = '29.99';
    $order->taxAmount = '0.00';
    $order->shippingAmount = '0.00';
    $order->internalNotes = 'A note about my order.';
    $order->billTo = $address;
    $order->shipTo = $address;
    $order->items[] = $item;

    // This will var_dump the newly created order, and order should be wrapped in an array.
    var_dump($shipStation->orders->post([$order], 'createorder'));
    // or with the helper: $shipStation->orders->create([$order]); would be the same.
```

### DELETE

[](#delete)

```
$shipStation->{$endpoint}->delete($resourceEndPoint);
```

Example of deleting an order by it's order ID:

```
$shipStation->orders->delete($orderId);
```

### UPDATE

[](#update)

```
$shipStation->{$endpoint}->update($query = [], $resourceEndPoint);
```

Simple Wrapper Helpers
----------------------

[](#simple-wrapper-helpers)

Helpers are located in `/src/Helpers` and will be named after the endpoint. Currently there is only a helper for the /orders endpoint and /shipments endpint. I will be adding more; feel free to send a PR with any you use.

Check to see if an order already exists in ShipStation via an Order Number:

```
$orderExists = $shipStation->orders->existsByOrderNumber($orderNumber) // returns bool
```

> Note: When using the orderNumber query parameter ShipStation will return any order that contains the search term. e.g. orderNumber = 1 will return any order that CONTAINS 1 in ascending order and not an exact match to the query. If you have two orders 123, and 1234 in your ShipStation and call $shipStation-&gt;orders-&gt;get(\['orderNumber' =&gt; 123\]); you will return both orders.

Check how many orders are in `awaiting_fulfillment` status:

```
$count = $shipStation->orders->awaitingShipmentCount(); // returns int
```

Create an order in ShipStation:

```
$newOrder = $shipStation->orders->create($order);
```

Get the shipments for a specific order number.

```
$shipments = $shipStation->shipments->forOrderNumber($orderNumber);
```

ShipStation API Rate Limit
--------------------------

[](#shipstation-api-rate-limit)

ShipStation only allows for 40 API calls that resets every 60 seconds (or 1 call every 1.5 seconds). By default, LaravelShipStation will protect against any calls being rate limited by pausing when we are averaging more than 1 call every 1.5 seconds.

Tests
-----

[](#tests)

Tests can be ran using `phpunit`. Please note that tests will create an order, check the order, and delete the order in your production environment. By default, tests are disabled. If you would like to run the tests edit the `phpunit.xml` file to set the environment variable `SHIPSTATION_TESTING` to `true` and set your API Key &amp; Secret Key.

Contribution
------------

[](#contribution)

Pull requests are most certainly welcomed! This is a WIP.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/joecampo/laravel-shipstation/blob/master/LICENSE) for more information.

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 56.4% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9619df15113f1aefef92cca6071ca8720ccecf5255081813937a26fa5db5be47?d=identicon)[Zeeshansaaab](/maintainers/Zeeshansaaab)

---

Top Contributors

[![joecampo](https://avatars.githubusercontent.com/u/3619398?v=4)](https://github.com/joecampo "joecampo (22 commits)")[![rajarizwan2007](https://avatars.githubusercontent.com/u/33256730?v=4)](https://github.com/rajarizwan2007 "rajarizwan2007 (10 commits)")[![danrichards](https://avatars.githubusercontent.com/u/470255?v=4)](https://github.com/danrichards "danrichards (3 commits)")[![hkonnet](https://avatars.githubusercontent.com/u/2987857?v=4)](https://github.com/hkonnet "hkonnet (2 commits)")[![Zeeshansaaab](https://avatars.githubusercontent.com/u/73499389?v=4)](https://github.com/Zeeshansaaab "Zeeshansaaab (2 commits)")

### Embed Badge

![Health badge](/badges/zeeshanali-laravel-shipstation/health.svg)

```
[![Health](https://phpackages.com/badges/zeeshanali-laravel-shipstation/health.svg)](https://phpackages.com/packages/zeeshanali-laravel-shipstation)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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